diff options
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/canvas/script-tests')
8 files changed, 27 insertions, 9 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-createImageData.js b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-createImageData.js index c2bbb97..ff601d1 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-createImageData.js +++ b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-createImageData.js @@ -3,6 +3,9 @@ description("Test canvas createImageData()"); ctx = document.createElement('canvas').getContext('2d'); shouldThrow("ctx.createImageData(null)"); +shouldThrow("ctx.createImageData(undefined)"); +shouldThrow("ctx.createImageData([])"); +shouldThrow("ctx.createImageData({})"); // create a 100x50 imagedata and fill it with white pixels diff --git a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-currentTransform.js b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-currentTransform.js index c34ff1f..74ba2e1 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-currentTransform.js +++ b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-currentTransform.js @@ -175,6 +175,8 @@ shouldBe("imgdata[6]", "255"); debug("Check assigning an invalid object throws exception as expected"); shouldThrow("ctx.currentTransform = ctx", '"TypeError: Failed to set the \'currentTransform\' property on \'CanvasRenderingContext2D\': The provided value is not of type \'SVGMatrix\'."'); +shouldThrow("ctx.currentTransform = undefined", '"TypeError: Failed to set the \'currentTransform\' property on \'CanvasRenderingContext2D\': The provided value is not of type \'SVGMatrix\'."'); +shouldThrow("ctx.currentTransform = null", '"TypeError: Failed to set the \'currentTransform\' property on \'CanvasRenderingContext2D\': The provided value is not of type \'SVGMatrix\'."'); debug("Check handling non-finite values. see 2d.transformation.setTransform.nonfinite.html"); ctx.fillStyle = 'red'; diff --git a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-isPointInPath-winding.js b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-isPointInPath-winding.js index 7ed85ec..20c8a01 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-isPointInPath-winding.js +++ b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-isPointInPath-winding.js @@ -61,17 +61,17 @@ function prepareTestScenario() { shouldThrow("ctx.isPointInPath(50, 50, 'gazonk')"); debug(''); - debug('Testing null isPointInPath with Path object'); - path = null; + debug('Testing invalid type isPointInPath with Path object'); shouldThrow("ctx.isPointInPath(null, 50, 50)"); shouldThrow("ctx.isPointInPath(null, 50, 50, 'nonzero')"); shouldThrow("ctx.isPointInPath(null, 50, 50, 'evenodd')"); - shouldThrow("ctx.isPointInPath(path, 50, 50)"); - shouldThrow("ctx.isPointInPath(path, 50, 50, 'nonzero')"); - shouldThrow("ctx.isPointInPath(path, 50, 50, 'evenodd')"); - debug(''); - - debug('Testing invalid type isPointInPath with Path object'); + shouldThrow("ctx.isPointInPath(null, 50, 50, null)"); + shouldThrow("ctx.isPointInPath(path, 50, 50, null)"); + shouldThrow("ctx.isPointInPath(undefined, 50, 50)"); + shouldThrow("ctx.isPointInPath(undefined, 50, 50, 'nonzero')"); + shouldThrow("ctx.isPointInPath(undefined, 50, 50, 'evenodd')"); + shouldThrow("ctx.isPointInPath(undefined, 50, 50, undefined)"); + shouldThrow("ctx.isPointInPath(path, 50, 50, undefined)"); shouldThrow("ctx.isPointInPath([], 50, 50)"); shouldThrow("ctx.isPointInPath([], 50, 50, 'nonzero')"); shouldThrow("ctx.isPointInPath([], 50, 50, 'evenodd')"); diff --git a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-isPointInStroke-with-path.js b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-isPointInStroke-with-path.js index 84764b0..383b00d 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-isPointInStroke-with-path.js +++ b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-isPointInStroke-with-path.js @@ -30,8 +30,9 @@ shouldBeFalse("ctx.isPointInStroke(path,NaN,122)"); shouldBeFalse("ctx.isPointInStroke(path,18,NaN)"); debug(""); -debug("Check null and invalid type"); +debug("Check invalid type"); shouldThrow("ctx.isPointInStroke(null,70,20)"); +shouldThrow("ctx.isPointInStroke(undefined,70,20)"); shouldThrow("ctx.isPointInStroke([],20,70)"); shouldThrow("ctx.isPointInStroke({},120,70)"); debug(""); diff --git a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-path-context-clip.js b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-path-context-clip.js index 2da69d9..8d6a1fc 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-path-context-clip.js +++ b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-path-context-clip.js @@ -67,6 +67,7 @@ function prepareTestScenario() { shouldThrow("ctx.clip(null)"); shouldThrow("ctx.clip(null, null)"); shouldThrow("ctx.clip(null, 'nonzero')"); + shouldThrow("ctx.clip(path, null)"); shouldThrow("ctx.clip([], 'nonzero')"); shouldThrow("ctx.clip({}, 'nonzero')"); shouldThrow("ctx.clip(null, 'evenodd')"); @@ -74,6 +75,10 @@ function prepareTestScenario() { shouldThrow("ctx.clip({}, 'evenodd')"); shouldThrow("ctx.clip('gazonk')"); shouldThrow("ctx.clip(path, 'gazonk')"); + shouldThrow("ctx.clip(undefined)"); + shouldThrow("ctx.clip(undefined, undefined)"); + shouldThrow("ctx.clip(undefined, 'nonzero')"); + shouldThrow("ctx.clip(path, undefined)"); } // Run test and allow variation of results. diff --git a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-path-context-fill.js b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-path-context-fill.js index ecaf5e6..71b1f84 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-path-context-fill.js +++ b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-path-context-fill.js @@ -65,6 +65,7 @@ function prepareTestScenario() { shouldThrow("ctx.fill(null)"); shouldThrow("ctx.fill(null, null)"); shouldThrow("ctx.fill(null, 'nonzero')"); + shouldThrow("ctx.fill(path, null)"); shouldThrow("ctx.fill([], 'nonzero')"); shouldThrow("ctx.fill({}, 'nonzero')"); shouldThrow("ctx.fill(null, 'evenodd')"); @@ -72,6 +73,10 @@ function prepareTestScenario() { shouldThrow("ctx.fill({}, 'evenodd')"); shouldThrow("ctx.fill('gazonk')"); shouldThrow("ctx.fill(path, 'gazonk')"); + shouldThrow("ctx.fill(undefined)"); + shouldThrow("ctx.fill(undefined, undefined)"); + shouldThrow("ctx.fill(undefined, path)"); + shouldThrow("ctx.fill(path, undefined)"); } // Run test and allow variation of results. diff --git a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js index 199725b..4905abc 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js +++ b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js @@ -47,6 +47,7 @@ function prepareTestScenario() { // Test exception cases. shouldThrow("ctx.stroke(null)"); + shouldThrow("ctx.stroke(undefined)"); shouldThrow("ctx.stroke([])"); shouldThrow("ctx.stroke({})"); } diff --git a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-scroll-path-into-view.js b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-scroll-path-into-view.js index 8cf2a4e..6a6e44b 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-scroll-path-into-view.js +++ b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-scroll-path-into-view.js @@ -153,6 +153,7 @@ debug(""); debug("Test case 5: exceptions"); shouldThrow("context.scrollPathIntoView(null);"); +shouldThrow("context.scrollPathIntoView(undefined);"); shouldThrow("context.scrollPathIntoView([]);"); shouldThrow("context.scrollPathIntoView({});"); debug(""); |