Changeset 203313 in webkit
- Timestamp:
- Jul 15, 2016, 5:46:23 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/dom/DOMException/XPathException-expected.txt (modified) (1 diff)
-
LayoutTests/fast/dom/DOMException/resources/XPathException.js (modified) (1 diff)
-
LayoutTests/fast/xpath/4XPath/Core/test_parser-expected.txt (modified) (1 diff)
-
LayoutTests/fast/xpath/invalid-functions-expected.txt (modified) (1 diff)
-
LayoutTests/fast/xpath/py-dom-xpath/expressions-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/bindings/js/JSDOMBinding.cpp (modified) (1 diff)
-
Source/WebCore/xml/XPathException.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r203311 r203313 1 2016-07-15 Brady Eidson <beidson@apple.com> 2 3 Update XPathException to use the description in toString(). 4 https://bugs.webkit.org/show_bug.cgi?id=159848 5 6 Reviewed by Alex Christensen. 7 8 * fast/dom/DOMException/XPathException-expected.txt: 9 * fast/dom/DOMException/resources/XPathException.js: 10 * fast/xpath/4XPath/Core/test_parser-expected.txt: 11 * fast/xpath/invalid-functions-expected.txt: 12 * fast/xpath/py-dom-xpath/expressions-expected.txt: 13 1 14 2016-07-15 Brady Eidson <beidson@apple.com> 2 15 -
trunk/LayoutTests/fast/dom/DOMException/XPathException-expected.txt
r196392 r203313 4 4 5 5 6 PASS e.toString() is " Error: TYPE_ERR: DOM XPath Exception 52"6 PASS e.toString() is "TYPE_ERR (DOM XPath Exception 52): The expression could not be converted to return the specified type." 7 7 PASS Object.prototype.toString.call(e) is "[object XPathException]" 8 8 PASS Object.prototype.toString.call(e.__proto__) is "[object XPathExceptionPrototype]" -
trunk/LayoutTests/fast/dom/DOMException/resources/XPathException.js
r196392 r203313 12 12 } 13 13 14 shouldBeEqualToString("e.toString()", " Error: TYPE_ERR: DOM XPath Exception 52");14 shouldBeEqualToString("e.toString()", "TYPE_ERR (DOM XPath Exception 52): The expression could not be converted to return the specified type."); 15 15 shouldBeEqualToString("Object.prototype.toString.call(e)", "[object XPathException]"); 16 16 shouldBeEqualToString("Object.prototype.toString.call(e.__proto__)", "[object XPathExceptionPrototype]"); -
trunk/LayoutTests/fast/xpath/4XPath/Core/test_parser-expected.txt
r20102 r203313 39 39 PASS DOM.evaluate("CHILD2/@CODE * 0", ROOT, null, XPathResult.NUMBER_TYPE, null).numberValue is 0 40 40 PASS föø 41 PASS DOM.evaluate("\\", ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.41 PASS DOM.evaluate("\\", ROOT, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator.. 42 42 PASS successfullyParsed is true 43 43 -
trunk/LayoutTests/fast/xpath/invalid-functions-expected.txt
r20338 r203313 1 PASS document.createExpression("foobar()", null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.2 PASS document.evaluate("foobar()", document, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.3 PASS document.createExpression("position(//div)", null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.4 PASS document.evaluate("position(//div)", document, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.5 PASS document.createExpression("ceiling(1,2)", null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.6 PASS document.evaluate("ceiling(1,2)", document, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.7 PASS document.createExpression("ceiling(1,2)", null).evaluate(document, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.8 PASS document.createExpression("boolean()", null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.9 PASS document.evaluate("boolean()", document, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.1 PASS document.createExpression("foobar()", null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator.. 2 PASS document.evaluate("foobar()", document, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator.. 3 PASS document.createExpression("position(//div)", null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator.. 4 PASS document.evaluate("position(//div)", document, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator.. 5 PASS document.createExpression("ceiling(1,2)", null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator.. 6 PASS document.evaluate("ceiling(1,2)", document, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator.. 7 PASS document.createExpression("ceiling(1,2)", null).evaluate(document, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator.. 8 PASS document.createExpression("boolean()", null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator.. 9 PASS document.evaluate("boolean()", document, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator.. 10 10 PASS successfullyParsed is true 11 11 -
trunk/LayoutTests/fast/xpath/py-dom-xpath/expressions-expected.txt
r44372 r203313 1 1 PASS //item[@id >= 2 and @id <= "4"] 2 2 PASS //item[@id >= 2 and @id <= 3] 3 PASS doc.evaluate("position(1)", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.4 PASS doc.evaluate("not()", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.3 PASS doc.evaluate("position(1)", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator.. 4 PASS doc.evaluate("not()", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator.. 5 5 PASS string-length(100) 6 PASS doc.evaluate("count(100)", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.7 PASS doc.evaluate("adumbrate()", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.6 PASS doc.evaluate("count(100)", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator.. 7 PASS doc.evaluate("adumbrate()", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator.. 8 8 PASS //item[@id mod 2 = 0] | //item[@id mod 3 = 0] 9 PASS doc.evaluate("//item | 42", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.10 PASS doc.evaluate("/doc/(item[@id = 2] | item[@id = 6])/@id", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.11 PASS doc.evaluate('"monty"/anaconda', doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.12 PASS doc.evaluate('/doc/string(item[@id = 2])/@id', doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.13 PASS doc.evaluate('(1)[1]', doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception Error: INVALID_EXPRESSION_ERR: DOM XPath Exception 51.9 PASS doc.evaluate("//item | 42", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator.. 10 PASS doc.evaluate("/doc/(item[@id = 2] | item[@id = 6])/@id", doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator.. 11 PASS doc.evaluate('"monty"/anaconda', doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator.. 12 PASS doc.evaluate('/doc/string(item[@id = 2])/@id', doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator.. 13 PASS doc.evaluate('(1)[1]', doc.documentElement, null, XPathResult.ANY_TYPE, null) threw exception INVALID_EXPRESSION_ERR (DOM XPath Exception 51): The expression had a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator.. 14 14 PASS (1) 15 15 PASS ((1 + 1)) -
trunk/Source/WebCore/ChangeLog
r203311 r203313 1 2016-07-15 Brady Eidson <beidson@apple.com> 2 3 Update XPathException to use the description in toString(). 4 https://bugs.webkit.org/show_bug.cgi?id=159848 5 6 Reviewed by Alex Christensen. 7 8 No new tests (Covered by changes to existing tests). 9 10 * bindings/js/JSDOMBinding.cpp: 11 (WebCore::createDOMException): 12 * xml/XPathException.h: 13 (WebCore::XPathException::XPathException): 14 1 15 2016-07-15 Brady Eidson <beidson@apple.com> 2 16 -
trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp
r202890 r203313 274 274 JSValue errorObject; 275 275 switch (description.type) { 276 DOM_EXCEPTION_INTERFACES_FOR_EACH(TRY_TO_CREATE_EXCEPTION) 276 case DOMCoreExceptionType: 277 errorObject = toJS(exec, globalObject, DOMCoreException::create(description)); 278 break; 279 case FileExceptionType: 280 errorObject = toJS(exec, globalObject, FileException::create(description)); 281 break; 282 case SQLExceptionType: 283 errorObject = toJS(exec, globalObject, SQLException::create(description)); 284 break; 285 case SVGExceptionType: 286 errorObject = toJS(exec, globalObject, SVGException::create(description)); 287 break; 288 case XPathExceptionType: 289 errorObject = toJS(exec, globalObject, XPathException::create(description)); 290 break; 277 291 #if ENABLE(INDEXED_DATABASE) 278 292 case IDBDatabaseExceptionType: -
trunk/Source/WebCore/xml/XPathException.h
r177744 r203313 53 53 private: 54 54 explicit XPathException(const ExceptionCodeDescription& description) 55 : ExceptionBase(description )55 : ExceptionBase(description, ExceptionBase::MessageSource::UseDescription) 56 56 { 57 57 }
Note:
See TracChangeset
for help on using the changeset viewer.