Tue, 06 Jan 2015 21:39:09 +0100
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.
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>MessageEvent tests</title> |
michael@0 | 5 | <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 6 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
michael@0 | 7 | </head> |
michael@0 | 8 | <body> |
michael@0 | 9 | <p id="display"></p> |
michael@0 | 10 | <pre id="test"> |
michael@0 | 11 | <script> |
michael@0 | 12 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 13 | |
michael@0 | 14 | window.addEventListener('message', function (e) { |
michael@0 | 15 | console.log(e); |
michael@0 | 16 | console.dir(e); |
michael@0 | 17 | var loc = e.data; |
michael@0 | 18 | is(loc.hash, '', 'Unexpected hash.'); |
michael@0 | 19 | is(loc.host, 'mochi.test:8888', 'Unexpected host.'); |
michael@0 | 20 | is(loc.hostname, 'mochi.test', 'Unexpected hostname.'); |
michael@0 | 21 | // Is this correct? It matches WebKit, but it seems wrong: |
michael@0 | 22 | // https://bugs.webkit.org/show_bug.cgi?id=106488 |
michael@0 | 23 | is(loc.origin, 'http://mochi.test:8888', 'Unexpected origin.'); |
michael@0 | 24 | is(loc.pathname, '/tests/dom/tests/mochitest/dom-level0/framed_location.html', 'Unexpected pathname.'); |
michael@0 | 25 | is(loc.port, '8888', 'Unexpected port.'); |
michael@0 | 26 | is(loc.protocol, 'http:', 'Unexpected protocol.'); |
michael@0 | 27 | SimpleTest.finish(); |
michael@0 | 28 | }); |
michael@0 | 29 | </script> |
michael@0 | 30 | <iframe sandbox="allow-scripts" src="framed_location.html"></iframe> |
michael@0 | 31 | </pre> |
michael@0 | 32 | </body> |
michael@0 | 33 | </html> |