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