Changeset 228003 in webkit
- Timestamp:
- Feb 2, 2018 4:33:51 AM (6 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 7 added
- 2 deleted
- 12 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r228001 r228003 1 2018-02-02 Ms2ger <Ms2ger@igalia.com> 2 3 Update imagebitmap tests. 4 https://bugs.webkit.org/show_bug.cgi?id=182335 5 <rdar://problem/37110684> 6 7 Unreviewed test gardening. 8 9 * platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt: Removed. 10 * platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt: 11 * platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt: Added. 12 * platform/mac/TestExpectations: 13 * platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt: Removed. 14 * platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt: 15 * platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt: Added. 16 1 17 2018-02-02 Fujii Hironori <Hironori.Fujii@sony.com> 2 18 -
trunk/LayoutTests/imported/w3c/ChangeLog
r227997 r228003 1 2018-02-02 Ms2ger <Ms2ger@igalia.com> 2 3 Update imagebitmap tests. 4 https://bugs.webkit.org/show_bug.cgi?id=182335 5 <rdar://problem/37110684> 6 7 Unreviewed test gardening. 8 9 * web-platform-tests/2dcontext/imagebitmap/common.sub.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.js. 10 * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt: 11 * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html: 12 * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt: 13 * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html: 14 * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt: Added. 15 * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html: Added. 16 * web-platform-tests/2dcontext/imagebitmap/w3c-import.log: 17 * web-platform-tests/common/namespaces.js: Added. 18 * web-platform-tests/common/w3c-import.log: 19 * web-platform-tests/images/pattern.mp4: Added. 20 * web-platform-tests/images/pattern.svg: Added. 21 * web-platform-tests/images/w3c-import.log: 22 1 23 2018-02-01 Chris Dumez <cdumez@apple.com> 2 24 -
trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.sub.js
r228002 r228003 39 39 resolve(video); 40 40 }; 41 video.src = "/images/pattern.ogv"; 41 video.onerror = reject; 42 video.src = getVideoURI("/images/pattern"); 42 43 }); 43 44 } 44 45 45 function makeImage() { 46 return new Promise(resolve => { 47 var img = new Image(); 48 img.onload = function() { 49 resolve(img); 50 }; 51 img.src = "/images/pattern.png"; 52 }); 46 function makeDataUrlVideo() { 47 const toDataUrl = (type, buffer) => { 48 const encoded = btoa(String.fromCodePoint(...new Uint8Array(buffer))); 49 return `data:${type};base64,${encoded}` 50 }; 51 52 return fetch(getVideoURI("/images/pattern")) 53 .then(response => Promise.all([response.headers.get("Content-Type"), response.arrayBuffer()])) 54 .then(([type, data]) => { 55 return new Promise(function(resolve, reject) { 56 var video = document.createElement("video"); 57 video.oncanplaythrough = function() { 58 resolve(video); 59 }; 60 video.onerror = reject; 61 video.src = toDataUrl(type, data); 62 }); 63 }); 64 } 65 66 function makeMakeHTMLImage(src) { 67 return function() { 68 return new Promise(resolve => { 69 var img = new Image(); 70 img.onload = function() { 71 resolve(img); 72 }; 73 img.src = src; 74 }); 75 } 76 } 77 78 function makeMakeSVGImage(src) { 79 return function() { 80 return new Promise((resolve, reject) => { 81 var image = document.createElementNS(NAMESPACES.svg, "image"); 82 image.onload = () => resolve(image); 83 image.onerror = reject; 84 image.setAttribute("externalResourcesRequired", "true"); 85 image.setAttributeNS(NAMESPACES.xlink, 'xlink:href', src); 86 document.body.appendChild(image); 87 }); 88 } 53 89 } 54 90 … … 100 136 { name: 'an HTMLCanvasElement', factory: makeCanvas }, 101 137 { name: 'an HTMLVideoElement', factory: makeVideo }, 102 { name: 'an HTMLImageElement', factory: makeImage }, 138 { name: 'an HTMLVideoElement from a data URL', factory: makeDataUrlVideo }, 139 { name: 'a bitmap HTMLImageElement', factory: makeMakeHTMLImage("/images/pattern.png") }, 140 { name: 'a vector HTMLImageElement', factory: makeMakeHTMLImage("/images/pattern.svg") }, 141 { name: 'a bitmap SVGImageElement', factory: makeMakeSVGImage("/images/pattern.png") }, 142 { name: 'a vector SVGImageElement', factory: makeMakeSVGImage("/images/pattern.svg") }, 103 143 { name: 'an OffscreenCanvas', factory: makeOffscreenCanvas }, 104 144 { name: 'an ImageData', factory: makeImageData }, -
trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt
r227973 r228003 1 2 Harness Error (TIMEOUT), message = null3 1 4 2 PASS createImageBitmap from an HTMLCanvasElement, and drawImage on the created ImageBitmap 3 PASS createImageBitmap from an HTMLCanvasElement scaled down, and drawImage on the created ImageBitmap 4 PASS createImageBitmap from an HTMLCanvasElement scaled up, and drawImage on the created ImageBitmap 5 PASS createImageBitmap from an HTMLCanvasElement resized, and drawImage on the created ImageBitmap 5 6 FAIL createImageBitmap from an HTMLCanvasElement with negative sw/sh, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "RangeError: Cannot create ImageBitmap with a negative width or height" 6 TIMEOUT createImageBitmap from an HTMLVideoElement, and drawImage on the created ImageBitmap Test timed out 7 NOTRUN createImageBitmap from an HTMLVideoElement with negative sw/sh, and drawImage on the created ImageBitmap 8 NOTRUN createImageBitmap from an HTMLImageElement, and drawImage on the created ImageBitmap 9 NOTRUN createImageBitmap from an HTMLImageElement with negative sw/sh, and drawImage on the created ImageBitmap 10 NOTRUN createImageBitmap from an OffscreenCanvas, and drawImage on the created ImageBitmap 11 NOTRUN createImageBitmap from an OffscreenCanvas with negative sw/sh, and drawImage on the created ImageBitmap 12 NOTRUN createImageBitmap from an ImageData, and drawImage on the created ImageBitmap 13 NOTRUN createImageBitmap from an ImageData with negative sw/sh, and drawImage on the created ImageBitmap 14 NOTRUN createImageBitmap from an ImageBitmap, and drawImage on the created ImageBitmap 15 NOTRUN createImageBitmap from an ImageBitmap with negative sw/sh, and drawImage on the created ImageBitmap 16 NOTRUN createImageBitmap from a Blob, and drawImage on the created ImageBitmap 17 NOTRUN createImageBitmap from a Blob with negative sw/sh, and drawImage on the created ImageBitmap 7 FAIL createImageBitmap from an HTMLVideoElement, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with HTMLVideoElement is not implemented" 8 FAIL createImageBitmap from an HTMLVideoElement scaled down, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with HTMLVideoElement is not implemented" 9 FAIL createImageBitmap from an HTMLVideoElement scaled up, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with HTMLVideoElement is not implemented" 10 FAIL createImageBitmap from an HTMLVideoElement resized, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with HTMLVideoElement is not implemented" 11 FAIL createImageBitmap from an HTMLVideoElement with negative sw/sh, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "RangeError: Cannot create ImageBitmap with a negative width or height" 12 FAIL createImageBitmap from an HTMLVideoElement from a data URL, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with HTMLVideoElement is not implemented" 13 FAIL createImageBitmap from an HTMLVideoElement from a data URL scaled down, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with HTMLVideoElement is not implemented" 14 FAIL createImageBitmap from an HTMLVideoElement from a data URL scaled up, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with HTMLVideoElement is not implemented" 15 FAIL createImageBitmap from an HTMLVideoElement from a data URL resized, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with HTMLVideoElement is not implemented" 16 FAIL createImageBitmap from an HTMLVideoElement from a data URL with negative sw/sh, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "RangeError: Cannot create ImageBitmap with a negative width or height" 17 PASS createImageBitmap from a bitmap HTMLImageElement, and drawImage on the created ImageBitmap 18 PASS createImageBitmap from a bitmap HTMLImageElement scaled down, and drawImage on the created ImageBitmap 19 PASS createImageBitmap from a bitmap HTMLImageElement scaled up, and drawImage on the created ImageBitmap 20 PASS createImageBitmap from a bitmap HTMLImageElement resized, and drawImage on the created ImageBitmap 21 FAIL createImageBitmap from a bitmap HTMLImageElement with negative sw/sh, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "RangeError: Cannot create ImageBitmap with a negative width or height" 22 PASS createImageBitmap from a vector HTMLImageElement, and drawImage on the created ImageBitmap 23 PASS createImageBitmap from a vector HTMLImageElement scaled down, and drawImage on the created ImageBitmap 24 PASS createImageBitmap from a vector HTMLImageElement scaled up, and drawImage on the created ImageBitmap 25 PASS createImageBitmap from a vector HTMLImageElement resized, and drawImage on the created ImageBitmap 26 FAIL createImageBitmap from a vector HTMLImageElement with negative sw/sh, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "RangeError: Cannot create ImageBitmap with a negative width or height" 27 FAIL createImageBitmap from a bitmap SVGImageElement, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error" 28 FAIL createImageBitmap from a bitmap SVGImageElement scaled down, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error" 29 FAIL createImageBitmap from a bitmap SVGImageElement scaled up, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error" 30 FAIL createImageBitmap from a bitmap SVGImageElement resized, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error" 31 FAIL createImageBitmap from a bitmap SVGImageElement with negative sw/sh, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error" 32 FAIL createImageBitmap from a vector SVGImageElement, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error" 33 FAIL createImageBitmap from a vector SVGImageElement scaled down, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error" 34 FAIL createImageBitmap from a vector SVGImageElement scaled up, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error" 35 FAIL createImageBitmap from a vector SVGImageElement resized, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error" 36 FAIL createImageBitmap from a vector SVGImageElement with negative sw/sh, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error" 37 FAIL createImageBitmap from an OffscreenCanvas, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: null is not an object (evaluating 'testCtx.fillStyle = "rgb(255, 0, 0)"')" 38 FAIL createImageBitmap from an OffscreenCanvas scaled down, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: null is not an object (evaluating 'testCtx.fillStyle = "rgb(255, 0, 0)"')" 39 FAIL createImageBitmap from an OffscreenCanvas scaled up, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: null is not an object (evaluating 'testCtx.fillStyle = "rgb(255, 0, 0)"')" 40 FAIL createImageBitmap from an OffscreenCanvas resized, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: null is not an object (evaluating 'testCtx.fillStyle = "rgb(255, 0, 0)"')" 41 FAIL createImageBitmap from an OffscreenCanvas with negative sw/sh, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: null is not an object (evaluating 'testCtx.fillStyle = "rgb(255, 0, 0)"')" 42 FAIL createImageBitmap from an ImageData, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with ImageData is not implemented" 43 FAIL createImageBitmap from an ImageData scaled down, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with ImageData is not implemented" 44 FAIL createImageBitmap from an ImageData scaled up, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with ImageData is not implemented" 45 FAIL createImageBitmap from an ImageData resized, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with ImageData is not implemented" 46 FAIL createImageBitmap from an ImageData with negative sw/sh, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "RangeError: Cannot create ImageBitmap with a negative width or height" 47 PASS createImageBitmap from an ImageBitmap, and drawImage on the created ImageBitmap 48 PASS createImageBitmap from an ImageBitmap scaled down, and drawImage on the created ImageBitmap 49 PASS createImageBitmap from an ImageBitmap scaled up, and drawImage on the created ImageBitmap 50 PASS createImageBitmap from an ImageBitmap resized, and drawImage on the created ImageBitmap 51 FAIL createImageBitmap from an ImageBitmap with negative sw/sh, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "RangeError: Cannot create ImageBitmap with a negative width or height" 52 FAIL createImageBitmap from a Blob, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with ArrayBuffer or Blob is not implemented" 53 FAIL createImageBitmap from a Blob scaled down, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with ArrayBuffer or Blob is not implemented" 54 FAIL createImageBitmap from a Blob scaled up, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with ArrayBuffer or Blob is not implemented" 55 FAIL createImageBitmap from a Blob resized, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with ArrayBuffer or Blob is not implemented" 56 FAIL createImageBitmap from a Blob with negative sw/sh, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "RangeError: Cannot create ImageBitmap with a negative width or height" 18 57 -
trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html
r227973 r228003 5 5 <script src="/resources/testharnessreport.js"></script> 6 6 <script src="/common/canvas-tests.js"></script> 7 <script src="common.js"></script> 7 <script src="/common/media.js"></script> 8 <script src="/common/namespaces.js"></script> 9 <script src="common.sub.js"></script> 8 10 <link rel="stylesheet" href="/common/canvas-tests.css"> 9 11 <body> 10 12 <script> 11 function testCanvasDisplayingPattern(canvas )13 function testCanvasDisplayingPattern(canvas, width, height) 12 14 { 13 15 var tolerance = 5; // for creating ImageBitmap from a video, the tolerance needs to be high 14 _assertPixelApprox(canvas, 5,5, 255,0,0,255, "5,5", "255,0,0,255", tolerance); 15 _assertPixelApprox(canvas, 15,5, 0,255,0,255, "15,5", "0,255,0,255", tolerance); 16 _assertPixelApprox(canvas, 5,15, 0,0,255,255, "5,15", "0,0,255,255", tolerance); 17 _assertPixelApprox(canvas, 15,15, 0,0,0,255, "15,15", "0,0,0,255", tolerance); 16 const check = (x, y, r, g, b, a) => 17 _assertPixelApprox(canvas, x,y, r,g,b,a, `${x},${y}`, `${r},${g},${b},${a}`, tolerance); 18 check(1 * width / 4, 1 * height / 4, 255,0,0,255); 19 check(3 * width / 4, 1 * height / 4, 0,255,0,255); 20 check(1 * width / 4, 3 * height / 4, 0,0,255,255); 21 check(3 * width / 4, 3 * height / 4, 0,0,0,255); 18 22 } 19 23 20 function testDrawImageBitmap(source, args = [] )24 function testDrawImageBitmap(source, args = [], { resizeWidth = 20, resizeHeight = 20 } = {}) 21 25 { 22 26 var canvas = document.createElement("canvas"); 23 canvas.width = 20;24 canvas.height = 20;27 canvas.width = resizeWidth; 28 canvas.height = resizeHeight; 25 29 var ctx = canvas.getContext("2d"); 26 ctx.clearRect(0, 0, canvas.width, canvas.height);27 30 return createImageBitmap(source, ...args).then(imageBitmap => { 31 assert_equals(imageBitmap.width, resizeWidth); 32 assert_equals(imageBitmap.height, resizeHeight); 28 33 ctx.drawImage(imageBitmap, 0, 0); 29 testCanvasDisplayingPattern(canvas );34 testCanvasDisplayingPattern(canvas, resizeWidth, resizeHeight); 30 35 }); 31 36 } … … 40 45 promise_test(function() { 41 46 return factory().then(function(img) { 47 const options = { resizeWidth: 10, resizeHeight: 10 }; 48 return testDrawImageBitmap(img, [options], options); 49 }); 50 }, `createImageBitmap from ${name} scaled down, and drawImage on the created ImageBitmap`); 51 52 promise_test(function() { 53 return factory().then(function(img) { 54 const options = { resizeWidth: 40, resizeHeight: 40 }; 55 return testDrawImageBitmap(img, [options], options); 56 }); 57 }, `createImageBitmap from ${name} scaled up, and drawImage on the created ImageBitmap`); 58 59 promise_test(function() { 60 return factory().then(function(img) { 61 const options = { resizeWidth: 10, resizeHeight: 40 }; 62 return testDrawImageBitmap(img, [options], options); 63 }); 64 }, `createImageBitmap from ${name} resized, and drawImage on the created ImageBitmap`); 65 66 promise_test(function() { 67 return factory().then(function(img) { 42 68 return testDrawImageBitmap(img, [20, 20, -20, -20]); 43 69 }); -
trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt
r227973 r228003 1 2 Harness Error (TIMEOUT), message = null 1 CONSOLE MESSAGE: line 137: Canvas area exceeds the maximum limit (width * height > 268435456). 3 2 4 3 PASS createImageBitmap with a an HTMLCanvasElement source and sw set to 0 5 4 PASS createImageBitmap with a an HTMLCanvasElement source and sh set to 0 6 5 FAIL createImageBitmap with a an HTMLCanvasElement source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code 7 TIMEOUT createImageBitmap with a an HTMLVideoElement source and sw set to 0 Test timed out 8 NOTRUN createImageBitmap with a an HTMLVideoElement source and sh set to 0 9 NOTRUN createImageBitmap with a an HTMLVideoElement source and oversized (unallocatable) crop region 10 NOTRUN createImageBitmap with a an HTMLImageElement source and sw set to 0 11 NOTRUN createImageBitmap with a an HTMLImageElement source and sh set to 0 12 NOTRUN createImageBitmap with a an HTMLImageElement source and oversized (unallocatable) crop region 13 NOTRUN createImageBitmap with a an OffscreenCanvas source and sw set to 0 14 NOTRUN createImageBitmap with a an OffscreenCanvas source and sh set to 0 15 NOTRUN createImageBitmap with a an OffscreenCanvas source and oversized (unallocatable) crop region 16 NOTRUN createImageBitmap with a an ImageData source and sw set to 0 17 NOTRUN createImageBitmap with a an ImageData source and sh set to 0 18 NOTRUN createImageBitmap with a an ImageData source and oversized (unallocatable) crop region 19 NOTRUN createImageBitmap with a an ImageBitmap source and sw set to 0 20 NOTRUN createImageBitmap with a an ImageBitmap source and sh set to 0 21 NOTRUN createImageBitmap with a an ImageBitmap source and oversized (unallocatable) crop region 22 NOTRUN createImageBitmap with a a Blob source and sw set to 0 23 NOTRUN createImageBitmap with a a Blob source and sh set to 0 24 NOTRUN createImageBitmap with a a Blob source and oversized (unallocatable) crop region 25 NOTRUN createImageBitmap with undefined image source. 26 NOTRUN createImageBitmap with null image source. 27 NOTRUN createImageBitmap with empty image source. 28 NOTRUN createImageBitmap with empty video source. 29 NOTRUN createImageBitmap with an oversized canvas source. 30 NOTRUN createImageBitmap with an invalid OffscreenCanvas source. 31 NOTRUN createImageBitmap with an undecodable blob source. 32 NOTRUN createImageBitmap with a broken image source. 33 NOTRUN createImageBitmap with an available but undecodable image source. 34 NOTRUN createImageBitmap with a closed ImageBitmap. 6 PASS createImageBitmap with a an HTMLVideoElement source and sw set to 0 7 PASS createImageBitmap with a an HTMLVideoElement source and sh set to 0 8 FAIL createImageBitmap with a an HTMLVideoElement source and oversized (unallocatable) crop region assert_throws: function "function () { throw e }" threw object "TypeError: createImageBitmap with HTMLVideoElement is not implemented" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 9 PASS createImageBitmap with a an HTMLVideoElement from a data URL source and sw set to 0 10 PASS createImageBitmap with a an HTMLVideoElement from a data URL source and sh set to 0 11 FAIL createImageBitmap with a an HTMLVideoElement from a data URL source and oversized (unallocatable) crop region assert_throws: function "function () { throw e }" threw object "TypeError: createImageBitmap with HTMLVideoElement is not implemented" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 12 PASS createImageBitmap with a a bitmap HTMLImageElement source and sw set to 0 13 PASS createImageBitmap with a a bitmap HTMLImageElement source and sh set to 0 14 FAIL createImageBitmap with a a bitmap HTMLImageElement source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code 15 PASS createImageBitmap with a a vector HTMLImageElement source and sw set to 0 16 PASS createImageBitmap with a a vector HTMLImageElement source and sh set to 0 17 FAIL createImageBitmap with a a vector HTMLImageElement source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code 18 FAIL createImageBitmap with a a bitmap SVGImageElement source and sw set to 0 assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "RangeError" ("RangeError") 19 FAIL createImageBitmap with a a bitmap SVGImageElement source and sh set to 0 assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "RangeError" ("RangeError") 20 FAIL createImageBitmap with a a bitmap SVGImageElement source and oversized (unallocatable) crop region assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 21 FAIL createImageBitmap with a a vector SVGImageElement source and sw set to 0 assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "RangeError" ("RangeError") 22 FAIL createImageBitmap with a a vector SVGImageElement source and sh set to 0 assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "RangeError" ("RangeError") 23 FAIL createImageBitmap with a a vector SVGImageElement source and oversized (unallocatable) crop region assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 24 FAIL createImageBitmap with a an OffscreenCanvas source and sw set to 0 promise_test: Unhandled rejection with value: object "TypeError: null is not an object (evaluating 'testCtx.fillStyle = "rgb(255, 0, 0)"')" 25 FAIL createImageBitmap with a an OffscreenCanvas source and sh set to 0 promise_test: Unhandled rejection with value: object "TypeError: null is not an object (evaluating 'testCtx.fillStyle = "rgb(255, 0, 0)"')" 26 FAIL createImageBitmap with a an OffscreenCanvas source and oversized (unallocatable) crop region promise_test: Unhandled rejection with value: object "TypeError: null is not an object (evaluating 'testCtx.fillStyle = "rgb(255, 0, 0)"')" 27 PASS createImageBitmap with a an ImageData source and sw set to 0 28 PASS createImageBitmap with a an ImageData source and sh set to 0 29 FAIL createImageBitmap with a an ImageData source and oversized (unallocatable) crop region assert_throws: function "function () { throw e }" threw object "TypeError: createImageBitmap with ImageData is not implemented" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 30 PASS createImageBitmap with a an ImageBitmap source and sw set to 0 31 PASS createImageBitmap with a an ImageBitmap source and sh set to 0 32 FAIL createImageBitmap with a an ImageBitmap source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code 33 PASS createImageBitmap with a a Blob source and sw set to 0 34 PASS createImageBitmap with a a Blob source and sh set to 0 35 FAIL createImageBitmap with a a Blob source and oversized (unallocatable) crop region assert_throws: function "function () { throw e }" threw object "TypeError: createImageBitmap with ArrayBuffer or Blob is not implemented" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 36 PASS createImageBitmap with undefined image source. 37 PASS createImageBitmap with null image source. 38 PASS createImageBitmap with CanvasRenderingContext2D image source. 39 PASS createImageBitmap with WebGLRenderingContext image source. 40 PASS createImageBitmap with Uint8Array image source. 41 PASS createImageBitmap with ArrayBuffer image source. 42 PASS createImageBitmap with empty image source. 43 FAIL createImageBitmap with empty video source. assert_throws: function "function () { throw e }" threw object "TypeError: createImageBitmap with HTMLVideoElement is not implemented" that is not a DOMException InvalidStateError: property "code" is equal to undefined, expected 11 44 PASS createImageBitmap with an oversized canvas source. 45 FAIL createImageBitmap with an invalid OffscreenCanvas source. assert_throws: function "function () { throw e }" threw object "TypeError: Type error" that is not a DOMException InvalidStateError: property "code" is equal to undefined, expected 11 46 FAIL createImageBitmap with an undecodable blob source. assert_throws: function "function () { throw e }" threw object "TypeError: createImageBitmap with ArrayBuffer or Blob is not implemented" that is not a DOMException InvalidStateError: property "code" is equal to undefined, expected 11 47 PASS createImageBitmap with a broken image source. 48 FAIL createImageBitmap with an available but undecodable image source. assert_unreached: Should have rejected: undefined Reached unreachable code 49 FAIL createImageBitmap with an available but zero height image source. assert_unreached: Should have rejected: undefined Reached unreachable code 50 FAIL createImageBitmap with an available but zero width image source. assert_unreached: Should have rejected: undefined Reached unreachable code 51 PASS createImageBitmap with a closed ImageBitmap. 35 52 -
trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html
r227973 r228003 2 2 <script src="/resources/testharness.js"></script> 3 3 <script src="/resources/testharnessreport.js"></script> 4 <script src="common.js"></script> 4 <script src="/common/media.js"></script> 5 <script src="/common/namespaces.js"></script> 6 <script src="common.sub.js"></script> 5 7 <script> 6 8 … … 29 31 30 32 function makeBrokenImage() { 31 return new Promise( resolve=> {33 return new Promise((resolve, reject) => { 32 34 const image = new Image(); 33 35 image.src = "data:,x"; 36 image.onload = reject; 34 37 image.onerror = () => resolve(image); 35 38 }); 36 39 } 37 40 38 function makeAvailableButBrokenImage( ) {41 function makeAvailableButBrokenImage(path) { 39 42 return new Promise((resolve, reject) => { 40 43 const image = new Image(); 41 image.src = "/images/broken.png";44 image.src = path; 42 45 image.onload = () => resolve(image); 43 46 image.onerror = reject; … … 100 103 101 104 promise_test( t => { 105 var context = document.createElement("canvas").getContext("2d"); 106 return promise_rejects(t, new TypeError(), createImageBitmap(context)); 107 }, "createImageBitmap with CanvasRenderingContext2D image source."); 108 109 promise_test( t => { 110 var context = document.createElement("canvas").getContext("webgl"); 111 return promise_rejects(t, new TypeError(), createImageBitmap(context)); 112 }, "createImageBitmap with WebGLRenderingContext image source."); 113 114 promise_test( t => { 115 var buffer = new Uint8Array(); 116 return promise_rejects(t, new TypeError(), createImageBitmap(buffer)); 117 }, "createImageBitmap with Uint8Array image source."); 118 119 promise_test( t => { 120 var buffer = new ArrayBuffer(8); 121 return promise_rejects(t, new TypeError(), createImageBitmap(buffer)); 122 }, "createImageBitmap with ArrayBuffer image source."); 123 124 promise_test( t => { 102 125 return promise_rejects(t, "InvalidStateError", 103 126 createImageBitmap(new Image())); … … 138 161 139 162 promise_test( t => { 140 return makeAvailableButBrokenImage( ).then(image => {163 return makeAvailableButBrokenImage("/images/broken.png").then(image => { 141 164 return promise_rejects(t, "InvalidStateError", 142 165 createImageBitmap(image)); 143 166 }); 144 167 }, "createImageBitmap with an available but undecodable image source."); 168 169 promise_test( t => { 170 return makeAvailableButBrokenImage("/images/red-zeroheight.svg").then(image => { 171 return promise_rejects(t, "InvalidStateError", 172 createImageBitmap(image)); 173 }); 174 }, "createImageBitmap with an available but zero height image source."); 175 176 promise_test( t => { 177 return makeAvailableButBrokenImage("/images/red-zerowidth.svg").then(image => { 178 return promise_rejects(t, "InvalidStateError", 179 createImageBitmap(image)); 180 }); 181 }, "createImageBitmap with an available but zero width image source."); 145 182 146 183 promise_test( t => { -
trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/w3c-import.log
r227973 r228003 15 15 ------------------------------------------------------------------------ 16 16 List of files: 17 /LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common. js17 /LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.sub.js 18 18 /LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html 19 19 /LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html 20 /LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html 20 21 /LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-sizeOverflow.html -
trunk/LayoutTests/imported/w3c/web-platform-tests/common/w3c-import.log
r227973 r228003 44 44 /LayoutTests/imported/w3c/web-platform-tests/common/media.js 45 45 /LayoutTests/imported/w3c/web-platform-tests/common/media.js.headers 46 /LayoutTests/imported/w3c/web-platform-tests/common/namespaces.js 46 47 /LayoutTests/imported/w3c/web-platform-tests/common/object-association.js 47 48 /LayoutTests/imported/w3c/web-platform-tests/common/object-association.js.headers -
trunk/LayoutTests/imported/w3c/web-platform-tests/images/w3c-import.log
r227973 r228003 39 39 /LayoutTests/imported/w3c/web-platform-tests/images/grgr-256x256.png 40 40 /LayoutTests/imported/w3c/web-platform-tests/images/movie_300_frame_0.png 41 /LayoutTests/imported/w3c/web-platform-tests/images/pattern.mp4 41 42 /LayoutTests/imported/w3c/web-platform-tests/images/pattern.ogv 42 43 /LayoutTests/imported/w3c/web-platform-tests/images/pattern.png 44 /LayoutTests/imported/w3c/web-platform-tests/images/pattern.svg 43 45 /LayoutTests/imported/w3c/web-platform-tests/images/red-16x16.png 44 46 /LayoutTests/imported/w3c/web-platform-tests/images/red-zeroheight.svg -
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt
r227973 r228003 1 CONSOLE MESSAGE: line 1 14: Canvas area exceeds the maximum limit (width * height > 268435456).1 CONSOLE MESSAGE: line 137: Canvas area exceeds the maximum limit (width * height > 268435456). 2 2 3 3 PASS createImageBitmap with a an HTMLCanvasElement source and sw set to 0 … … 7 7 PASS createImageBitmap with a an HTMLVideoElement source and sh set to 0 8 8 FAIL createImageBitmap with a an HTMLVideoElement source and oversized (unallocatable) crop region assert_throws: function "function () { throw e }" threw object "TypeError: createImageBitmap with HTMLVideoElement is not implemented" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 9 PASS createImageBitmap with a an HTMLImageElement source and sw set to 0 10 PASS createImageBitmap with a an HTMLImageElement source and sh set to 0 11 FAIL createImageBitmap with a an HTMLImageElement source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code 9 PASS createImageBitmap with a an HTMLVideoElement from a data URL source and sw set to 0 10 PASS createImageBitmap with a an HTMLVideoElement from a data URL source and sh set to 0 11 FAIL createImageBitmap with a an HTMLVideoElement from a data URL source and oversized (unallocatable) crop region assert_throws: function "function () { throw e }" threw object "TypeError: createImageBitmap with HTMLVideoElement is not implemented" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 12 PASS createImageBitmap with a a bitmap HTMLImageElement source and sw set to 0 13 PASS createImageBitmap with a a bitmap HTMLImageElement source and sh set to 0 14 FAIL createImageBitmap with a a bitmap HTMLImageElement source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code 15 PASS createImageBitmap with a a vector HTMLImageElement source and sw set to 0 16 PASS createImageBitmap with a a vector HTMLImageElement source and sh set to 0 17 FAIL createImageBitmap with a a vector HTMLImageElement source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code 18 FAIL createImageBitmap with a a bitmap SVGImageElement source and sw set to 0 assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "RangeError" ("RangeError") 19 FAIL createImageBitmap with a a bitmap SVGImageElement source and sh set to 0 assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "RangeError" ("RangeError") 20 FAIL createImageBitmap with a a bitmap SVGImageElement source and oversized (unallocatable) crop region assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 21 FAIL createImageBitmap with a a vector SVGImageElement source and sw set to 0 assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "RangeError" ("RangeError") 22 FAIL createImageBitmap with a a vector SVGImageElement source and sh set to 0 assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "RangeError" ("RangeError") 23 FAIL createImageBitmap with a a vector SVGImageElement source and oversized (unallocatable) crop region assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 12 24 FAIL createImageBitmap with a an OffscreenCanvas source and sw set to 0 promise_test: Unhandled rejection with value: object "TypeError: null is not an object (evaluating 'testCtx.fillStyle = "rgb(255, 0, 0)"')" 13 25 FAIL createImageBitmap with a an OffscreenCanvas source and sh set to 0 promise_test: Unhandled rejection with value: object "TypeError: null is not an object (evaluating 'testCtx.fillStyle = "rgb(255, 0, 0)"')" … … 24 36 PASS createImageBitmap with undefined image source. 25 37 PASS createImageBitmap with null image source. 38 PASS createImageBitmap with CanvasRenderingContext2D image source. 39 PASS createImageBitmap with WebGLRenderingContext image source. 40 PASS createImageBitmap with Uint8Array image source. 41 PASS createImageBitmap with ArrayBuffer image source. 26 42 PASS createImageBitmap with empty image source. 27 43 FAIL createImageBitmap with empty video source. assert_throws: function "function () { throw e }" threw object "TypeError: createImageBitmap with HTMLVideoElement is not implemented" that is not a DOMException InvalidStateError: property "code" is equal to undefined, expected 11 … … 31 47 PASS createImageBitmap with a broken image source. 32 48 FAIL createImageBitmap with an available but undecodable image source. promise_test: Unhandled rejection with value: object "[object Event]" 49 FAIL createImageBitmap with an available but zero height image source. assert_unreached: Should have rejected: undefined Reached unreachable code 50 FAIL createImageBitmap with an available but zero width image source. assert_unreached: Should have rejected: undefined Reached unreachable code 33 51 PASS createImageBitmap with a closed ImageBitmap. 34 52 -
trunk/LayoutTests/platform/mac/TestExpectations
r227968 r228003 1792 1792 webkit.org/b/181831 [ HighSierra+ ] fast/forms/searchfield-heights.html [ Pass Failure ] 1793 1793 1794 webkit.org/b/182422 imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html [ Crash ] -
trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt
r227973 r228003 1 CONSOLE MESSAGE: line 1 14: Canvas area exceeds the maximum limit (width * height > 268435456).1 CONSOLE MESSAGE: line 137: Canvas area exceeds the maximum limit (width * height > 268435456). 2 2 3 3 PASS createImageBitmap with a an HTMLCanvasElement source and sw set to 0 … … 7 7 PASS createImageBitmap with a an HTMLVideoElement source and sh set to 0 8 8 FAIL createImageBitmap with a an HTMLVideoElement source and oversized (unallocatable) crop region assert_throws: function "function () { throw e }" threw object "TypeError: createImageBitmap with HTMLVideoElement is not implemented" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 9 PASS createImageBitmap with a an HTMLImageElement source and sw set to 0 10 PASS createImageBitmap with a an HTMLImageElement source and sh set to 0 11 FAIL createImageBitmap with a an HTMLImageElement source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code 9 PASS createImageBitmap with a an HTMLVideoElement from a data URL source and sw set to 0 10 PASS createImageBitmap with a an HTMLVideoElement from a data URL source and sh set to 0 11 FAIL createImageBitmap with a an HTMLVideoElement from a data URL source and oversized (unallocatable) crop region assert_throws: function "function () { throw e }" threw object "TypeError: createImageBitmap with HTMLVideoElement is not implemented" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 12 PASS createImageBitmap with a a bitmap HTMLImageElement source and sw set to 0 13 PASS createImageBitmap with a a bitmap HTMLImageElement source and sh set to 0 14 FAIL createImageBitmap with a a bitmap HTMLImageElement source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code 15 PASS createImageBitmap with a a vector HTMLImageElement source and sw set to 0 16 PASS createImageBitmap with a a vector HTMLImageElement source and sh set to 0 17 FAIL createImageBitmap with a a vector HTMLImageElement source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code 18 FAIL createImageBitmap with a a bitmap SVGImageElement source and sw set to 0 assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "RangeError" ("RangeError") 19 FAIL createImageBitmap with a a bitmap SVGImageElement source and sh set to 0 assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "RangeError" ("RangeError") 20 FAIL createImageBitmap with a a bitmap SVGImageElement source and oversized (unallocatable) crop region assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 21 FAIL createImageBitmap with a a vector SVGImageElement source and sw set to 0 assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "RangeError" ("RangeError") 22 FAIL createImageBitmap with a a vector SVGImageElement source and sh set to 0 assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "RangeError" ("RangeError") 23 FAIL createImageBitmap with a a vector SVGImageElement source and oversized (unallocatable) crop region assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 12 24 FAIL createImageBitmap with a an OffscreenCanvas source and sw set to 0 promise_test: Unhandled rejection with value: object "TypeError: null is not an object (evaluating 'testCtx.fillStyle = "rgb(255, 0, 0)"')" 13 25 FAIL createImageBitmap with a an OffscreenCanvas source and sh set to 0 promise_test: Unhandled rejection with value: object "TypeError: null is not an object (evaluating 'testCtx.fillStyle = "rgb(255, 0, 0)"')" … … 24 36 PASS createImageBitmap with undefined image source. 25 37 PASS createImageBitmap with null image source. 38 PASS createImageBitmap with CanvasRenderingContext2D image source. 39 PASS createImageBitmap with WebGLRenderingContext image source. 40 PASS createImageBitmap with Uint8Array image source. 41 PASS createImageBitmap with ArrayBuffer image source. 26 42 PASS createImageBitmap with empty image source. 27 43 FAIL createImageBitmap with empty video source. assert_throws: function "function () { throw e }" threw object "TypeError: createImageBitmap with HTMLVideoElement is not implemented" that is not a DOMException InvalidStateError: property "code" is equal to undefined, expected 11 … … 31 47 PASS createImageBitmap with a broken image source. 32 48 FAIL createImageBitmap with an available but undecodable image source. promise_test: Unhandled rejection with value: object "[object Event]" 49 FAIL createImageBitmap with an available but zero height image source. assert_unreached: Should have rejected: undefined Reached unreachable code 50 FAIL createImageBitmap with an available but zero width image source. assert_unreached: Should have rejected: undefined Reached unreachable code 33 51 PASS createImageBitmap with a closed ImageBitmap. 34 52
Note: See TracChangeset
for help on using the changeset viewer.