Modern IDB: Make sure IndexedDB works from file:// url documents by default
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jul 2016 21:38:42 +0000 (21:38 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jul 2016 21:38:42 +0000 (21:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=153783

Reviewed by Alex Christensen.

Previously, to grant IndexedDB access to file:// urls for testing purposes,
we had to call the SPI [WKWebViewConfiguration _setAllowUniversalAccessFromFileURLs:].

As of https://trac.webkit.org/changeset/203695 this is no longer required.

Change the relevant API tests to make sure this continues to be no longer required.

* TestWebKitAPI/Tests/WebKit2Cocoa/IDBDeleteRecovery.mm:
* TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBDatabaseProcessKill.mm:
* TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBMultiProcess.mm:
* TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBPersistence.mm:
* TestWebKitAPI/Tests/WebKit2Cocoa/StoreBlobThenDelete.mm:
* TestWebKitAPI/Tests/WebKit2Cocoa/WebProcessKillIDBCleanup.mm:

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

Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/IDBDeleteRecovery.mm
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBDatabaseProcessKill.mm
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBMultiProcess.mm
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBPersistence.mm
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/StoreBlobThenDelete.mm
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WebProcessKillIDBCleanup.mm

index 283539c..13c77e6 100644 (file)
@@ -1,3 +1,24 @@
+2016-07-25  Brady Eidson  <beidson@apple.com>
+
+        Modern IDB: Make sure IndexedDB works from file:// url documents by default
+        https://bugs.webkit.org/show_bug.cgi?id=153783
+
+        Reviewed by Alex Christensen.
+
+        Previously, to grant IndexedDB access to file:// urls for testing purposes, 
+        we had to call the SPI [WKWebViewConfiguration _setAllowUniversalAccessFromFileURLs:].
+        
+        As of https://trac.webkit.org/changeset/203695 this is no longer required.
+        
+        Change the relevant API tests to make sure this continues to be no longer required.
+
+        * TestWebKitAPI/Tests/WebKit2Cocoa/IDBDeleteRecovery.mm:
+        * TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBDatabaseProcessKill.mm:
+        * TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBMultiProcess.mm:
+        * TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBPersistence.mm:
+        * TestWebKitAPI/Tests/WebKit2Cocoa/StoreBlobThenDelete.mm:
+        * TestWebKitAPI/Tests/WebKit2Cocoa/WebProcessKillIDBCleanup.mm:
+
 2016-07-25  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         Media controls should not be displayed for a video until it starts playing
index 69dd916..59a4465 100644 (file)
@@ -59,9 +59,6 @@ TEST(IndexedDB, DeleteRecovery)
     RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
     [[configuration userContentController] addScriptMessageHandler:handler.get() name:@"testHandler"];
 
-    // Allow file URLs to load non-file resources
-    [configuration _setAllowUniversalAccessFromFileURLs:YES];
-
     [configuration.get().processPool _terminateDatabaseProcess];
 
     // Copy the inconsistent database files to the database directory
index 759f98b..6cf19fd 100644 (file)
@@ -92,9 +92,6 @@ TEST(IndexedDB, DatabaseProcessKill)
     RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
     [[configuration userContentController] addScriptMessageHandler:handler.get() name:@"testHandler"];
 
-    // Allow file URLs to load non-file resources
-    [configuration _setAllowUniversalAccessFromFileURLs:YES];
-
     RetainPtr<WKWebView> webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
 
     DatabaseProcessKillNavigationDelegate *delegate = [[DatabaseProcessKillNavigationDelegate alloc] init];
index c085cc5..f8b711d 100644 (file)
@@ -59,9 +59,6 @@ TEST(IndexedDB, IndexedDBMultiProcess)
     RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
     [[configuration userContentController] addScriptMessageHandler:handler.get() name:@"testHandler"];
 
-    // Allow file URLs to load non-file resources
-    [configuration _setAllowUniversalAccessFromFileURLs:YES];
-
     [configuration.get().processPool _terminateDatabaseProcess];
 
     RetainPtr<WKWebView> webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
index 6d167c0..449e893 100644 (file)
@@ -73,9 +73,6 @@ TEST(IndexedDB, IndexedDBPersistence)
     RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
     [[configuration userContentController] addScriptMessageHandler:handler.get() name:@"testHandler"];
 
-    // Allow file URLs to load non-file resources
-    [configuration _setAllowUniversalAccessFromFileURLs:YES];
-
     RetainPtr<WKWebView> webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
 
     NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"IndexedDBPersistence-1" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
index b408b28..340b698 100644 (file)
@@ -59,8 +59,6 @@ TEST(IndexedDB, StoreBlobThenDelete)
     RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
     [[configuration userContentController] addScriptMessageHandler:handler.get() name:@"testHandler"];
 
-    [configuration _setAllowUniversalAccessFromFileURLs:YES];
-
     RetainPtr<WKWebView> webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
 
     NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"StoreBlobToBeDeleted" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
index e1ce813..4c8604d 100644 (file)
@@ -60,9 +60,6 @@ TEST(IndexedDB, WebProcessKillIDBCleanup)
     RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
     [[configuration userContentController] addScriptMessageHandler:handler.get() name:@"testHandler"];
 
-    // Allow file URLs to load non-file resources
-    [configuration _setAllowUniversalAccessFromFileURLs:YES];
-
     [configuration.get().processPool _terminateDatabaseProcess];
 
     RetainPtr<WKWebView> webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);