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 function test () {
2 let loader = makeLoader();
3 let module = Module("./main", gTestPath);
4 let require = Require(loader, module);
6 /*
7 * Relative resource:// URI of json
8 */
10 let data = require("./data.json");
11 is(data.title, "jetpack mochitests", "loads relative JSON");
12 is(data.dependencies.underscore, "1.0.0", "loads relative JSON");
14 try {
15 let data = require("./invalid.json");
16 ok(false, "parsing an invalid JSON should throw");
17 }
18 catch (e) {
19 ok(e, "parsing an invalid JSON should throw");
20 }
22 finish();
23 }