dom/xbl/test/test_bug591198.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=591198
     5 -->
     6 <head>
     7   <title>Test for Bug 591198</title>
     8   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
    10 </head>
    11 <body onload="gen.next();">
    12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=591198">Mozilla Bug 591198</a>
    13 <iframe id=iframe></iframe>
    14 <pre id="test">
    15 <script class="testbody" type="text/javascript;version=1.8">
    17 SimpleTest.waitForExplicitFinish();
    19 gen = runTest();
    21 function runTest() {
    22   let iframe = $('iframe');
    23   window.addEventListener("message", function(e) {
    24     gen.send(JSON.parse(e.data));
    25   }, false);
    27   iframe.src = "file_bug591198_inner.html";
    28   let res = (yield);
    29   is(res.widths[0], res.widths[2], "binding was rendered");
    30   isnot(res.widths[0], res.widths[1], "binding was rendered");
    31   is(res.anonChildCount, 2, "correct number of anon children");
    33   iframe.src = "http://noxul.example.com/tests/dom/xbl/test/file_bug591198_inner.html";
    34   let res = (yield);
    35   is(res.widths[0], res.widths[1], "binding was not rendered");
    36   isnot(res.widths[0], res.widths[2], "binding was not rendered");
    37   is("anonChildCount" in res, false, "no anon children");
    39   SimpleTest.finish();
    40   yield undefined;
    41 }
    43 </script>
    44 </pre>
    45 </body>
    46 </html>

mercurial