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

Side by Side Diff: LayoutTests/dom/xhtml/level3/core/nodeisequalnode08.js

Issue 756123002: Remove tabs and trailing whitspace in LayoutTests/dom/.../*.js (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years 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
1
2 /* 1 /*
3 Copyright © 2001-2004 World Wide Web Consortium, 2 Copyright © 2001-2004 World Wide Web Consortium,
4 (Massachusetts Institute of Technology, European Research Consortium 3 (Massachusetts Institute of Technology, European Research Consortium
5 for Informatics and Mathematics, Keio University). All 4 for Informatics and Mathematics, Keio University). All
6 Rights Reserved. This work is distributed under the W3C® Software License [1] i n the 5 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 6 hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 7 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 8
10 [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 9 [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
11 */ 10 */
12 11
13
14
15 /** 12 /**
16 * Gets URI that identifies the test. 13 * Gets URI that identifies the test.
17 * @return uri identifier of test 14 * @return uri identifier of test
18 */ 15 */
19 function getTargetURI() { 16 function getTargetURI() {
20 return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode0 8"; 17 return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode0 8";
21 } 18 }
22 19
23 var docsLoaded = -1000000; 20 var docsLoaded = -1000000;
24 var builder = null; 21 var builder = null;
(...skipping 11 matching lines...) Expand all
36 setUpPageStatus = 'running'; 33 setUpPageStatus = 'running';
37 try { 34 try {
38 // 35 //
39 // creates test document builder, may throw exception 36 // creates test document builder, may throw exception
40 // 37 //
41 builder = createConfiguredBuilder(); 38 builder = createConfiguredBuilder();
42 setImplementationAttribute("namespaceAware", true); 39 setImplementationAttribute("namespaceAware", true);
43 setImplementationAttribute("ignoringElementContentWhitespace", true); 40 setImplementationAttribute("ignoringElementContentWhitespace", true);
44 41
45 docsLoaded = 0; 42 docsLoaded = 0;
46 43
47 var docRef = null; 44 var docRef = null;
48 if (typeof(this.doc) != 'undefined') { 45 if (typeof(this.doc) != 'undefined') {
49 docRef = this.doc; 46 docRef = this.doc;
50 } 47 }
51 docsLoaded += preload(docRef, "doc", "hc_staff"); 48 docsLoaded += preload(docRef, "doc", "hc_staff");
52 49
53 if (docsLoaded == 1) { 50 if (docsLoaded == 1) {
54 setUpPageStatus = 'complete'; 51 setUpPageStatus = 'complete';
55 } 52 }
56 } catch(ex) { 53 } catch(ex) {
57 » catchInitializationError(builder, ex); 54 catchInitializationError(builder, ex);
58 setUpPageStatus = 'complete'; 55 setUpPageStatus = 'complete';
59 } 56 }
60 } 57 }
61 58
62
63
64 // 59 //
65 // This method is called on the completion of 60 // This method is called on the completion of
66 // each asychronous load started in setUpTests. 61 // each asychronous load started in setUpTests.
67 // 62 //
68 // When every synchronous loaded document has completed, 63 // When every synchronous loaded document has completed,
69 // the page status is changed which allows the 64 // the page status is changed which allows the
70 // body of the test to be executed. 65 // body of the test to be executed.
71 function loadComplete() { 66 function loadComplete() {
72 if (++docsLoaded == 1) { 67 if (++docsLoaded == 1) {
73 setUpPageStatus = 'complete'; 68 setUpPageStatus = 'complete';
74 } 69 }
75 } 70 }
76 71
72 /**
73 *
77 74
78 /** 75 Retreive an element node of this Document having nodeName as employeeId and
79 * 76 namespaceURI as http://www.nist.gov. Create a new Element node having the s ame attributes
80 77 in this Document and using isEqualNode check if 2 Element nodes are equal.
81 »
82 » Retreive an element node of this Document having nodeName as employeeId and
83 » namespaceURI as http://www.nist.gov. Create a new Element node having t he same attributes
84 » in this Document and using isEqualNode check if 2 Element nodes are equa l.
85 78
86 * @author IBM 79 * @author IBM
87 * @author Neil Delima 80 * @author Neil Delima
88 * @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqua lNode 81 * @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqua lNode
89 */ 82 */
90 function nodeisequalnode08() { 83 function nodeisequalnode08() {
91 var success; 84 var success;
92 if(checkInitialization(builder, "nodeisequalnode08") != null) return; 85 if(checkInitialization(builder, "nodeisequalnode08") != null) return;
93 var doc; 86 var doc;
94 var elem1; 87 var elem1;
95 var elem2; 88 var elem2;
96 var employeeList; 89 var employeeList;
97 var text; 90 var text;
98 var isEqual; 91 var isEqual;
99 var appendedChild; 92 var appendedChild;
100 93
101 var docRef = null; 94 var docRef = null;
102 if (typeof(this.doc) != 'undefined') { 95 if (typeof(this.doc) != 'undefined') {
103 docRef = this.doc; 96 docRef = this.doc;
104 } 97 }
105 doc = load(docRef, "doc", "hc_staff"); 98 doc = load(docRef, "doc", "hc_staff");
106 employeeList = doc.getElementsByTagName("em"); 99 employeeList = doc.getElementsByTagName("em");
107 elem1 = employeeList.item(0); 100 elem1 = employeeList.item(0);
108 elem2 = doc.createElementNS("http://www.w3.org/1999/xhtml","em"); 101 elem2 = doc.createElementNS("http://www.w3.org/1999/xhtml","em");
109 text = doc.createTextNode("EMP0001"); 102 text = doc.createTextNode("EMP0001");
110 appendedChild = elem2.appendChild(text); 103 appendedChild = elem2.appendChild(text);
111 isEqual = elem1.isEqualNode(elem2); 104 isEqual = elem1.isEqualNode(elem2);
112 assertTrue("nodeisequalnode08",isEqual); 105 assertTrue("nodeisequalnode08",isEqual);
113 106
114 } 107 }
115 108
116
117
118
119 function runTest() { 109 function runTest() {
120 nodeisequalnode08(); 110 nodeisequalnode08();
121 } 111 }
OLDNEW
« no previous file with comments | « LayoutTests/dom/xhtml/level3/core/nodeisequalnode07.js ('k') | LayoutTests/dom/xhtml/level3/core/nodeisequalnode09.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698