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

Side by Side Diff: LayoutTests/fast/dom/MicroData/properties-collection-add-remove-property.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>Microdata properties collection must update on adding or removing property.</ p>
9 <div id="console"></div>
10 <script>
11 var element = createElement('div', {itemscope: 'itemscope'}, '<div itemprop="foo "></div>');
12
13 shouldBeTrue("element.properties.length == '1'");
14 shouldBeTrue("element.properties.item(0) == element.firstChild");
15 shouldBeTrue("element.properties[0] == element.firstChild");
16
17 debug('<br>Append a property with itemprop: bar.');
18 element.appendChild(createElement('div',{itemprop:'bar'}));
19 shouldBeTrue("element.properties.length == '2'");
20 shouldBeTrue("element.properties.item(1) == element.childNodes[1]");
21 shouldBeTrue("element.properties[1] == element.childNodes[1]");
22
23 debug('<br>Append a property with itemprop: foo.');
24 element.lastChild.appendChild(createElement('div',{itemprop:'foo'}));
25 shouldBeTrue("element.properties.length == '3'");
26 shouldBeTrue("element.properties.item(2) == element.childNodes[1].firstChild");
27 shouldBeTrue("element.properties[2] == element.childNodes[1].firstChild");
28
29 debug('<br>Remove property with itemprop: foo.');
30 element.lastChild.removeChild(element.lastChild.firstChild);
31 shouldBeTrue("element.properties.length == '2'");
32 shouldBeTrue("element.properties.item(2) == undefined");
33 shouldBeTrue("element.properties[2] == undefined");
34
35 </script>
36 <script src="../../js/resources/js-test-post.js"></script>
37 </body>
38 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698