Skip to content

Commit 73eb5e1

Browse files
committed
test: update WPT tests of URL for URLSearchParams parsing %
Related: web-platform-tests/wpt#24152 Related: nodejs#35013 Fixes: nodejs#33892
1 parent 1c6bab0 commit 73eb5e1

32 files changed

+5677
-1502
lines changed

test/fixtures/wpt/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Last update:
1212

1313
- console: https://github.com/web-platform-tests/wpt/tree/9786a4b131/console
1414
- encoding: https://github.com/web-platform-tests/wpt/tree/5059d2c777/encoding
15-
- url: https://github.com/web-platform-tests/wpt/tree/43feb7f612/url
16-
- resources: https://github.com/web-platform-tests/wpt/tree/e1fddfbf80/resources
17-
- interfaces: https://github.com/web-platform-tests/wpt/tree/8ada332aea/interfaces
15+
- url: https://github.com/web-platform-tests/wpt/tree/c79fe5612a/url
16+
- resources: https://github.com/web-platform-tests/wpt/tree/1ab7a4ebcf/resources
17+
- interfaces: https://github.com/web-platform-tests/wpt/tree/876f188904/interfaces
1818
- html/webappapis/microtask-queuing: https://github.com/web-platform-tests/wpt/tree/0c3bed38df/html/webappapis/microtask-queuing
1919
- html/webappapis/timers: https://github.com/web-platform-tests/wpt/tree/ddfe9c089b/html/webappapis/timers
2020
- hr-time: https://github.com/web-platform-tests/wpt/tree/a5d1774ecf/hr-time
+21-21
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
// GENERATED CONTENT - DO NOT EDIT
2-
// Content was automatically extracted by Reffy into reffy-reports
3-
// (https://github.com/tidoust/reffy-reports)
2+
// Content was automatically extracted by Reffy into webref
3+
// (https://github.com/w3c/webref)
44
// Source: Console Standard (https://console.spec.whatwg.org/)
55

66
[Exposed=(Window,Worker,Worklet)]
77
namespace console { // but see namespace object requirements below
88
// Logging
9-
void assert(optional boolean condition = false, any... data);
10-
void clear();
11-
void debug(any... data);
12-
void error(any... data);
13-
void info(any... data);
14-
void log(any... data);
15-
void table(optional any tabularData, optional sequence<DOMString> properties);
16-
void trace(any... data);
17-
void warn(any... data);
18-
void dir(optional any item, optional object? options);
19-
void dirxml(any... data);
9+
undefined assert(optional boolean condition = false, any... data);
10+
undefined clear();
11+
undefined debug(any... data);
12+
undefined error(any... data);
13+
undefined info(any... data);
14+
undefined log(any... data);
15+
undefined table(optional any tabularData, optional sequence<DOMString> properties);
16+
undefined trace(any... data);
17+
undefined warn(any... data);
18+
undefined dir(optional any item, optional object? options);
19+
undefined dirxml(any... data);
2020

2121
// Counting
22-
void count(optional DOMString label = "default");
23-
void countReset(optional DOMString label = "default");
22+
undefined count(optional DOMString label = "default");
23+
undefined countReset(optional DOMString label = "default");
2424

2525
// Grouping
26-
void group(any... data);
27-
void groupCollapsed(any... data);
28-
void groupEnd();
26+
undefined group(any... data);
27+
undefined groupCollapsed(any... data);
28+
undefined groupEnd();
2929

3030
// Timing
31-
void time(optional DOMString label = "default");
32-
void timeLog(optional DOMString label = "default", any... data);
33-
void timeEnd(optional DOMString label = "default");
31+
undefined time(optional DOMString label = "default");
32+
undefined timeLog(optional DOMString label = "default", any... data);
33+
undefined timeEnd(optional DOMString label = "default");
3434
};

test/fixtures/wpt/interfaces/dom.idl

