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.
1 <html>
2 <body>
3 <script>
4 window.returnValue = 3;
6 if (location.toString().match(/^http:\/\/mochi.test:8888/)) {
7 // Test that we got the right arguments.
8 opener.is(window.dialogArguments, "my args",
9 "dialog did not get the right arguments.");
11 // Load a different url, and test that it sees the arguments (since it's same origin).
12 window.location="data:text/html,<html><body onload=\"opener.is(window.dialogArguments, 'my args', 'subsequent dialog document did not get the right arguments.'); close();\">';";
13 } else {
14 // Post a message containing our arguments to the opener to test
15 // that this cross origing dialog does *not* see the passed in
16 // arguments.
17 opener.postMessage("args: " + window.dialogArguments,
18 "http://mochi.test:8888");
20 close();
21 }
22 </script>