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

Side by Side Diff: LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue1.js

Issue 1158433004: Remove Attr child nodes (making Attr a Node, not a ContainerNode) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address feedback Created 5 years, 6 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
1 /* 1 /*
2 Copyright © 2001-2004 World Wide Web Consortium, 2 Copyright © 2001-2004 World Wide Web Consortium,
3 (Massachusetts Institute of Technology, European Research Consortium 3 (Massachusetts Institute of Technology, European Research Consortium
4 for Informatics and Mathematics, Keio University). All 4 for Informatics and Mathematics, Keio University). All
5 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
6 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
7 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 7 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8 8
9 [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 9 [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
10 */ 10 */
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 */ 76 */
77 function hc_attrsetvalue1() { 77 function hc_attrsetvalue1() {
78 var success; 78 var success;
79 if(checkInitialization(builder, "hc_attrsetvalue1") != null) return; 79 if(checkInitialization(builder, "hc_attrsetvalue1") != null) return;
80 var doc; 80 var doc;
81 var acronymList; 81 var acronymList;
82 var testNode; 82 var testNode;
83 var attributes; 83 var attributes;
84 var titleAttr; 84 var titleAttr;
85 var value; 85 var value;
86 var retval;
87 var firstChild;
88 var otherChild;
89 86
90 var docRef = null; 87 var docRef = null;
91 if (typeof(this.doc) != 'undefined') { 88 if (typeof(this.doc) != 'undefined') {
92 docRef = this.doc; 89 docRef = this.doc;
93 } 90 }
94 doc = load(docRef, "doc", "hc_staff"); 91 doc = load(docRef, "doc", "hc_staff");
95 acronymList = doc.getElementsByTagName("acronym"); 92 acronymList = doc.getElementsByTagName("acronym");
96 testNode = acronymList.item(3); 93 testNode = acronymList.item(3);
97 attributes = testNode.attributes; 94 attributes = testNode.attributes;
98 95
99 titleAttr = attributes.getNamedItem("title"); 96 titleAttr = attributes.getNamedItem("title");
100 firstChild = titleAttr.firstChild;
101 97
102 assertNotNull("attrChildNotNull",firstChild); 98 titleAttr.value = "Tomorrow";
103 titleAttr.value = "Tomorrow";
104
105 firstChild.nodeValue = "impl reused node";
106 99
107 value = titleAttr.value; 100 value = titleAttr.value;
101 assertEquals("attrValue","Tomorrow",value);
108 102
109 assertEquals("attrValue","Tomorrow",value); 103 value = titleAttr.nodeValue;
110 value = titleAttr.nodeValue;
111
112 assertEquals("attrNodeValue","Tomorrow",value); 104 assertEquals("attrNodeValue","Tomorrow",value);
113 firstChild = titleAttr.lastChild;
114
115 value = firstChild.nodeValue;
116
117 assertEquals("firstChildValue","Tomorrow",value);
118 otherChild = firstChild.nextSibling;
119
120 assertNull("nextSiblingIsNull",otherChild);
121
122 } 105 }
123 106
124 function runTest() { 107 function runTest() {
125 hc_attrsetvalue1(); 108 hc_attrsetvalue1();
126 } 109 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698