+47-47
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// GENERATED CONTENT - DO NOT EDIT
2-
// Content was automatically extracted by Reffy into reffy-reports
3-
// (https://github.com/tidoust/reffy-reports)
2+
// Content was automatically extracted by Reffy into webref
3+
// (https://github.com/w3c/webref)
44
// Source: DOM Standard (https://dom.spec.whatwg.org/)
55

66
[Exposed=(Window,Worker,AudioWorklet)]
@@ -19,21 +19,21 @@ interface Event {
1919
const unsigned short BUBBLING_PHASE = 3;
2020
readonly attribute unsigned short eventPhase;
2121

22-
void stopPropagation();
22+
undefined stopPropagation();
2323
attribute boolean cancelBubble; // historical alias of .stopPropagation
24-
void stopImmediatePropagation();
24+
undefined stopImmediatePropagation();
2525

2626
readonly attribute boolean bubbles;
2727
readonly attribute boolean cancelable;
2828
attribute boolean returnValue; // historical
29-
void preventDefault();
29+
undefined preventDefault();
3030
readonly attribute boolean defaultPrevented;
3131
readonly attribute boolean composed;
3232

3333
[LegacyUnforgeable] readonly attribute boolean isTrusted;
3434
readonly attribute DOMHighResTimeStamp timeStamp;
3535

36-
void initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false); // historical
36+
undefined initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false); // historical
3737
};
3838

3939
dictionary EventInit {
@@ -52,7 +52,7 @@ interface CustomEvent : Event {
5252

5353
readonly attribute any detail;
5454

55-
void initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null); // historical
55+
undefined initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null); // historical
5656
};
5757

5858
dictionary CustomEventInit : EventInit {
@@ -63,13 +63,13 @@ dictionary CustomEventInit : EventInit {
6363
interface EventTarget {
6464
constructor();
6565

66-
void addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options = {});
67-
void removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options = {});
66+
undefined addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options = {});
67+
undefined removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options = {});
6868
boolean dispatchEvent(Event event);
6969
};
7070

7171
callback interface EventListener {
72-
void handleEvent(Event event);
72+
undefined handleEvent(Event event);
7373
};
7474

