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

Side by Side Diff: LayoutTests/fast/dom/MicroData/properties-collection-must-be-correct.html

Issue 14028014: Remove MicroData implementation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Also delete all the tests Created 7 years, 8 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../js/resources/js-test-pre.js"></script>
5 <script src="resources/microdata-common.js"></script>
6 </head>
7 <body>
8 <p>This test ensures that properties collection of a Microdata item must be corr ect.</p>
9 <div id="console"></div>
10 <script>
11 var element = createElement('div', {itemscope: 'itemscope'}, '<div itemprop="foo "></div><div itemprop="bar"><div itemprop="foo"></div></div><div itemprop="baz q ux"></div>');
12 var propertiesCollection = element.properties;
13 var childNodes = element.childNodes;
14
15 debug("<br>properties.length must be the total number of properties.");
16 shouldBeTrue("propertiesCollection.length == '4'");
17
18 debug("<br>properties.item(index) and properties[index] must give each property in tree order'");
19 shouldBeTrue("propertiesCollection.item(0) == childNodes[0]");
20 shouldBeTrue("propertiesCollection.item(1) == childNodes[1]");
21 shouldBeTrue("propertiesCollection.item(2) == childNodes[1].childNodes[0]");
22 shouldBeTrue("propertiesCollection.item(3) == childNodes[2]");
23 debug('');
24
25 shouldBeTrue("propertiesCollection[0] == childNodes[0]");
26 shouldBeTrue("propertiesCollection[1] == childNodes[1]");
27 shouldBeTrue("propertiesCollection[2] == childNodes[1].childNodes[0]");
28 shouldBeTrue("propertiesCollection[3] == childNodes[2]");
29
30 debug("properties[index] and properties.item(index) must return undefined for ou t of range index.");
31 shouldBeTrue("propertiesCollection[4] == undefined");
32 shouldBeTrue("propertiesCollection.item(4) == undefined");
33
34 </script>
35 <script src="../../js/resources/js-test-post.js"></script>
36 </body>
37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698