dom/tests/mochitest/dom-level0/test_location_framed.html

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 <!DOCTYPE html>
     2 <html>
     3 <head>
     4   <title>MessageEvent tests</title>
     5   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     6   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     7 </head>
     8 <body>
     9   <p id="display"></p>
    10   <pre id="test">
    11   <script>
    12   SimpleTest.waitForExplicitFinish();
    14   window.addEventListener('message', function (e) {
    15     console.log(e);
    16     console.dir(e);
    17     var loc = e.data;
    18     is(loc.hash, '', 'Unexpected hash.');
    19     is(loc.host, 'mochi.test:8888', 'Unexpected host.');
    20     is(loc.hostname, 'mochi.test', 'Unexpected hostname.');
    21     is(loc.origin, 'http://mochi.test:8888', 'Unexpected origin.');
    22     is(loc.pathname, '/tests/dom/tests/mochitest/dom-level0/framed_location.html', 'Unexpected pathname.');
    23     is(loc.port, '8888', 'Unexpected port.');
    24     is(loc.protocol, 'http:', 'Unexpected protocol.');
    25     SimpleTest.finish();
    26   });
    27   </script>
    28   <iframe src="framed_location.html"></iframe>
    29   </pre>
    30 </body>
    31 </html>

mercurial