cdumez@apple.com | 2485e36 | 2016-07-27 21:33:57 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <style> |
| 5 | @media screen { a { text-weight: bold } } |
| 6 | </style> |
| 7 | </head> |
| 8 | <body> |
| 9 | <script src="../../resources/js-test-pre.js"></script> |
| 10 | <script> |
| 11 | description("Tests that the parameters to MediaList.item() / deleteMedium() / appendMedium() are mandatory."); |
| 12 | |
| 13 | var mediaList = document.getElementsByTagName("style")[0].sheet.media; |
| 14 | shouldBe("mediaList.__proto__", "MediaList.prototype"); |
| 15 | |
| 16 | shouldThrow("mediaList.item()", "'TypeError: Not enough arguments'"); |
| 17 | shouldThrow("mediaList.deleteMedium()", "'TypeError: Not enough arguments'"); |
| 18 | shouldThrow("mediaList.appendMedium()", "'TypeError: Not enough arguments'"); |
| 19 | </script> |
| 20 | <script src="../../resources/js-test-post.js"></script> |
| 21 | </body> |
| 22 | </html> |