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

Side by Side Diff: LayoutTests/fast/dom/Element/id-in-getelement01.html

Issue 48903019: Delete js-test-post.js. (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 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../js/resources/js-test-pre.js"></script> 3 <script src="../../js/resources/js-test-pre.js"></script>
4 </head> 4 </head>
5 <body> 5 <body>
6 6
7 <div name='name1' id='id1'/> 7 <div name='name1' id='id1'/>
8 <div name='name2' id='id2'/> 8 <div name='name2' id='id2'/>
9 <div name='name3' id='id2'/> 9 <div name='name3' id='id2'/>
10 10
11 <script> 11 <script>
12 description("Test getElementById"); 12 description("Test getElementById");
13 13
14 var elem; 14 var elem;
15 15
16 // element found with exact match 16 // element found with exact match
17 elem = document.getElementById('id1'); 17 elem = document.getElementById('id1');
18 shouldBe('elem.getAttribute("name")', '"name1"'); 18 shouldBe('elem.getAttribute("name")', '"name1"');
19 19
20 // multiple elements having same id return the first one 20 // multiple elements having same id return the first one
21 elem = document.getElementById('id2'); 21 elem = document.getElementById('id2');
22 shouldBe('elem.getAttribute("name")', '"name2"'); 22 shouldBe('elem.getAttribute("name")', '"name2"');
23 23
24 // element with id not found 24 // element with id not found
25 elem = document.getElementById('id3'); 25 elem = document.getElementById('id3');
26 shouldBeNull('elem'); 26 shouldBeNull('elem');
27 </script> 27 </script>
28 <script src="../../js/resources/js-test-post.js"></script>
29 </body> 28 </body>
30 </html> 29 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/Element/id-in-frame.html ('k') | LayoutTests/fast/dom/Element/id-in-insert-hr.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698