dom/plugins/test/mochitest/test_defaultValue.html

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 <html>
     2   <head>
     3     <title>NPObject [[DefaultValue]] implementation</title>
     5     <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     6     <script type="text/javascript" src="utils.js"></script>
     7     <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     8   </head>
    10   <body onload="run()">
    12     <script class="testbody" type="application/javascript">
    13       SimpleTest.waitForExplicitFinish();
    14       setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
    16       function run() {
    17         var plugin = document.getElementById("plugin");
    18         var pluginProto = Object.getPrototypeOf(plugin);
    20         plugin.propertyAndMethod = {};
    21         plugin.propertyAndMethod + "baz";
    22         ok(true, "|plugin.propertyAndMethod + \"baz\"| shouldn't assert");
    23         pluginProto.propertyAndMethod = {};
    24         pluginProto.propertyAndMethod + "quux";
    25         ok(true, "|pluginProto.propertyAndMethod + \"quux\"| shouldn't assert");
    27         plugin + "foo";
    28         ok(true, "|plugin + \"foo\"| shouldn't assert");
    29         pluginProto + "bar";
    30         ok(true, "|pluginProto + \"bar\"| shouldn't assert");
    32         SimpleTest.finish();
    33       }
    34     </script>
    36     <embed id="plugin" type="application/x-test" wmode="window"></embed>
    37   </body>
    38 </html>

mercurial