Unreviewed, fix assertions in storage access API layout tests after r256882.
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Feb 2020 16:31:05 +0000 (16:31 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Feb 2020 16:31:05 +0000 (16:31 +0000)
Source/WebCore:

* dom/DocumentStorageAccess.idl:
Only expose the storage access API operations to the Web when the corresponding setting is
enabled instead of relying on an assertion.

* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
Stop disabling the storage access API since the API is enabled by default.

Tools:

Drop dead testRunner code to toggle storage access API feature.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setStorageAccessAPIEnabled): Deleted.
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

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

Source/WebCore/ChangeLog
Source/WebCore/dom/DocumentStorageAccess.idl
Source/WebCore/testing/Internals.cpp
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
Tools/WebKitTestRunner/TestInvocation.cpp

index f89ac32..505c2e8 100644 (file)
@@ -1,3 +1,15 @@
+2020-02-19  Chris Dumez  <cdumez@apple.com>
+
+        Unreviewed, fix assertions in storage access API layout tests after r256882.
+
+        * dom/DocumentStorageAccess.idl:
+        Only expose the storage access API operations to the Web when the corresponding setting is
+        enabled instead of relying on an assertion.
+
+        * testing/Internals.cpp:
+        (WebCore::Internals::resetToConsistentState):
+        Stop disabling the storage access API since the API is enabled by default.
+
 2020-02-18  Zalan Bujtas  <zalan@apple.com>
 
         Rename ScrollView::styleDidChange to styleAndRenderTreeDidChange
index 4de3c5f..46e72c7 100644 (file)
@@ -25,6 +25,7 @@
 
 [
     Conditional=RESOURCE_LOAD_STATISTICS,
+    EnabledBySetting=storageAccessAPI
 ] partial interface Document {
     Promise<bool> hasStorageAccess();
     Promise<void> requestStorageAccess();
index b8a8f5e..902ac25 100644 (file)
@@ -550,7 +550,6 @@ void Internals::resetToConsistentState(Page& page)
     rtcProvider.setUseGPUProcess(false);
 #endif
 
-    page.settings().setStorageAccessAPIEnabled(false);
     page.setFullscreenAutoHideDuration(0_s);
     page.setFullscreenInsets({ });
     page.setFullscreenControlsHidden(false);
index 2424664..1f46a4a 100644 (file)
@@ -1,3 +1,16 @@
+2020-02-19  Chris Dumez  <cdumez@apple.com>
+
+        Unreviewed, fix assertions in storage access API layout tests after r256882.
+
+        Drop dead testRunner code to toggle storage access API feature.
+
+        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+        (WTR::TestRunner::setStorageAccessAPIEnabled): Deleted.
+        * WebKitTestRunner/InjectedBundle/TestRunner.h:
+        * WebKitTestRunner/TestInvocation.cpp:
+        (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
+
 2020-02-18  Zan Dobersek  <zdobersek@igalia.com>
 
         [WPE] Support 2D axis, smooth-motion events
index a7fd21e..4a55102 100644 (file)
@@ -352,7 +352,6 @@ interface TestRunner {
     void installTextFieldDidEndEditingCallback(object callback);
 
     // Storage Access API
-    void setStorageAccessAPIEnabled(boolean enabled);
     void getAllStorageAccessEntries(object callback);
 
     // Open panel
index 521f5e5..ec126d6 100644 (file)
@@ -2312,15 +2312,6 @@ void TestRunner::textFieldDidEndEditingCallback()
     callTestRunnerCallback(TextFieldDidEndEditingCallbackID);
 }
 
-void TestRunner::setStorageAccessAPIEnabled(bool enabled)
-{
-    WKRetainPtr<WKStringRef> messageName = adoptWK(WKStringCreateWithUTF8CString("SetStorageAccessAPIEnabled"));
-    
-    WKRetainPtr<WKBooleanRef> messageBody = adoptWK(WKBooleanCreate(enabled));
-    
-    WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), messageName.get(), messageBody.get(), nullptr);
-}
-
 void TestRunner::getAllStorageAccessEntries(JSValueRef callback)
 {
     cacheTestRunnerCallback(AllStorageAccessEntriesCallbackID, callback);
index 7228b5b..721021d 100644 (file)
@@ -460,7 +460,6 @@ public:
     void textFieldDidEndEditingCallback();
 
     // Storage Access API
-    void setStorageAccessAPIEnabled(bool);
     void getAllStorageAccessEntries(JSValueRef callback);
     void callDidReceiveAllStorageAccessEntriesCallback(Vector<String>& domains);
 
index 81afb52..3224f08 100644 (file)
@@ -929,12 +929,6 @@ WKRetainPtr<WKTypeRef> TestInvocation::didReceiveSynchronousMessageFromInjectedB
         return nullptr;
     }
 
-    if (WKStringIsEqualToUTF8CString(messageName, "SetStorageAccessAPIEnabled")) {
-        WKBooleanRef accept = static_cast<WKBooleanRef>(messageBody);
-        WKContextSetStorageAccessAPIEnabled(TestController::singleton().context(), WKBooleanGetValue(accept));
-        return nullptr;
-    }
-
     if (WKStringIsEqualToUTF8CString(messageName, "GetAllStorageAccessEntries")) {
         TestController::singleton().getAllStorageAccessEntries();
         return nullptr;