OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <script src="../../../resources/js-test.js"></script> | |
5 </head> | |
6 <body> | |
7 <script> | |
8 description("This test should trigger exceptions on HTMLTableElement, an
d verify that the messages are reasonably helpful."); | |
9 | |
10 var t = document.createElement('table'); | |
11 | |
12 // TODO(foolip): Setting caption/tHead to null should not throw | |
13 // an exception, it should just remove the old caption/thead. | |
14 shouldThrow("t.caption = null"); | |
15 shouldThrow("t.caption = document.body"); | |
16 | |
17 shouldThrow("t.tHead = null"); | |
18 shouldThrow("t.tHead = document.body"); | |
19 | |
20 shouldBe("t.createTFoot()", "t.tFoot"); | |
21 shouldBeNonNull("t.tFoot"); | |
22 shouldNotThrow("t.tFoot = null"); | |
23 shouldBeNull("t.tFoot"); | |
24 shouldThrow("t.tFoot = document.body"); | |
25 | |
26 shouldThrow("t.insertRow(-2)"); | |
27 shouldThrow("t.insertRow(1)"); | |
28 | |
29 t.insertRow(); | |
30 | |
31 shouldThrow("t.deleteRow(-2)"); | |
32 shouldThrow("t.deleteRow(2)"); | |
33 shouldThrow("t.deleteRow()"); | |
34 </script> | |
35 </body> | |
36 </html> | |
OLD | NEW |