Title: [189530] trunk/Tools
Revision
189530
Author
mmaxfi...@apple.com
Date
2015-09-08 20:27:48 -0700 (Tue, 08 Sep 2015)

Log Message

[WKTR] Allow changing the WKContextConfiguration between successive tests
https://bugs.webkit.org/show_bug.cgi?id=148833

Reviewed by Tim Horton.

Previously, we were creating a single WKContext and it lived for the life of the entire test runner.
However, there are certain tests which require specifying options in this object. This patch makes
our existing code for recreating the test runner web view also recreate the WKContext.

As such, our options to the view are now options to the WKContextConfiguration. This patch renames the
class.

* WebKitTestRunner/ContextConfigurationOptions.h: Renamed from Tools/WebKitTestRunner/ViewOptions.h.
* WebKitTestRunner/PlatformWebView.h:
(WTR::PlatformWebView::options):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):
(WTR::TestController::generateContextConfiguration):
(WTR::TestController::generatePageConfiguration):
(WTR::TestController::createWebViewWithOptions):
(WTR::TestController::ensureViewSupportsOptionsForTest):
(WTR::updateContextConfigurationOptionsFromTestHeader):
(WTR::TestController::contextConfigurationOptionsForTest):
(WTR::TestController::platformCreateWebView):
(WTR::TestController::platformCreateOtherPage):
(WTR::updateViewOptionsFromTestHeader): Deleted.
(WTR::TestController::viewOptionsForTest): Deleted.
* WebKitTestRunner/TestController.h:
(WTR::TestController::injectedBundlePath):
(WTR::TestController::testPluginDirectory):
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::platformCreateWebView):
(WTR::TestController::platformCreateOtherPage):
* WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
(WTR::PlatformWebView::PlatformWebView):
(WTR::PlatformWebView::viewSupportsOptions):
* WebKitTestRunner/efl/TestControllerEfl.cpp:
(WTR::TestController::updatePlatformSpecificContextConfigurationOptionsForTest):
(WTR::TestController::updatePlatformSpecificViewOptionsForTest): Deleted.
* WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
(WTR::PlatformWebView::PlatformWebView):
(WTR::PlatformWebView::viewSupportsOptions):
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::updatePlatformSpecificContextConfigurationOptionsForTest):
(WTR::TestController::updatePlatformSpecificViewOptionsForTest): Deleted.
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::PlatformWebView):
(WTR::PlatformWebView::viewSupportsOptions):
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::updatePlatformSpecificContextConfigurationOptionsForTest):
(WTR::TestController::updatePlatformSpecificViewOptionsForTest): Deleted.
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::PlatformWebView):
(WTR::PlatformWebView::viewSupportsOptions):
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::updatePlatformSpecificContextConfigurationOptionsForTest):
(WTR::TestController::updatePlatformSpecificViewOptionsForTest): Deleted.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Tools/ChangeLog (189529 => 189530)


