dom/plugins/test/mochitest/test_cookies.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/plugins/test/mochitest/test_cookies.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,23 @@
     1.4 +<html>
     1.5 +<head>
     1.6 +  <title>NPAPI Cookie Tests</title>
     1.7 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     1.8 +  <script type="application/javascript" src="utils.js"></script>
     1.9 +</head>
    1.10 +
    1.11 +<body onload="runTests()">
    1.12 +  <script class="testbody" type="application/javascript">
    1.13 +    SimpleTest.waitForExplicitFinish();
    1.14 +    setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
    1.15 +
    1.16 +    function runTests() {
    1.17 +      var pluginElement = document.getElementById("plugin1");
    1.18 +      pluginElement.setCookie("foo");
    1.19 +      is(pluginElement.getCookie(), "foo", "Cookie was set and retrieved correctly via NPAPI.");
    1.20 +      SimpleTest.finish();
    1.21 +    }
    1.22 +  </script>
    1.23 +
    1.24 +  <embed id="plugin1" type="application/x-test" width="400" height="400"></embed>
    1.25 +</body>
    1.26 +</html>

mercurial