-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1906289 [wpt PR 47002] - MIME Sniffing: HTML no feed, a=testonly
Automatic update from web-platform-tests MIME Sniffing: HTML no feed For whatwg/mimesniff#192. -- wpt-commits: 48369a247abab60f100a84de8faef3cacf0b42c5 wpt-pr: 47002
- Loading branch information
1 parent
ffc84fd
commit 2d81f1e
Showing
3 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
testing/web-platform/tests/mimesniff/sniffing/html.window.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
["atom", "rss"].forEach(item => { | ||
async_test(t => { | ||
const popup = window.open(`support/${item}.html`); | ||
t.add_cleanup(() => popup.close()); | ||
popup.onload = t.step_func_done(() => { | ||
assert_equals(popup.document.contentType, "text/html"); | ||
assert_equals(popup.document.documentElement.localName, "html"); | ||
assert_equals(popup.document.documentElement.namespaceURI, "http://www.w3.org/1999/xhtml"); | ||
assert_equals(popup.document.querySelector("b").namespaceURI, "http://www.w3.org/1999/xhtml"); | ||
}); | ||
}, `HTML is not sniffed for a "feed": ${item}`); | ||
}); |
3 changes: 3 additions & 0 deletions
3
testing/web-platform/tests/mimesniff/sniffing/support/atom.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<atom> | ||
<b>HELLO</b> | ||
</atom> |
3 changes: 3 additions & 0 deletions
3
testing/web-platform/tests/mimesniff/sniffing/support/rss.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<rss> | ||
<b>HELLO</b> | ||
</rss> |