OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <script src="../../js/resources/js-test-pre.js"></script> | |
5 </head> | |
6 <body> | |
7 <div id="mydiv"></div> | |
8 <script> | |
9 description("This tests that itemtype, itemprop, itemref attributes must update
correctly when tokens have been added or removed."); | |
10 var element = document.getElementById("mydiv"); | |
11 | |
12 debug("itemtype attribute test."); | |
13 element.itemType.add('foo'); | |
14 element.itemType.add('FOO'); | |
15 shouldBe("element.getAttribute('itemtype')", "'foo FOO'"); | |
16 element.itemType.remove('foo'); | |
17 shouldBe("element.getAttribute('itemtype')", "'FOO'"); | |
18 element.itemType.remove('FOO'); | |
19 shouldBe("element.getAttribute('itemtype')", "''"); | |
20 | |
21 debug(""); | |
22 debug("itemprop attribute test."); | |
23 element.itemProp.add('foo'); | |
24 element.itemProp.add('FOO'); | |
25 shouldBe("element.getAttribute('itemprop')", "'foo FOO'"); | |
26 element.itemProp.remove('foo'); | |
27 shouldBe("element.getAttribute('itemprop')", "'FOO'"); | |
28 element.itemProp.remove('FOO'); | |
29 shouldBe("element.getAttribute('itemprop')", "''"); | |
30 | |
31 debug(""); | |
32 debug("itemref attribute test."); | |
33 element.itemRef.add('foo'); | |
34 element.itemRef.add('FOO'); | |
35 shouldBe("element.getAttribute('itemref')", "'foo FOO'"); | |
36 element.itemRef.remove('foo'); | |
37 shouldBe("element.getAttribute('itemref')", "'FOO'"); | |
38 element.itemRef.remove('FOO'); | |
39 shouldBe("element.getAttribute('itemref')", "''"); | |
40 </script> | |
41 <script src="../../js/resources/js-test-post.js"></script> | |
42 </body> | |
43 </html> | |
OLD | NEW |