summaryrefslogtreecommitdiff
path: root/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp')
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp b/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp
index 58fefea5e..bbdd104c5 100644
--- a/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp
+++ b/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp
@@ -25,7 +25,7 @@
#include "config.h"
#include "WebViewTest.h"
-#include <wtf/gobject/GRefPtr.h>
+#include <wtf/glib/GRefPtr.h>
#include <wtf/text/WTFString.h>
// Name of the test server application creating the webView object.
@@ -237,12 +237,10 @@ static void openRemoteDebuggingSession(InspectorServerTest* test, gconstpointer)
test->loadURI(resolvedURL.utf8().data());
test->waitUntilLoadFinished();
- javascriptResult = test->runJavaScriptAndWaitUntilFinished("window.document.getElementsByTagName('li')[0].title", &error.outPtr());
- g_assert(javascriptResult);
- g_assert(!error.get());
-
- GUniquePtr<char> title(WebViewTest::javascriptResultToCString(javascriptResult));
- g_assert_cmpstr(title.get(), ==, "http://127.0.0.1:2999/");
+ const char* title = webkit_web_view_get_title(test->m_webView);
+ if (!title || !*title)
+ test->waitUntilTitleChanged();
+ g_assert_cmpstr(webkit_web_view_get_title(test->m_webView), ==, "127.0.0.1");
}
static void sendIncompleteRequest(InspectorServerTest* test, gconstpointer)