gecko/modules/plugin/test/mochitest/test_cookies.html
Benjamin Smedberg 915969ff29 Bug 541155 - test_loadflags.html doesn't reset prefs properly (manifests as a failure in modules/plugin/test/test_cookies.html), r=dwitte
--HG--
extra : transplant_source : VM%EB%A5.b%EC%CB1%1FGB%C2%A0%0E%C4%60%B0r4
2010-01-21 14:11:49 -05:00

21 lines
764 B
HTML

<html>
<head>
<title>NPAPI Cookie Tests</title>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
</head>
<body onload="runTests()">
<embed id="plugin1" type="application/x-test" width="400" height="400"></embed>
<script class="testbody" type="application/javascript">
SimpleTest.waitForExplicitFinish();
function runTests() {
var pluginElement = document.getElementById("plugin1");
pluginElement.setCookie("foo");
is(pluginElement.getCookie(), "foo", "Cookie was set and retrieved correctly via NPAPI.");
SimpleTest.finish();
}
</script>
</body>
</html>