diff options
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast')
22 files changed, 81 insertions, 17 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageData-expected.txt b/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageData-expected.txt index a2bcafe..20e5e68 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageData-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageData-expected.txt @@ -4,6 +4,9 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE PASS ctx.createImageData(null) threw exception TypeError: Failed to execute 'createImageData' on 'CanvasRenderingContext2D': parameter 1 is not of type 'ImageData'.. +PASS ctx.createImageData(undefined) threw exception TypeError: Failed to execute 'createImageData' on 'CanvasRenderingContext2D': parameter 1 is not of type 'ImageData'.. +PASS ctx.createImageData([]) threw exception TypeError: Failed to execute 'createImageData' on 'CanvasRenderingContext2D': parameter 1 is not of type 'ImageData'.. +PASS ctx.createImageData({}) threw exception TypeError: Failed to execute 'createImageData' on 'CanvasRenderingContext2D': parameter 1 is not of type 'ImageData'.. PASS imageData.width is 100 PASS imageData.height is 50 PASS imageData.data[32] is 255 diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-currentTransform-expected.txt b/third_party/WebKit/LayoutTests/fast/canvas/canvas-currentTransform-expected.txt index 55ab153..2f6d08b 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-currentTransform-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-currentTransform-expected.txt @@ -115,6 +115,8 @@ PASS imgdata[5] is 0 PASS imgdata[6] is 255 Check assigning an invalid object throws exception as expected PASS ctx.currentTransform = ctx threw exception TypeError: Failed to set the 'currentTransform' property on 'CanvasRenderingContext2D': The provided value is not of type 'SVGMatrix'.. +PASS ctx.currentTransform = undefined threw exception TypeError: Failed to set the 'currentTransform' property on 'CanvasRenderingContext2D': The provided value is not of type 'SVGMatrix'.. +PASS ctx.currentTransform = null threw exception TypeError: Failed to set the 'currentTransform' property on 'CanvasRenderingContext2D': The provided value is not of type 'SVGMatrix'.. Check handling non-finite values. see 2d.transformation.setTransform.nonfinite.html PASS matrix.a is 1 PASS matrix.b is 0 diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-isPointInPath-winding-expected.txt b/third_party/WebKit/LayoutTests/fast/canvas/canvas-isPointInPath-winding-expected.txt index c127a97..6654edc 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-isPointInPath-winding-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-isPointInPath-winding-expected.txt @@ -29,15 +29,17 @@ Testing invalid enumeration isPointInPath (w/ and w/o Path object PASS ctx.isPointInPath(path, 50, 50, 'gazonk') threw exception TypeError: Failed to execute 'isPointInPath' on 'CanvasRenderingContext2D': parameter 4 ('gazonk') is not a valid enum value.. PASS ctx.isPointInPath(50, 50, 'gazonk') threw exception TypeError: Failed to execute 'isPointInPath' on 'CanvasRenderingContext2D': parameter 3 ('gazonk') is not a valid enum value.. -Testing null isPointInPath with Path object +Testing invalid type isPointInPath with Path object PASS ctx.isPointInPath(null, 50, 50) threw exception TypeError: Failed to execute 'isPointInPath' on 'CanvasRenderingContext2D': parameter 3 ('50') is not a valid enum value.. PASS ctx.isPointInPath(null, 50, 50, 'nonzero') threw exception TypeError: Failed to execute 'isPointInPath' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. PASS ctx.isPointInPath(null, 50, 50, 'evenodd') threw exception TypeError: Failed to execute 'isPointInPath' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. -PASS ctx.isPointInPath(path, 50, 50) threw exception TypeError: Failed to execute 'isPointInPath' on 'CanvasRenderingContext2D': parameter 3 ('50') is not a valid enum value.. -PASS ctx.isPointInPath(path, 50, 50, 'nonzero') threw exception TypeError: Failed to execute 'isPointInPath' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. -PASS ctx.isPointInPath(path, 50, 50, 'evenodd') threw exception TypeError: Failed to execute 'isPointInPath' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. - -Testing invalid type isPointInPath with Path object +PASS ctx.isPointInPath(null, 50, 50, null) threw exception TypeError: Failed to execute 'isPointInPath' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. +PASS ctx.isPointInPath(path, 50, 50, null) threw exception TypeError: Failed to execute 'isPointInPath' on 'CanvasRenderingContext2D': parameter 4 ('null') is not a valid enum value.. +PASS ctx.isPointInPath(undefined, 50, 50) threw exception TypeError: Failed to execute 'isPointInPath' on 'CanvasRenderingContext2D': parameter 3 ('50') is not a valid enum value.. +PASS ctx.isPointInPath(undefined, 50, 50, 'nonzero') threw exception TypeError: Failed to execute 'isPointInPath' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. +PASS ctx.isPointInPath(undefined, 50, 50, 'evenodd') threw exception TypeError: Failed to execute 'isPointInPath' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. +PASS ctx.isPointInPath(undefined, 50, 50, undefined) threw exception TypeError: Failed to execute 'isPointInPath' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. +PASS ctx.isPointInPath(path, 50, 50, undefined) threw exception TypeError: Failed to execute 'isPointInPath' on 'CanvasRenderingContext2D': parameter 4 ('undefined') is not a valid enum value.. PASS ctx.isPointInPath([], 50, 50) threw exception TypeError: Failed to execute 'isPointInPath' on 'CanvasRenderingContext2D': parameter 3 ('50') is not a valid enum value.. PASS ctx.isPointInPath([], 50, 50, 'nonzero') threw exception TypeError: Failed to execute 'isPointInPath' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. PASS ctx.isPointInPath([], 50, 50, 'evenodd') threw exception TypeError: Failed to execute 'isPointInPath' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-isPointInStroke-with-path-expected.txt b/third_party/WebKit/LayoutTests/fast/canvas/canvas-isPointInStroke-with-path-expected.txt index eda53b5..dec4240 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-isPointInStroke-with-path-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-isPointInStroke-with-path-expected.txt @@ -23,8 +23,9 @@ PASS ctx.isPointInStroke(path,18,70) is false PASS ctx.isPointInStroke(path,NaN,122) is false PASS ctx.isPointInStroke(path,18,NaN) is false -Check null and invalid type +Check invalid type PASS ctx.isPointInStroke(null,70,20) threw exception TypeError: Failed to execute 'isPointInStroke' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. +PASS ctx.isPointInStroke(undefined,70,20) threw exception TypeError: Failed to execute 'isPointInStroke' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. PASS ctx.isPointInStroke([],20,70) threw exception TypeError: Failed to execute 'isPointInStroke' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. PASS ctx.isPointInStroke({},120,70) threw exception TypeError: Failed to execute 'isPointInStroke' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-path-context-clip-expected.txt b/third_party/WebKit/LayoutTests/fast/canvas/canvas-path-context-clip-expected.txt index a6bdd16..4aeb651 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-path-context-clip-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-path-context-clip-expected.txt @@ -42,6 +42,7 @@ PASS pixelDataAtPoint()[3] is within 5 of 255 PASS ctx.clip(null) threw exception TypeError: Failed to execute 'clip' on 'CanvasRenderingContext2D': parameter 1 ('null') is not a valid enum value.. PASS ctx.clip(null, null) threw exception TypeError: Failed to execute 'clip' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. PASS ctx.clip(null, 'nonzero') threw exception TypeError: Failed to execute 'clip' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. +PASS ctx.clip(path, null) threw exception TypeError: Failed to execute 'clip' on 'CanvasRenderingContext2D': parameter 2 ('null') is not a valid enum value.. PASS ctx.clip([], 'nonzero') threw exception TypeError: Failed to execute 'clip' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. PASS ctx.clip({}, 'nonzero') threw exception TypeError: Failed to execute 'clip' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. PASS ctx.clip(null, 'evenodd') threw exception TypeError: Failed to execute 'clip' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. @@ -49,6 +50,10 @@ PASS ctx.clip([], 'evenodd') threw exception TypeError: Failed to execute 'clip' PASS ctx.clip({}, 'evenodd') threw exception TypeError: Failed to execute 'clip' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. PASS ctx.clip('gazonk') threw exception TypeError: Failed to execute 'clip' on 'CanvasRenderingContext2D': parameter 1 ('gazonk') is not a valid enum value.. PASS ctx.clip(path, 'gazonk') threw exception TypeError: Failed to execute 'clip' on 'CanvasRenderingContext2D': parameter 2 ('gazonk') is not a valid enum value.. +PASS ctx.clip(undefined) threw exception TypeError: Failed to execute 'clip' on 'CanvasRenderingContext2D': parameter 1 ('undefined') is not a valid enum value.. +PASS ctx.clip(undefined, undefined) threw exception TypeError: Failed to execute 'clip' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. +PASS ctx.clip(undefined, 'nonzero') threw exception TypeError: Failed to execute 'clip' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. +PASS ctx.clip(path, undefined) threw exception TypeError: Failed to execute 'clip' on 'CanvasRenderingContext2D': parameter 2 ('undefined') is not a valid enum value.. PASS successfullyParsed is true TEST COMPLETE diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-path-context-fill-expected.txt b/third_party/WebKit/LayoutTests/fast/canvas/canvas-path-context-fill-expected.txt index 30c66ce..ca99174 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-path-context-fill-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-path-context-fill-expected.txt @@ -42,6 +42,7 @@ PASS pixelDataAtPoint()[3] is within 5 of 255 PASS ctx.fill(null) threw exception TypeError: Failed to execute 'fill' on 'CanvasRenderingContext2D': parameter 1 ('null') is not a valid enum value.. PASS ctx.fill(null, null) threw exception TypeError: Failed to execute 'fill' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. PASS ctx.fill(null, 'nonzero') threw exception TypeError: Failed to execute 'fill' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. +PASS ctx.fill(path, null) threw exception TypeError: Failed to execute 'fill' on 'CanvasRenderingContext2D': parameter 2 ('null') is not a valid enum value.. PASS ctx.fill([], 'nonzero') threw exception TypeError: Failed to execute 'fill' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. PASS ctx.fill({}, 'nonzero') threw exception TypeError: Failed to execute 'fill' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. PASS ctx.fill(null, 'evenodd') threw exception TypeError: Failed to execute 'fill' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. @@ -49,6 +50,10 @@ PASS ctx.fill([], 'evenodd') threw exception TypeError: Failed to execute 'fill' PASS ctx.fill({}, 'evenodd') threw exception TypeError: Failed to execute 'fill' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. PASS ctx.fill('gazonk') threw exception TypeError: Failed to execute 'fill' on 'CanvasRenderingContext2D': parameter 1 ('gazonk') is not a valid enum value.. PASS ctx.fill(path, 'gazonk') threw exception TypeError: Failed to execute 'fill' on 'CanvasRenderingContext2D': parameter 2 ('gazonk') is not a valid enum value.. +PASS ctx.fill(undefined) threw exception TypeError: Failed to execute 'fill' on 'CanvasRenderingContext2D': parameter 1 ('undefined') is not a valid enum value.. +PASS ctx.fill(undefined, undefined) threw exception TypeError: Failed to execute 'fill' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. +PASS ctx.fill(undefined, path) threw exception TypeError: Failed to execute 'fill' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. +PASS ctx.fill(path, undefined) threw exception TypeError: Failed to execute 'fill' on 'CanvasRenderingContext2D': parameter 2 ('undefined') is not a valid enum value.. PASS successfullyParsed is true TEST COMPLETE diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-path-context-stroke-expected.txt b/third_party/WebKit/LayoutTests/fast/canvas/canvas-path-context-stroke-expected.txt index c9a4787..395ad76 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-path-context-stroke-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-path-context-stroke-expected.txt @@ -16,6 +16,7 @@ PASS pixelDataAtPoint()[1] is within 5 of 255 PASS pixelDataAtPoint()[2] is within 5 of 0 PASS pixelDataAtPoint()[3] is within 5 of 255 PASS ctx.stroke(null) threw exception TypeError: Failed to execute 'stroke' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. +PASS ctx.stroke(undefined) threw exception TypeError: Failed to execute 'stroke' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. PASS ctx.stroke([]) threw exception TypeError: Failed to execute 'stroke' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. PASS ctx.stroke({}) threw exception TypeError: Failed to execute 'stroke' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. PASS successfullyParsed is true diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-behaviour-expected.txt b/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-behaviour-expected.txt index bb23577..77e0c8a 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-behaviour-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-behaviour-expected.txt @@ -12,6 +12,10 @@ PASS context.createPattern(green1x1, 'null') threw exception SyntaxError: Failed PASS context.createPattern(green1x1, undefined) threw exception SyntaxError: Failed to execute 'createPattern' on 'CanvasRenderingContext2D': The provided type ('undefined') is not one of 'repeat', 'no-repeat', 'repeat-x', or 'repeat-y'.. PASS context.createPattern(green1x1, 'undefined') threw exception SyntaxError: Failed to execute 'createPattern' on 'CanvasRenderingContext2D': The provided type ('undefined') is not one of 'repeat', 'no-repeat', 'repeat-x', or 'repeat-y'.. PASS context.createPattern(green1x1, {toString:function(){ return null;}}) threw exception SyntaxError: Failed to execute 'createPattern' on 'CanvasRenderingContext2D': The provided type ('null') is not one of 'repeat', 'no-repeat', 'repeat-x', or 'repeat-y'.. +PASS context.createPattern(null, '') threw exception TypeError: Failed to execute 'createPattern' on 'CanvasRenderingContext2D': No function was found that matched the signature provided.. +PASS context.createPattern(undefined, '') threw exception TypeError: Failed to execute 'createPattern' on 'CanvasRenderingContext2D': No function was found that matched the signature provided.. +PASS context.createPattern({}, '') threw exception TypeError: Failed to execute 'createPattern' on 'CanvasRenderingContext2D': No function was found that matched the signature provided.. +PASS context.createPattern([], '') threw exception TypeError: Failed to execute 'createPattern' on 'CanvasRenderingContext2D': No function was found that matched the signature provided.. PASS context.createPattern(green1x1, '') did not throw an exception PASS getPixel(1,1) is [0,128,0,255] PASS getPixel(98,1) is [0,128,0,255] diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-behaviour.js b/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-behaviour.js index a476571..8d6f3a5 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-behaviour.js +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-behaviour.js @@ -68,6 +68,18 @@ var tests = [ shouldThrow("context.createPattern(green1x1, {toString:function(){ return null;}})"); }, function () { + shouldThrow("context.createPattern(null, '')"); + }, + function () { + shouldThrow("context.createPattern(undefined, '')"); + }, + function () { + shouldThrow("context.createPattern({}, '')"); + }, + function () { + shouldThrow("context.createPattern([], '')"); + }, + function () { var didThrow = false; try { var pattern = context.createPattern(green1x1, ''); diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-putImageData-expected.txt b/third_party/WebKit/LayoutTests/fast/canvas/canvas-putImageData-expected.txt index da14d69..d9945f7 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-putImageData-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-putImageData-expected.txt @@ -163,6 +163,8 @@ PASS context.putImageData(buffer, 0, 0, undefined, 0, 0, 0) threw exception Type PASS context.putImageData(buffer, 0, 0, 0, undefined, 0, 0) threw exception TypeError: Failed to execute 'putImageData' on 'CanvasRenderingContext2D': float parameter 5 is non-finite.. PASS context.putImageData(buffer, 0, 0, 0, 0, undefined, 0) threw exception TypeError: Failed to execute 'putImageData' on 'CanvasRenderingContext2D': float parameter 6 is non-finite.. PASS context.putImageData(buffer, 0, 0, 0, 0, 0, undefined) threw exception TypeError: Failed to execute 'putImageData' on 'CanvasRenderingContext2D': float parameter 7 is non-finite.. +PASS context.putImageData(null, 0, 0, 0, 0, 0, 0) threw exception TypeError: Failed to execute 'putImageData' on 'CanvasRenderingContext2D': parameter 1 is not of type 'ImageData'.. +PASS context.putImageData(undefined, 0, 0, 0, 0, 0, 0) threw exception TypeError: Failed to execute 'putImageData' on 'CanvasRenderingContext2D': parameter 1 is not of type 'ImageData'.. PASS successfullyParsed is true TEST COMPLETE diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-putImageData.js b/third_party/WebKit/LayoutTests/fast/canvas/canvas-putImageData.js index 97f3510..b273f92 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-putImageData.js +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-putImageData.js @@ -220,6 +220,8 @@ shouldThrow("context.putImageData(buffer, 0, 0, undefined, 0, 0, 0)"); shouldThrow("context.putImageData(buffer, 0, 0, 0, undefined, 0, 0)"); shouldThrow("context.putImageData(buffer, 0, 0, 0, 0, undefined, 0)"); shouldThrow("context.putImageData(buffer, 0, 0, 0, 0, 0, undefined)"); +shouldThrow("context.putImageData(null, 0, 0, 0, 0, 0, 0)"); +shouldThrow("context.putImageData(undefined, 0, 0, 0, 0, 0, 0)"); // Ensure we don't mess up bounds clipping checks var rectcanvas = document.createElement("canvas"); diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-scroll-path-into-view-expected.txt b/third_party/WebKit/LayoutTests/fast/canvas/canvas-scroll-path-into-view-expected.txt index 49e3b06..ebad0fb 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-scroll-path-into-view-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-scroll-path-into-view-expected.txt @@ -93,6 +93,7 @@ PASS testValue is 660 Test case 5: exceptions PASS context.scrollPathIntoView(null); threw exception TypeError: Failed to execute 'scrollPathIntoView' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. +PASS context.scrollPathIntoView(undefined); threw exception TypeError: Failed to execute 'scrollPathIntoView' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. PASS context.scrollPathIntoView([]); threw exception TypeError: Failed to execute 'scrollPathIntoView' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. PASS context.scrollPathIntoView({}); threw exception TypeError: Failed to execute 'scrollPathIntoView' on 'CanvasRenderingContext2D': parameter 1 is not of type 'Path2D'.. diff --git a/third_party/WebKit/LayoutTests/fast/canvas/drawImage-with-broken-image-expected.txt b/third_party/WebKit/LayoutTests/fast/canvas/drawImage-with-broken-image-expected.txt index a0c93f5..91ce0fe 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/drawImage-with-broken-image-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/canvas/drawImage-with-broken-image-expected.txt @@ -6,6 +6,9 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE PASS ctx.drawImage(null, 0, 0) threw exception TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': No function was found that matched the signature provided.. PASS ctx.drawImage(null, 0, 0, 20, 20) threw exception TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': No function was found that matched the signature provided.. PASS ctx.drawImage(null, 0, 0, 20, 20, 0, 0, 20, 20) threw exception TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': No function was found that matched the signature provided.. +PASS ctx.drawImage(undefined, 0, 0) threw exception TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': No function was found that matched the signature provided.. +PASS ctx.drawImage(undefined, 0, 0, 20, 20) threw exception TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': No function was found that matched the signature provided.. +PASS ctx.drawImage(undefined, 0, 0, 20, 20, 0, 0, 20, 20) threw exception TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': No function was found that matched the signature provided.. PASS ctx.drawImage(invalidImage, 0, 0) threw exception InvalidStateError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The HTMLImageElement provided is in the 'broken' state.. PASS ctx.drawImage(invalidImage, 0, 0, 20, 20) threw exception InvalidStateError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The HTMLImageElement provided is in the 'broken' state.. PASS ctx.drawImage(invalidImage, 0, 0, 20, 20, 0, 0, 20, 20) threw exception InvalidStateError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The HTMLImageElement provided is in the 'broken' state.. diff --git a/third_party/WebKit/LayoutTests/fast/canvas/drawImage-with-broken-image.html b/third_party/WebKit/LayoutTests/fast/canvas/drawImage-with-broken-image.html index 3a9462cc..afb0f14 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/drawImage-with-broken-image.html +++ b/third_party/WebKit/LayoutTests/fast/canvas/drawImage-with-broken-image.html @@ -14,10 +14,13 @@ var ctx = document.createElement("canvas").getContext('2d'); function draw() { - // null images should throw TypeError + // null and undefined images should throw TypeError shouldThrow("ctx.drawImage(null, 0, 0)"); shouldThrow("ctx.drawImage(null, 0, 0, 20, 20)"); shouldThrow("ctx.drawImage(null, 0, 0, 20, 20, 0, 0, 20, 20)"); + shouldThrow("ctx.drawImage(undefined, 0, 0)"); + shouldThrow("ctx.drawImage(undefined, 0, 0, 20, 20)"); + shouldThrow("ctx.drawImage(undefined, 0, 0, 20, 20, 0, 0, 20, 20)"); // broken images should not throw shouldThrow("ctx.drawImage(invalidImage, 0, 0)"); 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(""); |