Skip to content

Commit

Permalink
Align Request.destination to spec
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
yoavweiss authored and chromium-wpt-export-bot committed Apr 27, 2018
1 parent c70b18e commit 694ef3b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions fetch/api/request/destination/fetch-destination.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -425,4 +425,18 @@
});
}, 'HTMLLinkElement with rel=preload and as=manifest fetches with a "manifest" Request.destination');

// HTMLLinkElement with rel=prefetch - empty string destination
promise_test(async t => {
await new Promise((resolve, reject) => {
let node = frame.contentWindow.document.createElement("link");
node.rel = "prefetch";
node.onload = resolve;
node.onerror = reject;
node.href = "dummy?dest=";
frame.contentWindow.document.body.appendChild(node);
}).catch(() => {
assert_unreached("Fetch errored.");
});
}, 'HTMLLinkElement with rel=prefetch fetches with an empty string Request.destination');

</script>

0 comments on commit 694ef3b

Please sign in to comment.