Provide a runtime flag to run-webkit-tests that shows the test view
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 May 2015 16:23:07 +0000 (16:23 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 May 2015 16:23:07 +0000 (16:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=144079.

Unreviewed correction to r183651.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize): Make sure the state of the '--show-webview'
flag is included in the options dictionary passed to the PlatformWebView.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183675 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/WebKitTestRunner/TestController.cpp

index a76d519..97b4e9e 100644 (file)
@@ -1,3 +1,14 @@
+2015-05-01  Brent Fulgham  <bfulgham@apple.com>
+
+        Provide a runtime flag to run-webkit-tests that shows the test view
+        https://bugs.webkit.org/show_bug.cgi?id=144079.
+
+        Unreviewed correction to r183651.
+
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::initialize): Make sure the state of the '--show-webview'
+        flag is included in the options dictionary passed to the PlatformWebView.
+
 2015-05-01  Antti Koivisto  <antti@apple.com>
 
         Remove network process load serialization code
index 04c7bf2..06e67d6 100644 (file)
@@ -439,6 +439,14 @@ void TestController::initialize(int argc, const char* argv[])
         WKDictionarySetItem(viewOptions.get(), useRemoteLayerTreeKey.get(), useRemoteLayerTreeValue.get());
     }
 
+    if (m_shouldShowWebView) {
+        if (!viewOptions)
+            viewOptions = adoptWK(WKMutableDictionaryCreate());
+        WKRetainPtr<WKStringRef> shouldShowWebViewKey = adoptWK(WKStringCreateWithUTF8CString("ShouldShowWebView"));
+        WKRetainPtr<WKBooleanRef> shouldShowWebViewValue = adoptWK(WKBooleanCreate(m_shouldShowWebView));
+        WKDictionarySetItem(viewOptions.get(), shouldShowWebViewKey.get(), shouldShowWebViewValue.get());
+    }
+
     createWebViewWithOptions(viewOptions.get());
 }