blob: 6a3af64ee86e18e7dc79b5f559ef0651a28527bb [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
</head>
<body>
<script>
var canvas = document.createElement('canvas');
var context = canvas.getContext('2d');
test(function() {
try {
context.isPointInPath(1);
} catch (e) {
assert_true(e instanceof TypeError);
assert_equals(e.name, "TypeError");
assert_equals(e.message, "Not enough arguments");
}
}, "An overloaded function that is passed too few arguments for any overload should throw a 'Not enough arguments' exception");
test(function() {
try {
context.isPointInPath.call({ }, 1);
} catch (e) {
assert_true(e instanceof TypeError);
assert_equals(e.name, "TypeError");
assert_equals(e.message, "Can only call CanvasRenderingContext2D.isPointInPath on instances of CanvasRenderingContext2D");
}
}, "An overloaded function that is passed too few arguments for any overload, and also an invalid this object, should throw an 'Invalid this object' exception");
</script>
</body>
</html>