Bug 1622011 [wpt PR 22218] - [Trusted Types] Fix script handling for XML Documents., a=testonly
authorDaniel Vogelheim <vogelheim@chromium.org>
Sat, 14 Mar 2020 11:29:16 +0000
changeset 518849 66de3172be9b8cee6e27fa8f4c47085d6925c630
parent 518848 f9d2a1f7125bd8f6b16a4e83d5aa14d504813284
child 518850 1b70759d18fe97229e31ca657cbd198225a38533
push id37217
push userccoroiu@mozilla.com
push dateSun, 15 Mar 2020 21:37:59 +0000
treeherdermozilla-central@f9fc9427476e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1622011, 22218, 1060949, 2100928, 750113
milestone76.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 1622011 [wpt PR 22218] - [Trusted Types] Fix script handling for XML Documents., a=testonly Automatic update from web-platform-tests [Trusted Types] Fix script handling for XML Documents. XMLDocumentParser::UpdateLeafTextNode calls CharacterData::appendData (rather than CharacterData::ParserAppendData), which means this change is incorrectly attributed to a user script. Additionally, CharacterData::DidModifyData now passes UpdateSource correctly to the ChildrenChange event. Bug: 1060949 Change-Id: Ida8c93bc68f66da45221a8490b84b669898b084f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2100928 Commit-Queue: Daniel Vogelheim <vogelheim@chromium.org> Reviewed-by: Mike West <mkwst@chromium.org> Cr-Commit-Position: refs/heads/master@{#750113} -- wpt-commits: db71bad14a2d147e4557ec3a8694e3b9ce43fa53 wpt-pr: 22218
testing/web-platform/tests/trusted-types/HTMLScriptElement-in-xhtml-document.tentative.https.xhtml
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/trusted-types/HTMLScriptElement-in-xhtml-document.tentative.https.xhtml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <script src="/resources/testharness.js"></script>
+  <script src="/resources/testharnessreport.js"></script>
+  <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script'"/>
+</head>
+<body>
+<script>
+  // This this a regresion test that verifies that in-tree script element in
+  // an xhtml document still works correctly. The test itself doesn't do much.
+  test(t => {
+    t.done();
+  }, "Test whether a script element still executes for XHTML documents.");
+</script>
+</body>
+</html>
+