WebKitTestRunner needs layoutTestController.setDashboardCompatibilityMode
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Sep 2016 22:52:13 +0000 (22:52 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Sep 2016 22:52:13 +0000 (22:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=42547
Source/WebKit2:

Reviewed by Darin Adler.

Added access to setUseDashBoardCompatibilityMode for WebKit2.
Note: this bug mistakenly called this function setDashboardCompatibilityMode, it is actually setUseDashboardCompatibilityMode.

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetUseDashboardCompatibilityMode): Added dashboard compatiblity mode setter.
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Ditto.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setUseDashboardCompatibilityMode): Ditto.
* WebProcess/InjectedBundle/InjectedBundle.h: Ditto.

Tools:

Reviewed by Darin Adler.

Added JavaScript bindings and C++ implementation of setUseDashboardCompatibilityMode for the WebKit2 sTestRunner.
Note: this bug mistakenly called this function setDashboardCompatibilityMode, it is actually setUseDashboardCompatibilityMode.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: Added dashboard compatiblity mode setter.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting): Reset dashboard compatibility mode.
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setJavaScriptCanAccessClipboard): Code style changes.
(WTR::TestRunner::setPrivateBrowsingEnabled): Code style changes.
(WTR::TestRunner::setUseDashboardCompatibilityMode): Added dashboard compatiblity mode setter.
(WTR::TestRunner::setPopupBlockingEnabled): Code style changes.
(WTR::TestRunner::setAuthorAndUserStylesEnabled): Code style changes.
(WTR::TestRunner::addOriginAccessWhitelistEntry): Code style changes.
* WebKitTestRunner/InjectedBundle/TestRunner.h: Added dashboard compatiblity mode setter.

LayoutTests:

Reviewed by Darin Adler.

The addition of setUseDashboardCompatibilityMode to the WebKit2 TestRunner means the set of tests removed from the expected failures list now pass.
Note: this bug mistakenly called this function setDashboardCompatibilityMode, it is actually setUseDashboardCompatibilityMode.

* platform/ios-simulator-wk2/TestExpectations:  Changed reason test was excluded.
* platform/wk2/TestExpectations: Remove tests which use setUseDashboardCompatibilityMode from expected failures.

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

14 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/ios-simulator-wk2/TestExpectations
LayoutTests/platform/win/TestExpectations
LayoutTests/platform/wk2/TestExpectations
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

index f26b2b9..c8fef97 100644 (file)
@@ -1,3 +1,16 @@
+2016-09-02  Jonathan Bedard  <jbedard@apple.com>
+
+        WebKitTestRunner needs layoutTestController.setDashboardCompatibilityMode
+        https://bugs.webkit.org/show_bug.cgi?id=42547
+
+        Reviewed by Darin Adler.
+
+        The addition of setUseDashboardCompatibilityMode to the WebKit2 TestRunner means the set of tests removed from the expected failures list now pass.
+        Note: this bug mistakenly called this function setDashboardCompatibilityMode, it is actually setUseDashboardCompatibilityMode.
+
+        * platform/ios-simulator-wk2/TestExpectations:  Changed reason test was excluded.
+        * platform/wk2/TestExpectations: Remove tests which use setUseDashboardCompatibilityMode from expected failures.
+
 2016-09-02  Ryan Haddad  <ryanhaddad@apple.com>
 
         Marking editing/pasteboard/5478250.html as flaky on mac-wk2.
index f8cc911..37b5394 100644 (file)
@@ -90,8 +90,13 @@ scrollbars/scrolling-by-page-ignoring-transparent-fixed-elements-on-keyboard-spa
 scrollbars/scrolling-by-page-on-keyboard-spacebar.html [ Failure ]
 scrollbars/scrollbars-on-positioned-content.html [ Failure ]
 
