| Index: third_party/WebKit/LayoutTests/fast/canvas/gradient-addColorStop-with-invalid-offset.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/canvas/gradient-addColorStop-with-invalid-offset.html b/third_party/WebKit/LayoutTests/fast/canvas/gradient-addColorStop-with-invalid-offset.html
|
| index f340a48bad04209feb7bc7a18176e8e686c066fd..c2640a4a84b86c6d0e89575354554edcbd615866 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/canvas/gradient-addColorStop-with-invalid-offset.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/canvas/gradient-addColorStop-with-invalid-offset.html
|
| @@ -1,9 +1,15 @@
|
| -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
| -<html>
|
| -<head>
|
| -<script src="../../resources/js-test.js"></script>
|
| -</head>
|
| -<body>
|
| -<script src="script-tests/gradient-addColorStop-with-invalid-offset.js"></script>
|
| -</body>
|
| -</html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script>
|
| +test(function() {
|
| +
|
| + var gradient = document.createElement('canvas').getContext('2d').createLinearGradient(0, 0, 150, 0);
|
| +
|
| + assert_throws(null, function(){gradient.addColorStop(-1, '#000');});
|
| + assert_throws(null, function(){gradient.addColorStop(2, '#000');});
|
| + assert_throws(null, function(){gradient.addColorStop(Infinity, '#000');});
|
| + assert_throws(null, function(){gradient.addColorStop(-Infinity, '#000');});
|
| + assert_throws(null, function(){gradient.addColorStop(NaN, '#000');});
|
| +
|
| +}, 'This test checks invalid offsets on gradients.');
|
| +</script>
|
|
|