Bug 1529242 [wpt PR 15471] - domparsing: HTML Parser: Remove conditional parsing of <noembed> content, a=testonly
authorKent Tamura <tkent@chromium.org>
Wed, 06 Mar 2019 10:35:20 +0000
changeset 464607 7cce703abc33ec6f3aa826403287adb6000a397e
parent 464606 aef3f8d081d1cd507984b6a1ec092eac86616a41
child 464608 d472b88c048c8b5ad7a04c2ac66d48e142cb0702
push id35717
push useraciure@mozilla.com
push dateSun, 17 Mar 2019 09:45:26 +0000
treeherdermozilla-central@e0861be8d6c0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1529242, 15471, 933211, 1477556, 633571
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
testing/web-platform/tests/domparsing/DOMParser-parseFromString-html.html
--- a/testing/web-platform/tests/domparsing/DOMParser-parseFromString-html.html
+++ b/testing/web-platform/tests/domparsing/DOMParser-parseFromString-html.html
@@ -62,13 +62,18 @@ test(function() {
 test(function() {
     var soup = "<!DOCTYPE foo></><foo></multiple></>";
     var htmldoc = new DOMParser().parseFromString(soup, "text/html");
     assert_equals(htmldoc.documentElement.localName, "html");
     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");
     })
 }, "DOMParser throws on an invalid enum value")
 </script>