7575
dictionary EventListenerOptions {
@@ -87,7 +87,7 @@ interface AbortController {
8787

8888
[SameObject] readonly attribute AbortSignal signal;
8989

90-
void abort();
90+
undefined abort();
9191
};
9292

9393
[Exposed=(Window,Worker)]
@@ -113,9 +113,9 @@ interface mixin ParentNode {
113113
readonly attribute Element? lastElementChild;
114114
readonly attribute unsigned long childElementCount;
115115

116-
[CEReactions, Unscopable] void prepend((Node or DOMString)... nodes);
117-
[CEReactions, Unscopable] void append((Node or DOMString)... nodes);
118-
[CEReactions, Unscopable] void replaceChildren((Node or DOMString)... nodes);
116+
[CEReactions, Unscopable] undefined prepend((Node or DOMString)... nodes);
117+
[CEReactions, Unscopable] undefined append((Node or DOMString)... nodes);
118+
[CEReactions, Unscopable] undefined replaceChildren((Node or DOMString)... nodes);
119119

120120
Element? querySelector(DOMString selectors);
121121
[NewObject] NodeList querySelectorAll(DOMString selectors);
@@ -132,10 +132,10 @@ Element includes NonDocumentTypeChildNode;
132132
CharacterData includes NonDocumentTypeChildNode;
133133

134134
interface mixin ChildNode {
135-
[CEReactions, Unscopable] void before((Node or DOMString)... nodes);
136-
[CEReactions, Unscopable] void after((Node or DOMString)... nodes);
137-
[CEReactions, Unscopable] void replaceWith((Node or DOMString)... nodes);
138-
[CEReactions, Unscopable] void remove();
135+
[CEReactions, Unscopable] undefined before((Node or DOMString)... nodes);
136+
[CEReactions, Unscopable] undefined after((Node or DOMString)... nodes);
137+
[CEReactions, Unscopable] undefined replaceWith((Node or DOMString)... nodes);
138+
[CEReactions, Unscopable] undefined remove();
139139
};
140140
DocumentType includes ChildNode;
141141
Element includes ChildNode;
@@ -165,12 +165,12 @@ interface HTMLCollection {
165165
interface MutationObserver {
166166
constructor(MutationCallback callback);
167167

168-
void observe(Node target, optional MutationObserverInit options = {});
169-
void disconnect();
168+
undefined observe(Node target, optional MutationObserverInit options = {});
169+
undefined disconnect();
170170
sequence<MutationRecord> takeRecords();
171171
};
172172

173-
callback MutationCallback = void (sequence<MutationRecord> mutations, MutationObserver observer);
173+
callback MutationCallback = undefined (sequence<MutationRecord> mutations, MutationObserver observer);
174174

175175
dictionary MutationObserverInit {
176176
boolean childList = false;
@@ -228,7 +228,7 @@ interface Node : EventTarget {
228228

229229
[CEReactions] attribute DOMString? nodeValue;
230230
[CEReactions] attribute DOMString? textContent;
231-
[CEReactions] void normalize();
231+
[CEReactions] undefined normalize();
232232

233233
[CEReactions, NewObject] Node cloneNode(optional boolean deep = false);
234234
boolean isEqualNode(Node? otherNode);
@@ -353,10 +353,10 @@ interface Element : Node {
353353
sequence<DOMString> getAttributeNames();
354354
DOMString? getAttribute(DOMString qualifiedName);
355355
DOMString? getAttributeNS(DOMString? namespace, DOMString localName);
356-
[CEReactions] void setAttribute(DOMString qualifiedName, DOMString value);
357-
[CEReactions] void setAttributeNS(DOMString? namespace, DOMString qualifiedName, DOMString value);
358-
[CEReactions] void removeAttribute(DOMString qualifiedName);
359-
[CEReactions] void removeAttributeNS(DOMString? namespace, DOMString localName);
356+
[CEReactions] undefined setAttribute(DOMString qualifiedName, DOMString value);
357+
[CEReactions] undefined setAttributeNS(DOMString? namespace, DOMString qualifiedName, DOMString value);
358+
[CEReactions] undefined removeAttribute(DOMString qualifiedName);
359+
[CEReactions] undefined removeAttributeNS(DOMString? namespace, DOMString localName);
360360
[CEReactions] boolean toggleAttribute(DOMString qualifiedName, optional boolean force);
361361
boolean hasAttribute(DOMString qualifiedName);
362362
boolean hasAttributeNS(DOMString? namespace, DOMString localName);
@@ -379,7 +379,7 @@ interface Element : Node {
379379
HTMLCollection getElementsByClassName(DOMString classNames);
380380

381381
[CEReactions] Element? insertAdjacentElement(DOMString where, Element element); // historical
382-
void insertAdjacentText(DOMString where, DOMString data); // historical
382+
undefined insertAdjacentText(DOMString where, DOMString data); // historical
383383
};
384384

385385
dictionary ShadowRootInit {
@@ -417,10 +417,10 @@ interface CharacterData : Node {
417417
attribute [LegacyNullToEmptyString] DOMString data;
418418
readonly attribute unsigned long length;
419419
DOMString substringData(unsigned long offset, unsigned long count);
420-
void appendData(DOMString data);
421-
void insertData(unsigned long offset, DOMString data);
422-
void deleteData(unsigned long offset, unsigned long count);
423-
void replaceData(unsigned long offset, unsigned long count, DOMString data);
420+
undefined appendData(DOMString data);
421+
undefined insertData(unsigned long offset, DOMString data);
422+
undefined deleteData(unsigned long offset, unsigned long count);
423+
undefined replaceData(unsigned long offset, unsigned long count, DOMString data);
424424
};
425425

426426
[Exposed=Window]
@@ -470,30 +470,30 @@ interface Range : AbstractRange {
470470

471471
readonly attribute Node commonAncestorContainer;
472472

473-
void setStart(Node node, unsigned long offset);
474-
void setEnd(Node node, unsigned long offset);
475-
void setStartBefore(Node node);
476-
void setStartAfter(Node node);
477-
void setEndBefore(Node node);
478-
void setEndAfter(Node node);
479-
void collapse(optional boolean toStart = false);
480-
void selectNode(Node node);
481-
void selectNodeContents(Node node);
473+
undefined setStart(Node node, unsigned long offset);
474+
undefined setEnd(Node node, unsigned long offset);
475+
undefined setStartBefore(Node node);
476+
undefined setStartAfter(Node node);
477+
undefined setEndBefore(Node node);
478+
undefined setEndAfter(Node node);
479+
undefined collapse(optional boolean toStart = false);
480+
undefined selectNode(Node node);
481+
undefined selectNodeContents(Node node);
482482

483483
const unsigned short START_TO_START = 0;
484484
const unsigned short START_TO_END = 1;
485485
const unsigned short END_TO_END = 2;
486486
const unsigned short END_TO_START = 3;
487487
short compareBoundaryPoints(unsigned short how, Range sourceRange);
488488

489-
[CEReactions] void deleteContents();
489+
[CEReactions] undefined deleteContents();
490490
[CEReactions, NewObject] DocumentFragment extractContents();
491491
[CEReactions, NewObject] DocumentFragment cloneContents();
492-
[CEReactions] void insertNode(Node node);
493-
[CEReactions] void surroundContents(Node newParent);
492+
[CEReactions] undefined insertNode(Node node);
493+
[CEReactions] undefined surroundContents(Node newParent);
494494

495495
[NewObject] Range cloneRange();
496-
void detach();
496+
undefined detach();
497497

498498
boolean isPointInRange(Node node, unsigned long offset);
499499
short comparePoint(Node node, unsigned long offset);
@@ -514,7 +514,7 @@ interface NodeIterator {
514514
Node? nextNode();
515515
Node? previousNode();
516516

517-
void detach();
517+
undefined detach();
518518
};
519519

520520
[Exposed=Window]
@@ -562,8 +562,8 @@ interface DOMTokenList {
562562
readonly attribute unsigned long length;
563563
getter DOMString? item(unsigned long index);
564564
boolean contains(DOMString token);
565-
[CEReactions] void add(DOMString... tokens);
566-
[CEReactions] void remove(DOMString... tokens);
565+
[CEReactions] undefined add(DOMString... tokens);
566+
[CEReactions] undefined remove(DOMString... tokens);
567567
[CEReactions] boolean toggle(DOMString token, optional boolean force);
568568
[CEReactions] boolean replace(DOMString token, DOMString newToken);
569569
boolean supports(DOMString token);

test/fixtures/wpt/interfaces/encoding.idl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// GENERATED CONTENT - DO NOT EDIT
2-
// Content was automatically extracted by Reffy into reffy-reports
3-
// (https://github.com/tidoust/reffy-reports)
2+
// Content was automatically extracted by Reffy into webref
3+
// (https://github.com/w3c/webref)
44
// Source: Encoding Standard (https://encoding.spec.whatwg.org/)
55

66
interface mixin TextDecoderCommon {

test/fixtures/wpt/interfaces/hr-time.idl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// GENERATED CONTENT - DO NOT EDIT
2-
// Content was automatically extracted by Reffy into reffy-reports
3-
// (https://github.com/tidoust/reffy-reports)
2+
// Content was automatically extracted by Reffy into webref
3+
// (https://github.com/w3c/webref)
44
// Source: High Resolution Time (https://w3c.github.io/hr-time/)
55

66
typedef double DOMHighResTimeStamp;

0 commit comments

Comments
 (0)