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

Side by Side Diff: LayoutTests/fast/dom/htmlallcollection-enumerated-properties.html

Issue 906963002: layout tests: Fixes property enumeration tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/htmlcollection-enumerated-properties.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 5
6 <a href="#" id="aId1" name="aName1"></a> 6 <a href="#" id="aId1" name="aName1"></a>
7 <applet code="#" width="0" height="0" id="appletId1" name="appletName1"></applet > 7 <applet code="#" width="0" height="0" id="appletId1" name="appletName1"></applet >
8 <map id="mapId1" name="mapName1"> 8 <map id="mapId1" name="mapName1">
9 <area shape="rect" coords="0,0,82,126" href="#" id="areaId1" name="areaName1"/ > 9 <area shape="rect" coords="0,0,82,126" href="#" id="areaId1" name="areaName1"/ >
10 <area shape="circle" coords="90,58,3" href="#" id="areaId2" name="areaName2"/> 10 <area shape="circle" coords="90,58,3" href="#" id="areaId2" name="areaName2"/>
(...skipping 17 matching lines...) Expand all
28 shouldBe("htmlAllCollection.__proto__", "HTMLAllCollection.prototype"); 28 shouldBe("htmlAllCollection.__proto__", "HTMLAllCollection.prototype");
29 shouldBe("htmlAllCollection.__proto__.__proto__", "HTMLCollection.prototype"); 29 shouldBe("htmlAllCollection.__proto__.__proto__", "HTMLCollection.prototype");
30 shouldBe("htmlAllCollection.length", "35"); 30 shouldBe("htmlAllCollection.length", "35");
31 31
32 // As per http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom -interfaces.html#htmlallcollection-0: 32 // As per http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom -interfaces.html#htmlallcollection-0:
33 // The supported property names consist of the non-empty values of all the id at tributes of all the elements 33 // The supported property names consist of the non-empty values of all the id at tributes of all the elements
34 // represented by the collection, and the non-empty values of all the name attri butes of all the a, applet, area, 34 // represented by the collection, and the non-empty values of all the name attri butes of all the a, applet, area,
35 // embed, form, frame, frameset, iframe, img, and object elements represented by the collection, in tree order, 35 // embed, form, frame, frameset, iframe, img, and object elements represented by the collection, in tree order,
36 // ignoring later duplicates, with the id of an element preceding its name if it contributes both, they differ from 36 // ignoring later duplicates, with the id of an element preceding its name if it contributes both, they differ from
37 // each other, and neither is the duplicate of an earlier entry. 37 // each other, and neither is the duplicate of an earlier entry.
38 var expectedEnumeratedProperties = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "2 2", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35" , "36", "37", "38", "length", "description", "console", "aId1", "aName1", "apple tId1", "appletName1", "mapId1", "areaId1", "areaName1", "areaId2", "areaName2", "embedId1", "embedName1", "formId1", "formName1", "inputId1", "inputName1", "inp utId2", "iframeId1", "iframeName1", "imgId8", "imgName8", "objectId1", "objectNa me1", "selectId1", "selectName1", "optionId1", "item", "namedItem"]; 38 var expectedEnumeratedProperties = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "2 2", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35" , "36", "37", "38", "length", "description", "console", "aId1", "aName1", "apple tId1", "appletName1", "mapId1", "areaId1", "areaName1", "areaId2", "areaName2", "embedId1", "embedName1", "formId1", "formName1", "inputId1", "inputName1", "inp utId2", "iframeId1", "iframeName1", "imgId8", "imgName8", "objectId1", "objectNa me1", "selectId1", "selectName1", "optionId1", "item", "namedItem"].sort();
39 39
40 var enumeratedProperties = []; 40 var enumeratedProperties = [];
41 for (var property in htmlAllCollection) { 41 for (var property in htmlAllCollection) {
42 enumeratedProperties[enumeratedProperties.length] = property; 42 enumeratedProperties[enumeratedProperties.length] = property;
43 } 43 }
44 enumeratedProperties.sort();
44 shouldBe("enumeratedProperties", "expectedEnumeratedProperties"); 45 shouldBe("enumeratedProperties", "expectedEnumeratedProperties");
45 </script> 46 </script>
46 </body> 47 </body>
47 </html> 48 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/htmlcollection-enumerated-properties.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698