2011-07-17 23:09:13 +04:00
|
|
|
<!--
|
|
|
|
Any copyright is dedicated to the Public Domain.
|
|
|
|
http://creativecommons.org/publicdomain/zero/1.0/
|
|
|
|
-->
|
2008-11-27 09:16:37 +03:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<!--
|
|
|
|
Tests of DOM Worker Threads XHR(Bug 450452 )
|
|
|
|
-->
|
|
|
|
<head>
|
|
|
|
<title>Test for DOM Worker Threads XHR (Bug 450452 )</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=450452">DOM Worker Threads XHR (Bug 450452)</a>
|
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<pre id="test">
|
|
|
|
<script language="javascript" src="xhrAbort_worker.js"></script>
|
|
|
|
<script class="testbody" language="javascript">
|
|
|
|
|
|
|
|
function postMessage(data) {
|
2011-07-17 23:09:13 +04:00
|
|
|
dump(data.toString() + "\n");
|
2008-11-27 09:16:37 +03:00
|
|
|
|
|
|
|
var worker = new Worker("xhrAbort_worker.js");
|
|
|
|
|
|
|
|
worker.onmessage = function(event) {
|
2008-12-08 03:15:49 +03:00
|
|
|
is (data.toString(), event.data.toString(), "Got different results!");
|
2008-11-27 09:16:37 +03:00
|
|
|
SimpleTest.finish();
|
|
|
|
};
|
|
|
|
|
|
|
|
worker.postMessage("start");
|
|
|
|
}
|
|
|
|
|
2012-07-26 00:49:24 +04:00
|
|
|
runTest();
|
2012-01-24 03:40:39 +04:00
|
|
|
|
2012-07-26 00:49:24 +04:00
|
|
|
SimpleTest.waitForExplicitFinish();
|
2008-11-27 09:16:37 +03:00
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|