Skip to content

Commit 694ef3b

Browse files
yoavweisschromium-wpt-export-bot
authored andcommitted
Align Request.destination to spec
Currently `Request.destination` is set to "unknown" prefetch, but that was recently changed: Issue: whatwg/fetch#658 PR: whatwg/fetch#659 This CL aligns the destination values to the spec change. Bug: 832105 Change-Id: Ib9f21dcc6cf0ace27b7a810d3670cddc45b3b74f Reviewed-on: https://chromium-review.googlesource.com/1029858 Commit-Queue: Yoav Weiss <[email protected]> Reviewed-by: Charlie Harrison <[email protected]> Reviewed-by: Yutaka Hirano <[email protected]> Cr-Commit-Position: refs/heads/master@{#554341}
1 parent c70b18e commit 694ef3b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

fetch/api/request/destination/fetch-destination.https.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,4 +425,18 @@
425425
});
426426
}, 'HTMLLinkElement with rel=preload and as=manifest fetches with a "manifest" Request.destination');
427427

428+
// HTMLLinkElement with rel=prefetch - empty string destination
429+
promise_test(async t => {
430+
await new Promise((resolve, reject) => {
431+
let node = frame.contentWindow.document.createElement("link");
432+
node.rel = "prefetch";
433+
node.onload = resolve;
434+
node.onerror = reject;
435+
node.href = "dummy?dest=";
436+
frame.contentWindow.document.body.appendChild(node);
437+
}).catch(() => {
438+
assert_unreached("Fetch errored.");
439+
});
440+
}, 'HTMLLinkElement with rel=prefetch fetches with an empty string Request.destination');
441+
428442
</script>

0 commit comments

Comments
 (0)