| Index: third_party/WebKit/LayoutTests/fast/xsl/xslt-node-set-empty.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/xsl/xslt-node-set-empty.html b/third_party/WebKit/LayoutTests/fast/xsl/xslt-node-set-empty.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ce1ff8a905191fc7918efdad603b98fb5b7a89ae
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/xsl/xslt-node-set-empty.html
|
| @@ -0,0 +1,27 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script>
|
| +test(() => {
|
| + const xmlSource = '<poke/>';
|
| + const xslSource = `<xsl:stylesheet version="1.0"
|
| + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
| + xmlns:exsl="http://exslt.org/common">
|
| +
|
| + <xsl:variable name="peek" select="exsl:node-set('')"/>
|
| +
|
| + <xsl:template match="poke">
|
| + <xsl:text>PASS</xsl:text>
|
| + </xsl:template>
|
| + </xsl:stylesheet>`;
|
| +
|
| + const parser = new DOMParser();
|
| + const xsl = parser.parseFromString(xslSource, 'text/xml');
|
| + const xml = parser.parseFromString(xmlSource, 'text/xml');
|
| +
|
| + const xslproc = new XSLTProcessor();
|
| + xslproc.importStylesheet(xsl);
|
| + const result = xslproc.transformToFragment(xml, document);
|
| + assert_equals(result.firstChild.textContent, 'PASS');
|
| +}, 'a variable set to node-set of a string should not halt processing');
|
| +</script>
|
|
|