Skip to content

Commit cc32365

Browse files
jasnelltargos
authored andcommitted
test: add WPT streams tests
Signed-off-by: James M Snell <[email protected]> PR-URL: #39062 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent 4202274 commit cc32365

File tree

91 files changed

+18833
-10
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+18833
-10
lines changed

Diff for: test/fixtures/wpt/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ Last update:
1919
- html/webappapis/atob: https://github.com/web-platform-tests/wpt/tree/f267e1dca6/html/webappapis/atob
2020
- html/webappapis/microtask-queuing: https://github.com/web-platform-tests/wpt/tree/2c5c3c4c27/html/webappapis/microtask-queuing
2121
- html/webappapis/timers: https://github.com/web-platform-tests/wpt/tree/5873f2d8f1/html/webappapis/timers
22-
- interfaces: https://github.com/web-platform-tests/wpt/tree/79fa4cf76e/interfaces
22+
- interfaces: https://github.com/web-platform-tests/wpt/tree/fcb671ed8b/interfaces
2323
- resources: https://github.com/web-platform-tests/wpt/tree/972ca5b669/resources
24+
- streams: https://github.com/web-platform-tests/wpt/tree/b869e60df1/streams
2425
- url: https://github.com/web-platform-tests/wpt/tree/1fcb39223d/url
2526

2627
[Web Platform Tests]: https://github.com/web-platform-tests/wpt
27-
[`git node wpt`]: https://github.com/nodejs/node-core-utils/blob/master/docs/git-node.md#git-node-wpt
28+
[`git node wpt`]: https://github.com/nodejs/node-core-utils/blob/main/docs/git-node.md#git-node-wpt

Diff for: test/fixtures/wpt/interfaces/dom.idl

