Changeset 148083 in webkit
- Timestamp:
- Apr 10, 2013 12:39:18 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r148082 r148083 1 2013-04-10 Zan Dobersek <zdobersek@igalia.com> 2 3 REGRESSION (r146518): WebKit2APITests/TestInspector is failing 4 https://bugs.webkit.org/show_bug.cgi?id=113281 5 6 Reviewed by Darin Adler. 7 8 Changes to the WebInspectorProxy opening processing in r146518 caused the change in how the GTK-specific 9 WebInspectorProxy code operates, specifically the 'bring-to-front' signal is not emitted anymore when opening the 10 inspector due to the WebInspectorProxy::bringToFront method now only bringing the inspector window to front if it exists 11 and opening it (and thus unable to bring it to front) otherwise. 12 13 Closing of the inspector through the didClose method is now done immediately after sending the WebInspector::Close() 14 message to the WebProcess rather than waiting for the WebProcess to communicate back the order of closing. Due to this 15 the relevant code in the test cases had to be changed to not run the loop but rather just check that the closing was 16 successful. 17 18 (InspectorTest::InspectorTest): Remove the initialization of the now redundant m_quitOnBringToFront member variable. 19 (InspectorTest::bringToFront): Quit the loop without checking the removed member variable. 20 (InspectorTest::closed): Do not quit the loop as it is not run anymore. 21 (InspectorTest::showIdle): A helper method that asynchronously calls the webkit_web_inspector_show method, removing some 22 unnecessary complexity about under what exact circumstances to quit the loop in open-window/bring-to-front callbacks. 23 (InspectorTest::show): Replaces the showAndWaitUntilFinished method, adding an idle invocation of the showIdle helper 24 method and running the loop. 25 (InspectorTest::close): Formerly closeAndWaitUntilClosed, now does not run the loop anymore as there's no need for it. 26 (testInspectorDefault): Only the window opening event is now expected upon showing the inspector for the first time. 27 Adjusting callsites to use InspectorTest::show and InspectorTest::close instead of 28 InspectorTest::showAndWaitUntilFinished and InspectorTest::showAndWaitUntilFinished. 29 (CustomInspectorTest::destroyWindow): Formerly destroyWindowAndWaitUntilClosed, the closing is not asynchronous anymore 30 so the loop is not run. 31 (testInspectorManualAttachDetach): Only the window opening event is now expected upon showing the inspector for the first time. 32 Adjusting callsites to use InspectorTest::show and InspectorTest::close instead of 33 InspectorTest::showAndWaitUntilFinished and InspectorTest::showAndWaitUntilFinished. 34 (testInspectorCustomContainerDestroyed): Adjusting callsites to use InspectorTest::show and CustomInspectorTest::destroyWindow 35 instead of InspectorTest::showAndWaitUntilFinished and CustomInspectorTest::destroyWindowAndWaitUntilClosed. 36 * UIProcess/WebInspectorProxy.cpp: 37 (WebKit::WebInspectorProxy::show): When showing a connected WebInspectorProxy, call the bringToFront method which will 38 open the inspector if it's not yet visible or bring it to the front otherwise. 39 1 40 2013-04-10 Zan Dobersek <zandobersek@gmail.com> 2 41 -
trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestInspector.cpp
r148082 r148083 66 66 : WebViewTest() 67 67 , m_inspector(webkit_web_view_get_inspector(m_webView)) 68 , m_quitOnBringToFront(false)69 68 { 70 69 webkit_settings_set_enable_developer_extras(webkit_web_view_get_settings(m_webView), TRUE); … … 92 91 { 93 92 m_events.append(BringToFront); 94 if (m_quitOnBringToFront) 95 g_main_loop_quit(m_mainLoop); 93 g_main_loop_quit(m_mainLoop); 96 94 return FALSE; 97 95 } … … 100 98 { 101 99 m_events.append(Closed); 102 g_main_loop_quit(m_mainLoop);103 100 } 104 101 … … 115 112 } 116 113 117 void showAndWaitUntilFinished(bool quitOnBringToFront) 118 { 119 m_quitOnBringToFront = quitOnBringToFront; 120 webkit_web_inspector_show(m_inspector); 114 115 static gboolean showIdle(InspectorTest* test) 116 { 117 webkit_web_inspector_show(test->m_inspector); 118 return FALSE; 119 } 120 121 void show() 122 { 123 g_idle_add(reinterpret_cast<GSourceFunc>(showIdle), this); 121 124 g_main_loop_run(m_mainLoop); 122 m_quitOnBringToFront = false;123 125 } 124 126 … … 142 144 } 143 145 144 void close AndWaitUntilClosed()146 void close() 145 147 { 146 148 webkit_web_inspector_close(m_inspector); 147 g_main_loop_run(m_mainLoop);148 149 } 149 150 150 151 WebKitWebInspector* m_inspector; 151 bool m_quitOnBringToFront;152 152 Vector<InspectorEvents> m_events; 153 153 }; … … 160 160 test->waitUntilLoadFinished(); 161 161 162 test->show AndWaitUntilFinished(false);162 test->show(); 163 163 // We don't add the view to a container, so consume the weak ref with GRefPtr. 164 164 GRefPtr<WebKitWebViewBase> inspectorView = webkit_web_inspector_get_web_view(test->m_inspector); … … 168 168 g_assert_cmpuint(webkit_web_inspector_get_attached_height(test->m_inspector), ==, 0); 169 169 Vector<InspectorTest::InspectorEvents>& events = test->m_events; 170 g_assert_cmpint(events.size(), ==, 2); 171 g_assert_cmpint(events[0], ==, InspectorTest::BringToFront); 172 g_assert_cmpint(events[1], ==, InspectorTest::OpenWindow); 173 test->m_events.clear(); 174 175 test->showAndWaitUntilFinished(true); 170 g_assert_cmpint(events.size(), ==, 1); 171 g_assert_cmpint(events[0], ==, InspectorTest::OpenWindow); 172 test->m_events.clear(); 173 174 test->show(); 176 175 events = test->m_events; 177 176 g_assert_cmpint(events.size(), ==, 1); … … 195 194 test->m_events.clear(); 196 195 197 test->close AndWaitUntilClosed();196 test->close(); 198 197 events = test->m_events; 199 198 g_assert_cmpint(events.size(), ==, 1); … … 274 273 } 275 274 276 void destroyWindow AndWaitUntilClosed()275 void destroyWindow() 277 276 { 278 277 g_assert(m_inspectorWindow); 279 278 gtk_widget_destroy(m_inspectorWindow); 280 279 m_inspectorWindow = 0; 281 g_main_loop_run(m_mainLoop);282 280 } 283 281 … … 292 290 test->waitUntilLoadFinished(); 293 291 294 test->show AndWaitUntilFinished(false);292 test->show(); 295 293 test->assertObjectIsDeletedWhenTestFinishes(G_OBJECT(webkit_web_inspector_get_web_view(test->m_inspector))); 296 294 g_assert(!webkit_web_inspector_is_attached(test->m_inspector)); 297 295 Vector<InspectorTest::InspectorEvents>& events = test->m_events; 298 g_assert_cmpint(events.size(), ==, 2); 299 g_assert_cmpint(events[0], ==, InspectorTest::BringToFront); 300 g_assert_cmpint(events[1], ==, InspectorTest::OpenWindow); 296 g_assert_cmpint(events.size(), ==, 1); 297 g_assert_cmpint(events[0], ==, InspectorTest::OpenWindow); 301 298 test->m_events.clear(); 302 299 … … 320 317 g_assert(webkit_web_inspector_is_attached(test->m_inspector)); 321 318 test->m_events.clear(); 322 test->close AndWaitUntilClosed();319 test->close(); 323 320 events = test->m_events; 324 321 g_assert_cmpint(events.size(), ==, 2); … … 335 332 test->waitUntilLoadFinished(); 336 333 337 test->show AndWaitUntilFinished(false);334 test->show(); 338 335 test->assertObjectIsDeletedWhenTestFinishes(G_OBJECT(webkit_web_inspector_get_web_view(test->m_inspector))); 339 336 g_assert(!webkit_web_inspector_is_attached(test->m_inspector)); 340 337 341 338 test->m_events.clear(); 342 test->destroyWindow AndWaitUntilClosed();339 test->destroyWindow(); 343 340 Vector<InspectorTest::InspectorEvents>& events = test->m_events; 344 341 g_assert_cmpint(events.size(), ==, 1); -
trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp
r147362 r148083 154 154 155 155 if (isConnected()) { 156 open();156 bringToFront(); 157 157 return; 158 158 } -
trunk/Tools/ChangeLog
r148077 r148083 1 2013-04-10 Zan Dobersek <zdobersek@igalia.com> 2 3 REGRESSION (r146518): WebKit2APITests/TestInspector is failing 4 https://bugs.webkit.org/show_bug.cgi?id=113281 5 6 Reviewed by Darin Adler. 7 8 * Scripts/run-gtk-tests: 9 (TestRunner): Remove the skip entry for the WebKit2APITests/TestInspector unit test. 10 1 11 2013-04-09 Glenn Adams <glenn@skynav.com> 2 12 -
trunk/Tools/Scripts/run-gtk-tests
r147559 r148083 68 68 SkippedTest("unittests/testwebview", "/webkit/webview/icon-uri", "Test times out in GTK Linux 64-bit Release bot", 82328), 69 69 SkippedTest("unittests/testatk", "/webkit/atk/getTextInParagraphAndBodyModerate", "Test fails", 105538), 70 SkippedTest("WebKit2APITests/TestInspector", SkippedTest.ENTIRE_SUITE, "Test fails", 113281),71 70 SkippedTest("WebKit2APITests/TestInspectorServer", SkippedTest.ENTIRE_SUITE, "Test times out", 105866), 72 71 SkippedTest("WebKit2APITests/TestResources", "/webkit2/WebKitWebView/resources", "Test is flaky in GTK Linux 32-bit Release bot", 82868),
Note: See TracChangeset
for help on using the changeset viewer.