| OLD | NEW |
| (Empty) |
| 1 <head> | |
| 2 <script src="../fast/js/resources/js-test-pre.js"></script> | |
| 3 </head> | |
| 4 <body onload="runTest()"> | |
| 5 <p id="description"></p> | |
| 6 <div id="console"></div> | |
| 7 <script> | |
| 8 function runTest() | |
| 9 { | |
| 10 if (!window.testRunner) { | |
| 11 debug("This test can only run from within DumpRenderTree because it requ
ires TestNetscapePlugin.\n"); | |
| 12 return; | |
| 13 } | |
| 14 | |
| 15 plugin1 = document.createElement("embed"); | |
| 16 plugin1.type = "application/x-webkit-test-netscape"; | |
| 17 plugin1.setAttribute('test', 'private-browsing'); | |
| 18 document.body.appendChild(plugin1); | |
| 19 | |
| 20 shouldBe("plugin1.privateBrowsingEnabled", "false"); | |
| 21 | |
| 22 // Now enable private browsing | |
| 23 testRunner.setPrivateBrowsingEnabled(true); | |
| 24 | |
| 25 shouldBe("plugin1.privateBrowsingEnabled", "true"); | |
| 26 | |
| 27 plugin2 = document.createElement("embed"); | |
| 28 plugin2.type = "application/x-webkit-test-netscape"; | |
| 29 plugin2.setAttribute('test', 'private-browsing'); | |
| 30 document.body.appendChild(plugin2); | |
| 31 | |
| 32 shouldBe("plugin2.privateBrowsingEnabled", "true"); | |
| 33 testRunner.setPrivateBrowsingEnabled(false); | |
| 34 shouldBe("plugin1.privateBrowsingEnabled", "false"); | |
| 35 shouldBe("plugin2.privateBrowsingEnabled", "false"); | |
| 36 } | |
| 37 </script> | |
| 38 | |
| 39 <script> | |
| 40 description("Tests that NPNVprivateModeBool is supported by the WebKit plugin vi
ew. \n This test is for WebKit platforms that wish to support NPNVprivateModeBoo
l but do not wish to implement the preference change listener required to suppor
t a cachedPrivateBrowsingEnabled property similar to the one provided by Safari
and tested for in private-browsing-mode.html"); | |
| 41 | |
| 42 | |
| 43 </script> | |
| OLD | NEW |