-# WebKitTestRunner needs testRunner.setUseDashboardCompatibilityMode
-mathml/mathml-in-dashboard.html [ Skip ]
+# iOS doesn’t support dashboard.
+mathml/mathml-in-dashboard.html [ Failure ]
+svg/custom/embedded-svg-allowed-in-dashboard.xml [ Failure ]
+svg/custom/manually-parsed-embedded-svg-allowed-in-dashboard.html [ Failure ]
+svg/custom/manually-parsed-svg-allowed-in-dashboard.html [ Failure ]
+svg/custom/svg-allowed-in-dashboard-object.html [ Failure ]
+http/tests/xmlhttprequest/svg-created-by-xhr-allowed-in-dashboard.html [ Failure ]
 
 # SVG tests that time out (these require EventSender)
 svg/animations/animVal-basics.html
@@ -264,7 +269,6 @@ imported/mozilla/svg/image/image-xy-01.svg [ ImageOnlyFailure ]
 imported/mozilla/svg/image/image-y-01.svg [ ImageOnlyFailure ]
 imported/mozilla/svg/text/text-shadow.svg [ ImageOnlyFailure ]
 svg/animations/mozilla/animateMotion-mpath-targetChange-1.svg [ ImageOnlyFailure ]
-svg/custom/embedded-svg-allowed-in-dashboard.xml [ Failure ]
 svg/custom/focus-event-handling-keyboard.xhtml [ Failure ]
 svg/custom/focus-event-handling.xhtml [ Failure ]
 svg/custom/foreignObject-crash-on-hover.xml [ Failure ]
@@ -274,8 +278,6 @@ svg/custom/getscreenctm-in-scrollable-svg-area.xhtml [ Failure ]
 svg/custom/hover-default-fill.svg [ Failure ]
 svg/custom/image-clipped-hit.svg [ Failure ]
 svg/custom/invisible-text-after-scrolling.xhtml [ Failure ]
-svg/custom/manually-parsed-embedded-svg-allowed-in-dashboard.html [ Failure ]
-svg/custom/manually-parsed-svg-allowed-in-dashboard.html [ Failure ]
 svg/custom/marker-changes.svg [ Failure ]
 svg/custom/non-scaling-stroke-update.svg [ ImageOnlyFailure ]
 svg/custom/pointer-events-image-css-transform.svg [ Failure ]
@@ -285,7 +287,6 @@ svg/custom/pointer-events-text-css-transform.svg [ Failure ]
 svg/custom/pointer-events-text.svg [ Failure ]
 svg/custom/polyline-hittest.svg [ Failure ]
 svg/custom/stroke-width-click.svg [ Failure ]
-svg/custom/svg-allowed-in-dashboard-object.html [ Failure ]
 svg/custom/svg-fonts-fallback.xhtml [ Failure ]
 svg/custom/text-hit-test.svg [ Failure ]
 svg/custom/use-clipped-hit.svg [ Failure ]
@@ -376,7 +377,6 @@ http/tests/security/no-referrer.html [ Failure ]
 http/tests/security/redirect-BLOCKED-to-localURL.html [ Failure ]
 http/tests/security/setDomainRelaxationForbiddenForURLScheme.html [ Failure ]
 http/tests/uri/css-href.php [ Failure ]
-http/tests/xmlhttprequest/svg-created-by-xhr-allowed-in-dashboard.html [ Failure ]
 
 # HTTP tests that assert:
 http/tests/navigation/new-window-redirect-history.html
index 4e2c520..ef3d74b 100644 (file)
@@ -105,7 +105,7 @@ http/tests/misc/willCacheResponse-delegate-callback.html [ Skip ]
 # testRunner.setAlwaysAcceptCookies() is not implemented on Windows.
 http/tests/xmlhttprequest/cross-origin-cookie-storage.html [ Skip ]
 
-# TODO No Dashboard compatibility mode on Windows
+# No Dashboard compatibility mode on Windows.
 http/tests/xmlhttprequest/default-content-type-dashboard.html [ Skip ]
 http/tests/xmlhttprequest/svg-created-by-xhr-allowed-in-dashboard.html [ Skip ]
 svg/custom/embedded-svg-allowed-in-dashboard.xml [ Skip ]
