OLD | NEW |
1 description("Test that invalid canvas getContext() requests return null."); | 1 description("Test that invalid canvas getContext() requests return null."); |
2 | 2 |
3 canvas = document.createElement('canvas'); | 3 canvas = document.createElement('canvas'); |
4 | 4 |
5 shouldBe("canvas.getContext('')", "null"); | 5 shouldBe("canvas.getContext('')", "null"); |
6 shouldBe("canvas.getContext('2d#')", "null"); | 6 shouldBe("canvas.getContext('2d#')", "null"); |
7 shouldBe("canvas.getContext('This is clearly not a valid context name.')", "null
"); | 7 shouldBe("canvas.getContext('This is clearly not a valid context name.')", "null
"); |
8 shouldBe("canvas.getContext('2d\0')", "null"); | 8 shouldBe("canvas.getContext('2d\0')", "null"); |
9 shouldBe("canvas.getContext('2\uFF44')", "null"); | 9 shouldBe("canvas.getContext('2\uFF44')", "null"); |
10 shouldBe("canvas.getContext('2D')", "null"); | 10 shouldBe("canvas.getContext('2D')", "null"); |
| 11 shouldThrow("canvas.getContext()"); |
| 12 shouldBe("canvas.getContext('null')", "null"); |
| 13 shouldBe("canvas.getContext('undefined')", "null"); |
OLD | NEW |