Commit ffa4222e authored by Glenn Adams's avatar Glenn Adams
Browse files

Update webworkers (partial).

parent e1e25eee
"use script";
function getWorkerGlobalScopeAsync(test) {
var w = new Worker('./resources/workerglobalscope.js');
w.onmessage = test.step_func_done(function(evt) {
});
w.postMessage(test.def);
}
......@@ -9,6 +9,6 @@ function showProperties(o) {
return s;
}
onmessage = function(event) {
self.console.info(self['XMLHttpRequest']);
//self.console.info(event);
postMessage('done');
};
\ No newline at end of file
......@@ -2,6 +2,9 @@
"spec": "webworkers",
"source": "http://dev.w3.org/html5/workers/",
"local": "webworkers.html",
"helpers": [
"WorkerGlobalScope"
],
"instances": {
"AbstractWorker": "'Worker' in window && new Worker('./resources/empty.js')",
"SharedWorker": "'SharedWorker' in window && new SharedWorker('./resources/empty.js')",
......@@ -10,7 +13,7 @@
"instancesAsync": {
"DedicatedWorkerGlobalScope": "null",
"SharedWorkerGlobalScope": "null",
"WorkerGlobalScope": "null",
"WorkerGlobalScope": "getWorkerGlobalScopeAsync(test)",
"WorkerLocation": "null",
"WorkerNavigator": "null"
}
......
"use script";
function getWorkerGlobalScopeAsync(test) {
var w = new Worker('./resources/workerglobalscope.js');
w.onmessage = test.step_func_done(function(evt) {
});
w.postMessage(test.def);
}
......@@ -9,6 +9,6 @@ function showProperties(o) {
return s;
}
onmessage = function(event) {
self.console.info(self['XMLHttpRequest']);
self.console.info(event);
postMessage('done');
};
\ No newline at end of file
......@@ -6,11 +6,12 @@
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script src='/tools/common/level1.js'></script>
<script src='./helpers/WorkerGlobalScope.js'></script>
<script type='text/plain' id='idl'>
[{"type":"implements","target":"WorkerGlobalScope","implements":"WindowBase64","extAttrs":[]},{"type":"interface","name":"WindowBase64","partial":false,"members":[{"type":"operation","getter":false,"setter":false,"creator":false,"deleter":false,"legacycaller":false,"static":false,"stringifier":false,"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"DOMString"},"name":"btoa","arguments":[{"optional":false,"variadic":false,"extAttrs":[],"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"DOMString"},"name":"btoa"}],"extAttrs":[]},{"type":"operation","getter":false,"setter":false,"creator":false,"deleter":false,"legacycaller":false,"static":false,"stringifier":false,"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"DOMString"},"name":"atob","arguments":[{"optional":false,"variadic":false,"extAttrs":[],"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"DOMString"},"name":"atob"}],"extAttrs":[]}],"inheritance":null,"extAttrs":[{"name":"NoInterfaceObject","arguments":null}],"spec":"html5"}]
</script>
<h1>Test WorkerGlobalScope Implements WindowBase64 Signature</h1>
<div id='log'></div>
<script>
level1Async('webworkers', JSON.parse(document.getElementById('idl').textContent), null);
level1Async('webworkers', JSON.parse(document.getElementById('idl').textContent), function(test){return getWorkerGlobalScopeAsync(test);});
</script>
......@@ -6,11 +6,12 @@
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script src='/tools/common/level1.js'></script>
<script src='./helpers/WorkerGlobalScope.js'></script>
<script type='text/plain' id='idl'>
[{"type":"implements","target":"WorkerGlobalScope","implements":"WindowTimers","extAttrs":[]},{"type":"interface","name":"WindowTimers","partial":false,"members":[{"type":"operation","getter":false,"setter":false,"creator":false,"deleter":false,"legacycaller":false,"static":false,"stringifier":false,"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"long"},"name":"setTimeout","arguments":[{"optional":false,"variadic":false,"extAttrs":[],"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"Function"},"name":"handler"},{"optional":true,"variadic":false,"extAttrs":[],"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"long"},"name":"timeout"},{"optional":false,"variadic":true,"extAttrs":[],"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"any"},"name":"arguments"}],"extAttrs":[]},{"type":"operation","getter":false,"setter":false,"creator":false,"deleter":false,"legacycaller":false,"static":false,"stringifier":false,"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"long"},"name":"setTimeout","arguments":[{"optional":false,"variadic":false,"extAttrs":[],"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"DOMString"},"name":"handler"},{"optional":true,"variadic":false,"extAttrs":[],"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"long"},"name":"timeout"},{"optional":false,"variadic":true,"extAttrs":[],"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"any"},"name":"arguments"}],"extAttrs":[]},{"type":"operation","getter":false,"setter":false,"creator":false,"deleter":false,"legacycaller":false,"static":false,"stringifier":false,"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"void"},"name":"clearTimeout","arguments":[{"optional":false,"variadic":false,"extAttrs":[],"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"long"},"name":"handle"}],"extAttrs":[]},{"type":"operation","getter":false,"setter":false,"creator":false,"deleter":false,"legacycaller":false,"static":false,"stringifier":false,"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"long"},"name":"setInterval","arguments":[{"optional":false,"variadic":false,"extAttrs":[],"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"Function"},"name":"handler"},{"optional":true,"variadic":false,"extAttrs":[],"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"long"},"name":"timeout"},{"optional":false,"variadic":true,"extAttrs":[],"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"any"},"name":"arguments"}],"extAttrs":[]},{"type":"operation","getter":false,"setter":false,"creator":false,"deleter":false,"legacycaller":false,"static":false,"stringifier":false,"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"long"},"name":"setInterval","arguments":[{"optional":false,"variadic":false,"extAttrs":[],"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"DOMString"},"name":"handler"},{"optional":true,"variadic":false,"extAttrs":[],"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"long"},"name":"timeout"},{"optional":false,"variadic":true,"extAttrs":[],"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"any"},"name":"arguments"}],"extAttrs":[]},{"type":"operation","getter":false,"setter":false,"creator":false,"deleter":false,"legacycaller":false,"static":false,"stringifier":false,"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"void"},"name":"clearInterval","arguments":[{"optional":false,"variadic":false,"extAttrs":[],"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"long"},"name":"handle"}],"extAttrs":[]}],"inheritance":null,"extAttrs":[{"name":"NoInterfaceObject","arguments":null}],"spec":"html5"}]
</script>
<h1>Test WorkerGlobalScope Implements WindowTimers Signature</h1>
<div id='log'></div>
<script>
level1Async('webworkers', JSON.parse(document.getElementById('idl').textContent), null);
level1Async('webworkers', JSON.parse(document.getElementById('idl').textContent), function(test){return getWorkerGlobalScopeAsync(test);});
</script>
......@@ -6,11 +6,12 @@
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script src='/tools/common/level1.js'></script>
<script src='./helpers/WorkerGlobalScope.js'></script>
<script type='text/plain' id='idl'>
{"type":"interface","name":"WorkerGlobalScope","partial":true,"members":[{"type":"operation","getter":false,"setter":false,"creator":false,"deleter":false,"legacycaller":false,"static":false,"stringifier":false,"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"void"},"name":"importScripts","arguments":[{"optional":false,"variadic":true,"extAttrs":[],"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"DOMString"},"name":"urls"}],"extAttrs":[]},{"type":"attribute","static":false,"stringifier":false,"inherit":false,"readonly":true,"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"WorkerNavigator"},"name":"navigator","extAttrs":[]}],"extAttrs":[{"name":"Exposed","arguments":null,"rhs":{"type":"identifier","value":"Worker"}}]}
</script>
<h1>Test Interface WorkerGlobalScope Signature</h1>
<div id='log'></div>
<script>
level1Async('webworkers', JSON.parse(document.getElementById('idl').textContent), null);
level1Async('webworkers', JSON.parse(document.getElementById('idl').textContent), function(test){return getWorkerGlobalScopeAsync(test);});
</script>
......@@ -6,11 +6,12 @@
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script src='/tools/common/level1.js'></script>
<script src='./helpers/WorkerGlobalScope.js'></script>
<script type='text/plain' id='idl'>
{"type":"interface","name":"WorkerGlobalScope","partial":false,"members":[{"type":"attribute","static":false,"stringifier":false,"inherit":false,"readonly":true,"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"WorkerGlobalScope"},"name":"self","extAttrs":[]},{"type":"attribute","static":false,"stringifier":false,"inherit":false,"readonly":true,"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"WorkerLocation"},"name":"location","extAttrs":[]},{"type":"operation","getter":false,"setter":false,"creator":false,"deleter":false,"legacycaller":false,"static":false,"stringifier":false,"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"void"},"name":"close","arguments":[],"extAttrs":[]},{"type":"attribute","static":false,"stringifier":false,"inherit":false,"readonly":false,"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"OnErrorEventHandler"},"name":"onerror","extAttrs":[]},{"type":"attribute","static":false,"stringifier":false,"inherit":false,"readonly":false,"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"EventHandler"},"name":"onlanguagechange","extAttrs":[]},{"type":"attribute","static":false,"stringifier":false,"inherit":false,"readonly":false,"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"EventHandler"},"name":"onoffline","extAttrs":[]},{"type":"attribute","static":false,"stringifier":false,"inherit":false,"readonly":false,"idlType":{"sequence":false,"generic":null,"nullable":false,"array":false,"union":false,"idlType":"EventHandler"},"name":"ononline","extAttrs":[]}],"inheritance":"EventTarget","extAttrs":[{"name":"Exposed","arguments":null,"rhs":{"type":"identifier","value":"Worker"}}]}
</script>
<h1>Test Interface WorkerGlobalScope Signature</h1>
<div id='log'></div>
<script>
level1Async('webworkers', JSON.parse(document.getElementById('idl').textContent), null);
level1Async('webworkers', JSON.parse(document.getElementById('idl').textContent), function(test){return getWorkerGlobalScopeAsync(test);});
</script>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment