2011-07-17 12:09:13 -07:00
|
|
|
<!--
|
|
|
|
Any copyright is dedicated to the Public Domain.
|
|
|
|
http://creativecommons.org/publicdomain/zero/1.0/
|
|
|
|
-->
|
2008-11-26 22:16:37 -08: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 12:09:13 -07:00
|
|
|
dump(data.toString() + "\n");
|
2008-11-26 22:16:37 -08:00
|
|
|
|
|
|
|
var worker = new Worker("xhrAbort_worker.js");
|
|
|
|
|
|
|
|
worker.onmessage = function(event) {
|
2008-12-07 16:15:49 -08:00
|
|
|
is (data.toString(), event.data.toString(), "Got different results!");
|
2008-11-26 22:16:37 -08:00
|
|
|
SimpleTest.finish();
|
|
|
|
};
|
|
|
|
|
|
|
|
worker.postMessage("start");
|
|
|
|
}
|
|
|
|
|
2012-07-25 13:49:24 -07:00
|
|
|
runTest();
|
2012-01-23 15:40:39 -08:00
|
|
|
|
2012-07-25 13:49:24 -07:00
|
|
|
SimpleTest.waitForExplicitFinish();
|
2008-11-26 22:16:37 -08:00
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|