--- trunk/Tools/ChangeLog	2015-09-09 03:01:39 UTC (rev 189529)
+++ trunk/Tools/ChangeLog	2015-09-09 03:27:48 UTC (rev 189530)
@@ -1,3 +1,64 @@
+2015-09-08  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        [WKTR] Allow changing the WKContextConfiguration between successive tests
+        https://bugs.webkit.org/show_bug.cgi?id=148833
+
+        Reviewed by Tim Horton.
+
+        Previously, we were creating a single WKContext and it lived for the life of the entire test runner.
+        However, there are certain tests which require specifying options in this object. This patch makes
+        our existing code for recreating the test runner web view also recreate the WKContext.
+
+        As such, our options to the view are now options to the WKContextConfiguration. This patch renames the
+        class.
+
+        * WebKitTestRunner/ContextConfigurationOptions.h: Renamed from Tools/WebKitTestRunner/ViewOptions.h.
+        * WebKitTestRunner/PlatformWebView.h:
+        (WTR::PlatformWebView::options):
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::initialize):
+        (WTR::TestController::generateContextConfiguration):
+        (WTR::TestController::generatePageConfiguration):
+        (WTR::TestController::createWebViewWithOptions):
+        (WTR::TestController::ensureViewSupportsOptionsForTest):
+        (WTR::updateContextConfigurationOptionsFromTestHeader):
+        (WTR::TestController::contextConfigurationOptionsForTest):
+        (WTR::TestController::platformCreateWebView):
+        (WTR::TestController::platformCreateOtherPage):
+        (WTR::updateViewOptionsFromTestHeader): Deleted.
+        (WTR::TestController::viewOptionsForTest): Deleted.
+        * WebKitTestRunner/TestController.h:
+        (WTR::TestController::injectedBundlePath):
+        (WTR::TestController::testPluginDirectory):
+        * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
+        * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
+        (WTR::TestController::platformCreateWebView):
+        (WTR::TestController::platformCreateOtherPage):
+        * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+        (WTR::PlatformWebView::PlatformWebView):
+        (WTR::PlatformWebView::viewSupportsOptions):
+        * WebKitTestRunner/efl/TestControllerEfl.cpp:
+        (WTR::TestController::updatePlatformSpecificContextConfigurationOptionsForTest):
+        (WTR::TestController::updatePlatformSpecificViewOptionsForTest): Deleted.
+        * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
+        (WTR::PlatformWebView::PlatformWebView):
+        (WTR::PlatformWebView::viewSupportsOptions):
+        * WebKitTestRunner/gtk/TestControllerGtk.cpp:
+        (WTR::TestController::updatePlatformSpecificContextConfigurationOptionsForTest):
+        (WTR::TestController::updatePlatformSpecificViewOptionsForTest): Deleted.
+        * WebKitTestRunner/ios/PlatformWebViewIOS.mm:
+        (WTR::PlatformWebView::PlatformWebView):
+        (WTR::PlatformWebView::viewSupportsOptions):
+        * WebKitTestRunner/ios/TestControllerIOS.mm:
+        (WTR::TestController::updatePlatformSpecificContextConfigurationOptionsForTest):
+        (WTR::TestController::updatePlatformSpecificViewOptionsForTest): Deleted.
+        * WebKitTestRunner/mac/PlatformWebViewMac.mm:
+        (WTR::PlatformWebView::PlatformWebView):
+        (WTR::PlatformWebView::viewSupportsOptions):
+        * WebKitTestRunner/mac/TestControllerMac.mm:
+        (WTR::TestController::updatePlatformSpecificContextConfigurationOptionsForTest):
+        (WTR::TestController::updatePlatformSpecificViewOptionsForTest): Deleted.
+
 2015-09-08  Daniel Bates  <daba...@apple.com>
 
         [Mac] Expose Enable/Disable Accelerated Drawing in MiniBrowser

Modified: trunk/Tools/WebKitTestRunner/PlatformWebView.h (189529 => 189530)


--- trunk/Tools/WebKitTestRunner/PlatformWebView.h	2015-09-09 03:01:39 UTC (rev 189529)
+++ trunk/Tools/WebKitTestRunner/PlatformWebView.h	2015-09-09 03:27:48 UTC (rev 189530)
@@ -26,7 +26,7 @@
 #ifndef PlatformWebView_h
 #define PlatformWebView_h
 
-#include "ViewOptions.h"
+#include "TestOptions.h"
 #include <WebKit/WKRetainPtr.h>
 
 #if PLATFORM(COCOA)
