RESOLVED FIXED 144079
Provide a runtime flag to run-webkit-tests that shows the test view
https://bugs.webkit.org/show_bug.cgi?id=144079
Summary Provide a runtime flag to run-webkit-tests that shows the test view
Brent Fulgham
Reported 2015-04-22 16:26:44 PDT
I find it helpful when debugging tests to be able to see the WebView as the test runs. We should provide a runtime flag so that instead of rendering off screen we can display the view. This should be available for: 1. DumpRenderTree 2. WebKitTestRunner 3. TestWebKitAPI
Attachments
Patch (15.45 KB, patch)
2015-04-30 12:23 PDT, Brent Fulgham
no flags
Patch (11.09 KB, patch)
2015-04-30 15:26 PDT, Brent Fulgham
dino: review+
Brent Fulgham
Comment 1 2015-04-30 12:13:28 PDT
Skipping TestWebKitAPI for now, since it doesn't process its own arguments (it's all driven by the Google test infrastructure.
Brent Fulgham
Comment 2 2015-04-30 12:23:27 PDT
Since this is only needed for debugging while creating tests, we will invoke it via the "--additional-drt-flag" option: --additional-drt-flag="--show-webview"
Brent Fulgham
Comment 3 2015-04-30 12:23:39 PDT
Simon Fraser (smfr)
Comment 4 2015-04-30 14:17:04 PDT
Comment on attachment 252078 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=252078&action=review > Tools/WebKitTestRunner/Options.cpp:115 > + if (option[0] && option[1] && option[0] == '-' && option[1] == '-') > + return true; Why this bit? It's different from how handleOptionRemoteLayerTree works. > Tools/WebKitTestRunner/TestInvocation.cpp:180 > + WKRetainPtr<WKStringRef> shouldShowWebViewKey(AdoptWK, WKStringCreateWithUTF8CString("ShouldShowWebView")); > + WKRetainPtr<WKBooleanRef> shouldShowWebViewValue = adoptWK(WKBooleanCreate(TestController::singleton().shouldShowWebView())); > + WKDictionarySetItem(beginTestMessageBody.get(), shouldShowWebViewKey.get(), shouldShowWebViewValue.get()); I don't get why these have to go to the injected bundle. We create the view in the UI process.
Brent Fulgham
Comment 5 2015-04-30 15:26:45 PDT
Brent Fulgham
Comment 6 2015-04-30 15:28:03 PDT
(In reply to comment #4) > Comment on attachment 252078 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=252078&action=review > > > Tools/WebKitTestRunner/Options.cpp:115 > > + if (option[0] && option[1] && option[0] == '-' && option[1] == '-') > > + return true; > > Why this bit? It's different from how handleOptionRemoteLayerTree works. OK -- I fixed it to be consistent with "--remote-layer-tree". > > Tools/WebKitTestRunner/TestInvocation.cpp:180 > > + WKRetainPtr<WKStringRef> shouldShowWebViewKey(AdoptWK, WKStringCreateWithUTF8CString("ShouldShowWebView")); > > + WKRetainPtr<WKBooleanRef> shouldShowWebViewValue = adoptWK(WKBooleanCreate(TestController::singleton().shouldShowWebView())); > > + WKDictionarySetItem(beginTestMessageBody.get(), shouldShowWebViewKey.get(), shouldShowWebViewValue.get()); > > I don't get why these have to go to the injected bundle. We create the view > in the UI process. I was just blindly following the "timeout" option. We don't need this for the InjectedBundle. I'll remove it.
Brent Fulgham
Comment 7 2015-04-30 16:15:05 PDT
Brent Fulgham
Comment 8 2015-05-01 09:24:46 PDT
Follow-up correction landed in r183765: Committed r183765: <http://trac.webkit.org/changeset/183765>
Note You need to log in before you can comment on or make changes to this bug.