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

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

Issue 740223003: Revive tests for Document.createAttributeNS() and Element.setAttributeNodeNS() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: deprecation messages Created 6 years, 1 month 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 1
2 /* 2 /*
3 Copyright © 2001-2004 World Wide Web Consortium, 3 Copyright © 2001-2004 World Wide Web Consortium,
4 (Massachusetts Institute of Technology, European Research Consortium 4 (Massachusetts Institute of Technology, European Research Consortium
5 for Informatics and Mathematics, Keio University). All 5 for Informatics and Mathematics, Keio University). All
6 Rights Reserved. This work is distributed under the W3C® Software License [1] i n the 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 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. 8 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 9
10 [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 10 [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
11 */ 11 */
12 12
13 13
14 14
15 /** 15 /**
16 * Gets URI that identifies the test. 16 * Gets URI that identifies the test.
17 * @return uri identifier of test 17 * @return uri identifier of test
18 */ 18 */
19 function getTargetURI() { 19 function getTargetURI() {
20 return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode1 6"; 20 return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode1 4";
21 } 21 }
22 22
23 var docsLoaded = -1000000; 23 var docsLoaded = -1000000;
24 var builder = null; 24 var builder = null;
25 25
26 // 26 //
27 // This function is called by the testing framework before 27 // This function is called by the testing framework before
28 // running the test suite. 28 // running the test suite.
29 // 29 //
30 // If there are no configuration exceptions, asynchronous 30 // If there are no configuration exceptions, asynchronous
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 if (++docsLoaded == 1) { 70 if (++docsLoaded == 1) {
71 setUpPageStatus = 'complete'; 71 setUpPageStatus = 'complete';
72 } 72 }
73 } 73 }
74 74
75 75
76 /** 76 /**
77 * 77 *
78 78
79 79
80 » Using isEqualNode check if a default attribute node and a cloned default attribute 80 » Using isEqualNode check if 2 Attr nodes having the same nodeName and a n ull namespaceURI
81 » node are equal. 81 » attribute, one created using createAttribute and the other createAttribu teNS, are not equal.
82 » Note the localName for an Attr created with DOM Level 1 methods is null.
82 83
83 * @author IBM 84 * @author IBM
84 * @author Neil Delima 85 * @author Neil Delima
85 * @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqua lNode 86 * @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqua lNode
86 */ 87 */
87 function nodeisequalnode16() { 88 function nodeisequalnode14() {
88 var success; 89 var success;
89 if(checkInitialization(builder, "nodeisequalnode16") != null) return; 90 if(checkInitialization(builder, "nodeisequalnode14") != null) return;
90 var doc; 91 var doc;
91 var attr1; 92 var attr1;
92 var attr2; 93 var attr2;
93 var addrElement;
94 var elementList;
95 var isEqual; 94 var isEqual;
96 var nullNSURI = null; 95 var nullNSURI = null;
97 96
98 97
99 var docRef = null; 98 var docRef = null;
100 if (typeof(this.doc) != 'undefined') { 99 if (typeof(this.doc) != 'undefined') {
101 docRef = this.doc; 100 docRef = this.doc;
102 } 101 }
103 doc = load(docRef, "doc", "hc_staff"); 102 doc = load(docRef, "doc", "hc_staff");
104 elementList = doc.getElementsByTagName("p"); 103 attr1 = doc.createAttribute("root");
105 addrElement = elementList.item(3); 104 attr2 = doc.createAttributeNS(nullNSURI,"root");
106 attr1 = addrElement.getAttributeNodeNS(nullNSURI,"dir");
107 attr2 = attr1.cloneNode(true);
108 isEqual = attr1.isEqualNode(attr2); 105 isEqual = attr1.isEqualNode(attr2);
109 assertTrue("nodeisequalnode16",isEqual); 106 assertFalse("nodeisequalnode14",isEqual);
110 107
111 } 108 }
112 109
113 110
114 111
115 112
116 function runTest() { 113 function runTest() {
117 nodeisequalnode16(); 114 nodeisequalnode14();
118 } 115 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698