blob: 624ee283e0ccfde29891a62e5883464163af538d [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
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");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>