Bug 1529242 [wpt PR 15471] - domparsing: HTML Parser: Remove conditional parsing of <noembed> content, a=testonly
☠☠ backed out by 66b1aba3fb43 ☠ ☠
authorKent Tamura <tkent@chromium.org>
Wed, 06 Mar 2019 10:35:20 +0000
changeset 522225 43debb14a0040caf856018d8eee0f318de3dd8a7
parent 522224 71768e55e777a5b9d2b5d3f696439655d2c76e0f
child 522226 df087069273bff0542e3ac040d32526220438fa9
push id10871
push usercbrindusan@mozilla.com
push dateMon, 18 Mar 2019 15:49:32 +0000
treeherdermozilla-beta@018abdd16060 [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>