js/xpconnect/tests/mochitest/test_bug993423.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 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=993423
     5 -->
     6 <head>
     7   <meta charset="utf-8">
     8   <title>Test for Bug 993423</title>
     9   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    10   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    11   <script type="application/javascript">
    13   /** Test for Bug 993423 **/
    14   SimpleTest.waitForExplicitFinish();
    16   var sCallbackInvocations = 0;
    17   function callback(handlerIsInXBLScope) {
    18     ok(!handlerIsInXBLScope, "Event handler should not be in XBL scope");
    19     if (++sCallbackInvocations == 2)
    20       SimpleTest.finish();
    21   }
    23   function go() {
    24     document.querySelector('use').setAttributeNS('http://www.w3.org/1999/xlink',
    25                                                  'href', location.href + '#a');
    26   }
    28   </script>
    29 </head>
    30 <body onload="go()";>
    31 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=993423">Mozilla Bug 993423</a>
    32 <p id="display"></p>
    33 <div id="content" style="display: none">
    35 </div>
    36 <pre id="test">
    37 </pre>
    38 <svg>
    39   <symbol id="a">
    40     <foreignObject>
    41     <img src="about:logo" onload="var isInXBL = (function() { return this; })() != window; if (isInXBL) callback = window.wrappedJSObject.callback; callback(isInXBL);">
    42     </foreignObject>
    43   </symbol>
    44   <use />
    45 </svg>
    46 </body>
    47 </html>

mercurial