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

Side by Side Diff: LayoutTests/fast/dom/Attr/invalidate-nodelist-after-attr-setvalue.html

Issue 58533003: Move fast/js/resources files to resources. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 <body> 3 <body>
4 <p>This tests setting the value of an attribute node after caching childNodes of the attribute node.<br> 4 <p>This tests setting the value of an attribute node after caching childNodes of the attribute node.<br>
5 The cache should be cleared and childNodes[0].data should return the new value.< br> 5 The cache should be cleared and childNodes[0].data should return the new value.< br>
6 You should see PASS below:</p> 6 You should see PASS below:</p>
7 <div id="console"></div> 7 <div id="console"></div>
8 <script src="../../js/resources/js-test-pre.js"></script> 8 <script src="../../../resources/js-test.js"></script>
9 <script> 9 <script>
10 10
11 var element = document.createElement('div'); 11 var element = document.createElement('div');
12 var nameAttrNode = document.createAttribute('name'); 12 var nameAttrNode = document.createAttribute('name');
13 var oldValue = document.createTextNode('oldName'); 13 var oldValue = document.createTextNode('oldName');
14 nameAttrNode.appendChild(oldValue); 14 nameAttrNode.appendChild(oldValue);
15 element.setAttributeNode(nameAttrNode); 15 element.setAttributeNode(nameAttrNode);
16 document.body.appendChild(element); 16 document.body.appendChild(element);
17 17
18 shouldBe("nameAttrNode.childNodes.length", '1'); 18 shouldBe("nameAttrNode.childNodes.length", '1');
19 shouldBe('nameAttrNode.childNodes[0]', 'oldValue'); 19 shouldBe('nameAttrNode.childNodes[0]', 'oldValue');
20 shouldBe('nameAttrNode.childNodes[0].data', '"oldName"'); 20 shouldBe('nameAttrNode.childNodes[0].data', '"oldName"');
21 21
22 debug(''); 22 debug('');
23 shouldBe("nameAttrNode.value = 'newName'; nameAttrNode.value", '"newName"'); 23 shouldBe("nameAttrNode.value = 'newName'; nameAttrNode.value", '"newName"');
24 shouldNotBe("nameAttrNode.childNodes[0]", 'oldValue'); 24 shouldNotBe("nameAttrNode.childNodes[0]", 'oldValue');
25 shouldBe("nameAttrNode.childNodes[0].data", '"newName"'); 25 shouldBe("nameAttrNode.childNodes[0].data", '"newName"');
26 26
27 </script> 27 </script>
28 </body> 28 </body>
29 </html> 29 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/Attr/direction-attribute-set-and-cleared.html ('k') | LayoutTests/fast/dom/Attr/parent-adopt-node.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698