|
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. |
|
4 |
|
5 setCachingEnabled(true); |
|
6 if (!isAsmJSCompilationAvailable()) |
|
7 quit(); |
|
8 |
|
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); |