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

Side by Side Diff: LayoutTests/fast/dom/MicroData/properties-collection-behavior-add-remove-itemscope-attr.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 tests the behavior of properties collection on adding or removing itemsc ope attribute.</p>
9 <div id="console"></div>
10 <script>
11 var element = createElement('div', {}, '<div itemprop="foo">bar</div>');
12
13 debug("<br>The properties collection must be empty if the element does not have an itemscope attribute.");
14 shouldBeTrue("element.properties.length == '0'");
15 shouldBeTrue("element.properties[0] == undefined");
16 shouldBeTrue("element.properties.item(0) == undefined");
17
18 debug("<br>The properties collection must become populated if we add itemscope a ttribute.");
19 element.itemScope = true;
20 shouldBeTrue("element.properties.length == '1'");
21 shouldBeTrue("element.properties[0] == element.firstChild");
22 shouldBeTrue("element.properties.item(0) == element.firstChild");
23
24 debug("<br>The properties collection must become empty if we remove itemscope at tribute.");
25 element.itemScope = false;
26 shouldBeTrue("element.properties.length == '0'");
27 shouldBeTrue("element.properties[0] == undefined");
28 shouldBeTrue("element.properties.item(0) == undefined");
29
30 </script>
31 <script src="../../js/resources/js-test-post.js"></script>
32 </body>
33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698