mirror of
https://github.com/servo/servo.git
synced 2025-10-03 18:19:14 +01:00
32 lines
779 B
HTML
32 lines
779 B
HTML
<!--
|
|
self.close()
|
|
var xhr = new XMLHttpRequest();
|
|
xhr.open("GET", "/resources/testharness.js");
|
|
xhr.send(42);
|
|
postMessage(xhr.readyState)
|
|
/*-->
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>XHR used when worker is closing itself</title>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="log"></div>
|
|
<script>
|
|
var test = async_test();
|
|
test.step(function() {
|
|
var worker = new Worker('#')
|
|
worker.onmessage = function(e) {
|
|
test.step(function() {
|
|
assert_equals(e.data, XMLHttpRequest.OPENED, 'XHR.readyState')
|
|
})
|
|
test.done()
|
|
}
|
|
})
|
|
</script>
|
|
</body>
|
|
</html>
|
|
<!--*/ //-->
|