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

Side by Side Diff: LayoutTests/fast/dom/Attr/change-id-via-attr-node-value.html

Issue 733943004: Remove Text.replaceWholeText() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase 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 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body id="a"> 6 <body id="a">
7 <script> 7 <script>
8 8
9 description("Test that different ways of changing an element's id all work prope rly."); 9 description("Test that different ways of changing an element's id all work prope rly.");
10 10
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 debug("\n14. Node.normalize(), joining text nodes."); 128 debug("\n14. Node.normalize(), joining text nodes.");
129 attrNode.normalize(); 129 attrNode.normalize();
130 shouldBe('document.getElementById("hi")', 'document.body'); 130 shouldBe('document.getElementById("hi")', 'document.body');
131 shouldBe('document.body.id', '"hi"'); 131 shouldBe('document.body.id', '"hi"');
132 shouldBe('document.body.getAttribute("id")', '"hi"'); 132 shouldBe('document.body.getAttribute("id")', '"hi"');
133 shouldBe('document.body.getAttributeNode("id").value', '"hi"'); 133 shouldBe('document.body.getAttributeNode("id").value', '"hi"');
134 shouldBe('document.body.getAttributeNode("id").childNodes.length', '1'); 134 shouldBe('document.body.getAttributeNode("id").childNodes.length', '1');
135 135
136 debug("\n15. Changing Attr.nodeValue."); 136 debug("\n15. Changing Attr.nodeValue.");
137 attrNode.nodeValue = "foo"; 137 attrNode.nodeValue = "foo";
138 attrNode.firstChild.replaceWholeText("j"); 138 attrNode.firstChild.data = "j";
139 shouldBe('document.getElementById("hi")', 'null'); 139 shouldBe('document.getElementById("hi")', 'null');
140 shouldBe('document.getElementById("j")', 'document.body'); 140 shouldBe('document.getElementById("j")', 'document.body');
141 shouldBe('document.body.id', '"j"'); 141 shouldBe('document.body.id', '"j"');
142 shouldBe('document.body.getAttribute("id")', '"j"'); 142 shouldBe('document.body.getAttribute("id")', '"j"');
143 shouldBe('attrNode.value', '"j"'); 143 shouldBe('attrNode.value', '"j"');
144 shouldBe('attrNode.childNodes.length', '1'); 144 shouldBe('attrNode.childNodes.length', '1');
145 145
146 debug("\n16. Changing Text.data."); 146 debug("\n16. Changing Text.data.");
147 attrNode.firstChild.data = "k"; 147 attrNode.firstChild.data = "k";
148 shouldBe('document.getElementById("j")', 'null'); 148 shouldBe('document.getElementById("j")', 'null');
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 var attrNode = document.createAttribute("id"); 207 var attrNode = document.createAttribute("id");
208 attrNode.value = "p"; 208 attrNode.value = "p";
209 document.body.setAttributeNode(attrNode); 209 document.body.setAttributeNode(attrNode);
210 shouldBe('document.getElementById("o")', 'null'); 210 shouldBe('document.getElementById("o")', 'null');
211 shouldBe('document.getElementById("p")', 'document.body'); 211 shouldBe('document.getElementById("p")', 'document.body');
212 shouldBe('document.body.id', '"p"'); 212 shouldBe('document.body.id', '"p"');
213 shouldBe('document.body.getAttribute("id")', '"p"'); 213 shouldBe('document.body.getAttribute("id")', '"p"');
214 </script> 214 </script>
215 </body> 215 </body>
216 </html> 216 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698