mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 942276 - Improve test_asmjs2.html once caching is deterministic (r=me)
--HG-- extra : rebase_source : 36d1b607bda300f455d4086fe1bd8c7ca3834e77
This commit is contained in:
parent
b10aaf2d3e
commit
c4f69baa02
@ -17,7 +17,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=854209
|
||||
|
||||
<script>
|
||||
var jsFuns = SpecialPowers.Cu.getJSTestingFunctions();
|
||||
ok(jsFuns.isAsmJSCompilationAvailable());
|
||||
ok(jsFuns.isAsmJSCompilationAvailable(), "asm.js compilation is available");
|
||||
</script>
|
||||
|
||||
<script src="http://mochi.test:8888/tests/js/xpconnect/tests/mochitest/file_asmjs.js"></script>
|
||||
|
@ -30,7 +30,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=929236
|
||||
code += "var g42 = f();\n";
|
||||
code += "ok(jsFuns.isAsmJSFunction(g42), 'g42 is an asm.js function')\n";
|
||||
code += "ok(g42() === 42, 'g42 returns the correct result')\n";
|
||||
code += "finishedEvalAsync();";
|
||||
code += "finishedEvalAsync(f);";
|
||||
ok(code.length > 10000);
|
||||
|
||||
function evalAsync(code) {
|
||||
@ -41,13 +41,14 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=929236
|
||||
}
|
||||
|
||||
var state = 0;
|
||||
function finishedEvalAsync() {
|
||||
function finishedEvalAsync(module) {
|
||||
switch (state) {
|
||||
case 0:
|
||||
state++;
|
||||
evalAsync(code);
|
||||
break;
|
||||
case 1:
|
||||
ok(jsFuns.isAsmJSModuleLoadedFromCache(module), 'module loaded from cache');
|
||||
SimpleTest.finish();
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user