Skip to content

Commit 158ada2

Browse files
Update web platform tests + minor fixes
* Fixed normalizing values in the Headers class * Fixed pageshow to be fired with bubbles: true and cancelable: true Also refactors the code for the "legacy target override flag" in events.
1 parent c98e0f5 commit 158ada2

File tree

9 files changed

+650186
-621922
lines changed

9 files changed

+650186
-621922
lines changed

lib/jsdom/browser/Window.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const EventHandlerNonNull = require("../living/generated/EventHandlerNonNull");
1212
const IDLFunction = require("../living/generated/Function");
1313
const OnBeforeUnloadEventHandlerNonNull = require("../living/generated/OnBeforeUnloadEventHandlerNonNull");
1414
const OnErrorEventHandlerNonNull = require("../living/generated/OnErrorEventHandlerNonNull");
15-
const PageTransitionEvent = require("../living/generated/PageTransitionEvent");
15+
const { fireAPageTransitionEvent } = require("../living/helpers/page-transition-event");
1616
const namedPropertiesWindow = require("../living/named-properties-window");
1717
const postMessage = require("../living/post-message");
1818
const DOMException = require("domexception/webidl2js-wrapper");
@@ -905,17 +905,16 @@ function Window(options) {
905905
return; // window might've been closed already
906906
}
907907

908-
const documentImpl = idlUtils.implForWrapper(window._document);
909-
910908
if (window.document.readyState === "complete") {
911-
fireAnEvent("load", window, undefined, {}, documentImpl);
909+
fireAnEvent("load", window, undefined, {}, true);
912910
} else {
913911
window.document.addEventListener("load", () => {
914-
fireAnEvent("load", window, undefined, {}, documentImpl);
912+
fireAnEvent("load", window, undefined, {}, true);
915913

914+
const documentImpl = idlUtils.implForWrapper(window._document);
916915
if (!documentImpl._pageShowingFlag) {
917916
documentImpl._pageShowingFlag = true;
918-
fireAnEvent("pageshow", window, PageTransitionEvent, { persisted: false }, documentImpl);
917+
fireAPageTransitionEvent("pageshow", window, false);
919918
}
920919
});
921920
}

