Title: [249561] trunk/LayoutTests
Revision
249561
Author
cdu...@apple.com
Date
2019-09-05 21:37:10 -0700 (Thu, 05 Sep 2019)

Log Message

Stop using testRunner.setPrivateBrowsingEnabled_DEPRECATED() in plugins/private-browsing-mode.html
https://bugs.webkit.org/show_bug.cgi?id=201523

Reviewed by Alex Christensen.

Stop using testRunner.setPrivateBrowsingEnabled_DEPRECATED() in plugins/private-browsing-mode.html
since it does not do the right thing for WebKit2. Instead, use the new useEphemeralSession
WKTR flag.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
* plugins/non-private-browsing-mode-expected.txt: Added.
* plugins/non-private-browsing-mode.html: Added.
* plugins/private-browsing-mode-expected.txt:
* plugins/private-browsing-mode.html:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (249560 => 249561)


--- trunk/LayoutTests/ChangeLog	2019-09-06 02:38:47 UTC (rev 249560)
+++ trunk/LayoutTests/ChangeLog	2019-09-06 04:37:10 UTC (rev 249561)
@@ -1,3 +1,21 @@
+2019-09-05  Chris Dumez  <cdu...@apple.com>
+
+        Stop using testRunner.setPrivateBrowsingEnabled_DEPRECATED() in plugins/private-browsing-mode.html
+        https://bugs.webkit.org/show_bug.cgi?id=201523
+
+        Reviewed by Alex Christensen.
+
+        Stop using testRunner.setPrivateBrowsingEnabled_DEPRECATED() in plugins/private-browsing-mode.html
+        since it does not do the right thing for WebKit2. Instead, use the new useEphemeralSession
+        WKTR flag.
+
+        * platform/mac-wk2/TestExpectations:
+        * platform/mac/TestExpectations:
+        * plugins/non-private-browsing-mode-expected.txt: Added.
+        * plugins/non-private-browsing-mode.html: Added.
+        * plugins/private-browsing-mode-expected.txt:
+        * plugins/private-browsing-mode.html:
+
 2019-09-05  Justin Fan  <justin_...@apple.com>
 
         [WebGPU] Fix new test results after adding console warnings

Modified: trunk/LayoutTests/platform/mac/TestExpectations (249560 => 249561)


--- trunk/LayoutTests/platform/mac/TestExpectations	2019-09-06 02:38:47 UTC (rev 249560)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2019-09-06 04:37:10 UTC (rev 249561)
@@ -467,7 +467,6 @@
 webkit.org/b/57688 fast/text/international/bidi-CS-after-AN.html [ Failure Pass ]
 webkit.org/b/57688 fast/text/international/thai-line-breaks.html [ Failure Pass ]
 
-webkit.org/b/112646 plugins/private-browsing-mode.html [ Failure Pass ]
 webkit.org/b/112616 plugins/plugin-clip-subframe.html [ Failure Pass ]
 
 # Flakey plugin tests

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (249560 => 249561)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2019-09-06 02:38:47 UTC (rev 249560)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2019-09-06 04:37:10 UTC (rev 249561)
@@ -487,7 +487,6 @@
 http/tests/security/storage-blocking-loosened-private-browsing-plugin.html [ Skip ]
 http/tests/security/storage-blocking-strengthened-private-browsing-plugin.html [ Skip ]
 plugins/private-browsing-mode-2.html [ Skip ]
-plugins/private-browsing-mode.html [ Skip ]
 storage/websql/private-browsing-noread-nowrite.html [ Skip ]
 
 # There is no network load scheduling or prioritization with NetworkProcess.

Added: trunk/LayoutTests/plugins/non-private-browsing-mode-expected.txt (0 => 249561)


--- trunk/LayoutTests/plugins/non-private-browsing-mode-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/plugins/non-private-browsing-mode-expected.txt	2019-09-06 04:37:10 UTC (rev 249561)
@@ -0,0 +1,11 @@
+Tests that the private browsing API implementation works as expected
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS plugin.privateBrowsingEnabled is false
+PASS plugin.cachedPrivateBrowsingEnabled is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/plugins/non-private-browsing-mode.html (0 => 249561)


