Skip to content

Commit

Permalink
test: update wpt interfaces
Browse files Browse the repository at this point in the history
Refs: web-platform-tests/wpt#26992

PR-URL: #36659
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
watilde authored and danielleadams committed Jan 12, 2021
1 parent a7f743f commit 9eff709
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 56 deletions.
2 changes: 1 addition & 1 deletion test/fixtures/wpt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Last update:
- encoding: https://github.com/web-platform-tests/wpt/tree/3c9820d1cc/encoding
- url: https://github.com/web-platform-tests/wpt/tree/1783c9bccf/url
- resources: https://github.com/web-platform-tests/wpt/tree/351a99782b/resources
- interfaces: https://github.com/web-platform-tests/wpt/tree/8719553b2d/interfaces
- interfaces: https://github.com/web-platform-tests/wpt/tree/b4be9a3fdf/interfaces
- html/webappapis/microtask-queuing: https://github.com/web-platform-tests/wpt/tree/2c5c3c4c27/html/webappapis/microtask-queuing
- html/webappapis/timers: https://github.com/web-platform-tests/wpt/tree/264f12bc7b/html/webappapis/timers
- hr-time: https://github.com/web-platform-tests/wpt/tree/a5d1774ecf/hr-time
Expand Down
39 changes: 20 additions & 19 deletions test/fixtures/wpt/interfaces/dom.idl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface Event {

readonly attribute DOMString type;
readonly attribute EventTarget? target;
readonly attribute EventTarget? srcElement; // historical
readonly attribute EventTarget? srcElement; // legacy
readonly attribute EventTarget? currentTarget;
sequence<EventTarget> composedPath();

Expand All @@ -20,20 +20,20 @@ interface Event {
readonly attribute unsigned short eventPhase;

undefined stopPropagation();
attribute boolean cancelBubble; // historical alias of .stopPropagation
attribute boolean cancelBubble; // legacy alias of .stopPropagation()
undefined stopImmediatePropagation();

readonly attribute boolean bubbles;
readonly attribute boolean cancelable;
attribute boolean returnValue; // historical
attribute boolean returnValue; // legacy
undefined preventDefault();
readonly attribute boolean defaultPrevented;
readonly attribute boolean composed;

[LegacyUnforgeable] readonly attribute boolean isTrusted;
readonly attribute DOMHighResTimeStamp timeStamp;

undefined initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false); // historical
undefined initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false); // legacy
};

dictionary EventInit {
Expand All @@ -43,7 +43,7 @@ dictionary EventInit {
};

partial interface Window {
[Replaceable] readonly attribute any event; // historical
[Replaceable] readonly attribute (Event or undefined) event; // legacy
};

[Exposed=(Window,Worker)]
Expand All @@ -52,7 +52,7 @@ interface CustomEvent : Event {

readonly attribute any detail;

undefined initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null); // historical
undefined initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null); // legacy
};

