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

Side by Side Diff: LayoutTests/fast/dom/MicroData/properties-collection-add-remove-itemref.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 should update properly on adding or removing itemref.</p>
9 <div id="console"></div>
10 <script>
11 var element = createElement('div', {}, '<div id="id1" itemprop="foo"></div><div itemscope></div>');
12 var item = element.childNodes[1];
13 document.body.appendChild(element);
14
15 shouldBeTrue("item.properties.length == '0'");
16
17 debug("<br>Set itemref to id1.");
18 item.setAttribute('itemref', 'id1');
19 shouldBeTrue("item.properties.length == '1'");
20 shouldBeTrue("item.properties.item(0) == element.firstChild");
21 shouldBeTrue("item.properties[0] == element.firstChild");
22
23 debug("<br>Remove itemref attribute.");
24 item.removeAttribute('itemref');
25 shouldBeTrue("item.properties.length == '0'");
26 shouldBeTrue("item.properties.item(0) == undefined");
27 shouldBeTrue("item.properties[0] == undefined");
28
29 </script>
30 <script src="../../js/resources/js-test-post.js"></script>
31 </body>
32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698