dom/xbl/test/test_bug790265.xhtml

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.

michael@0 1 <?xml version="1.0"?>
michael@0 2 <html xmlns="http://www.w3.org/1999/xhtml">
michael@0 3 <!--
michael@0 4 https://bugzilla.mozilla.org/show_bug.cgi?id=790265
michael@0 5 -->
michael@0 6 <head>
michael@0 7 <title>Test for Bug 790265</title>
michael@0 8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
michael@0 9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
michael@0 10 <bindings xmlns="http://www.mozilla.org/xbl">
michael@0 11 <binding id="binding">
michael@0 12 <implementation>
michael@0 13 <method name="foo" exposeToUntrustedContent="true">
michael@0 14 <body><![CDATA[
michael@0 15 return this;
michael@0 16 ]]></body>
michael@0 17 </method>
michael@0 18 </implementation>
michael@0 19 </binding>
michael@0 20 </bindings>
michael@0 21 <style>
michael@0 22 #toBind { display: none; }
michael@0 23 #toBind.bound { -moz-binding: url(#binding); }
michael@0 24 </style>
michael@0 25 </head>
michael@0 26 <body>
michael@0 27 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=790265">Mozilla Bug 790265</a>
michael@0 28 <p id="display"></p>
michael@0 29 <div id="content">
michael@0 30 <div id="toBind">Bound element</div>
michael@0 31 </div>
michael@0 32 <pre id="test">
michael@0 33 <script class="testbody" type="text/javascript">
michael@0 34 <![CDATA[
michael@0 35 SimpleTest.waitForExplicitFinish();
michael@0 36 // Flush out style on $("toBind")
michael@0 37 $("toBind").offsetWidth;
michael@0 38 ok(!("foo" in $("toBind")), "Should not have binding applied");
michael@0 39 is(getComputedStyle($("toBind")).MozBinding, "none",
michael@0 40 "Computed binding should be none");
michael@0 41 $("toBind").className = "bound";
michael@0 42 // Flush the style change, so we kick off the binding load before onload
michael@0 43 // fires and thus block onload.
michael@0 44 $("toBind").offsetWidth;
michael@0 45 addLoadEvent(function() {
michael@0 46 ok("foo" in $("toBind"), "Should have binding applied");
michael@0 47 is($("toBind").foo(), $("toBind"), "Should have correct return value");
michael@0 48 SimpleTest.finish();
michael@0 49 });
michael@0 50 ]]>
michael@0 51 </script>
michael@0 52 </pre>
michael@0 53 </body>
michael@0 54 </html>
michael@0 55

mercurial