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

Side by Side Diff: LayoutTests/fast/dom/MicroData/propertynodelist-add-remove-itemref-tokens.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 <script>
9 description("Test to ensure that adding or removing itemref tokens must update i ts PropertyNodeList.");
10 var parent = createElement('div', {}, '<div id="id1" itemprop="foo"></div><div i temscope></div>');
11 var testElement = parent.childNodes[1];
12 var PNL = testElement.properties.namedItem('foo');
13
14 shouldBe("PNL.length", "0");
15 testElement.itemRef.add('id1');
16 shouldBe("PNL.length", "1");
17 shouldBe("PNL[0]", "parent.firstChild");
18 testElement.itemRef.remove('id1');
19 shouldBe("PNL.length", "0");
20 shouldBeTrue("!PNL[0]");
21
22 document.body.appendChild(parent);
23 var length0 = PNL.length;
24 testElement.itemRef.toggle('id1');
25 var length1 = PNL.length;
26 var foo0 = PNL[0];
27 testElement.removeAttribute('itemref');
28 var length2 = PNL.length;
29 var foo1 = PNL[0];
30 document.body.removeChild(parent);
31 shouldBe("length0", "0");
32 shouldBe("length1", "1");
33 shouldBe("foo0", "parent.firstChild");
34 shouldBe("length2", "0");
35 shouldBeTrue("!foo1");
36 </script>
37 <script src="../../js/resources/js-test-post.js"></script>
38 </body>
39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698