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