mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
07142666f2
--HG-- extra : rebase_source : c9f2ef6114cf1d29a4081cb9e3aa72b7e9a800b1
49 lines
1.3 KiB
HTML
49 lines
1.3 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<!--
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=854209
|
|
-->
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>asm.js browser tests</title>
|
|
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
|
</head>
|
|
<body>
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=854209">asm.js browser tests</a>
|
|
<p id="display"></p>
|
|
<div id="content" style="display: none"></div>
|
|
<pre id="test"></pre>
|
|
|
|
<script>
|
|
var jsFuns = SpecialPowers.Cu.getJSTestingFunctions();
|
|
|
|
var completed = 0;
|
|
function complete() {
|
|
if (++completed == 2)
|
|
SimpleTest.finish();
|
|
}
|
|
|
|
if (!jsFuns.isAsmJSCompilationAvailable()) {
|
|
ok(true, "isAsmJSCompilationAvailable is false, skipping this test!");
|
|
} else {
|
|
var script = document.createElement("script");
|
|
script.src = "http://mochi.test:8888/tests/dom/asmjscache/test/file_slow.js";
|
|
document.body.appendChild(script);
|
|
|
|
var w = new Worker('http://mochi.test:8888/tests/dom/asmjscache/test/file_slow.js');
|
|
w.onmessage = function(e) {
|
|
ok(e.data === "ok", "Worker asm.js tests");
|
|
complete();
|
|
}
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
}
|
|
</script>
|
|
|
|
<script>
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|