@@ -57,9 +57,9 @@
 class PlatformWebView {
 public:
 #if PLATFORM(COCOA)
-    PlatformWebView(WKWebViewConfiguration*, const ViewOptions&);
+    PlatformWebView(WKWebViewConfiguration*, const TestOptions&);
 #else
-    PlatformWebView(WKPageConfigurationRef, const ViewOptions&);
+    PlatformWebView(WKPageConfigurationRef, const TestOptions&);
 #endif
     ~PlatformWebView();
 
@@ -80,10 +80,10 @@
     void setWindowIsKey(bool isKey) { m_windowIsKey = isKey; }
     bool windowIsKey() const { return m_windowIsKey; }
 
-    bool viewSupportsOptions(const ViewOptions&) const;
+    bool viewSupportsOptions(const TestOptions&) const;
 
     WKRetainPtr<WKImageRef> windowSnapshotImage();
-    const ViewOptions& options() const { return m_options; }
+    const TestOptions& options() const { return m_options; }
 
     void changeWindowScaleIfNeeded(float newScale);
     void setNavigationGesturesEnabled(bool);
@@ -98,7 +98,7 @@
     PlatformWKView m_view;
     PlatformWindow m_window;
     bool m_windowIsKey;
-    const ViewOptions m_options;
+    const TestOptions m_options;
 
 #if PLATFORM(EFL)
     bool m_usingFixedLayout;

Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (189529 => 189530)


--- trunk/Tools/WebKitTestRunner/TestController.cpp	2015-09-09 03:01:39 UTC (rev 189529)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp	2015-09-09 03:27:48 UTC (rev 189530)
@@ -368,7 +368,10 @@
 
     WKRetainPtr<WKStringRef> pageGroupIdentifier(AdoptWK, WKStringCreateWithUTF8CString("WebKitTestRunnerPageGroup"));
     m_pageGroup.adopt(WKPageGroupCreateWithIdentifier(pageGroupIdentifier.get()));
+}
 
+WKRetainPtr<WKContextConfigurationRef> TestController::generateContextConfiguration() const
+{
     auto configuration = adoptWK(WKContextConfigurationCreate());
     WKContextConfigurationSetInjectedBundlePath(configuration.get(), injectedBundlePath());
     WKContextConfigurationSetFullySynchronousModeIsAllowedForTesting(configuration.get(), true);
@@ -385,8 +388,13 @@
         WKContextConfigurationSetWebSQLDatabaseDirectory(configuration.get(), toWK(temporaryFolder + separator + "Databases" + separator + "WebSQL").get());
         WKContextConfigurationSetMediaKeysStorageDirectory(configuration.get(), toWK(temporaryFolder + separator + "MediaKeys").get());
     }
-    m_context = platformAdjustContext(adoptWK(WKContextCreateWithConfiguration(configuration.get())).get(), configuration.get());
+    return configuration;
+}
 
+WKRetainPtr<WKPageConfigurationRef> TestController::generatePageConfiguration(WKContextConfigurationRef configuration)
+{
+    m_context = platformAdjustContext(adoptWK(WKContextCreateWithConfiguration(configuration)).get(), configuration);
+
     m_geolocationProvider = std::make_unique<GeolocationProviderMock>(m_context.get());
 
 #if PLATFORM(EFL)
@@ -445,18 +453,24 @@
     if (m_forceComplexText)
         WKContextSetAlwaysUsesComplexTextCodePath(m_context.get(), true);
 
-    m_configuration = adoptWK(WKPageConfigurationCreate());
-    WKPageConfigurationSetContext(m_configuration.get(), m_context.get());
-    WKPageConfigurationSetPageGroup(m_configuration.get(), m_pageGroup.get());
-    WKPageConfigurationSetUserContentController(m_configuration.get(), adoptWK(WKUserContentControllerCreate()).get());
+    auto pageConfiguration = adoptWK(WKPageConfigurationCreate());
+    WKPageConfigurationSetContext(pageConfiguration.get(), m_context.get());
+    WKPageConfigurationSetPageGroup(pageConfiguration.get(), m_pageGroup.get());
+    WKPageConfigurationSetUserContentController(pageConfiguration.get(), adoptWK(WKUserContentControllerCreate()).get());
+    return pageConfiguration;
+}
 
