gecko/testing/web-platform/tests/workers/WorkerGlobalScope_EventTarget.htm
James Graham 3dfd6c1bac Bug 945222 - Initial import of web-platform-tests testsuite 1/4: test data
--HG--
extra : rebase_source : d635a4f39c587d4d381b486dd63de747865b77a2
2014-09-04 12:48:31 +01:00

34 lines
810 B
HTML

<!DOCTYPE html>
<html>
<head>
<title> WorkerGlobalScope implements EventTarget </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id=log></div>
<script>
var DATA = "TestEventTarget";
var FileName = './support/EventListener.js';
var t = async_test("Test Description: WorkerGlobalScope implements EventTarget");
var worker = new Worker(FileName);
worker.onmessage = t.step_func(function(evt)
{
var global = evt.data[0];
var target = evt.data[1];
assert_regexp_match(target, /\[object (.*?)Worker(.+?)\]/);
assert_equals(target, global);
t.done();
});
worker.postMessage(DATA);
</script>
</body>
</html>