Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/xsl/xslt-node-set-empty.html

Issue 2750943004: node-set($x), when $x is empty, should not halt XSLT processing (Closed)
Patch Set: Refine the description. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/xml/XSLTExtensions.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <script>
5 test(() => {
6 const xmlSource = '<poke/>';
7 const xslSource = `<xsl:stylesheet version="1.0"
8 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9 xmlns:exsl="http://exslt.org/common">
10
11 <xsl:variable name="peek" select="exsl:node-set('')"/>
12
13 <xsl:template match="poke">
14 <xsl:text>PASS</xsl:text>
15 </xsl:template>
16 </xsl:stylesheet>`;
17
18 const parser = new DOMParser();
19 const xsl = parser.parseFromString(xslSource, 'text/xml');
20 const xml = parser.parseFromString(xmlSource, 'text/xml');
21
22 const xslproc = new XSLTProcessor();
23 xslproc.importStylesheet(xsl);
24 const result = xslproc.transformToFragment(xml, document);
25 assert_equals(result.firstChild.textContent, 'PASS');
26 }, 'a variable set to node-set of a string should not halt processing');
27 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/xml/XSLTExtensions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698