Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 // Test a big fat asm.js module. First load/compile/cache bullet.js in a
2 // separate process and then load it again in this process, which should be a
3 // cache hit.
5 setCachingEnabled(true);
6 if (!isAsmJSCompilationAvailable())
7 quit();
9 // Note: if you get some failure in this test, it probably has to do with
10 // bullet.js and not the nestedShell() call, so try first commenting out
11 // nestedShell() (and the loadedFromCache assertion) to see if the error
12 // reproduces.
13 var code = "setIonCheckGraphCoherency(false); setCachingEnabled(true); load('" + libdir + "bullet.js'); runBullet()";
14 nestedShell("--js-cache", "--execute=" + code);
15 setIonCheckGraphCoherency(false);
16 load(libdir + 'bullet.js');
17 var results = runBullet();
18 assertEq(results.asmJSValidated, true);
19 assertEq(results.loadedFromCache, true);