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 | function callback(result) { |
michael@0 | 2 | do_check_eq(result, Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT); |
michael@0 | 3 | do_test_finished(); |
michael@0 | 4 | } |
michael@0 | 5 | |
michael@0 | 6 | function run_test() { |
michael@0 | 7 | do_test_pending(); |
michael@0 | 8 | |
michael@0 | 9 | do_check_eq(runtime.processType, Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT); |
michael@0 | 10 | |
michael@0 | 11 | sendCommand("load('test_ipcshell_child.js');"); |
michael@0 | 12 | |
michael@0 | 13 | sendCommand("runtime.processType;", callback); |
michael@0 | 14 | |
michael@0 | 15 | [ [ "C", "D" ], [ "D", "C" ], [ "\u010C", "D" ], [ "D", "\u010C" ] ].forEach( |
michael@0 | 16 | function (pair) { |
michael@0 | 17 | do_test_pending(); |
michael@0 | 18 | var cmp = pair[0].localeCompare(pair[1]); |
michael@0 | 19 | sendCommand( |
michael@0 | 20 | "'"+ pair[0] +"'.localeCompare('"+ pair[1] +"');", |
michael@0 | 21 | function (result) { |
michael@0 | 22 | do_check_eq(cmp, result); |
michael@0 | 23 | do_test_finished(); |
michael@0 | 24 | }); |
michael@0 | 25 | }) |
michael@0 | 26 | } |
michael@0 | 27 | load('test_ipcshell_child.js'); |
michael@0 | 28 |