<!DOCTYPE html>
<html>
<head>
    <script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
    description("Test the handling of invalid arguments in canvas createPattern().")

    var context = document.createElement('canvas').getContext('2d');

    shouldThrow("context.createPattern(undefined, undefined)", "'TypeError: Type error'");
    shouldThrow("context.createPattern(undefined, null)", "'TypeError: Type error'");
    shouldThrow("context.createPattern(undefined, '')", "'TypeError: Type error'");
    shouldThrow("context.createPattern(undefined, 'repeat')", "'TypeError: Type error'");

    shouldThrow("context.createPattern(null, undefined)", "'TypeError: Type error'");
    shouldThrow("context.createPattern(null, null)", "'TypeError: Type error'");
    shouldThrow("context.createPattern(null, '')", "'TypeError: Type error'");
    shouldThrow("context.createPattern(null, 'repeat')", "'TypeError: Type error'");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>
