content/html/document/test/test_bug57600.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=57600
     5 -->
     6 <head>
     7   <title>Test for Bug 57600</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=57600">Mozilla Bug 57600</a>
    13 <div id="content" style="display: none">
    15 </div>
    16 <pre id="test">
    17 <script type="application/javascript">
    19 /** Test for Bug 57600 **/
    20 SimpleTest.waitForExplicitFinish();
    21 var count = 0;
    22 function disp(win) {
    23   var d = win ? win.document : self.testname.document;
    24   var str = 'You should see this';
    25   d.open();
    26   d.write(str);
    27   d.close();
    28   is(d.documentElement.textContent, str, "Unexpected text");
    29   if (++count == 2) {
    30     SimpleTest.finish();
    31   }
    32 }
    33 </script>
    34 </pre>
    35 <p id="display">
    36   <iframe src="javascript:'<body onload=&quot;this.onerror = parent.onerror; parent.disp(self)&quot;></body>'"> 
    37   </iframe>
    38   <iframe name="testname" src="javascript:'<body onload=&quot;this.onerror = parent.onerror; parent.disp()&quot;></body>'"> 
    39   </iframe>
    40 </p>
    41 </body>
    42 </html>

mercurial