+19
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ interface AbortController {
9393

9494
[Exposed=(Window,Worker)]
9595
interface AbortSignal : EventTarget {
96+
[NewObject] static AbortSignal abort();
97+
9698
readonly attribute boolean aborted;
9799

98100
attribute EventHandler onabort;
@@ -331,11 +333,14 @@ interface DocumentFragment : Node {
331333
[Exposed=Window]
332334
interface ShadowRoot : DocumentFragment {
333335
readonly attribute ShadowRootMode mode;
336+
readonly attribute boolean delegatesFocus;
337+
readonly attribute SlotAssignmentMode slotAssignment;
334338
readonly attribute Element host;
335339
attribute EventHandler onslotchange;
336340
};
337341

338342
enum ShadowRootMode { "open", "closed" };
343+
enum SlotAssignmentMode { "manual", "named" };
339344

340345
[Exposed=Window]
341346
interface Element : Node {
@@ -386,6 +391,7 @@ interface Element : Node {
386391
dictionary ShadowRootInit {
387392
required ShadowRootMode mode;
388393
boolean delegatesFocus = false;
394+
SlotAssignmentMode slotAssignment = "named";
389395
};
390396

391397
[Exposed=Window,
@@ -621,3 +627,16 @@ interface XPathEvaluator {
621627
};
622628

623629
XPathEvaluator includes XPathEvaluatorBase;
630+
631+
[Exposed=Window]
632+
interface XSLTProcessor {
633+
constructor();
634+
undefined importStylesheet(Node style);
635+
[CEReactions] DocumentFragment transformToFragment(Node source, Document output);
636+
[CEReactions] Document transformToDocument(Node source);
637+
undefined setParameter([LegacyNullToEmptyString] DOMString namespaceURI, DOMString localName, any value);
638+
any getParameter([LegacyNullToEmptyString] DOMString namespaceURI, DOMString localName);
639+
undefined removeParameter([LegacyNullToEmptyString] DOMString namespaceURI, DOMString localName);
640+
undefined clearParameters();
641+
undefined reset();
642+
};

Diff for: test/fixtures/wpt/interfaces/html.idl

+29-7
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ interface HTMLElement : Element {
120120
[CEReactions] attribute DOMString autocapitalize;
121121

122122
[CEReactions] attribute [LegacyNullToEmptyString] DOMString innerText;
123+
[CEReactions] attribute [LegacyNullToEmptyString] DOMString outerText;
123124

124125
ElementInternals attachInternals();
125126
};
@@ -695,7 +696,7 @@ interface TextTrackCue : EventTarget {
695696

696697
attribute DOMString id;
697698
attribute double startTime;
698-
attribute double endTime;
699+
attribute unrestricted double endTime;
699700
attribute boolean pauseOnExit;
700701

701702
attribute EventHandler onenter;
@@ -1231,6 +1232,7 @@ interface HTMLSlotElement : HTMLElement {
12311232
[CEReactions] attribute DOMString name;
12321233
sequence<Node> assignedNodes(optional AssignedNodesOptions options = {});
12331234
sequence<Element> assignedElements(optional AssignedNodesOptions options = {});
1235+
undefined assign((Element or Text)... nodes);
12341236
};
12351237

12361238
dictionary AssignedNodesOptions {
@@ -1264,11 +1266,14 @@ typedef (HTMLOrSVGImageElement or
12641266
ImageBitmap or
12651267
OffscreenCanvas) CanvasImageSource;
12661268

1269+
enum PredefinedColorSpace { "srgb", "display-p3" };
1270+
12671271
enum CanvasFillRule { "nonzero", "evenodd" };
12681272

12691273
dictionary CanvasRenderingContext2DSettings {
12701274
boolean alpha = true;
12711275
boolean desynchronized = false;
1276+
PredefinedColorSpace colorSpace = "srgb";
12721277
};
12731278

12741279
enum ImageSmoothingQuality { "low", "medium", "high" };
@@ -1301,6 +1306,7 @@ interface mixin CanvasState {
13011306
// state
13021307
undefined save(); // push state on state stack
13031308
undefined restore(); // pop state stack and restore state
1309+
undefined reset(); // reset the rendering context to its default state
13041310
};
13051311

13061312
interface mixin CanvasTransform {
@@ -1336,6 +1342,7 @@ interface mixin CanvasFillStrokeStyles {
13361342
attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black)
13371343
CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
13381344
CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
1345+
CanvasGradient createConicGradient(double startAngle, double x, double y);
13391346
CanvasPattern? createPattern(CanvasImageSource image, [LegacyNullToEmptyString] DOMString repetition);
13401347

13411348
};
@@ -1398,9 +1405,9 @@ interface mixin CanvasDrawImage {
13981405

13991406
interface mixin CanvasImageData {
14001407
// pixel manipulation
1401-
ImageData createImageData([EnforceRange] long sw, [EnforceRange] long sh);
1408+
ImageData createImageData([EnforceRange] long sw, [EnforceRange] long sh, optional ImageDataSettings settings = {});
14021409
ImageData createImageData(ImageData imagedata);
1403-
ImageData getImageData([EnforceRange] long sx, [EnforceRange] long sy, [EnforceRange] long sw, [EnforceRange] long sh);
1410+
ImageData getImageData([EnforceRange] long sx, [EnforceRange] long sy, [EnforceRange] long sw, [EnforceRange] long sh, optional ImageDataSettings settings = {});
14041411
undefined putImageData(ImageData imagedata, [EnforceRange] long dx, [EnforceRange] long dy);
14051412
undefined putImageData(ImageData imagedata, [EnforceRange] long dx, [EnforceRange] long dy, [EnforceRange] long dirtyX, [EnforceRange] long dirtyY, [EnforceRange] long dirtyWidth, [EnforceRange] long dirtyHeight);
14061413
};
@@ -1410,6 +1417,10 @@ enum CanvasLineJoin { "round", "bevel", "miter" };
14101417
enum CanvasTextAlign { "start", "end", "left", "right", "center" };
14111418
enum CanvasTextBaseline { "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" };
14121419
enum CanvasDirection { "ltr", "rtl", "inherit" };
1420+
enum CanvasFontKerning { "auto", "normal", "none" };
1421+
enum CanvasFontStretch { "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded" };
1422+
enum CanvasFontVariantCaps { "normal", "small-caps", "all-small-caps", "petite-caps", "all-petite-caps", "unicase", "titling-caps" };
1423+
enum CanvasTextRendering { "auto", "optimizeSpeed", "optimizeLegibility", "geometricPrecision" };
14131424

14141425
interface mixin CanvasPathDrawingStyles {
14151426
// line caps/joins
@@ -1430,6 +1441,12 @@ interface mixin CanvasTextDrawingStyles {
14301441
attribute CanvasTextAlign textAlign; // (default: "start")
14311442
attribute CanvasTextBaseline textBaseline; // (default: "alphabetic")
14321443
attribute CanvasDirection direction; // (default: "inherit")
1444+
attribute double textLetterSpacing; // (default: 0)
1445+
attribute double textWordSpacing; // (default: 0)
1446+
attribute CanvasFontKerning fontKerning; // (default: "auto")
1447+
attribute CanvasFontStretch fontStretch; // (default: "normal")
1448+
attribute CanvasFontVariantCaps fontVariantCaps; // (default: "normal")
1449+
attribute CanvasTextRendering textRendering; // (default: "normal")
14331450
};
14341451

14351452
interface mixin CanvasPath {
@@ -1476,15 +1493,20 @@ interface TextMetrics {
14761493
readonly attribute double ideographicBaseline;
14771494
};
14781495

1496+
dictionary ImageDataSettings {
1497+
PredefinedColorSpace colorSpace;
1498+
};
1499+
14791500
[Exposed=(Window,Worker),
14801501
Serializable]
14811502
interface ImageData {
1482-
constructor(unsigned long sw, unsigned long sh);
1483-
constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh);
1503+
constructor(unsigned long sw, unsigned long sh, optional ImageDataSettings settings = {});
1504+
constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh, optional ImageDataSettings settings = {});
14841505

14851506
readonly attribute unsigned long width;
14861507
readonly attribute unsigned long height;
14871508
readonly attribute Uint8ClampedArray data;
1509+
readonly attribute PredefinedColorSpace colorSpace;
14881510
};
14891511

14901512
[Exposed=(Window,Worker)]
@@ -1738,8 +1760,8 @@ interface History {
17381760
undefined go(optional long delta = 0);
17391761
undefined back();
17401762
undefined forward();
1741-
undefined pushState(any data, DOMString title, optional USVString? url = null);
1742-
undefined replaceState(any data, DOMString title, optional USVString? url = null);
1763+
undefined pushState(any data, DOMString unused, optional USVString? url = null);
1764+
undefined replaceState(any data, DOMString unused, optional USVString? url = null);
17431765
};
17441766

17451767
[Exposed=Window]

0 commit comments

Comments
 (0)