dom/xbl/test/file_bug844783.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.

     1 <html xmlns="http://www.w3.org/1999/xhtml">
     2 <!--
     3 https://bugzilla.mozilla.org/show_bug.cgi?id=844783
     4 -->
     5 <head>
     6   <bindings xmlns="http://www.mozilla.org/xbl">
     7     <binding id="testBinding">
     8       <implementation>
     9         <constructor>
    10           is(windowExpando, 42, "Expandos show up without explicit waiving");
    11           someFunction();
    12           ok(called, "Function called");
    13           go();
    14         </constructor>
    15       </implementation>
    16       <handlers>
    17         <handler event="testevent" action="is(boundExpando, 11, 'See expandos on |this|'); SimpleTest.finish();"/>
    18       </handlers>
    19     </binding>
    20   </bindings>
    21   <script type="application/javascript">
    22   <![CDATA[
    24   is = parent.is;
    25   ok = parent.ok;
    26   SimpleTest = parent.SimpleTest;
    27   window.windowExpando = 42;
    28   window.someFunction = function() { ok(true, "Called"); window.called = true; };
    30   function go() {
    31     var bound = document.getElementById('bound');
    32     bound.boundExpando = 11;
    33     bound.dispatchEvent(new CustomEvent('testevent'));
    34   }
    36   function setup() {
    37     // When the bindings are applied, the constructor will be invoked and the
    38     // test will continue.
    39     document.getElementById('bound').style.MozBinding = 'url(#testBinding)';
    40   }
    42   ]]>
    43 </script>
    44 </head>
    45 <body onload="setup()">
    46 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=844783">Mozilla Bug 844783</a>
    47 <p id="display"></p>
    48 <div id="content">
    49   <div id="bound">Bound element</div>
    50 </div>
    51 <pre id="test">
    52 </pre>
    53 </body>
    54 </html>

mercurial