Skip to content

Commit

Permalink
[Trusted Types] Fix script handling for XML Documents.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
otherdaniel authored and chromium-wpt-export-bot committed Mar 13, 2020
1 parent eea4d73 commit f88affd
Showing 1 changed file with 19 additions and 0 deletions.
@@ -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>

0 comments on commit f88affd

Please sign in to comment.