--- trunk/LayoutTests/plugins/non-private-browsing-mode.html	                        (rev 0)
+++ trunk/LayoutTests/plugins/non-private-browsing-mode.html	2019-09-06 04:37:10 UTC (rev 249561)
@@ -0,0 +1,27 @@
+<head>
+<script src=""
+</head>
+<body _onload_="runTest()">
+<script>
+function runTest() 
+{
+    if (!window.testRunner) {
+        debug("This test can only run from within DumpRenderTree because it requires TestNetscapePlugin.\n");
+        return;
+    }
+    
+    plugin = document.createElement("embed");
+    plugin.type = "application/x-webkit-test-netscape";
+    plugin.setAttribute('test', 'private-browsing');
+    document.body.appendChild(plugin);
+    
+    shouldBe("plugin.privateBrowsingEnabled", "false");
+    shouldBe("plugin.cachedPrivateBrowsingEnabled", "false");
+}
+</script>
+
+<script>
+description("Tests that the private browsing API implementation works as expected");
+
+
+</script>

Modified: trunk/LayoutTests/plugins/private-browsing-mode-expected.txt (249560 => 249561)


--- trunk/LayoutTests/plugins/private-browsing-mode-expected.txt	2019-09-06 02:38:47 UTC (rev 249560)
+++ trunk/LayoutTests/plugins/private-browsing-mode-expected.txt	2019-09-06 04:37:10 UTC (rev 249561)
@@ -3,10 +3,9 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS plugin1.privateBrowsingEnabled is false
-PASS plugin1.cachedPrivateBrowsingEnabled is false
-PASS plugin1.privateBrowsingEnabled is true
-PASS plugin1.cachedPrivateBrowsingEnabled is true
-PASS plugin2.privateBrowsingEnabled is true
-PASS plugin2.cachedPrivateBrowsingEnabled is true
+PASS plugin.privateBrowsingEnabled is true
+PASS plugin.cachedPrivateBrowsingEnabled is true
+PASS successfullyParsed is true
 
+TEST COMPLETE
+

Modified: trunk/LayoutTests/plugins/private-browsing-mode.html (249560 => 249561)


--- trunk/LayoutTests/plugins/private-browsing-mode.html	2019-09-06 02:38:47 UTC (rev 249560)
+++ trunk/LayoutTests/plugins/private-browsing-mode.html	2019-09-06 04:37:10 UTC (rev 249561)
@@ -1,9 +1,8 @@
+<!-- webkit-test-runner [ useEphemeralSession=true ] -->
 <head>
-<script src=""
+<script src=""
 </head>
 <body _onload_="runTest()">
-<p id="description"></p>
-<div id="console"></div>
 <script>
 function runTest() 
 {
@@ -12,28 +11,14 @@
         return;
     }
     
-    plugin1 = document.createElement("embed");
-    plugin1.type = "application/x-webkit-test-netscape";
-    plugin1.setAttribute('test', 'private-browsing');
-    document.body.appendChild(plugin1);
+    plugin = document.createElement("embed");
+    plugin.type = "application/x-webkit-test-netscape";
+    plugin.setAttribute('test', 'private-browsing');
+    document.body.appendChild(plugin);
     
-    shouldBe("plugin1.privateBrowsingEnabled", "false");
-    shouldBe("plugin1.cachedPrivateBrowsingEnabled", "false");
-
-    // Now enable private browsing
-    testRunner.setPrivateBrowsingEnabled_DEPRECATED(true);
-
-    shouldBe("plugin1.privateBrowsingEnabled", "true");
-    shouldBe("plugin1.cachedPrivateBrowsingEnabled", "true");
+    shouldBe("plugin.privateBrowsingEnabled", "true");
+    shouldBe("plugin.cachedPrivateBrowsingEnabled", "true");
     
-    plugin2 = document.createElement("embed");
-    plugin2.type = "application/x-webkit-test-netscape";
-    plugin2.setAttribute('test', 'private-browsing');
-    document.body.appendChild(plugin2);
-    
-    shouldBe("plugin2.privateBrowsingEnabled", "true");
-    shouldBe("plugin2.cachedPrivateBrowsingEnabled", "true");
-    
 }
 </script>
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to