michael@0: // Test a big fat asm.js module. First load/compile/cache bullet.js in a michael@0: // separate process and then load it again in this process, which should be a michael@0: // cache hit. michael@0: michael@0: setCachingEnabled(true); michael@0: if (!isAsmJSCompilationAvailable()) michael@0: quit(); michael@0: michael@0: // Note: if you get some failure in this test, it probably has to do with michael@0: // bullet.js and not the nestedShell() call, so try first commenting out michael@0: // nestedShell() (and the loadedFromCache assertion) to see if the error michael@0: // reproduces. michael@0: var code = "setIonCheckGraphCoherency(false); setCachingEnabled(true); load('" + libdir + "bullet.js'); runBullet()"; michael@0: nestedShell("--js-cache", "--execute=" + code); michael@0: setIonCheckGraphCoherency(false); michael@0: load(libdir + 'bullet.js'); michael@0: var results = runBullet(); michael@0: assertEq(results.asmJSValidated, true); michael@0: assertEq(results.loadedFromCache, true);