mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1588949 [wpt PR 19714] - [Import Maps] WPT: Explicitly reject data: base URLs in tests, a=testonly
Automatic update from web-platform-tests [Import Maps] WPT: Explicitly reject data: base URLs in tests For easier test failure triage. Bug: 990561 Change-Id: I4abeed8c2b97366316f7ed77f8df815f8f3a32ed Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1864014 Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by: Domenic Denicola <domenic@chromium.org> Cr-Commit-Position: refs/heads/master@{#707011} -- wpt-commits: 91d5b1b8e38243afb5de6038e45864112035d6d5 wpt-pr: 19714
This commit is contained in:
parent
5ae0dd1b55
commit
733c31dd57
@ -89,6 +89,11 @@ function it(message, f) {
|
||||
// Currently document.write() is used to make everything synchronous, which
|
||||
// is just needed for running the existing Jest-based tests easily.
|
||||
function parseFromString(mapString, mapBaseURL) {
|
||||
// We can't test data: base URLs because <base> rejects data: URLs.
|
||||
if (new URL(mapBaseURL).protocol === 'data:') {
|
||||
throw Error('test helper does not support data: base URLs');
|
||||
}
|
||||
|
||||
const iframe = document.createElement('iframe');
|
||||
document.body.appendChild(iframe);
|
||||
iframe.contentDocument.write(`
|
||||
|
Loading…
Reference in New Issue
Block a user