summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/workers/semantics/interface-objects/003.html
blob: 5277825dbc1dc24c669e08d04f182680dfb035a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!--
onconnect = function(e) {
  var expected = [
    // https://html.spec.whatwg.org/
    "ApplicationCache",
    "WorkerGlobalScope",
    "SharedWorkerGlobalScope",
    "Worker",
    "SharedWorker",
    "MessagePort",
    "MessageEvent",
    "WorkerNavigator",
    "MessageChannel",
    "WorkerLocation",
    "ImageData",
    "ImageBitmap",
    "CanvasPath",
    "Path2D",
    "PromiseRejectionEvent",
    "EventSource",
    "WebSocket",
    "CloseEvent",
    "BroadcastChannel",
    // https://tc39.github.io/ecma262/
    "ArrayBuffer",
    "Int8Array",
    "Uint8Array",
    "Uint8ClampedArray",
    "Int16Array",
    "Uint16Array",
    "Int32Array",
    "Uint32Array",
    "Float32Array",
    "Float64Array",
    "DataView",
    // https://xhr.spec.whatwg.org/
    "XMLHttpRequestEventTarget",
    "XMLHttpRequestUpload",
    "XMLHttpRequest",
    "ProgressEvent",
    "FormData",
    // https://url.spec.whatwg.org/
    "URL",
    "URLSearchParams",
    // https://w3c.github.io/FileAPI/
    "File",
    "Blob",
    "FileList",
    "FileReader",
    "FileReaderSync",
    // https://dom.spec.whatwg.org/
    "EventTarget",
    "ErrorEvent",
    "Event",
    "CustomEvent",
    // http://heycam.github.io/webidl/
    "DOMException",
    // https://streams.spec.whatwg.org/
    "ReadableStream",
    "WritableStream",
    "ByteLengthQueuingStrategy",
    "CountQueuingStrategy",
    // http://w3c.github.io/IndexedDB/
    "IDBRequest",
    "IDBOpenDBRequest",
    "IDBVersionChangeEvent",
    "IDBFactory",
    "IDBDatabase",
    "IDBObjectStore",
    "IDBIndex",
    "IDBKeyRange",
    "IDBCursor",
    "IDBCursorWithValue",
    "IDBTransaction",
  ];
  var result = [];
  for (var i = 0; i < expected.length; ++i) {
    result.push([expected[i], expected[i] in self]);
  }
  e.ports[0].postMessage(result);
}
/*
-->
<!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>
setup(function() {
  window.worker = new SharedWorker('#');
  worker.port.onmessage = function(e) {
    var result = e.data;
    for (var i = 0; i < result.length; ++i) {
      test(function() {
        assert_true(result[i][1]);
      }, "The " + result[i][0] + " interface object should be exposed");
    }
    done();
  }
}, {explicit_done: true});
</script>
<!--
*/
//-->