From e458d70a0d18538346f41b503114c9ebe6b2ce12 Mon Sep 17 00:00:00 2001 From: Leon Clarke Date: Thu, 15 Jul 2010 12:03:35 +0100 Subject: Merge WebKit at r63173 : Initial merge by git. Change-Id: Ife5af0c7c6261fbbc8ae6bc08c390efa9ef10b44 --- .../fast/xpath/substring-nan-position-expected.txt | 10 +++++++++ LayoutTests/fast/xpath/substring-nan-position.html | 26 ++++++++++++++++++++++ .../substring-non-positive-postion-expected.txt | 10 +++++++++ .../fast/xpath/substring-non-positive-postion.html | 23 +++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 LayoutTests/fast/xpath/substring-nan-position-expected.txt create mode 100644 LayoutTests/fast/xpath/substring-nan-position.html create mode 100644 LayoutTests/fast/xpath/substring-non-positive-postion-expected.txt create mode 100644 LayoutTests/fast/xpath/substring-non-positive-postion.html (limited to 'LayoutTests/fast') diff --git a/LayoutTests/fast/xpath/substring-nan-position-expected.txt b/LayoutTests/fast/xpath/substring-nan-position-expected.txt new file mode 100644 index 0000000..136cf21 --- /dev/null +++ b/LayoutTests/fast/xpath/substring-nan-position-expected.txt @@ -0,0 +1,10 @@ +Test for bug 41862: XPath substring function is broken when passing NaN as the position parameter. + +PASS document.evaluate("substring('12345', number('NaN'))", document, null, XPathResult.STRING_TYPE, null).stringValue is '' +PASS document.evaluate("substring('12345', number('NaN'), 3)", document, null, XPathResult.STRING_TYPE, null).stringValue is '' +PASS document.evaluate("substring('12345', number('NaN'), -2147483645)", document, null, XPathResult.STRING_TYPE, null).stringValue is '' +PASS document.evaluate("substring('12345', number('NaN'), number('NaN'))", document, null, XPathResult.STRING_TYPE, null).stringValue is '' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/xpath/substring-nan-position.html b/LayoutTests/fast/xpath/substring-nan-position.html new file mode 100644 index 0000000..d1a1813 --- /dev/null +++ b/LayoutTests/fast/xpath/substring-nan-position.html @@ -0,0 +1,26 @@ + + + + + + + +

Test for bug 41862: +XPath substring function is broken when passing NaN as the position parameter.

+
+ + + + + diff --git a/LayoutTests/fast/xpath/substring-non-positive-postion-expected.txt b/LayoutTests/fast/xpath/substring-non-positive-postion-expected.txt new file mode 100644 index 0000000..d3683b7 --- /dev/null +++ b/LayoutTests/fast/xpath/substring-non-positive-postion-expected.txt @@ -0,0 +1,10 @@ +Test for bug 41913: XPath substring function does not correctly handle non-positive values for the position argument + +PASS document.evaluate("substring('abcde', 0)", document, null, XPathResult.STRING_TYPE, null).stringValue is 'abcde' +PASS document.evaluate("substring('abcde', -2)", document, null, XPathResult.STRING_TYPE, null).stringValue is 'abcde' +PASS document.evaluate("substring('abcde', 0, 5)", document, null, XPathResult.STRING_TYPE, null).stringValue is 'abcd' +PASS document.evaluate("substring('abcde', -2, 5)", document, null, XPathResult.STRING_TYPE, null).stringValue is 'ab' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/xpath/substring-non-positive-postion.html b/LayoutTests/fast/xpath/substring-non-positive-postion.html new file mode 100644 index 0000000..321bf25 --- /dev/null +++ b/LayoutTests/fast/xpath/substring-non-positive-postion.html @@ -0,0 +1,23 @@ + + + + + + + +

Test for bug 41913: +XPath substring function does not correctly handle non-positive values for the position argument

+
+ + + + + -- cgit v1.1