gecko/modules/plugin/test/mochitest/test_cookies.html

21 lines
714 B
HTML
Raw Normal View History

<html>
<head>
<title>NPAPI Cookie Tests</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/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>