dictionary CustomEventInit : EventInit {
Expand All @@ -79,6 +79,7 @@ dictionary EventListenerOptions {
dictionary AddEventListenerOptions : EventListenerOptions {
boolean passive = false;
boolean once = false;
AbortSignal signal;
};

[Exposed=(Window,Worker)]
Expand Down Expand Up @@ -201,14 +202,14 @@ interface Node : EventTarget {
const unsigned short ATTRIBUTE_NODE = 2;
const unsigned short TEXT_NODE = 3;
const unsigned short CDATA_SECTION_NODE = 4;
const unsigned short ENTITY_REFERENCE_NODE = 5; // historical
const unsigned short ENTITY_NODE = 6; // historical
const unsigned short ENTITY_REFERENCE_NODE = 5; // legacy
const unsigned short ENTITY_NODE = 6; // legacy
const unsigned short PROCESSING_INSTRUCTION_NODE = 7;
const unsigned short COMMENT_NODE = 8;
const unsigned short DOCUMENT_NODE = 9;
const unsigned short DOCUMENT_TYPE_NODE = 10;
const unsigned short DOCUMENT_FRAGMENT_NODE = 11;
const unsigned short NOTATION_NODE = 12; // historical
const unsigned short NOTATION_NODE = 12; // legacy
readonly attribute unsigned short nodeType;
readonly attribute DOMString nodeName;

Expand All @@ -232,7 +233,7 @@ interface Node : EventTarget {

[CEReactions, NewObject] Node cloneNode(optional boolean deep = false);
boolean isEqualNode(Node? otherNode);
boolean isSameNode(Node? otherNode); // historical alias of ===
boolean isSameNode(Node? otherNode); // legacy alias of ===

const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;
const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02;
Expand Down Expand Up @@ -266,8 +267,8 @@ interface Document : Node {
readonly attribute USVString documentURI;
readonly attribute DOMString compatMode;
readonly attribute DOMString characterSet;
readonly attribute DOMString charset; // historical alias of .characterSet
readonly attribute DOMString inputEncoding; // historical alias of .characterSet
readonly attribute DOMString charset; // legacy alias of .characterSet
readonly attribute DOMString inputEncoding; // legacy alias of .characterSet
readonly attribute DOMString contentType;

readonly attribute DocumentType? doctype;
Expand All @@ -290,7 +291,7 @@ interface Document : Node {
[NewObject] Attr createAttribute(DOMString localName);
[NewObject] Attr createAttributeNS(DOMString? namespace, DOMString qualifiedName);

[NewObject] Event createEvent(DOMString interface); // historical
[NewObject] Event createEvent(DOMString interface); // legacy

[NewObject] Range createRange();

Expand Down Expand Up @@ -372,14 +373,14 @@ interface Element : Node {

Element? closest(DOMString selectors);
boolean matches(DOMString selectors);
boolean webkitMatchesSelector(DOMString selectors); // historical alias of .matches
boolean webkitMatchesSelector(DOMString selectors); // legacy alias of .matches

HTMLCollection getElementsByTagName(DOMString qualifiedName);
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
HTMLCollection getElementsByClassName(DOMString classNames);

[CEReactions] Element? insertAdjacentElement(DOMString where, Element element); // historical
undefined insertAdjacentText(DOMString where, DOMString data); // historical
[CEReactions] Element? insertAdjacentElement(DOMString where, Element element); // legacy
undefined insertAdjacentText(DOMString where, DOMString data); // legacy
};

dictionary ShadowRootInit {
Expand Down Expand Up @@ -545,14 +546,14 @@ callback interface NodeFilter {
const unsigned long SHOW_ATTRIBUTE = 0x2;
const unsigned long SHOW_TEXT = 0x4;
const unsigned long SHOW_CDATA_SECTION = 0x8;
const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // historical
const unsigned long SHOW_ENTITY = 0x20; // historical
const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // legacy
const unsigned long SHOW_ENTITY = 0x20; // legacy
const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x40;
const unsigned long SHOW_COMMENT = 0x80;
const unsigned long SHOW_DOCUMENT = 0x100;
const unsigned long SHOW_DOCUMENT_TYPE = 0x200;
const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x400;
const unsigned long SHOW_NOTATION = 0x800; // historical
const unsigned long SHOW_NOTATION = 0x800; // legacy

unsigned short acceptNode(Node node);
};
Expand Down
40 changes: 5 additions & 35 deletions test/fixtures/wpt/interfaces/html.idl
Original file line number Diff line number Diff line change
Expand Up @@ -1701,8 +1701,7 @@ interface Window : EventTarget {

// the user agent
readonly attribute Navigator navigator;
[SecureContext] readonly attribute ApplicationCache applicationCache;
readonly attribute boolean originIsolated;
readonly attribute boolean originAgentCluster;

// user prompts
undefined alert();
Expand Down Expand Up @@ -1801,39 +1800,6 @@ interface BeforeUnloadEvent : Event {
attribute DOMString returnValue;
};

[SecureContext,
Exposed=Window]
interface ApplicationCache : EventTarget {

// update status
const unsigned short UNCACHED = 0;
const unsigned short IDLE = 1;
const unsigned short CHECKING = 2;
const unsigned short DOWNLOADING = 3;
const unsigned short UPDATEREADY = 4;
const unsigned short OBSOLETE = 5;
readonly attribute unsigned short status;

// updates
undefined update();
undefined abort();
undefined swapCache();

// events
attribute EventHandler onchecking;
attribute EventHandler onerror;
attribute EventHandler onnoupdate;
attribute EventHandler ondownloading;
attribute EventHandler onprogress;
attribute EventHandler onupdateready;
attribute EventHandler oncached;
attribute EventHandler onobsolete;
};

interface mixin NavigatorOnLine {
readonly attribute boolean onLine;
};

[Exposed=(Window,Worker)]
interface ErrorEvent : Event {
constructor(DOMString type, optional ErrorEventInit eventInitDict = {});
Expand Down Expand Up @@ -2048,6 +2014,10 @@ interface mixin NavigatorLanguage {
readonly attribute FrozenArray<DOMString> languages;
};

interface mixin NavigatorOnLine {
readonly attribute boolean onLine;
};

interface mixin NavigatorContentUtils {
[SecureContext] undefined registerProtocolHandler(DOMString scheme, USVString url);
[SecureContext] undefined unregisterProtocolHandler(DOMString scheme, USVString url);
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/wpt/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"path": "resources"
},
"interfaces": {
"commit": "8719553b2dd8f0f39d38253ccac2ee9ab4d6c87b",
"commit": "b4be9a3fdf18459a924f88e49bc55d8b30faa93a",
"path": "interfaces"
},
"html/webappapis/microtask-queuing": {
Expand Down

0 comments on commit 9eff709

Please sign in to comment.