Skip to content

Commit

Permalink
Bug 1906289 [wpt PR 47002] - MIME Sniffing: HTML no feed, a=testonly
Browse files Browse the repository at this point in the history
Automatic update from web-platform-tests
MIME Sniffing: HTML no feed

For whatwg/mimesniff#192.

--

wpt-commits: 48369a247abab60f100a84de8faef3cacf0b42c5
wpt-pr: 47002
  • Loading branch information
annevk authored and moz-wptsync-bot committed Jul 17, 2024
1 parent ffc84fd commit 2d81f1e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions testing/web-platform/tests/mimesniff/sniffing/html.window.js
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}`);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<atom>
<b>HELLO</b>
</atom>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<rss>
<b>HELLO</b>
</rss>

0 comments on commit 2d81f1e

Please sign in to comment.