Skip to content

Commit

Permalink
Merge 155985 - [GTK] Test /webkit2/WebKitWebInspectorServer/test-open…
Browse files Browse the repository at this point in the history
…-debugging-session times out after r155714

https://bugs.webkit.org/show_bug.cgi?id=121383

Reviewed by Carlos Garcia Campos.

* UIProcess/API/gtk/tests/TestInspectorServer.cpp:
(openRemoteDebuggingSession): use the page contents' to check the remote debugging of the page
has been successfuly opened, as the title is no longer the same after the switch to the new
frontend.
  • Loading branch information
kov committed Sep 17, 2013
1 parent a92ec28 commit 90dbe4e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
12 changes: 12 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,15 @@
2013-09-17 Gustavo Noronha Silva <gns@gnome.org>

[GTK] Test /webkit2/WebKitWebInspectorServer/test-open-debugging-session times out after r155714
https://bugs.webkit.org/show_bug.cgi?id=121383

Reviewed by Carlos Garcia Campos.

* UIProcess/API/gtk/tests/TestInspectorServer.cpp:
(openRemoteDebuggingSession): use the page contents' to check the remote debugging of the page
has been successfuly opened, as the title is no longer the same after the switch to the new
frontend.

2013-09-16 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>

Web Inspector: Do not try to parse incomplete HTTP requests
Expand Down
13 changes: 9 additions & 4 deletions Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp
Expand Up @@ -215,8 +215,8 @@ static void testRemoteDebuggingMessage(InspectorServerTest* test, gconstpointer)

static void openRemoteDebuggingSession(InspectorServerTest* test, gconstpointer)
{
// To test the whole pipeline this exploits a behavior of the inspector front-end which won't provide any title unless the
// debugging session was established correctly through web socket. It should be something like "Web Inspector - <Page URL>".
// To test the whole pipeline this exploits a behavior of the inspector front-end which won't provide the page address as title unless the
// debugging session was established correctly through web socket.
// In our case page URL should be http://127.0.0.1:2999/
// So this test case will fail if:
// - The page list didn't return a valid inspector URL
Expand All @@ -235,9 +235,14 @@ static void openRemoteDebuggingSession(InspectorServerTest* test, gconstpointer)

String resolvedURL = String("http://127.0.0.1:2999/") + String::fromUTF8(WebViewTest::javascriptResultToCString(javascriptResult));
test->loadURI(resolvedURL.utf8().data());
test->waitUntilTitleChanged();
test->waitUntilLoadFinished();

javascriptResult = test->runJavaScriptAndWaitUntilFinished("window.document.getElementsByTagName('li')[0].title", &error.outPtr());
g_assert(javascriptResult);
g_assert(!error.get());

g_assert_cmpstr(webkit_web_view_get_title(test->m_webView), ==, "Web Inspector - http://127.0.0.1:2999/");
GOwnPtr<char> title(WebViewTest::javascriptResultToCString(javascriptResult));
g_assert_cmpstr(title.get(), ==, "http://127.0.0.1:2999/");
}

static void sendIncompleteRequest(InspectorServerTest* test, gconstpointer)
Expand Down

0 comments on commit 90dbe4e

Please sign in to comment.