blob: e35e9deb527968bd43e9ac56223bb175f443ec6b [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/js-test-pre.js"></script>
<script src="resources/worker-create-common.js"></script>
<script>
var jsTestIsAsync = true;
description('Tests that self.hasOwnProperty() works in workers');
var worker = createWorker();
worker.postMessage("eval self.hasOwnProperty('DedicatedWorkerGlobalScope')");
worker.postMessage("eval self.hasOwnProperty('WorkerGlobalScope')");
worker.postMessage("eval self.hasOwnProperty('postMessage')");
worker.postMessage("eval self.hasOwnProperty('IDBDatabase')");
worker.postMessage("eval DONE");
worker.onmessage = function(evt) {
if (!/DONE/.test(evt.data))
debug(evt.data.replace(new RegExp("/.*LayoutTests"), "<...>"));
else
finishJSTest();
};
</script>
<script src="../../resources/js-test-post.js"></script>