| Index: LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.js
|
| diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.js b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.js
|
| index dfbd350ceec7b6184286a49feea3194965a5e202..96b820a9b34ef4de18e643971092c15b62b806b2 100644
|
| --- a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.js
|
| +++ b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.js
|
| @@ -1,16 +1,14 @@
|
| -
|
| /*
|
| -Copyright © 2001-2004 World Wide Web Consortium,
|
| -(Massachusetts Institute of Technology, European Research Consortium
|
| -for Informatics and Mathematics, Keio University). All
|
| -Rights Reserved. This work is distributed under the W3C® Software License [1] in the
|
| -hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
| -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
| +Copyright © 2001-2004 World Wide Web Consortium,
|
| +(Massachusetts Institute of Technology, European Research Consortium
|
| +for Informatics and Mathematics, Keio University). All
|
| +Rights Reserved. This work is distributed under the W3C® Software License [1] in the
|
| +hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
| +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
| [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
|
| */
|
|
|
| -
|
| // expose test function names
|
| function exposeTestFunctionNames()
|
| {
|
| @@ -38,26 +36,24 @@ function setUpPage() {
|
| builder = createConfiguredBuilder();
|
|
|
| docsLoaded = 0;
|
| -
|
| +
|
| var docRef = null;
|
| if (typeof(this.doc) != 'undefined') {
|
| docRef = this.doc;
|
| }
|
| docsLoaded += preload(docRef, "doc", "staffNS");
|
| -
|
| +
|
| if (docsLoaded == 1) {
|
| setUpPageStatus = 'complete';
|
| }
|
| } catch(ex) {
|
| - catchInitializationError(builder, ex);
|
| + catchInitializationError(builder, ex);
|
| setUpPageStatus = 'complete';
|
| }
|
| }
|
|
|
| -
|
| -
|
| //
|
| -// This method is called on the completion of
|
| +// This method is called on the completion of
|
| // each asychronous load started in setUpTests.
|
| //
|
| // When every synchronous loaded document has completed,
|
| @@ -69,18 +65,17 @@ function loadComplete() {
|
| }
|
| }
|
|
|
| -
|
| /**
|
| -*
|
| +*
|
| The XPathEvaluator can create a "XPathExpression" using the method
|
| "createExpression(expression, resolver)".
|
| -
|
| +
|
| Retrieve the DOM document on which the
|
| 'createExpression("/staff/jfouffa:employee", resolver)' method is
|
| invoked with the document element. The method should fail to create
|
| pre-compiled expression and throws DOMException.NAMESPACE_ERR
|
| since the prefix jfouffa is not mapped.
|
| -
|
| +
|
| * @author Philippe Le Hégaret
|
| * @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-createExpression
|
| */
|
| @@ -92,7 +87,7 @@ function XPathEvaluator_createExpression_NAMESPACE_ERR_02() {
|
| var exp;
|
| var root;
|
| var resolver;
|
| -
|
| +
|
| var docRef = null;
|
| if (typeof(this.doc) != 'undefined') {
|
| docRef = this.doc;
|
| @@ -102,23 +97,20 @@ function XPathEvaluator_createExpression_NAMESPACE_ERR_02() {
|
| root = doc.documentElement;
|
|
|
| resolver = xpEvaluator.createNSResolver(root);
|
| -
|
| - {
|
| - success = false;
|
| - try {
|
| +
|
| + {
|
| + success = false;
|
| + try {
|
| exp = xpEvaluator.createExpression("/staff/jfouffa:employee",resolver);
|
| }
|
| - catch(ex) {
|
| + catch(ex) {
|
| success = (typeof(ex.code) != 'undefined' && ex.code == 14);
|
| - }
|
| - assertTrue("throw_NAMESPACE_ERR",success);
|
| - }
|
| + }
|
| + assertTrue("throw_NAMESPACE_ERR",success);
|
| + }
|
|
|
| }
|
|
|
| -
|
| -
|
| -
|
| function runTest() {
|
| XPathEvaluator_createExpression_NAMESPACE_ERR_02();
|
| }
|
|
|