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

Side by Side Diff: LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_empty.js

Issue 133703014: Remove Node.isSupported (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
(Empty)
1
2 /*
3 Copyright © 2001-2004 World Wide Web Consortium,
4 (Massachusetts Institute of Technology, European Research Consortium
5 for Informatics and Mathematics, Keio University). All
6 Rights Reserved. This work is distributed under the W3C® Software License [1] i n the
7 hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
10 [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
11 */
12
13
14 // expose test function names
15 function exposeTestFunctionNames()
16 {
17 return ['Conformance_isSupported_empty'];
18 }
19
20 var docsLoaded = -1000000;
21 var builder = null;
22
23 //
24 // This function is called by the testing framework before
25 // running the test suite.
26 //
27 // If there are no configuration exceptions, asynchronous
28 // document loading is started. Otherwise, the status
29 // is set to complete and the exception is immediately
30 // raised when entering the body of the test.
31 //
32 function setUpPage() {
33 setUpPageStatus = 'running';
34 try {
35 //
36 // creates test document builder, may throw exception
37 //
38 builder = createConfiguredBuilder();
39
40 docsLoaded = 0;
41
42 var docRef = null;
43 if (typeof(this.doc) != 'undefined') {
44 docRef = this.doc;
45 }
46 docsLoaded += preload(docRef, "doc", "staffNS");
47
48 if (docsLoaded == 1) {
49 setUpPageStatus = 'complete';
50 }
51 } catch(ex) {
52 catchInitializationError(builder, ex);
53 setUpPageStatus = 'complete';
54 }
55 }
56
57
58
59 //
60 // This method is called on the completion of
61 // each asychronous load started in setUpTests.
62 //
63 // When every synchronous loaded document has completed,
64 // the page status is changed which allows the
65 // body of the test to be executed.
66 function loadComplete() {
67 if (++docsLoaded == 1) {
68 setUpPageStatus = 'complete';
69 }
70 }
71
72
73 /**
74 *
75 1.3 Conformance - The "feature" parameter in the
76 "Node.isSupported(feature,version)"
77 method is the name of the feature and the version is the version
78 number of the feature to test. XPath is the legal value for the
79 XPath module. The method should return "true".
80
81 Retrieve the DOM document on which the
82 "isSupported(feature,version)" method is invoked with "feature"
83 equal to "XPath" and version to the empty string "". The method
84 should return a boolean "true" if the implementation claims support
85 for some version for XPath.
86
87 * @author Philippe Le Hégaret
88 * @author Bob Clary
89 * @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#Conformance
90 */
91 function Conformance_isSupported_empty() {
92 var success;
93 if(checkInitialization(builder, "Conformance_isSupported_empty") != null) re turn;
94 var doc;
95 var state;
96
97 var docRef = null;
98 if (typeof(this.doc) != 'undefined') {
99 docRef = this.doc;
100 }
101 doc = load(docRef, "doc", "staffNS");
102 state = doc.isSupported("xpATH","");
103 assertTrue("isSupported-XPath-empty",state);
104
105 }
106
107
108
109
110 function runTest() {
111 Conformance_isSupported_empty();
112 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698