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

Side by Side Diff: LayoutTests/fast/dom/MicroData/itemref-for-an-element-must-be-correct.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 test that the itemRef should be correct for an element that has itemRef attribute.</p>
9 <div id="console"></div>
10 <script>
11 var element = createElement('div', {itemref: 'foo bar FOO FOo'});
12
13 shouldBeTrue("element.itemRef.length == 4");
14 shouldBeTrue("element.itemRef.toString() == 'foo bar FOO FOo'");
15 shouldBeTrue("element.itemRef.item(0) == 'foo'");
16 shouldBeTrue("element.itemRef.item(1) == 'bar'");
17 shouldBeTrue("element.itemRef[0] == 'foo'");
18 shouldBeTrue("element.itemRef[1] == 'bar'");
19 shouldBeTrue("element.itemRef.contains('bar')");
20 shouldBeTrue("element.itemRef.contains('foo')");
21
22 debug("<br>itemRef should return case-sensitive strings.");
23 shouldBeTrue("element.itemRef.item(2) == 'FOO'");
24 shouldBeTrue("element.itemRef[2] == 'FOO'");
25 shouldBeTrue("element.itemRef.item(3) == 'FOo'");
26 shouldBeTrue("element.itemRef[3] == 'FOo'");
27
28 debug("<br>itemRef should not contain an undefined token.");
29 shouldBeFalse("element.itemRef.contains('test')");
30
31 debug("<br>itemRef.length should be 0 if element has not tokens.");
32 var element1 = createElement('div', {itemRef: ''});
33 shouldBeTrue("element1.itemRef.length == 0");
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