+void TestController::createWebViewWithOptions(const TestOptions& options)
+{
+    auto contextConfiguration = generateContextConfiguration();
+    // Modify contextConfiguration here.
+    auto configuration = generatePageConfiguration(contextConfiguration.get());
+
     // Some preferences (notably mock scroll bars setting) currently cannot be re-applied to an existing view, so we need to set them now.
+    // FIXME: Migrate these preferences to WKContextConfigurationRef.
     resetPreferencesToConsistentValues();
-}
 
-void TestController::createWebViewWithOptions(const ViewOptions& options)
-{
-    platformCreateWebView(m_configuration.get(), options);
+    platformCreateWebView(configuration.get(), options);
     WKPageUIClientV6 pageUIClient = {
         { 6, m_mainWebView.get() },
         0, // createNewPage_deprecatedForUseWithV0
@@ -564,10 +578,10 @@
 
 void TestController::ensureViewSupportsOptionsForTest(const TestInvocation& test)
 {
-    auto viewOptions = viewOptionsForTest(test);
+    auto options = testOptionsForTest(test);
 
     if (m_mainWebView) {
-        if (m_mainWebView->viewSupportsOptions(viewOptions))
+        if (m_mainWebView->viewSupportsOptions(options))
             return;
 
         WKPageSetPageUIClient(m_mainWebView->page(), nullptr);
@@ -577,7 +591,7 @@
         m_mainWebView = nullptr;
     }
 
-    createWebViewWithOptions(viewOptions);
+    createWebViewWithOptions(options);
 
     if (!resetStateToConsistentValues())
         TestInvocation::dumpWebProcessUnresponsiveness("<unknown> - TestController::run - Failed to reset state to consistent values\n");
@@ -808,7 +822,7 @@
     return std::string();
 }
 
-static void updateViewOptionsFromTestHeader(ViewOptions& viewOptions, const TestInvocation& test)
+static void updateTestOptionsFromTestHeader(TestOptions& testOptions, const TestInvocation& test)
 {
     std::string filename = testPath(test.url());
     if (filename.empty())
@@ -842,24 +856,24 @@
         }
         auto key = pairString.substr(pairStart, equalsLocation - pairStart);
         auto value = pairString.substr(equalsLocation + 1, pairEnd - (equalsLocation + 1));
-        // Options processing to modify viewOptions goes here.
+        // Options processing to modify testOptions goes here.
         pairStart = pairEnd + 1;
     }
 }
 
-ViewOptions TestController::viewOptionsForTest(const TestInvocation& test) const
+TestOptions TestController::testOptionsForTest(const TestInvocation& test) const
 {
-    ViewOptions viewOptions;
+    TestOptions options;
 
-    viewOptions.useRemoteLayerTree = m_shouldUseRemoteLayerTree;
-    viewOptions.shouldShowWebView = m_shouldShowWebView;
-    viewOptions.useFixedLayout = shouldUseFixedLayout(test);
+    options.useRemoteLayerTree = m_shouldUseRemoteLayerTree;
+    options.shouldShowWebView = m_shouldShowWebView;
+    options.useFixedLayout = shouldUseFixedLayout(test);
 
-    updateViewOptionsFromTestHeader(viewOptions, test);
+    updateTestOptionsFromTestHeader(options, test);
 
-    updatePlatformSpecificViewOptionsForTest(viewOptions, test);
+    updatePlatformSpecificTestOptionsForTest(options, test);
 
-    return viewOptions;
+    return options;
 }
 
 void TestController::updateWebViewSizeForTest(const TestInvocation& test)
@@ -1767,12 +1781,12 @@
 {
 }
 
-void TestController::platformCreateWebView(WKPageConfigurationRef configuration, const ViewOptions& options)
+void TestController::platformCreateWebView(WKPageConfigurationRef configuration, const TestOptions& options)
 {
     m_mainWebView = std::make_unique<PlatformWebView>(configuration, options);
 }
 