lib/jsdom/living/events/EventTarget-impl.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,16 @@ class EventTargetImpl {
101101

102102
// https://dom.spec.whatwg.org/#concept-event-dispatch
103103
// legacyOutputDidListenersThrowFlag optional parameter is not necessary here since it is only used by indexDB.
104-
_dispatch(eventImpl, targetOverride /* , legacyOutputDidListenersThrowFlag */) {
104+
_dispatch(eventImpl, legacyTargetOverrideFlag /* , legacyOutputDidListenersThrowFlag */) {
105105
let targetImpl = this;
106106
let clearTargets = false;
107107
let activationTarget = null;
108108

109109
eventImpl._dispatchFlag = true;
110110

111-
targetOverride = targetOverride || targetImpl;
111+
const targetOverride = legacyTargetOverrideFlag ?
112+
idlUtils.implForWrapper(targetImpl._globalObject._document) :
113+
targetImpl;
112114
let relatedTarget = retarget(eventImpl.relatedTarget, targetImpl);
113115

114116
if (targetImpl !== relatedTarget || targetImpl === eventImpl.relatedTarget) {

lib/jsdom/living/fetch/Headers-impl.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ function assertValue(value) {
2121
}
2222
}
2323

24+
// https://fetch.spec.whatwg.org/#concept-header-value-normalize
25+
function normalizeValue(potentialValue) {
26+
return potentialValue.replace(/^[\n\r\t ]+|[\n\r\t ]+$/g, "");
27+
}
28+
2429
class HeadersImpl {
2530
constructor(globalObject, args) {
2631
this.guard = "none";
@@ -61,7 +66,7 @@ class HeadersImpl {
6166
}
6267

6368
append(name, value) {
64-
value = value.trim();
69+
value = normalizeValue(value);
6570
assertName(name);
6671
assertValue(value);
6772

@@ -97,7 +102,7 @@ class HeadersImpl {
97102
}
98103

99104
set(name, value) {
100-
value = value.trim();
105+
value = normalizeValue(value);
101106
assertName(name);
102107
assertValue(value);
103108

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"use strict";
2+
const PageTransitionEvent = require("../generated/PageTransitionEvent.js");
3+
const { fireAnEvent } = require("./events");
4+
5+
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#fire-a-page-transition-event
6+
exports.fireAPageTransitionEvent = (eventName, window, persisted) => {
7+
const attributes = { persisted, cancelable: true, bubbles: true };
8+
fireAnEvent(eventName, window, PageTransitionEvent, attributes, true);
9+
};

test/web-platform-tests/run-wpts.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ const { resolveReason } = require("./utils.js");
1111
const validInnerReasons = new Set([
1212
"fail",
1313
"fail-with-canvas",
14-
"needs-node10",
15-
"needs-node11",
16-
"needs-node12"
14+
"needs-node14"
1715
]);
1816

1917
const validReasons = new Set([
@@ -22,9 +20,7 @@ const validReasons = new Set([
2220
"fail-with-canvas",
2321
"timeout",
2422
"flaky",
25-
"needs-node10",
26-
"needs-node11",
27-
"needs-node12",
23+
"needs-node14",
2824
"needs-canvas"
2925
]);
3026

test/web-platform-tests/tests

Submodule tests updated 6864 files

test/web-platform-tests/to-run.yaml

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ blob/Blob-constructor.any.html:
77
"Passing a FrozenArray as the blobParts array should work (FrozenArray<MessagePort>).": [fail, Depends on MessagePort]
88
blob/Blob-stream.any.html: [fail, Unknown]
99
blob/Blob-text.any.html: [fail, Depends on TextEncoder]
10-
file/File-constructor.any.html: [needs-node12, Requires globalThis]
1110
file/send-file-form*: [fail, DataTransfer not implemented]
12-
fileReader.any.html: [needs-node12, Requires globalThis]
1311
filelist-section/filelist.html:
1412
"Check if item is a instanceof Function": [fail, function is not instanceof Function]
1513
historical.https.html:
1614
"Service worker test setup": [fail, Needs Service Worker implementation]
15+
idlharness.any.html: [fail, URL.createObjectURL not implemented]
1716
idlharness.html: [fail, URL.createObjectURL not implemented]
1817
reading-data-section/FileReader-multiple-reads.any.html: [timeout, Unknown; spews tons of zeros on the screen when failing]
1918
reading-data-section/filereader_events.any.html: [fail, Unknown]
@@ -86,6 +85,7 @@ elementScroll.html: [fail, Unknown]
8685
elementsFromPoint**: [fail, Not implemented]
8786
getBoundingClientRect-empty-inline.html: [fail, document.fonts is not implemented]
8887
getBoundingClientRect-shy.html: [fail, Not implemented]
88+
getBoundingClientRect-svg.html: [fail, Not implemented]
8989
getClientRects-br-*: [fail, Not implemented]
9090
getClientRects-inline-atomic-child.html: [fail, Not implemented]
9191
idlharness.html: [fail, Depends on Fetch]
@@ -173,6 +173,14 @@ throw-on-dynamic-markup-insertion-counter-reactions.html: [timeout, document.ope
173173

174174
DIR: dom/abort
175175

176+
event.any.html:
177+
"AbortController abort() should fire event synchronously": [fail, AbortSignal.reason is not implemented]
178+
"AbortController abort(reason) should set signal.reason": [fail, AbortSignal.reason is not implemented]
179+
"aborting AbortController without reason creates an \"AbortError\" DOMException": [fail, AbortSignal.reason is not implemented]
180+
"AbortController abort(undefined) creates an \"AbortError\" DOMException": [fail, AbortSignal.reason is not implemented]
181+
"static aborting signal should have right properties": [fail, AbortSignal.reason is not implemented]
182+
"static aborting signal with reason should set signal.reason": [fail, AbortSignal.reason is not implemented]
183+
176184
---
177185

178186
DIR: dom/collections
@@ -189,6 +197,7 @@ EventListener-incumbent-global-1.sub.html: [timeout, Multi-globals]
189197
EventListener-incumbent-global-2.sub.html: [timeout, Multi-globals]
190198
EventListener-invoke-legacy.html: [timeout, Animation stuff not implemented]
191199
EventTarget-dispatchEvent.html: [fail, We don't support every event interface yet]
200+
KeyEvent-initKeyEvent.html: [needs-node14, Test uses optional chaining]
192201
event-global-extra.window.html: [fail, We're supposed to check the event listener's global (not the Event's global)]
193202
relatedTarget.window.html: [fail, Unknown]
194203
webkit-animation-end-event.html: [fail, WebKit-prefixed events not implemented]
@@ -207,7 +216,8 @@ DOMTokenList-coverage-for-attributes.html: [fail, Several DOMTokenList attribute
207216
DIR: dom/nodes
208217

209218
Document-URL.html: [fail, Unknown]
210-
Document-characterSet-normalization.html: [timeout, Some encodings are not supported - see the whatwg-encoding module]
219+
Document-characterSet-normalization-1.html: [timeout, Some encodings are not supported - see the whatwg-encoding module]
220+
Document-characterSet-normalization-2.html: [timeout, Some encodings are not supported - see the whatwg-encoding module]
211221
Document-createEvent.https.html: [fail, We don't support every event interface yet]
212222
Document-getElementById.html: [fail, We cache IDs in insertion order]
213223
Element-closest.html: [fail, :has is not supported (by all major browsers as well)]
@@ -285,6 +295,7 @@ api-availability.html: [timeout, window.open not implemented]
285295
browsing_context_name.html: [timeout, Unknown]
286296
browsing_context_name_cross_origin.html: [timeout, Unknown]
287297
browsing_context_name_cross_origin_2.html: [fail, window.name not implemented]
298+
history-traversal-navigates-multiple-frames.html: [fail, Unknown]
288299
persisted-user-state-restoration/resume-timer-on-history-back.html: [timeout, Unknown]
289300
persisted-user-state-restoration/scroll-restoration-basic.html: [fail, Not implemented]
290301
persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html: [timeout, Unknown]
@@ -321,13 +332,22 @@ anchor-jsurl-form-submit.html: [timeout, Unknown]
321332
child-navigates-parent-same-origin.window.html: [fail-slow, Unknown]
322333
empty_fragment.html: [fail, Unknown]
323334
failure-check-sequence.https.html: [fail, Not implemented]
335+
initial-empty-document/*: [fail, Unknown]
324336
javascript-url-abort/javascript-url-abort-return-value-string.tentative.html: [timeout, Unknown]
325337
javascript-url-abort/javascript-url-abort-return-value-undefined.tentative.html: [timeout, Unknown]
326338
javascript-url-return-value-handling-dynamic.html: [fail, Unknown]
339+
javascript-url-security-check-failure.sub.html: [fail, Unknown]
340+
javascript-url-security-check-multi-globals.sub.html: [fail, Unknown]
341+
javascript-url-security-check-same-origin-domain.sub.html: [fail, Unknown]
342+
navigate-cross-origin-iframe-to-same-url-with-fragment.html: [fail, Unknown]
343+
navigate-cross-origin-iframe-to-same-url.html: [fail, Unknown]
327344
navigation-unload-form-submit.html: [timeout, Unknown]
328345
navigation-unload-same-origin-fragment.html: [timeout, Unknown]
346+
redirect-to-about.window.html: [fail, Unknown]
347+
redirect-to-data.html: [fail, Unknown]
329348
refresh/navigate.window.html: [timeout, Unknown]
330349
refresh/subresource.any.html: [fail, Depends on fetch]
350+
replace-before-load/*: [fail, Unknown]
331351
source/navigate-child-function-parent.html: [timeout, Unknown]
332352
source/navigate-child-function.html: [timeout, Unknown]
333353
source/navigate-child-src-about-blank.html: [fail, Unknown]
@@ -365,6 +385,7 @@ history_go_to_uri.html: [timeout, Unknown]
365385
history_go_undefined.html: [timeout, Unknown]
366386
history_go_zero.html: [timeout, Unknown]
367387
history_properties_only_fully_active.html: [fail, Unknown]
388+
history_pushstate_url_rewriting.html: [fail, needs URL.createObjectURL]
368389
iframe_history_go_0.html: [timeout, Unknown]
369390
joint_session_history/001.html: [timeout, Unknown]
370391
joint_session_history/002.html: [timeout, Unknown]
@@ -470,6 +491,7 @@ window-open-defaults.window.html: [fail, Depends on window.open()]
470491
window-open-invalid-url.html: [fail, Unknown]
471492
window-open-noopener.html**: [fail-slow, Unknown]
472493
window-open-noreferrer.html: [fail, Depends on BroadcastChannel]
494+
window-opener-unconfigurable.window.html: [fail, Not implemented]
473495
window-properties.https.html:
474496
"Window method: createImageBitmap": [fail, Not implemented]
475497
"Window method: matchMedia": [fail, Not implemented]
@@ -605,6 +627,7 @@ DIR: html/dom/elements/elements-in-the-dom
605627
DIR: html/dom/elements/global-attributes
606628

607629
dataset-prototype.html: [fail, Tests Object.prototype which jsdom has trouble with due to VM globals]
630+
dir-bdi-script.html: [fail, Unknown]
608631
dir-slots-directionality.tentative.html: [fail, Unknown]
609632
the-lang-attribute-001.html: [fail, Unknown]
610633
the-lang-attribute-002.html: [fail, Unknown]
@@ -750,6 +773,7 @@ img-picture-ancestor.html: [fail, Unknown; possibly needs media queries?]
750773
img.complete.html: [timeout, Unknown]
751774
invalid-src.html: [timeout, Resource loader doesn't catch bad URLs at the right point in the process]
752775
invisible-image.html: [fail, images block the window load event not implemented (images not in _queue)]
776+
list-of-available-images-does-not-coalesce-in-flight-requests.sub.tentative.html: [fail, Unknown]
753777
list-of-available-images-matching.https.html: [fail, Service worker not implemented]
754778
move-element-and-scroll.html: [fail, scrollIntoView not implemented]
755779
natural-size-orientation.html: [timeout, image-orientation CSS property not implemented]
@@ -817,6 +841,7 @@ button-activate.html: [fail, iframe onload needs to run after synchronous script
817841
button-submit-children.html: [fail-slow, We do not support form target yet]
818842
button-submit-remove-children-jssubmit.html: [fail-slow, We do not support form target yet]
819843
button-submit-remove-children.html: [fail-slow, We do not support form target yet]
844+
button-submit-remove-jssubmit.html: [fail-slow, We do not support form target yet]
820845

821846
---
822847

@@ -850,12 +875,14 @@ datetime-local.html: [fail, min/max constraints not implemented]
850875
hidden-charset-case-sensitive.html: [timeout, Unknown]
851876
image-click-form-data.html: [timeout, Unknown]
852877
input-seconds-leading-zeroes.html: [fail, Unknown]
878+
input-submit-remove-jssubmit.html: [fail-slow, We do not support form target yet]
853879
input-type-button.html: [fail, Depends on offsetWidth]
854880
maxlength.html: [fail, Reflection not implemented correctly]
855881
minlength.html: [fail, Reflection not implemented correctly]
856882
range-2.html: [fail, step attribute not yet implemented]
857883
range.html: [fail, step attribute and range semantics not yet implemented]
858884
reset.html: [fail, Reset semantics not yet implemented]
885+
show-picker-cross-origin-iframe.tentative.html: [fail, Not implemented]
859886

860887
---
861888

@@ -889,12 +916,15 @@ DIR: html/semantics/forms/the-progress-element
889916

890917
DIR: html/semantics/forms/the-select-element
891918

919+
select-validity.html: [fail, Unknown]
920+
892921
---
893922

894923
DIR: html/semantics/forms/the-textarea-element
895924

896925
textarea-maxlength.html: [fail, Unknown]
897926
textarea-minlength.html: [fail, Unknown]
927+
textarea-placeholder-lineheight.html: [fail, getBoundingClientRect() is not implemented]
898928
wrap-enumerated-ascii-case-insensitive.html: [timeout, Unknown]
899929

900930
---
@@ -905,6 +935,8 @@ DIR: html/semantics/grouping-content
905935

906936
DIR: html/semantics/interactive-elements/the-details-element
907937

938+
auto-expand-details-element-fragment.html: [fail, Ancestor details revealing algorithm is not implemented]
939+
closed-details-layout-apis.tentative.html: [fail, getBoundingClientRect() is not implemented]
908940
toggleEvent.html: [fail, The ninth test requires a streaming HTML parser to pass]
909941

910942
---
@@ -998,7 +1030,6 @@ execution-timing/107-import.html: [fail, Unknown]
9981030
execution-timing/107-noimport.html: [fail, Unknown]
9991031
execution-timing/108.html: [fail, Unknown]
10001032
execution-timing/109.html: [fail, Unknown]
1001-
execution-timing/116.html: [fail, Unknown]
10021033
execution-timing/117.html: [fail, Unknown]
10031034
execution-timing/118.html: [fail, Unknown]
10041035
execution-timing/119.html: [fail, Unknown]
@@ -1025,7 +1056,7 @@ execution-timing/142.html: [fail, Unknown]
10251056
execution-timing/143.html: [fail, Unknown]
10261057
execution-timing/144.html: [fail, Unknown]
10271058
execution-timing/145.html: [fail, Unknown]
1028-
execution-timing/146.html: [fail, Unknown]
1059+
execution-timing/146-href.html: [fail, Unknown]
10291060
execution-timing/149.html: [fail, Unknown]
10301061
execution-timing/150-import-xhtml.xhtml: [fail, Unknown]
10311062
execution-timing/150-import.html: [fail, Unknown]
@@ -1055,6 +1086,7 @@ script-not-executed-after-shutdown.html: [fail-slow, Unknown]
10551086
script-onerror-insertion-point-1.html: [timeout, Unknown]
10561087
script-onerror-insertion-point-2.html: [flaky]
10571088
script-onload-insertion-point.html: [fail, Unknown]
1089+
script-supports.html: [fail, Not implemented]
10581090
script-text-modifications.html: [fail, Unknown]
10591091
script-type-and-language-js.html: [fail, Our script execution timing is off; see discussion in https://github.com/jsdom/jsdom/pull/1406]
10601092

@@ -1103,12 +1135,16 @@ DIR: html/syntax
11031135

11041136
parsing-html-fragments/*: [timeout, Unknown]
11051137
parsing/DOMContentLoaded-defer.html: [fail, Script execution timing]
1138+
parsing/adoption_agency_check_the_end_tag_name.html: [fail, Unknown]
1139+
parsing/ambiguous-ampersand.html: [fail, Unknown]
11061140
parsing/html-integration-point.html: [fail, Incorrect handling of encoded entity references inside <noframes> element]
11071141
parsing/html5lib*: [timeout, Unknown]
11081142
parsing/html_content_in_foreign_context.html: [fail, Parser issues with foreign elements]
11091143
parsing/unclosed-svg-script.html: [fail, Unknown]
11101144
serializing-html-fragments/escaping.html: [fail, https://github.com/inikulin/parse5/issues/332]
11111145
serializing-html-fragments/serializing.html: [fail, https://github.com/inikulin/parse5/issues/289]
1146+
speculative-parsing/generated/document-write/*: [fail-slow, Unknown]
1147+
speculative-parsing/generated/page-load/*: [fail-slow, Unknown]
11121148
xmldecl/xmldecl-1.html: [fail, Unknown; possibly iframes are inheriting encoding from their parent?]
11131149
xmldecl/xmldecl-2.html: [fail, several encodings misdetected?]
11141150
xmldecl/xmldecl-3.html: [fail, Unknown]
@@ -1160,9 +1196,12 @@ messageevent-constructor.https.html: [fail, uses MessageChannel]
11601196

11611197
DIR: html/webappapis/system-state-and-capabilities/the-navigator-object
11621198

1199+
clientinformation.window.html: [fail, window.clientInformation is not implemented]
11631200
historical.https.window.html: [fail, Not implemented]
11641201
navigator-window-controls-overlay.html: [fail, Not implemented]
11651202
navigator_user_agent.https.html: [fail, Not implemented]
1203+
per-global.window.html: [fail, window.clientInformation is not implemented]
1204+
plugins-and-mimetypes.html: [fail, navigator.pdfViewerEnabled is not implemented]
11661205
protocol.https.html: [fail, registerProtocolHandler() is not implemented]
11671206
protocol.tentative.https.html: [fail, registerProtocolHandler() is not implemented]
11681207

@@ -1176,6 +1215,7 @@ DIR: selection
11761215

11771216
bidi/modify.tentative.html: [fail, Not implemented]
11781217
contenteditable/collapse.html: [fail, No spec for how selection changes should impact focus, https://github.com/whatwg/html/issues/6179]
1218+
contenteditable/initial-selection-on-focus.tentative.html?*: [fail, Not implemented]
11791219
contenteditable/modify.tentative.html: [fail, Not implemented]
11801220
idlharness.window.html: [fail, Depends on fetch]
11811221
modify-extend-word-trailing-inline-block.tentative.html: [fail, Not implemented]
@@ -1184,7 +1224,8 @@ script-and-style-elements.html: [fail,
11841224
toString should return only the text within the selection that is visible to the user
11851225
(https://www.w3.org/Bugs/Public/show_bug.cgi?id=10583, https://bugzilla.mozilla.org/show_bug.cgi?id=1535392)
11861226
]
1187-
textcontrols/selectionchange.tentative.html: [fail, Firefox-only semantics not yet backed by a spec]
1227+
textcontrols/selectionchange-bubble.html: [timeout, Unknown]
1228+
textcontrols/selectionchange.html: [fail, Firefox-only semantics not yet backed by a spec]
11881229

11891230
---
11901231

@@ -1278,6 +1319,7 @@ unload-a-document/*: [timeout, Requires window.open]
12781319

12791320
DIR: webstorage
12801321

1322+
localstorage-basic-partitioned.tentative.sub.html: [timeout, Depends on window.open()]
12811323
storage_local_window_open.window.html: [timeout, Depends on window.open()]
12821324
storage_session_window_noopener.window.html: [fail, Depends on BroadcastChannel]
12831325
storage_session_window_open.window.html: [timeout, Depends on window.open()]
@@ -1357,6 +1399,7 @@ send-response-event-order.htm: [fail, why no readystatechange for headers receiv
13571399
send-sync-response-event-order.htm: [fail-slow, not sure; sync is special]
13581400
setrequestheader-content-type.htm: [fail-slow, we don't implement ReadableStream; also unsure we can get request() to send no content-type for ArrayBuffer]
13591401
status-basic.htm: [timeout, https://github.com/jsdom/jsdom/issues/1833]
1402+
status.h2.window.html: [fail, Unknown]
13601403
sync-no-progress.any.html: [fail, Unknown]
13611404
sync-xhr-supported-by-feature-policy.html: [fail, We don't support Feature Policy]
13621405
xhr-timeout-longtask.any.html: [fail, This is probably impossible to get right in Node.js (without threads)]

test/web-platform-tests/utils.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"use strict";
22
const { Canvas } = require("../../lib/jsdom/utils.js");
33

4+
const nodeMajor = Number(process.versions.node.split(".", 1)[0]);
5+
const hasNode14 = nodeMajor >= 14;
46
const hasCanvas = Boolean(Canvas);
57

68
exports.resolveReason = reason => {
@@ -10,7 +12,8 @@ exports.resolveReason = reason => {
1012
}
1113

1214
if (reason === "fail" ||
13-
(reason === "fail-with-canvas" && hasCanvas)) {
15+
(reason === "fail-with-canvas" && hasCanvas) ||
16+
(reason === "needs-node14" && !hasNode14)) {
1417
return "expect-fail";
1518
}
1619

0 commit comments

Comments
 (0)