Skip to content

Commit

Permalink
Add test for xml regression fix
Browse files Browse the repository at this point in the history
This patch adds a test for commit 53b675cb30d079daf865d5955ca6058d004c8c72

Bug: 391499612
Change-Id: I375f75f566b0b0bbc4738822a8c400d263bb2757
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6216204
Reviewed-by: Di Zhang <[email protected]>
Commit-Queue: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1420101}
  • Loading branch information
josepharhar authored and chromium-wpt-export-bot committed Feb 13, 2025
1 parent 2b5429e commit 0c863b2
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dom/xslt/encoding-single-chunk-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!DOCTYPE html>
<iframe srcdoc="<h1 style='margin:0'>hello world</h1>"></iframe>
9 changes: 9 additions & 0 deletions dom/xslt/encoding-single-chunk.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<link rel=help href="https://issues.chromium.org/issues/391499612">
<link rel=match href="encoding-single-chunk-ref.html">
<iframe name="work" id="work" src=""></iframe>
<script>
window.onload = function () {
document.getElementById('work').src = 'resources/test.xml'
}
</script>
16 changes: 16 additions & 0 deletions dom/xslt/resources/reqLine.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="static" select="document(//static)"/>
<xsl:template match="/">
<xsl:for-each select="$static">
<html>
<body>
<h1>hello world</h1>
</body>
</html>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

4 changes: 4 additions & 0 deletions dom/xslt/resources/test.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version='1.0' encoding='ISO-8859-1'?><?xml-stylesheet type="text/xsl" href="./reqLine.xsl"?>
<RQStuff>
<static>./testu1LINE.xml</static>
</RQStuff>
2 changes: 2 additions & 0 deletions dom/xslt/resources/testu1LINE.xml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions lint.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ TRAILING WHITESPACE: webvtt/parsing/file-parsing/support/*.vtt
TRAILING WHITESPACE: webvtt/parsing/file-parsing/tests/support/*.vtt
TRAILING WHITESPACE: xhr/resources/headers-some-are-empty.asis
TRAILING WHITESPACE: content-security-policy/support/manifest.json
TRAILING WHITESPACE: dom/xslt/resources/testu1LINE.xml

# Intentional use of print statements
PRINT STATEMENT: dom/nodes/Document-createElement-namespace-tests/generate.py
Expand Down

0 comments on commit 0c863b2

Please sign in to comment.