-PlatformWebView* TestController::platformCreateOtherPage(PlatformWebView* parentView, WKPageConfigurationRef configuration, const ViewOptions& options)
+PlatformWebView* TestController::platformCreateOtherPage(PlatformWebView* parentView, WKPageConfigurationRef configuration, const TestOptions& options)
 {
     return new PlatformWebView(configuration, options);
 }

Modified: trunk/Tools/WebKitTestRunner/TestController.h (189529 => 189530)


--- trunk/Tools/WebKitTestRunner/TestController.h	2015-09-09 03:01:39 UTC (rev 189529)
+++ trunk/Tools/WebKitTestRunner/TestController.h	2015-09-09 03:27:48 UTC (rev 189530)
@@ -41,7 +41,7 @@
 class TestInvocation;
 class PlatformWebView;
 class EventSenderProxy;
-struct ViewOptions;
+struct TestOptions;
 
 // FIXME: Rename this TestRunner?
 class TestController {
@@ -62,8 +62,8 @@
 
     bool verbose() const { return m_verbose; }
 
-    WKStringRef injectedBundlePath() { return m_injectedBundlePath.get(); }
-    WKStringRef testPluginDirectory() { return m_testPluginDirectory.get(); }
+    WKStringRef injectedBundlePath() const { return m_injectedBundlePath.get(); }
+    WKStringRef testPluginDirectory() const { return m_testPluginDirectory.get(); }
 
     PlatformWebView* mainWebView() { return m_mainWebView.get(); }
     WKContextRef context() { return m_context.get(); }
@@ -129,8 +129,10 @@
     void setNavigationGesturesEnabled(bool value);
 
 private:
+    WKRetainPtr<WKPageConfigurationRef> generatePageConfiguration(WKContextConfigurationRef);
+    WKRetainPtr<WKContextConfigurationRef> generateContextConfiguration() const;
     void initialize(int argc, const char* argv[]);
-    void createWebViewWithOptions(const ViewOptions&);
+    void createWebViewWithOptions(const TestOptions&);
     void run();
 
     void runTestingServerLoop();
@@ -140,8 +142,8 @@
     void platformDestroy();
     WKContextRef platformAdjustContext(WKContextRef, WKContextConfigurationRef);
     void platformInitializeContext();
-    void platformCreateWebView(WKPageConfigurationRef, const ViewOptions&);
-    static PlatformWebView* platformCreateOtherPage(PlatformWebView* parentView, WKPageConfigurationRef, const ViewOptions&);
+    void platformCreateWebView(WKPageConfigurationRef, const TestOptions&);
+    static PlatformWebView* platformCreateOtherPage(PlatformWebView* parentView, WKPageConfigurationRef, const TestOptions&);
     void platformResetPreferencesToConsistentValues();
     void platformResetStateToConsistentValues();
 #if PLATFORM(COCOA)
@@ -156,8 +158,8 @@
     void initializeTestPluginDirectory();
 
     void ensureViewSupportsOptionsForTest(const TestInvocation&);
-    ViewOptions viewOptionsForTest(const TestInvocation&) const;
-    void updatePlatformSpecificViewOptionsForTest(ViewOptions&, const TestInvocation&) const;
+    TestOptions testOptionsForTest(const TestInvocation&) const;
+    void updatePlatformSpecificTestOptionsForTest(TestOptions&, const TestInvocation&) const;
 
     void updateWebViewSizeForTest(const TestInvocation&);
     void updateWindowScaleForTest(PlatformWebView*, const TestInvocation&);
@@ -258,7 +260,6 @@
     std::unique_ptr<PlatformWebView> m_mainWebView;
     WKRetainPtr<WKContextRef> m_context;
     WKRetainPtr<WKPageGroupRef> m_pageGroup;
-    WKRetainPtr<WKPageConfigurationRef> m_configuration;
 
     enum State {
         Initial,

Copied: trunk/Tools/WebKitTestRunner/TestOptions.h (from rev 189529, trunk/Tools/WebKitTestRunner/ViewOptions.h) (0 => 189530)


--- trunk/Tools/WebKitTestRunner/TestOptions.h	                        (rev 0)
+++ trunk/Tools/WebKitTestRunner/TestOptions.h	2015-09-09 03:27:48 UTC (rev 189530)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef TestOptions_h
+#define TestOptions_h
+
+namespace WTR {
+
+struct TestOptions {
+    bool useThreadedScrolling { false };
+    bool useRemoteLayerTree { false };
+    bool shouldShowWebView { false };
+
+    bool useFixedLayout { false };
+};
+
+}
+
+#endif // TestOptions_h

Property changes: trunk/Tools/WebKitTestRunner/TestOptions.h


Added: svn:keywords

Added: svn:eol-style

Deleted: trunk/Tools/WebKitTestRunner/ViewOptions.h (189529 => 189530)


--- trunk/Tools/WebKitTestRunner/ViewOptions.h	2015-09-09 03:01:39 UTC (rev 189529)
+++ trunk/Tools/WebKitTestRunner/ViewOptions.h	2015-09-09 03:27:48 UTC (rev 189530)
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ViewOptions_h
-#define ViewOptions_h
-
-namespace WTR {
-
-struct ViewOptions {
-    bool useThreadedScrolling { false };
-    bool useRemoteLayerTree { false };
-    bool shouldShowWebView { false };
-    bool useTiledDrawing { false };
-
-    bool useFixedLayout { false };
-};
-
-}
-
-#endif // ViewOptions_h

Modified: trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj (189529 => 189530)


--- trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj	2015-09-09 03:01:39 UTC (rev 189529)
+++ trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj	2015-09-09 03:27:48 UTC (rev 189530)
@@ -164,7 +164,7 @@
 		0FEB909E1905A776000FDBF3 /* InjectedBundlePageCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = InjectedBundlePageCocoa.mm; sourceTree = "<group>"; };
 		0FEB90A21905BC6A000FDBF3 /* CrashReporterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CrashReporterInfo.h; path = cocoa/CrashReporterInfo.h; sourceTree = "<group>"; };
 		0FEB90A31905BC6A000FDBF3 /* CrashReporterInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CrashReporterInfo.mm; path = cocoa/CrashReporterInfo.mm; sourceTree = "<group>"; };
-		1A3326051B75396500F89F62 /* ViewOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewOptions.h; sourceTree = "<group>"; };
+		1A3326051B75396500F89F62 /* TestOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TestOptions.h; sourceTree = "<group>"; };
 		26D758E5160BECDC00268472 /* GeolocationProviderMock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeolocationProviderMock.cpp; sourceTree = "<group>"; };
 		26D758E6160BECDD00268472 /* GeolocationProviderMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeolocationProviderMock.h; sourceTree = "<group>"; };
 		29210EA2144CAAA500835BB5 /* AccessibilityController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityController.cpp; sourceTree = "<group>"; };
@@ -383,7 +383,7 @@
 				BC79342F118F7F19005EA8E2 /* TestController.h */,
 				BCD7D2F711921278006DB7EE /* TestInvocation.cpp */,
 				BCD7D2F611921278006DB7EE /* TestInvocation.h */,
-				1A3326051B75396500F89F62 /* ViewOptions.h */,
+				1A3326051B75396500F89F62 /* TestOptions.h */,
 				BC251A1711D16774002EBC01 /* WebKitTestRunnerPrefix.h */,
 				3164C8EF15D1ADA100EF1FE0 /* WebNotificationProvider.cpp */,
 				3110BE0F15BA011400D216AC /* WebNotificationProvider.h */,

Modified: trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm (189529 => 189530)


--- trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm	2015-09-09 03:01:39 UTC (rev 189529)
+++ trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm	2015-09-09 03:27:48 UTC (rev 189530)
@@ -74,12 +74,12 @@
 #endif
 }
 
-void TestController::platformCreateWebView(WKPageConfigurationRef, const ViewOptions& options)
+void TestController::platformCreateWebView(WKPageConfigurationRef, const TestOptions& options)
 {
     m_mainWebView = std::make_unique<PlatformWebView>(globalWebViewConfiguration, options);
 }
 
-PlatformWebView* TestController::platformCreateOtherPage(PlatformWebView* parentView, WKPageConfigurationRef, const ViewOptions& options)
+PlatformWebView* TestController::platformCreateOtherPage(PlatformWebView* parentView, WKPageConfigurationRef, const TestOptions& options)
 {
 #if WK_API_ENABLED
     WKWebViewConfiguration *newConfiguration = [[globalWebViewConfiguration copy] autorelease];

Modified: trunk/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp (189529 => 189530)


--- trunk/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp	2015-09-09 03:01:39 UTC (rev 189529)
+++ trunk/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp	2015-09-09 03:27:48 UTC (rev 189530)
@@ -53,7 +53,7 @@
     return ecoreEvas;
 }
 
-PlatformWebView::PlatformWebView(WKPageConfigurationRef configuration, const ViewOptions& options)
+PlatformWebView::PlatformWebView(WKPageConfigurationRef configuration, const TestOptions& options)
     : m_options(options)
 {
     WKRetainPtr<WKStringRef> useFixedLayoutKey(AdoptWK, WKStringCreateWithUTF8CString("UseFixedLayout"));
@@ -144,7 +144,7 @@
     return adoptWK(WKViewCreateSnapshot(EWKViewGetWKView(m_view)));
 }
 
-bool PlatformWebView::viewSupportsOptions(const ViewOptions& options) const
+bool PlatformWebView::viewSupportsOptions(const TestOptions& options) const
 {
     if (m_options.useFixedLayout != options.useFixedLayout)
         return false;

Modified: trunk/Tools/WebKitTestRunner/efl/TestControllerEfl.cpp (189529 => 189530)


--- trunk/Tools/WebKitTestRunner/efl/TestControllerEfl.cpp	2015-09-09 03:01:39 UTC (rev 189529)
+++ trunk/Tools/WebKitTestRunner/efl/TestControllerEfl.cpp	2015-09-09 03:27:48 UTC (rev 189530)
@@ -148,9 +148,9 @@
     return false;
 }
 
-void TestController::updatePlatformSpecificViewOptionsForTest(ViewOptions& viewOptions, const TestInvocation& test) const
+void TestController::updatePlatformSpecificTestOptionsForTest(TestOptions& testOptions, const TestInvocation& test) const
 {
-    viewOptions.useFixedLayout = shouldUseFixedLayout(test);
+    testOptions.useFixedLayout = shouldUseFixedLayout(test);
 }
 
 void TestController::platformConfigureViewForTest(const TestInvocation&)

Modified: trunk/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp (189529 => 189530)


--- trunk/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp	2015-09-09 03:01:39 UTC (rev 189529)
+++ trunk/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp	2015-09-09 03:27:48 UTC (rev 189530)
@@ -36,7 +36,7 @@
 
 namespace WTR {
 
-PlatformWebView::PlatformWebView(WKPageConfigurationRef configuration, const ViewOptions& options)
+PlatformWebView::PlatformWebView(WKPageConfigurationRef configuration, const TestOptions& options)
     : m_view(WKViewCreate(configuration))
     , m_window(gtk_window_new(GTK_WINDOW_POPUP))
     , m_windowIsKey(true)
@@ -142,7 +142,7 @@
 {
 }
 
-bool PlatformWebView::viewSupportsOptions(const ViewOptions&) const
+bool PlatformWebView::viewSupportsOptions(const TestOptions&) const
 {
     return true;
 }

Modified: trunk/Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp (189529 => 189530)


--- trunk/Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp	2015-09-09 03:01:39 UTC (rev 189529)
+++ trunk/Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp	2015-09-09 03:27:48 UTC (rev 189530)
@@ -128,7 +128,7 @@
     m_mainWebView->dismissAllPopupMenus();
 }
 
-void TestController::updatePlatformSpecificViewOptionsForTest(ViewOptions&, const TestInvocation&) const
+void TestController::updatePlatformSpecificTestOptionsForTest(TestOptions&, const TestInvocation&) const
 {
 }
 

Modified: trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm (189529 => 189530)


--- trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm	2015-09-09 03:01:39 UTC (rev 189529)
+++ trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm	2015-09-09 03:27:48 UTC (rev 189530)
@@ -100,7 +100,7 @@
 
 namespace WTR {
 
-PlatformWebView::PlatformWebView(WKWebViewConfiguration* configuration, const ViewOptions& options)
+PlatformWebView::PlatformWebView(WKWebViewConfiguration* configuration, const TestOptions& options)
     : m_windowIsKey(true)
     , m_options(options)
 {
@@ -202,7 +202,7 @@
     return nullptr;
 }
 
-bool PlatformWebView::viewSupportsOptions(const ViewOptions& options) const
+bool PlatformWebView::viewSupportsOptions(const TestOptions& options) const
 {
     return true;
 }

Modified: trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm (189529 => 189530)


--- trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm	2015-09-09 03:01:39 UTC (rev 189529)
+++ trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm	2015-09-09 03:27:48 UTC (rev 189530)
@@ -102,7 +102,7 @@
     }
 }
 
