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

Side by Side Diff: LayoutTests/fast/dom/MicroData/propertynodelist-add-remove-itemprop-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 itemprop tokens must update its PropertyNodeList.");
10 var item = createElement('div', {itemscope: 'itemscope'}, '<div itemprop="foo">< /div><div></div>');
11 var PNLfoo = item.properties.namedItem('foo');
12 PNLbar = item.properties.namedItem('bar');
13
14 shouldBe("PNLfoo.length", "1");
15 shouldBe("PNLbar.length", "0");
16 shouldBe("PNLfoo[0]", "item.firstChild");
17
18 item.lastChild.itemProp.toggle('bar');
19 shouldBe("PNLfoo.length", "1");
20 shouldBe("PNLbar.length", "1");
21 shouldBe("PNLfoo[0]", "item.firstChild");
22 shouldBe("PNLbar[0]", "item.lastChild");
23
24 item.lastChild.itemProp.add('foo');
25 shouldBe("PNLfoo.length", "2");
26 shouldBe("PNLbar.length", "1");
27 shouldBe("PNLfoo[0]", "item.firstChild");
28 shouldBe("PNLfoo[1]", "item.lastChild");
29 shouldBe("PNLbar[0]", "item.lastChild");
30
31 item.lastChild.removeAttribute('itemprop');
32 shouldBe("PNLfoo.length", "1");
33 shouldBe("PNLbar.length", "0");
34 shouldBe("PNLfoo[0]", "item.firstChild");
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