Bug 1529242 [wpt PR 15471] - domparsing: HTML Parser: Remove conditional parsing of <noembed> content, a=testonly

Automatic update from web-platform-tests
domparsing: HTML Parser: Remove conditional parsing of <noembed> content

The HTML Parser had raw text handling for <noembed> content only if plugins
were runnable. However, the HTML specification doesn't ask such behavior,
and it didn't match to our HTML serializer.  We should always handle it as
raw text.

Bug: 933211
Change-Id: Iade5197a14aeffb6b540c8e9f1ed1880c651955b
Reviewed-on: https://chromium-review.googlesource.com/c/1477556
Auto-Submit: Kent Tamura <tkent@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633571}

--

wpt-commits: a8348f28a0ca463f412ce4beec0b07d6e39c1fd3
wpt-pr: 15471
This commit is contained in:
Kent Tamura 2019-03-06 10:35:20 +00:00 коммит произвёл James Graham
Родитель 26db24d562
Коммит 6cb6af1dd3
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -66,6 +66,11 @@ test(function() {
assert_equals(htmldoc.documentElement.namespaceURI, "http://www.w3.org/1999/xhtml");
}, "DOMParser parses HTML tag soup with no problems");
test(function() {
const doc = new DOMParser().parseFromString('<noembed>&lt;a&gt;</noembed>', 'text/html');
assert_equals(doc.querySelector('noembed').textContent, '&lt;a&gt;');
}, 'DOMParser should handle the content of <noembed> as raw text');
test(function() {
assert_throws(new TypeError(), function() {
new DOMParser().parseFromString("", "text/foo-this-is-invalid");