blob: 2970877a12e2c7bb758e8f6115f986e0feda5e4c [file] [log] [blame]
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body onload="runTest()">
<p id="description"></p>
<div id="console"></div>
<script>
function runTest()
{
if (!window.testRunner) {
debug("This test can only run from within DumpRenderTree because it requires TestNetscapePlugin.\n");
return;
}
plugin1 = document.createElement("embed");
plugin1.type = "application/x-webkit-test-netscape";
plugin1.setAttribute('test', 'private-browsing');
document.body.appendChild(plugin1);
shouldBe("plugin1.privateBrowsingEnabled", "false");
// Now enable private browsing
testRunner.setPrivateBrowsingEnabled_DEPRECATED(true);
shouldBe("plugin1.privateBrowsingEnabled", "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");
testRunner.setPrivateBrowsingEnabled_DEPRECATED(false);
shouldBe("plugin1.privateBrowsingEnabled", "false");
shouldBe("plugin2.privateBrowsingEnabled", "false");
}
</script>
<script>
description("Tests that NPNVprivateModeBool is supported by the WebKit plugin view. \n This test is for WebKit platforms that wish to support NPNVprivateModeBool but do not wish to implement the preference change listener required to support a cachedPrivateBrowsingEnabled property similar to the one provided by Safari and tested for in private-browsing-mode.html");
</script>