js/xpconnect/tests/mochitest/test_bug629227.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=629227
     5 -->
     6 <head>
     7   <title>Test for Bug 629227</title>
     8   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    10 </head>
    11 <body>
    12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=629227">Mozilla Bug 629227</a>
    13 <p id="display">
    14   <iframe id="testTarget"></iframe>
    15 </p>
    16 <div id="content" style="display: none">
    18 </div>
    19 <pre id="test">
    20 <script type="application/javascript">
    22 /** Test for Bug 629227 **/
    23 SimpleTest.waitForExplicitFinish();
    25 $("testTarget").src =
    26   "http://test1.example.org" +
    27   location.pathname.replace(/test_bug629227.html/, "file1_bug629227.html");
    29 window.onmessage = function(ev) {
    30   if (ev.data == "finish") {
    31     SimpleTest.finish();
    32   } else {
    33     var data = JSON.parse(ev.data);
    34     if ("ok" in data) {
    35       ok(data.ok, data.reason);
    36     }
    37   }
    38 }
    40 addLoadEvent(function() {
    41   $("testTarget").contentWindow.postMessage("start", "*");
    42 });
    44 </script>
    45 </pre>
    46 </body>
    47 </html>

mercurial