js/xpconnect/tests/mochitest/test_bug650273.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=650273
     5 test by moz_bug_r_a4@yahoo.com
     6 -->
     7 <head>
     8   <title>Test for Bug 650273</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 </head>
    12 <body>
    13 <a target="_blank"
    14 href="https://bugzilla.mozilla.org/show_bug.cgi?id=650273">Mozilla Bug 650273</a>
    15 <p id="display"></p>
    16 <div id="content" style="display: none">
    18 </div>
    19 <pre id="test">
    20 <script type="application/javascript">
    22 /** Test for Bug 504877 **/
    23 SimpleTest.waitForExplicitFinish();
    24 var count = 0;
    25 function done() {
    26     if (++count == 2) {
    27         try {
    28             ok($('ifr').location.host === 'example.com', "shouldn't see this");
    29         } catch (e) {
    30             ok(true, "navigation successfully happened");
    31         }
    32         SimpleTest.finish();
    33     }
    34 }
    36 </script>
    38 <iframe id="ifr" src="file_bug650273.html" onload="done()"></iframe>
    40 </pre>
    41 </body>
    42 </html>

mercurial