mirror of
https://github.com/servo/servo
synced 2026-05-05 06:32:13 +02:00
Update web-platform-tests to revision 0d318188757a9c996e20b82db201fd04de5aa255
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
importScripts("/resources/testharness.js");
|
||||
var expected = [
|
||||
"WorkerGlobalScope",
|
||||
"EventTarget",
|
||||
"DedicatedWorkerGlobalScope",
|
||||
"ErrorEvent",
|
||||
"Event",
|
||||
"Worker",
|
||||
"DOMException",
|
||||
"SharedWorker",
|
||||
"MessagePort",
|
||||
"MessageEvent",
|
||||
"WorkerNavigator",
|
||||
"MessageChannel",
|
||||
"WorkerLocation",
|
||||
"ImageData",
|
||||
"File",
|
||||
"Blob",
|
||||
"FileList",
|
||||
"XMLHttpRequest",
|
||||
"ProgressEvent",
|
||||
"FormData",
|
||||
"ArrayBuffer",
|
||||
"Int8Array",
|
||||
"Uint8Array",
|
||||
"Uint8ClampedArray",
|
||||
"Int16Array",
|
||||
"Uint16Array",
|
||||
"Int32Array",
|
||||
"Uint32Array",
|
||||
"Float32Array",
|
||||
"Float64Array",
|
||||
"DataView",
|
||||
"CanvasProxy",
|
||||
"ImageBitmap",
|
||||
"CanvasRenderingContext2D",
|
||||
"DrawingStyle",
|
||||
"CanvasGradient",
|
||||
"CanvasPattern",
|
||||
"Path",
|
||||
"TextMetrics"
|
||||
];
|
||||
for (var i = 0; i < expected.length; ++i) {
|
||||
test(function () {
|
||||
assert_own_property(self, expected[i]);
|
||||
}, "The " + expected[i] + " interface object should be exposed.");
|
||||
}
|
||||
done();
|
||||
@@ -0,0 +1,18 @@
|
||||
importScripts("/resources/testharness.js");
|
||||
var unexpected = [
|
||||
"AbstractView",
|
||||
"AbstractWorker",
|
||||
"ApplicationCache",
|
||||
"Location",
|
||||
"Navigator",
|
||||
"DOMImplementation",
|
||||
"Audio",
|
||||
"HTMLCanvasElement",
|
||||
"MouseEvent",
|
||||
];
|
||||
for (var i = 0; i < unexpected.length; ++i) {
|
||||
test(function () {
|
||||
assert_false(unexpected[i] in self);
|
||||
}, "The " + unexpected[i] + " interface object should not be exposed.");
|
||||
}
|
||||
done();
|
||||
@@ -0,0 +1,30 @@
|
||||
<!--
|
||||
onconnect = function(e) {
|
||||
var expected = 'ApplicationCache WorkerGlobalScope EventTarget ErrorEvent Event Worker DOMException SharedWorker MessagePort MessageEvent WorkerNavigator MessageChannel WorkerLocation Database ImageData File Blob FileList XMLHttpRequest ProgressEvent FormData ArrayBuffer Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array DataView CanvasProxy ImageBitmap CanvasRenderingContext2d DrawingStyle CanvasGradient CanvasPattern Path TextMetrics'.split(' ');
|
||||
var log = [];
|
||||
for (var i = 0; i < expected.length; ++i) {
|
||||
if (!(expected[i] in self))
|
||||
log.push(expected[i]);
|
||||
}
|
||||
e.ports[0].postMessage(log.join(', '));
|
||||
}
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>available interface objects in shared worker</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new SharedWorker('#');
|
||||
worker.port.onmessage = this.step_func(function(e) {
|
||||
assert_equals(e.data, '', 'these interface objects were missing');
|
||||
this.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<!--
|
||||
onconnect = function(e) {
|
||||
var unexpected = 'AbstractView AbstractWorker Location Navigator DOMImplementation Audio HTMLCanvasElement MouseEvent'.split(' ');
|
||||
var log = [];
|
||||
for (var i = 0; i < unexpected.length; ++i) {
|
||||
if (unexpected[i] in self)
|
||||
log.push(unexpected[i]);
|
||||
}
|
||||
e.ports[0].postMessage(log.join(', '));
|
||||
}
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>unavailable interface objects in shared worker</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new SharedWorker('#');
|
||||
worker.port.onmessage = this.step_func(function(e) {
|
||||
assert_equals(e.data, '', 'these interface objects were not expected');
|
||||
this.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
||||
Reference in New Issue
Block a user