index 065c1b9..8bfd0be 100644 (file)
@@ -113,16 +113,6 @@ platform/mac/fast/text/attributed-substring-from-range-in-textfield.html
 platform/mac/fast/text/attributed-substring-from-range.html
 platform/mac/fast/text/justified-text-rect.html
 
-# WebKitTestRunner needs testRunner.setDashboardCompatibilityMode
-# <https://bugs.webkit.org/show_bug.cgi?id=42547>
-fast/canvas/canvas-gradient-addStop-error.html
-http/tests/xmlhttprequest/default-content-type-dashboard.html
-http/tests/xmlhttprequest/svg-created-by-xhr-allowed-in-dashboard.html
-svg/custom/embedded-svg-allowed-in-dashboard.xml
-svg/custom/manually-parsed-embedded-svg-allowed-in-dashboard.html
-svg/custom/manually-parsed-svg-allowed-in-dashboard.html
-svg/custom/svg-allowed-in-dashboard-object.html
-
 # WebKitTestRunner needs testRunner.setMainFrameIsFirstResponder
 # <https://bugs.webkit.org/show_bug.cgi?id=42685>
 editing/selection/caret-and-focus-ring.html
@@ -302,10 +292,6 @@ printing/page-rule-selection.html
 fast/frames/location-redirect-user-gesture.html
 fast/frames/meta-refresh-user-gesture.html
 
-# WebKitTestRunner needs testRunner.setUseDashboardCompatibilityMode
-platform/mac/fast/dom/HTMLImageElement/dashboard-src-quirk.html [ Skip ]
-mathml/mathml-in-dashboard.html [ Skip ]
-
 # WebKitTestRunner needs testRunner.addURLToRedirect
 http/tests/loading/cross-origin-XHR-willLoadRequest.html
 
index 607fc8a..cc373e3 100644 (file)
@@ -1,3 +1,20 @@
+2016-09-02  Jonathan Bedard  <jbedard@apple.com>
+
+        WebKitTestRunner needs layoutTestController.setDashboardCompatibilityMode
+        https://bugs.webkit.org/show_bug.cgi?id=42547
+
+        Reviewed by Darin Adler.
+
+        Added access to setUseDashBoardCompatibilityMode for WebKit2.
+        Note: this bug mistakenly called this function setDashboardCompatibilityMode, it is actually setUseDashboardCompatibilityMode.
+
+        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+        (WKBundleSetUseDashboardCompatibilityMode): Added dashboard compatiblity mode setter.
+        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Ditto.
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::setUseDashboardCompatibilityMode): Ditto.
+        * WebProcess/InjectedBundle/InjectedBundle.h: Ditto.
+
 2016-09-02  Joseph Pecoraro  <pecoraro@apple.com>
 
         [Mac] RetainPtr misuse, AnimationController leaks
index 3b5229b..097383c 100644 (file)
@@ -165,6 +165,11 @@ void WKBundleSetPrivateBrowsingEnabled(WKBundleRef bundleRef, WKBundlePageGroupR
     toImpl(bundleRef)->setPrivateBrowsingEnabled(toImpl(pageGroupRef), enabled);
 }
 
+void WKBundleSetUseDashboardCompatibilityMode(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
+{
+    toImpl(bundleRef)->setUseDashboardCompatibilityMode(toImpl(pageGroupRef), enabled);
+}
+
 void WKBundleSetPopupBlockingEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
 {
     toImpl(bundleRef)->setPopupBlockingEnabled(toImpl(pageGroupRef), enabled);
index 4bf3280..a25a60c 100644 (file)
@@ -51,6 +51,7 @@ WK_EXPORT void WKBundleSetPluginsEnabled(WKBundleRef bundle, WKBundlePageGroupRe
 WK_EXPORT void WKBundleSetJavaScriptCanAccessClipboard(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetAutomaticLinkDetectionEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled);
 WK_EXPORT void WKBundleSetPrivateBrowsingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
+WK_EXPORT void WKBundleSetUseDashboardCompatibilityMode(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetPopupBlockingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetAuthorAndUserStylesEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetSpatialNavigationEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
index caff01f..3d62636 100644 (file)
@@ -327,6 +327,14 @@ void InjectedBundle::setPrivateBrowsingEnabled(WebPageGroupProxy* pageGroup, boo
         (*iter)->enableLegacyPrivateBrowsing(enabled);
 }
 
+void InjectedBundle::setUseDashboardCompatibilityMode(WebPageGroupProxy* pageGroup, bool enabled)
+{
+#if ENABLE(DASHBOARD_SUPPORT)
+    for (auto& page : PageGroup::pageGroup(pageGroup->identifier())->pages())
+        page->settings().setUsesDashboardBackwardCompatibilityMode(enabled);
+#endif
+}
+
 void InjectedBundle::setPopupBlockingEnabled(WebPageGroupProxy* pageGroup, bool enabled)
 {
     const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
index b8e03e3..8c04982 100644 (file)
@@ -108,6 +108,7 @@ public:
     void setJavaScriptCanAccessClipboard(WebPageGroupProxy*, bool);
     void setAutomaticLinkDetectionEnabled(WebPageGroupProxy*, bool enabled);
     void setPrivateBrowsingEnabled(WebPageGroupProxy*, bool);
+    void setUseDashboardCompatibilityMode(WebPageGroupProxy*, bool);
     void setPopupBlockingEnabled(WebPageGroupProxy*, bool);
     void setAuthorAndUserStylesEnabled(WebPageGroupProxy*, bool);
     void setSpatialNavigationEnabled(WebPageGroupProxy*, bool);
index 76b7721..1be9077 100644 (file)
@@ -1,3 +1,25 @@
+2016-09-02  Jonathan Bedard  <jbedard@apple.com>
+
+        WebKitTestRunner needs layoutTestController.setDashboardCompatibilityMode
+        https://bugs.webkit.org/show_bug.cgi?id=42547
+        Reviewed by Darin Adler.
+
+        Added JavaScript bindings and C++ implementation of setUseDashboardCompatibilityMode for the WebKit2 sTestRunner.
+        Note: this bug mistakenly called this function setDashboardCompatibilityMode, it is actually setUseDashboardCompatibilityMode.
+
+        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: Added dashboard compatiblity mode setter.
+        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+        (WTR::InjectedBundle::beginTesting): Reset dashboard compatibility mode.
+        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+        (WTR::TestRunner::setJavaScriptCanAccessClipboard): Code style changes.
+        (WTR::TestRunner::setPrivateBrowsingEnabled): Code style changes.
+        (WTR::TestRunner::setUseDashboardCompatibilityMode): Added dashboard compatiblity mode setter.
+        (WTR::TestRunner::setPopupBlockingEnabled): Code style changes.
+        (WTR::TestRunner::setAuthorAndUserStylesEnabled): Code style changes.
+        (WTR::TestRunner::addOriginAccessWhitelistEntry): Code style changes.
+        * WebKitTestRunner/InjectedBundle/TestRunner.h: Added dashboard compatiblity mode setter.
+
 2016-09-02  Jer Noble  <jer.noble@apple.com>
 
         Unreviewed build fix: restore storyboard files to Xcode 7-compatability.
index becd34e..1c3ce74 100644 (file)
@@ -64,6 +64,7 @@ interface TestRunner {
     void setJavaScriptCanAccessClipboard(boolean value);
     void setAutomaticLinkDetectionEnabled(boolean value);
     void setPrivateBrowsingEnabled(boolean value);
+    void setUseDashboardCompatibilityMode(boolean value);
     void setPopupBlockingEnabled(boolean value);
     void setAuthorAndUserStylesEnabled(boolean value);
     void setCustomPolicyDelegate(boolean enabled, boolean permissive);
index e6c92c2..05308ca 100644 (file)
@@ -296,6 +296,7 @@ void InjectedBundle::beginTesting(WKDictionaryRef settings)
     WKBundleSetJavaScriptCanAccessClipboard(m_bundle, m_pageGroup, true);
     WKBundleSetAutomaticLinkDetectionEnabled(m_bundle, m_pageGroup, false);
     WKBundleSetPrivateBrowsingEnabled(m_bundle, m_pageGroup, false);
+    WKBundleSetUseDashboardCompatibilityMode(m_bundle, m_pageGroup, false);
     WKBundleSetAuthorAndUserStylesEnabled(m_bundle, m_pageGroup, true);
     WKBundleSetFrameFlatteningEnabled(m_bundle, m_pageGroup, false);
     WKBundleSetMinimumLogicalFontSize(m_bundle, m_pageGroup, 9);
index 34f9701..3b56332 100644 (file)
@@ -408,7 +408,7 @@ void TestRunner::setPluginsEnabled(bool enabled)
 void TestRunner::setJavaScriptCanAccessClipboard(bool enabled)
 {
     auto& injectedBundle = InjectedBundle::singleton();
-     WKBundleSetJavaScriptCanAccessClipboard(injectedBundle.bundle(), injectedBundle.pageGroup(), enabled);
+    WKBundleSetJavaScriptCanAccessClipboard(injectedBundle.bundle(), injectedBundle.pageGroup(), enabled);
 }
 
 void TestRunner::setAutomaticLinkDetectionEnabled(bool enabled)
@@ -420,19 +420,27 @@ void TestRunner::setAutomaticLinkDetectionEnabled(bool enabled)
 void TestRunner::setPrivateBrowsingEnabled(bool enabled)
 {
     auto& injectedBundle = InjectedBundle::singleton();
-     WKBundleSetPrivateBrowsingEnabled(injectedBundle.bundle(), injectedBundle.pageGroup(), enabled);
+    WKBundleSetPrivateBrowsingEnabled(injectedBundle.bundle(), injectedBundle.pageGroup(), enabled);
 }
 
+void TestRunner::setUseDashboardCompatibilityMode(bool enabled)
+{
+#if ENABLE(DASHBOARD_SUPPORT)
+    auto& injectedBundle = InjectedBundle::singleton();
+    WKBundleSetUseDashboardCompatibilityMode(injectedBundle.bundle(), injectedBundle.pageGroup(), enabled);
+#endif
+}
+    
 void TestRunner::setPopupBlockingEnabled(bool enabled)
 {
     auto& injectedBundle = InjectedBundle::singleton();
-     WKBundleSetPopupBlockingEnabled(injectedBundle.bundle(), injectedBundle.pageGroup(), enabled);
+    WKBundleSetPopupBlockingEnabled(injectedBundle.bundle(), injectedBundle.pageGroup(), enabled);
 }
 
 void TestRunner::setAuthorAndUserStylesEnabled(bool enabled)
 {
     auto& injectedBundle = InjectedBundle::singleton();
-     WKBundleSetAuthorAndUserStylesEnabled(injectedBundle.bundle(), injectedBundle.pageGroup(), enabled);
+    WKBundleSetAuthorAndUserStylesEnabled(injectedBundle.bundle(), injectedBundle.pageGroup(), enabled);
 }
 
 void TestRunner::addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains)
index 1239c0e..073a54f 100644 (file)
@@ -111,6 +111,7 @@ public:
     void setJavaScriptCanAccessClipboard(bool);
     void setAutomaticLinkDetectionEnabled(bool);
     void setPrivateBrowsingEnabled(bool);
+    void setUseDashboardCompatibilityMode(bool);
     void setPopupBlockingEnabled(bool);
     void setAuthorAndUserStylesEnabled(bool);
     void setCustomPolicyDelegate(bool enabled, bool permissive = false);