Bug 1306170 part 5. Run the HTML interfaces web platform test in workers as well as windows. r=bkelly

This commit is contained in:
Boris Zbarsky 2017-02-13 16:06:46 -05:00
parent 83b7e32013
commit 19cf0c0f4e
5 changed files with 135 additions and 20 deletions

View File

@ -89758,6 +89758,12 @@
}
]
],
"html/dom/interfaces.worker.js": [
[
"/html/dom/interfaces.worker.html",
{}
]
],
"html/dom/reflection-embedded.html": [
[
"/html/dom/reflection-embedded.html",
@ -167462,7 +167468,11 @@
"support"
],
"html/dom/interfaces.html": [
"fde5349d6d50116e0160f6981882b1ae6b81da63",
"1af98e9283a240bca6b55b1453b18df3fb6d6099",
"testharness"
],
"html/dom/interfaces.worker.js": [
"274d32f84c7511fda136212bb9dc146a2cb7f2a7",
"testharness"
],
"html/dom/new-harness.js": [
@ -167518,11 +167528,11 @@
"support"
],
"html/dom/resources/interfaces.idl": [
"a1e95307cade27b9a056c07ee4a853e6c105241d",
"d4e094978d8cc85a4dc9f6bf34c12b295a12eb34",
"support"
],
"html/dom/resources/untested-interfaces.idl": [
"feb3b976fdf72ce628e8cdc143f94e4cf1509a46",
"d3a65dce1b6832b90a8318d121ac2f1e43decdfc",
"support"
],
"html/editing/.gitkeep": [

View File

@ -0,0 +1,76 @@
[interfaces.worker.html]
type: testharness
[Path2D interface: existence and properties of interface object]
expected: FAIL
[Path2D interface object length]
expected: FAIL
[Path2D interface object name]
expected: FAIL
[Path2D interface: existence and properties of interface prototype object]
expected: FAIL
[Path2D interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[Path2D interface: operation addPath(Path2D,DOMMatrixInit)]
expected: FAIL
[Path2D interface: operation closePath()]
expected: FAIL
[Path2D interface: operation moveTo(unrestricted double,unrestricted double)]
expected: FAIL
[Path2D interface: operation lineTo(unrestricted double,unrestricted double)]
expected: FAIL
[Path2D interface: operation quadraticCurveTo(unrestricted double,unrestricted double,unrestricted double,unrestricted double)]
expected: FAIL
[Path2D interface: operation bezierCurveTo(unrestricted double,unrestricted double,unrestricted double,unrestricted double,unrestricted double,unrestricted double)]
expected: FAIL
[Path2D interface: operation arcTo(unrestricted double,unrestricted double,unrestricted double,unrestricted double,unrestricted double)]
expected: FAIL
[Path2D interface: operation arcTo(unrestricted double,unrestricted double,unrestricted double,unrestricted double,unrestricted double,unrestricted double,unrestricted double)]
expected: FAIL
[Path2D interface: operation rect(unrestricted double,unrestricted double,unrestricted double,unrestricted double)]
expected: FAIL
[Path2D interface: operation arc(unrestricted double,unrestricted double,unrestricted double,unrestricted double,unrestricted double,boolean)]
expected: FAIL
[Path2D interface: operation ellipse(unrestricted double,unrestricted double,unrestricted double,unrestricted double,unrestricted double,unrestricted double,unrestricted double,boolean)]
expected: FAIL
[WorkerGlobalScope interface: attribute onlanguagechange]
expected: FAIL
[SharedWorker interface: existence and properties of interface object]
expected: FAIL
[SharedWorker interface object length]
expected: FAIL
[SharedWorker interface object name]
expected: FAIL
[SharedWorker interface: existence and properties of interface prototype object]
expected: FAIL
[SharedWorker interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[SharedWorker interface: attribute port]
expected: FAIL
[SharedWorker interface: attribute onerror]
expected: FAIL
[WorkerGlobalScope interface: self must inherit property "onlanguagechange" with the proper type (5)]
expected: FAIL

View File

@ -0,0 +1,33 @@
"use strict";
importScripts("/resources/testharness.js");
importScripts("/resources/WebIDLParser.js", "/resources/idlharness.js");
function doTest([untested, tested]) {
var idlArray = new IdlArray();
idlArray.add_untested_idls(untested);
idlArray.add_idls(tested);
idlArray.add_objects({
WorkerNavigator: ['self.navigator'],
WebSocket: ['new WebSocket("ws://foo")'],
CloseEvent: ['new CloseEvent("close")'],
Worker: [],
MessageEvent: ['new MessageEvent("message", { data: 5 })'],
DedicatedWorkerGlobalScope: ['self'],
});
idlArray.test();
};
function fetchData(url) {
return fetch(url).then((response) => response.text());
}
promise_test(function() {
return Promise.all([fetchData("resources/untested-interfaces.idl"),
fetchData("resources/interfaces.idl")])
.then(doTest);
}, "Test driver");
done();

View File

@ -47,7 +47,7 @@ interface HTMLOptionsCollection : HTMLCollection {
typedef sequence<any> PropertyValueArray;
[OverrideBuiltins, Exposed=(Window,Worker)]
[OverrideBuiltins]
interface DOMStringMap {
getter DOMString (DOMString name);
setter creator void (DOMString name, DOMString value);
@ -1461,7 +1461,7 @@ interface History {
[SameObject] readonly attribute USVString[] ancestorOrigins;
};
[Constructor(DOMString type, optional PopStateEventInit eventInitDict), Exposed=(Window,Worker)]
[Constructor(DOMString type, optional PopStateEventInit eventInitDict)]
interface PopStateEvent : Event {
readonly attribute any state;
};
@ -1470,7 +1470,7 @@ dictionary PopStateEventInit : EventInit {
any state;
};
[Constructor(DOMString type, optional HashChangeEventInit eventInitDict), Exposed=(Window,Worker)]
[Constructor(DOMString type, optional HashChangeEventInit eventInitDict)]
interface HashChangeEvent : Event {
readonly attribute DOMString oldURL;
readonly attribute DOMString newURL;
@ -1481,7 +1481,7 @@ dictionary HashChangeEventInit : EventInit {
DOMString newURL;
};
[Constructor(DOMString type, optional PageTransitionEventInit eventInitDict), Exposed=(Window,Worker)]
[Constructor(DOMString type, optional PageTransitionEventInit eventInitDict)]
interface PageTransitionEvent : Event {
readonly attribute boolean persisted;
};
@ -1686,11 +1686,11 @@ Navigator implements NavigatorConcurrentHardware;
[NoInterfaceObject, Exposed=(Window,Worker)]
interface NavigatorID {
[Exposed=Window] readonly attribute DOMString appCodeName; // constant "Mozilla"
readonly attribute DOMString appCodeName; // constant "Mozilla"
readonly attribute DOMString appName; // constant "Netscape"
readonly attribute DOMString appVersion;
readonly attribute DOMString platform;
[Exposed=Window] readonly attribute DOMString product; // constant "Gecko"
readonly attribute DOMString product; // constant "Gecko"
[Exposed=Window] readonly attribute DOMString productSub;
readonly attribute DOMString userAgent;
[Exposed=Window] readonly attribute DOMString vendor;
@ -1901,8 +1901,9 @@ interface BroadcastChannel : EventTarget {
interface WorkerGlobalScope : EventTarget {
readonly attribute WorkerGlobalScope self;
readonly attribute WorkerLocation location;
readonly attribute WorkerNavigator navigator;
void importScripts(USVString... urls);
void close();
attribute OnErrorEventHandler onerror;
attribute EventHandler onlanguagechange;
attribute EventHandler onoffline;
@ -1944,11 +1945,6 @@ interface SharedWorker : EventTarget {
};
SharedWorker implements AbstractWorker;
partial interface WorkerGlobalScope { // not obsolete
void importScripts(DOMString... urls);
readonly attribute WorkerNavigator navigator;
};
[Exposed=Worker]
interface WorkerNavigator {};
WorkerNavigator implements NavigatorID;

View File

@ -1,6 +1,6 @@
// DOM IDLs
[Constructor(DOMString type, optional EventInit eventInitDict)/*,
Exposed=(Window,Worker)*/]
[Constructor(DOMString type, optional EventInit eventInitDict),
Exposed=(Window,Worker)]
interface Event {
readonly attribute DOMString type;
readonly attribute EventTarget? target;
@ -31,8 +31,8 @@ dictionary EventInit {
boolean cancelable = false;
};
[Constructor(DOMString type, optional CustomEventInit eventInitDict)/*,
Exposed=(Window,Worker)*/]
[Constructor(DOMString type, optional CustomEventInit eventInitDict),
Exposed=(Window,Worker)]
interface CustomEvent : Event {
readonly attribute any detail;
@ -43,7 +43,7 @@ dictionary CustomEventInit : EventInit {
any detail = null;
};
//[Exposed=(Window,Worker)]
[Exposed=(Window,Worker)]
interface EventTarget {
void addEventListener(DOMString type, EventListener? callback, optional boolean capture = false);
void removeEventListener(DOMString type, EventListener? callback, optional boolean capture = false);