-void TestController::updatePlatformSpecificViewOptionsForTest(ViewOptions&, const TestInvocation&) const
+void TestController::updatePlatformSpecificTestOptionsForTest(TestOptions&, const TestInvocation&) const
 {
 }
 

Modified: trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm (189529 => 189530)


--- trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm	2015-09-09 03:01:39 UTC (rev 189529)
+++ trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm	2015-09-09 03:27:48 UTC (rev 189530)
@@ -114,7 +114,7 @@
 
 namespace WTR {
 
-PlatformWebView::PlatformWebView(WKWebViewConfiguration* configuration, const ViewOptions& options)
+PlatformWebView::PlatformWebView(WKWebViewConfiguration* configuration, const TestOptions& options)
     : m_windowIsKey(true)
     , m_options(options)
 {
@@ -240,7 +240,7 @@
     return adoptWK(WKImageCreateFromCGImage(windowSnapshotImage.get(), 0));
 }
 
-bool PlatformWebView::viewSupportsOptions(const ViewOptions& options) const
+bool PlatformWebView::viewSupportsOptions(const TestOptions& options) const
 {
     if (m_options.useThreadedScrolling != options.useThreadedScrolling)
         return false;

Modified: trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm (189529 => 189530)


--- trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm	2015-09-09 03:01:39 UTC (rev 189529)
+++ trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm	2015-09-09 03:27:48 UTC (rev 189530)
@@ -95,11 +95,11 @@
     }
 }
 
-void TestController::updatePlatformSpecificViewOptionsForTest(ViewOptions& viewOptions, const TestInvocation& test) const
+void TestController::updatePlatformSpecificTestOptionsForTest(TestOptions& options, const TestInvocation& test) const
 {
-    viewOptions.useThreadedScrolling = shouldUseThreadedScrolling(test);
-    viewOptions.useRemoteLayerTree = shouldUseRemoteLayerTree();
-    viewOptions.shouldShowWebView = shouldShowWebView();
+    options.useThreadedScrolling = shouldUseThreadedScrolling(test);
+    options.useRemoteLayerTree = shouldUseRemoteLayerTree();
+    options.shouldShowWebView = shouldShowWebView();
 }
 
 void TestController::platformConfigureViewForTest(const TestInvocation& test)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to