Title: [243935] trunk/Tools
Revision
243935
Author
sihui_...@apple.com
Date
2019-04-05 09:30:34 -0700 (Fri, 05 Apr 2019)

Log Message

Test sessionStorage in PSON private browsing mode
https://bugs.webkit.org/show_bug.cgi?id=196561

Reviewed by Alex Christensen.

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (243934 => 243935)


--- trunk/Tools/ChangeLog	2019-04-05 15:35:32 UTC (rev 243934)
+++ trunk/Tools/ChangeLog	2019-04-05 16:30:34 UTC (rev 243935)
@@ -1,3 +1,12 @@
+2019-04-05  Sihui Liu  <sihui_...@apple.com>
+
+        Test sessionStorage in PSON private browsing mode
+        https://bugs.webkit.org/show_bug.cgi?id=196561
+
+        Reviewed by Alex Christensen.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
+
 2019-04-05  Commit Queue  <commit-qu...@webkit.org>
 
         Unreviewed, rolling out r243833.

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm (243934 => 243935)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm	2019-04-05 15:35:32 UTC (rev 243934)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm	2019-04-05 16:30:34 UTC (rev 243935)
@@ -4705,7 +4705,7 @@
     done = false;
 }
 
-TEST(ProcessSwap, EphemeralLocalStorage)
+TEST(ProcessSwap, EphemeralWebStorage)
 {
     auto processPoolConfiguration = psonProcessPoolConfiguration();
     auto processPool = adoptNS([[WKProcessPool alloc] _initWithConfiguration:processPoolConfiguration.get()]);
@@ -4731,6 +4731,12 @@
     TestWebKitAPI::Util::run(&done);
 
     done = false;
+    [webView evaluateJavaScript:@"window.sessionStorage.setItem('b,'a')" completionHandler:^(id, NSError *) {
+        done = true;
+    }];
+    TestWebKitAPI::Util::run(&done);
+
+    done = false;
     [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://example.com/"]]];
     TestWebKitAPI::Util::run(&done);
 
@@ -4755,6 +4761,13 @@
         done = true;
     }];
     TestWebKitAPI::Util::run(&done);
+
+    done = false;
+    [webView evaluateJavaScript:@"window.sessionStorage.getItem('b')" completionHandler:^(id result, NSError *) {
+        EXPECT_FALSE([@"a" isEqualToString:result]);
+        done = true;
+    }];
+    TestWebKitAPI::Util::run(&done);
 }
 
 TEST(ProcessSwap, UsePrewarmedProcessAfterTerminatingNetworkProcess)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to