Title: [228003] trunk/LayoutTests
Revision
228003
Author
ms2...@igalia.com
Date
2018-02-02 04:33:51 -0800 (Fri, 02 Feb 2018)

Log Message

Update imagebitmap tests.
https://bugs.webkit.org/show_bug.cgi?id=182335
<rdar://problem/37110684>

Unreviewed test gardening.


LayoutTests/imported/w3c:

* web-platform-tests/2dcontext/imagebitmap/common.sub.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.js.
* web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt:
* web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html:
* web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:
* web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html:
* web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt: Added.
* web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html: Added.
* web-platform-tests/2dcontext/imagebitmap/w3c-import.log:
* web-platform-tests/common/namespaces.js: Added.
* web-platform-tests/common/w3c-import.log:
* web-platform-tests/images/pattern.mp4: Added.
* web-platform-tests/images/pattern.svg: Added.
* web-platform-tests/images/w3c-import.log:

LayoutTests:

* platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt: Added.
* platform/mac/TestExpectations:
* platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt: Added.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (228002 => 228003)


--- trunk/LayoutTests/ChangeLog	2018-02-02 12:19:26 UTC (rev 228002)
+++ trunk/LayoutTests/ChangeLog	2018-02-02 12:33:51 UTC (rev 228003)
@@ -1,3 +1,19 @@
+2018-02-02  Ms2ger  <ms2...@igalia.com>
+
+        Update imagebitmap tests.
+        https://bugs.webkit.org/show_bug.cgi?id=182335
+        <rdar://problem/37110684>
+
+        Unreviewed test gardening.
+
+        * platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt: Removed.
+        * platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:
+        * platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt: Added.
+        * platform/mac/TestExpectations:
+        * platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt: Removed.
+        * platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:
+        * platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt: Added.
+
 2018-02-02  Fujii Hironori  <hironori.fu...@sony.com>
 
         [GTK] fast/events/message-channel-gc-4.html is flaky

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (228002 => 228003)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2018-02-02 12:19:26 UTC (rev 228002)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2018-02-02 12:33:51 UTC (rev 228003)
@@ -1,3 +1,25 @@
+2018-02-02  Ms2ger  <ms2...@igalia.com>
+
+        Update imagebitmap tests.
+        https://bugs.webkit.org/show_bug.cgi?id=182335
+        <rdar://problem/37110684>
+
+        Unreviewed test gardening.
+
+        * web-platform-tests/2dcontext/imagebitmap/common.sub.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.js.
+        * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt:
+        * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html:
+        * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:
+        * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html:
+        * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt: Added.
+        * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html: Added.
+        * web-platform-tests/2dcontext/imagebitmap/w3c-import.log:
+        * web-platform-tests/common/namespaces.js: Added.
+        * web-platform-tests/common/w3c-import.log:
+        * web-platform-tests/images/pattern.mp4: Added.
+        * web-platform-tests/images/pattern.svg: Added.
+        * web-platform-tests/images/w3c-import.log:
+
 2018-02-01  Chris Dumez  <cdu...@apple.com>
 
         When SW install fails, null out registration.installing before setting worker state to "redundant"

Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.js (228002 => 228003)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.js	2018-02-02 12:19:26 UTC (rev 228002)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.js	2018-02-02 12:33:51 UTC (rev 228003)
@@ -1,107 +0,0 @@
-function makeCanvas() {
-    return new Promise(resolve => {
-        var testCanvas = document.createElement("canvas");
-        testCanvas.width = 20;
-        testCanvas.height = 20;
-        var testCtx = testCanvas.getContext("2d");
-        testCtx.fillStyle = "rgb(255, 0, 0)";
-        testCtx.fillRect(0, 0, 10, 10);
-        testCtx.fillStyle = "rgb(0, 255, 0)";
-        testCtx.fillRect(10, 0, 10, 10);
-        testCtx.fillStyle = "rgb(0, 0, 255)";
-        testCtx.fillRect(0, 10, 10, 10);
-        testCtx.fillStyle = "rgb(0, 0, 0)";
-        testCtx.fillRect(10, 10, 10, 10);
-        resolve(testCanvas);
-    });
-}
-
-function makeOffscreenCanvas() {
-    return new Promise(resolve => {
-        let canvas = new OffscreenCanvas(20, 20);
-        var testCtx = canvas.getContext("2d");
-        testCtx.fillStyle = "rgb(255, 0, 0)";
-        testCtx.fillRect(0, 0, 10, 10);
-        testCtx.fillStyle = "rgb(0, 255, 0)";
-        testCtx.fillRect(10, 0, 10, 10);
-        testCtx.fillStyle = "rgb(0, 0, 255)";
-        testCtx.fillRect(0, 10, 10, 10);
-        testCtx.fillStyle = "rgb(0, 0, 0)";
-        testCtx.fillRect(10, 10, 10, 10);
-        resolve(canvas);
-    });
-}
-
-function makeVideo() {
-    return new Promise(function(resolve, reject) {
-        var video = document.createElement("video");
-        video._oncanplaythrough_ = function() {
-            resolve(video);
-        };
-        video.src = ""
-    });
-}
-
-function makeImage() {
-    return new Promise(resolve => {
-        var img = new Image();
-        img._onload_ = function() {
-            resolve(img);
-        };
-        img.src = ""
-    });
-}
-
-function makeImageData() {
-    return new Promise(function(resolve, reject) {
-        var width = 20, height = 20;
-        var imgData = new ImageData(width, height);
-        for (var i = 0; i < width * height * 4; i += 4) {
-            imgData.data[i] = 0;
-            imgData.data[i + 1] = 0;
-            imgData.data[i + 2] = 0;
-            imgData.data[i + 3] = 255; //alpha channel: 255
-        }
-        var halfWidth = width / 2;
-        var halfHeight = height / 2;
-        // initialize to R, G, B, Black, with each one 10*10 pixels
-        for (var i = 0; i < halfHeight; i++)
-            for (var j = 0; j < halfWidth; j++)
-                imgData.data[i * width * 4 + j * 4] = 255;
-        for (var i = 0; i < halfHeight; i++)
-            for (var j = halfWidth; j < width; j++)
-                imgData.data[i * width * 4 + j * 4 + 1] = 255;
-        for (var i = halfHeight; i < height; i++)
-            for (var j = 0; j < halfWidth; j++)
-                imgData.data[i * width * 4 + j * 4 + 2] = 255;
-        resolve(imgData);
-    });
-}
-
-function makeImageBitmap() {
-    return makeCanvas().then(canvas => {
-        return createImageBitmap(canvas);
-    });
-}
-
-function makeBlob() {
-    return new Promise(function(resolve, reject) {
-        var xhr = new XMLHttpRequest();
-        xhr.open("GET", '/images/pattern.png');
-        xhr.responseType = 'blob';
-        xhr.send();
-        xhr._onload_ = function() {
-            resolve(xhr.response);
-        };
-    });
-}
-
-var imageSourceTypes = [
-    { name: 'an HTMLCanvasElement', factory: makeCanvas },
-    { name: 'an HTMLVideoElement',  factory: makeVideo },
-    { name: 'an HTMLImageElement',  factory: makeImage },
-    { name: 'an OffscreenCanvas',   factory: makeOffscreenCanvas },
-    { name: 'an ImageData',         factory: makeImageData },
-    { name: 'an ImageBitmap',       factory: makeImageBitmap },
-    { name: 'a Blob',               factory: makeBlob },
-];

Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.sub.js (from rev 228002, trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.js) (0 => 228003)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.sub.js	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.sub.js	2018-02-02 12:33:51 UTC (rev 228003)
@@ -0,0 +1,147 @@
+function makeCanvas() {
+    return new Promise(resolve => {
+        var testCanvas = document.createElement("canvas");
+        testCanvas.width = 20;
+        testCanvas.height = 20;
+        var testCtx = testCanvas.getContext("2d");
+        testCtx.fillStyle = "rgb(255, 0, 0)";
+        testCtx.fillRect(0, 0, 10, 10);
+        testCtx.fillStyle = "rgb(0, 255, 0)";
+        testCtx.fillRect(10, 0, 10, 10);
+        testCtx.fillStyle = "rgb(0, 0, 255)";
+        testCtx.fillRect(0, 10, 10, 10);
+        testCtx.fillStyle = "rgb(0, 0, 0)";
+        testCtx.fillRect(10, 10, 10, 10);
+        resolve(testCanvas);
+    });
+}
+
+function makeOffscreenCanvas() {
+    return new Promise(resolve => {
+        let canvas = new OffscreenCanvas(20, 20);
+        var testCtx = canvas.getContext("2d");
+        testCtx.fillStyle = "rgb(255, 0, 0)";
+        testCtx.fillRect(0, 0, 10, 10);
+        testCtx.fillStyle = "rgb(0, 255, 0)";
+        testCtx.fillRect(10, 0, 10, 10);
+        testCtx.fillStyle = "rgb(0, 0, 255)";
+        testCtx.fillRect(0, 10, 10, 10);
+        testCtx.fillStyle = "rgb(0, 0, 0)";
+        testCtx.fillRect(10, 10, 10, 10);
+        resolve(canvas);
+    });
+}
+
+function makeVideo() {
+    return new Promise(function(resolve, reject) {
+        var video = document.createElement("video");
+        video._oncanplaythrough_ = function() {
+            resolve(video);
+        };
+        video._onerror_ = reject;
+        video.src = ""
+    });
+}
+
+function makeDataUrlVideo() {
+    const toDataUrl = (type, buffer) => {
+        const encoded = btoa(String.fromCodePoint(...new Uint8Array(buffer)));
+        return `data:${type};base64,${encoded}`
+    };
+
+    return fetch(getVideoURI("/images/pattern"))
+        .then(response => Promise.all([response.headers.get("Content-Type"), response.arrayBuffer()]))
+        .then(([type, data]) => {
+            return new Promise(function(resolve, reject) {
+                var video = document.createElement("video");
+                video._oncanplaythrough_ = function() {
+                    resolve(video);
+                };
+                video._onerror_ = reject;
+                video.src = "" data);
+            });
+        });
+}
+
+function makeMakeHTMLImage(src) {
+    return function() {
+        return new Promise(resolve => {
+            var img = new Image();
+            img._onload_ = function() {
+                resolve(img);
+            };
+            img.src = ""
+        });
+    }
+}
+
+function makeMakeSVGImage(src) {
+    return function() {
+        return new Promise((resolve, reject) => {
+            var image = document.createElementNS(NAMESPACES.svg, "image");
+            image._onload_ = () => resolve(image);
+            image._onerror_ = reject;
+            image.setAttribute("externalResourcesRequired", "true");
+            image.setAttributeNS(NAMESPACES.xlink, 'xlink:href', src);
+            document.body.appendChild(image);
+        });
+    }
+}
+
+function makeImageData() {
+    return new Promise(function(resolve, reject) {
+        var width = 20, height = 20;
+        var imgData = new ImageData(width, height);
+        for (var i = 0; i < width * height * 4; i += 4) {
+            imgData.data[i] = 0;
+            imgData.data[i + 1] = 0;
+            imgData.data[i + 2] = 0;
+            imgData.data[i + 3] = 255; //alpha channel: 255
+        }
+        var halfWidth = width / 2;
+        var halfHeight = height / 2;
+        // initialize to R, G, B, Black, with each one 10*10 pixels
+        for (var i = 0; i < halfHeight; i++)
+            for (var j = 0; j < halfWidth; j++)
+                imgData.data[i * width * 4 + j * 4] = 255;
+        for (var i = 0; i < halfHeight; i++)
+            for (var j = halfWidth; j < width; j++)
+                imgData.data[i * width * 4 + j * 4 + 1] = 255;
+        for (var i = halfHeight; i < height; i++)
+            for (var j = 0; j < halfWidth; j++)
+                imgData.data[i * width * 4 + j * 4 + 2] = 255;
+        resolve(imgData);
+    });
+}
+
+function makeImageBitmap() {
+    return makeCanvas().then(canvas => {
+        return createImageBitmap(canvas);
+    });
+}
+
+function makeBlob() {
+    return new Promise(function(resolve, reject) {
+        var xhr = new XMLHttpRequest();
+        xhr.open("GET", '/images/pattern.png');
+        xhr.responseType = 'blob';
+        xhr.send();
+        xhr._onload_ = function() {
+            resolve(xhr.response);
+        };
+    });
+}
+
+var imageSourceTypes = [
+    { name: 'an HTMLCanvasElement', factory: makeCanvas },
+    { name: 'an HTMLVideoElement',  factory: makeVideo },
+    { name: 'an HTMLVideoElement from a data URL', factory: makeDataUrlVideo },
+    { name: 'a bitmap HTMLImageElement', factory: makeMakeHTMLImage("/images/pattern.png") },
+    { name: 'a vector HTMLImageElement', factory: makeMakeHTMLImage("/images/pattern.svg") },
+    { name: 'a bitmap SVGImageElement', factory: makeMakeSVGImage("/images/pattern.png") },
+    { name: 'a vector SVGImageElement', factory: makeMakeSVGImage("/images/pattern.svg") },
+    { name: 'an OffscreenCanvas',   factory: makeOffscreenCanvas },
+    { name: 'an ImageData',         factory: makeImageData },
+    { name: 'an ImageBitmap',       factory: makeImageBitmap },
+    { name: 'a Blob',               factory: makeBlob },
+];

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt (228002 => 228003)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt	2018-02-02 12:19:26 UTC (rev 228002)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt	2018-02-02 12:33:51 UTC (rev 228003)
@@ -1,18 +1,57 @@
 
-Harness Error (TIMEOUT), message = null
-
 PASS createImageBitmap from an HTMLCanvasElement, and drawImage on the created ImageBitmap 
+PASS createImageBitmap from an HTMLCanvasElement scaled down, and drawImage on the created ImageBitmap 
+PASS createImageBitmap from an HTMLCanvasElement scaled up, and drawImage on the created ImageBitmap 
+PASS createImageBitmap from an HTMLCanvasElement resized, and drawImage on the created ImageBitmap 
 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"
-TIMEOUT createImageBitmap from an HTMLVideoElement, and drawImage on the created ImageBitmap Test timed out
-NOTRUN createImageBitmap from an HTMLVideoElement with negative sw/sh, and drawImage on the created ImageBitmap 
-NOTRUN createImageBitmap from an HTMLImageElement, and drawImage on the created ImageBitmap 
-NOTRUN createImageBitmap from an HTMLImageElement with negative sw/sh, and drawImage on the created ImageBitmap 
-NOTRUN createImageBitmap from an OffscreenCanvas, and drawImage on the created ImageBitmap 
-NOTRUN createImageBitmap from an OffscreenCanvas with negative sw/sh, and drawImage on the created ImageBitmap 
-NOTRUN createImageBitmap from an ImageData, and drawImage on the created ImageBitmap 
-NOTRUN createImageBitmap from an ImageData with negative sw/sh, and drawImage on the created ImageBitmap 
-NOTRUN createImageBitmap from an ImageBitmap, and drawImage on the created ImageBitmap 
-NOTRUN createImageBitmap from an ImageBitmap with negative sw/sh, and drawImage on the created ImageBitmap 
-NOTRUN createImageBitmap from a Blob, and drawImage on the created ImageBitmap 
-NOTRUN createImageBitmap from a Blob with negative sw/sh, and drawImage on the created ImageBitmap 
+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"
+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"
+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"
+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"
+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"
+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"
+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"
+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"
+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"
+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"
+PASS createImageBitmap from a bitmap HTMLImageElement, and drawImage on the created ImageBitmap 
+PASS createImageBitmap from a bitmap HTMLImageElement scaled down, and drawImage on the created ImageBitmap 
+PASS createImageBitmap from a bitmap HTMLImageElement scaled up, and drawImage on the created ImageBitmap 
+PASS createImageBitmap from a bitmap HTMLImageElement resized, and drawImage on the created ImageBitmap 
+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"
+PASS createImageBitmap from a vector HTMLImageElement, and drawImage on the created ImageBitmap 
+PASS createImageBitmap from a vector HTMLImageElement scaled down, and drawImage on the created ImageBitmap 
+PASS createImageBitmap from a vector HTMLImageElement scaled up, and drawImage on the created ImageBitmap 
+PASS createImageBitmap from a vector HTMLImageElement resized, and drawImage on the created ImageBitmap 
+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"
+FAIL createImageBitmap from a bitmap SVGImageElement, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
+FAIL createImageBitmap from a bitmap SVGImageElement scaled down, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
+FAIL createImageBitmap from a bitmap SVGImageElement scaled up, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
+FAIL createImageBitmap from a bitmap SVGImageElement resized, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
+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"
+FAIL createImageBitmap from a vector SVGImageElement, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
+FAIL createImageBitmap from a vector SVGImageElement scaled down, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
+FAIL createImageBitmap from a vector SVGImageElement scaled up, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
+FAIL createImageBitmap from a vector SVGImageElement resized, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
+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"
+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)"')"
+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)"')"
+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)"')"
+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)"')"
+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)"')"
+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"
+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"
+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"
+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"
+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"
+PASS createImageBitmap from an ImageBitmap, and drawImage on the created ImageBitmap 
+PASS createImageBitmap from an ImageBitmap scaled down, and drawImage on the created ImageBitmap 
+PASS createImageBitmap from an ImageBitmap scaled up, and drawImage on the created ImageBitmap 
+PASS createImageBitmap from an ImageBitmap resized, and drawImage on the created ImageBitmap 
+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"
+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"
+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"
+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"
+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"
+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"
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html (228002 => 228003)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html	2018-02-02 12:19:26 UTC (rev 228002)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html	2018-02-02 12:33:51 UTC (rev 228003)
@@ -4,29 +4,34 @@
 <script src=""
 <script src=""
 <script src=""
-<script src=""
+<script src=""
+<script src=""
+<script src=""
 <link rel="stylesheet" href=""
 <body>
 <script>
-function testCanvasDisplayingPattern(canvas)
+function testCanvasDisplayingPattern(canvas, width, height)
 {
     var tolerance = 5; // for creating ImageBitmap from a video, the tolerance needs to be high
-    _assertPixelApprox(canvas, 5,5, 255,0,0,255, "5,5", "255,0,0,255", tolerance);
-    _assertPixelApprox(canvas, 15,5, 0,255,0,255, "15,5", "0,255,0,255", tolerance);
-    _assertPixelApprox(canvas, 5,15, 0,0,255,255, "5,15", "0,0,255,255", tolerance);
-    _assertPixelApprox(canvas, 15,15, 0,0,0,255, "15,15", "0,0,0,255", tolerance);
+    const check = (x, y, r, g, b, a) =>
+        _assertPixelApprox(canvas, x,y, r,g,b,a, `${x},${y}`, `${r},${g},${b},${a}`, tolerance);
+    check(1 * width / 4, 1 * height / 4, 255,0,0,255);
+    check(3 * width / 4, 1 * height / 4, 0,255,0,255);
+    check(1 * width / 4, 3 * height / 4, 0,0,255,255);
+    check(3 * width / 4, 3 * height / 4, 0,0,0,255);
 }
 
-function testDrawImageBitmap(source, args = [])
+function testDrawImageBitmap(source, args = [], { resizeWidth = 20, resizeHeight = 20 } = {})
 {
     var canvas = document.createElement("canvas");
-    canvas.width = 20;
-    canvas.height = 20;
+    canvas.width = resizeWidth;
+    canvas.height = resizeHeight;
     var ctx = canvas.getContext("2d");
-    ctx.clearRect(0, 0, canvas.width, canvas.height);
     return createImageBitmap(source, ...args).then(imageBitmap => {
+        assert_equals(imageBitmap.width, resizeWidth);
+        assert_equals(imageBitmap.height, resizeHeight);
         ctx.drawImage(imageBitmap, 0, 0);
-        testCanvasDisplayingPattern(canvas);
+        testCanvasDisplayingPattern(canvas, resizeWidth, resizeHeight);
     });
 }
 
@@ -39,6 +44,27 @@
 
     promise_test(function() {
         return factory().then(function(img) {
+            const options = { resizeWidth: 10, resizeHeight: 10 };
+            return testDrawImageBitmap(img, [options], options);
+        });
+    }, `createImageBitmap from ${name} scaled down, and drawImage on the created ImageBitmap`);
+
+    promise_test(function() {
+        return factory().then(function(img) {
+            const options = { resizeWidth: 40, resizeHeight: 40 };
+            return testDrawImageBitmap(img, [options], options);
+        });
+    }, `createImageBitmap from ${name} scaled up, and drawImage on the created ImageBitmap`);
+
+    promise_test(function() {
+        return factory().then(function(img) {
+            const options = { resizeWidth: 10, resizeHeight: 40 };
+            return testDrawImageBitmap(img, [options], options);
+        });
+    }, `createImageBitmap from ${name} resized, and drawImage on the created ImageBitmap`);
+
+    promise_test(function() {
+        return factory().then(function(img) {
             return testDrawImageBitmap(img, [20, 20, -20, -20]);
         });
     }, `createImageBitmap from ${name} with negative sw/sh, and drawImage on the created ImageBitmap`);

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt (228002 => 228003)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt	2018-02-02 12:19:26 UTC (rev 228002)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt	2018-02-02 12:33:51 UTC (rev 228003)
@@ -1,35 +1,52 @@
+CONSOLE MESSAGE: line 137: Canvas area exceeds the maximum limit (width * height > 268435456).
 
-Harness Error (TIMEOUT), message = null
-
 PASS createImageBitmap with a an HTMLCanvasElement source and sw set to 0 
 PASS createImageBitmap with a an HTMLCanvasElement source and sh set to 0 
 FAIL createImageBitmap with a an HTMLCanvasElement source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code
-TIMEOUT createImageBitmap with a an HTMLVideoElement source and sw set to 0 Test timed out
-NOTRUN createImageBitmap with a an HTMLVideoElement source and sh set to 0 
-NOTRUN createImageBitmap with a an HTMLVideoElement source and oversized (unallocatable) crop region 
-NOTRUN createImageBitmap with a an HTMLImageElement source and sw set to 0 
-NOTRUN createImageBitmap with a an HTMLImageElement source and sh set to 0 
-NOTRUN createImageBitmap with a an HTMLImageElement source and oversized (unallocatable) crop region 
-NOTRUN createImageBitmap with a an OffscreenCanvas source and sw set to 0 
-NOTRUN createImageBitmap with a an OffscreenCanvas source and sh set to 0 
-NOTRUN createImageBitmap with a an OffscreenCanvas source and oversized (unallocatable) crop region 
-NOTRUN createImageBitmap with a an ImageData source and sw set to 0 
-NOTRUN createImageBitmap with a an ImageData source and sh set to 0 
-NOTRUN createImageBitmap with a an ImageData source and oversized (unallocatable) crop region 
-NOTRUN createImageBitmap with a an ImageBitmap source and sw set to 0 
-NOTRUN createImageBitmap with a an ImageBitmap source and sh set to 0 
-NOTRUN createImageBitmap with a an ImageBitmap source and oversized (unallocatable) crop region 
-NOTRUN createImageBitmap with a a Blob source and sw set to 0 
-NOTRUN createImageBitmap with a a Blob source and sh set to 0 
-NOTRUN createImageBitmap with a a Blob source and oversized (unallocatable) crop region 
-NOTRUN createImageBitmap with undefined image source. 
-NOTRUN createImageBitmap with null image source. 
-NOTRUN createImageBitmap with empty image source. 
-NOTRUN createImageBitmap with empty video source. 
-NOTRUN createImageBitmap with an oversized canvas source. 
-NOTRUN createImageBitmap with an invalid OffscreenCanvas source. 
-NOTRUN createImageBitmap with an undecodable blob source. 
-NOTRUN createImageBitmap with a broken image source. 
-NOTRUN createImageBitmap with an available but undecodable image source. 
-NOTRUN createImageBitmap with a closed ImageBitmap. 
+PASS createImageBitmap with a an HTMLVideoElement source and sw set to 0 
+PASS createImageBitmap with a an HTMLVideoElement source and sh set to 0 
+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")
+PASS createImageBitmap with a an HTMLVideoElement from a data URL source and sw set to 0 
+PASS createImageBitmap with a an HTMLVideoElement from a data URL source and sh set to 0 
+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")
+PASS createImageBitmap with a a bitmap HTMLImageElement source and sw set to 0 
+PASS createImageBitmap with a a bitmap HTMLImageElement source and sh set to 0 
+FAIL createImageBitmap with a a bitmap HTMLImageElement source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code
+PASS createImageBitmap with a a vector HTMLImageElement source and sw set to 0 
+PASS createImageBitmap with a a vector HTMLImageElement source and sh set to 0 
+FAIL createImageBitmap with a a vector HTMLImageElement source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code
+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")
+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")
+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")
+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")
+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")
+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")
+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)"')"
+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)"')"
+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)"')"
+PASS createImageBitmap with a an ImageData source and sw set to 0 
+PASS createImageBitmap with a an ImageData source and sh set to 0 
+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")
+PASS createImageBitmap with a an ImageBitmap source and sw set to 0 
+PASS createImageBitmap with a an ImageBitmap source and sh set to 0 
+FAIL createImageBitmap with a an ImageBitmap source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code
+PASS createImageBitmap with a a Blob source and sw set to 0 
+PASS createImageBitmap with a a Blob source and sh set to 0 
+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")
+PASS createImageBitmap with undefined image source. 
+PASS createImageBitmap with null image source. 
+PASS createImageBitmap with CanvasRenderingContext2D image source. 
+PASS createImageBitmap with WebGLRenderingContext image source. 
+PASS createImageBitmap with Uint8Array image source. 
+PASS createImageBitmap with ArrayBuffer image source. 
+PASS createImageBitmap with empty image source. 
+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
+PASS createImageBitmap with an oversized canvas source. 
+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
+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
+PASS createImageBitmap with a broken image source. 
+FAIL createImageBitmap with an available but undecodable image source. assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL createImageBitmap with an available but zero height image source. assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL createImageBitmap with an available but zero width image source. assert_unreached: Should have rejected: undefined Reached unreachable code
+PASS createImageBitmap with a closed ImageBitmap. 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html (228002 => 228003)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html	2018-02-02 12:19:26 UTC (rev 228002)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html	2018-02-02 12:33:51 UTC (rev 228003)
@@ -1,7 +1,9 @@
 <!doctype html>
 <script src=""
 <script src=""
-<script src=""
+<script src=""
+<script src=""
+<script src=""
 <script>
 
 function makeOversizedCanvas() {
@@ -28,17 +30,18 @@
 }
 
 function makeBrokenImage() {
-  return new Promise(resolve => {
+  return new Promise((resolve, reject) => {
     const image = new Image();
     image.src = ""
+    image._onload_ = reject;
     image._onerror_ = () => resolve(image);
   });
 }
 
-function makeAvailableButBrokenImage() {
+function makeAvailableButBrokenImage(path) {
   return new Promise((resolve, reject) => {
     const image = new Image();
-    image.src = ""
+    image.src = ""
     image._onload_ = () => resolve(image);
     image._onerror_ = reject;
   });
@@ -99,6 +102,26 @@
 }, "createImageBitmap with null image source.");
 
 promise_test( t => {
+  var context = document.createElement("canvas").getContext("2d");
+  return promise_rejects(t, new TypeError(), createImageBitmap(context));
+}, "createImageBitmap with CanvasRenderingContext2D image source.");
+
+promise_test( t => {
+  var context = document.createElement("canvas").getContext("webgl");
+  return promise_rejects(t, new TypeError(), createImageBitmap(context));
+}, "createImageBitmap with WebGLRenderingContext image source.");
+
+promise_test( t => {
+  var buffer = new Uint8Array();
+  return promise_rejects(t, new TypeError(), createImageBitmap(buffer));
+}, "createImageBitmap with Uint8Array image source.");
+
+promise_test( t => {
+  var buffer = new ArrayBuffer(8);
+  return promise_rejects(t, new TypeError(), createImageBitmap(buffer));
+}, "createImageBitmap with ArrayBuffer image source.");
+
+promise_test( t => {
   return promise_rejects(t, "InvalidStateError",
     createImageBitmap(new Image()));
 }, "createImageBitmap with empty image source.");
@@ -137,7 +160,7 @@
 }, "createImageBitmap with a broken image source.");
 
 promise_test( t => {
-  return makeAvailableButBrokenImage().then(image => {
+  return makeAvailableButBrokenImage("/images/broken.png").then(image => {
     return promise_rejects(t, "InvalidStateError",
         createImageBitmap(image));
   });
@@ -144,6 +167,20 @@
 }, "createImageBitmap with an available but undecodable image source.");
 
 promise_test( t => {
+  return makeAvailableButBrokenImage("/images/red-zeroheight.svg").then(image => {
+    return promise_rejects(t, "InvalidStateError",
+        createImageBitmap(image));
+  });
+}, "createImageBitmap with an available but zero height image source.");
+
+promise_test( t => {
+  return makeAvailableButBrokenImage("/images/red-zerowidth.svg").then(image => {
+    return promise_rejects(t, "InvalidStateError",
+        createImageBitmap(image));
+  });
+}, "createImageBitmap with an available but zero width image source.");
+
+promise_test( t => {
   return makeImageBitmap().then(bitmap => {
     bitmap.close()
     return promise_rejects(t, "InvalidStateError", createImageBitmap(bitmap));

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt (0 => 228003)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt	2018-02-02 12:33:51 UTC (rev 228003)
@@ -0,0 +1,14 @@
+Blocked access to external URL http://www1.localhost:8800/images/red.png
+Blocked access to external URL http://www1.localhost:8800/images/red.png
+Blocked access to external URL http://www1.localhost:8800/media/movie_300.mp4
+Blocked access to external URL http://www1.localhost:8800/media/movie_300.mp4
+Blocked access to external URL http://www1.localhost:8800/images/red.png
+Blocked access to external URL http://www1.localhost:8800/images/red.png
+
+FAIL cross-origin HTMLImageElement promise_test: Unhandled rejection with value: object "[object Event]"
+FAIL cross-origin SVGImageElement promise_test: Unhandled rejection with value: object "[object Event]"
+FAIL cross-origin HTMLVideoElement promise_test: Unhandled rejection with value: object "[object Event]"
+FAIL redirected to cross-origin HTMLVideoElement promise_test: Unhandled rejection with value: object "[object Event]"
+FAIL unclean HTMLCanvasElement promise_test: Unhandled rejection with value: object "[object Event]"
+FAIL unclean ImageBitmap promise_test: Unhandled rejection with value: object "[object Event]"
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html (0 => 228003)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html	2018-02-02 12:33:51 UTC (rev 228003)
@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>createImageBitmap: origin-clean flag</title>
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<div id=log></div>
+<script>
+const crossOriginImageUrl = "http://{{domains[www1]}}:{{ports[http][0]}}/images/red.png";
+
+function assert_origin_unclean(bitmap) {
+  const context = document.createElement("canvas").getContext("2d");
+  context.drawImage(bitmap, 0, 0);
+  assert_throws("SecurityError", () => {
+    context.getImageData(0, 0, 1, 1);
+  });
+}
+
+function makeImage() {
+  return new Promise((resolve, reject) => {
+    const image = new Image();
+    image._onload_ = () => resolve(image);
+    image._onerror_ = reject;
+    image.src = ""
+  });
+}
+
+const arguments = [
+  {
+    name: "cross-origin HTMLImageElement",
+    factory: makeImage,
+  },
+
+  {
+    name: "cross-origin SVGImageElement",
+    factory: () => {
+      return new Promise((resolve, reject) => {
+        const image = document.createElementNS(NAMESPACES.svg, "image");
+        image._onload_ = () => resolve(image);
+        image._onerror_ = reject;
+        image.setAttribute("externalResourcesRequired", "true");
+        image.setAttributeNS(NAMESPACES.xlink, 'xlink:href', crossOriginImageUrl);
+        document.body.appendChild(image);
+      });
+    },
+  },
+
+  {
+    name: "cross-origin HTMLVideoElement",
+    factory: () => {
+      return new Promise((resolve, reject) => {
+        const video = document.createElement("video");
+        video._oncanplaythrough_ = () => resolve(video);
+        video._onerror_ = reject;
+        video.src = ""
+      });
+    },
+  },
+
+  {
+    name: "redirected to cross-origin HTMLVideoElement",
+    factory: () => {
+      return new Promise((resolve, reject) => {
+        const video = document.createElement("video");
+        video._oncanplaythrough_ = () => resolve(video);
+        video._onerror_ = reject;
+        video.src = "" + getVideoURI("http://{{domains[www1]}}:{{ports[http][0]}}/media/movie_300");
+      });
+    },
+  },
+
+  {
+    name: "unclean HTMLCanvasElement",
+    factory: () => {
+      return makeImage().then(image => {
+        const canvas = document.createElement("canvas");
+        const context = canvas.getContext("2d");
+        context.drawImage(image, 0, 0);
+        return canvas;
+      });
+    },
+  },
+
+  {
+    name: "unclean ImageBitmap",
+    factory: () => {
+      return makeImage().then(createImageBitmap);
+    },
+  },
+];
+
+for (let { name, factory } of arguments) {
+  promise_test(function() {
+    return factory().then(createImageBitmap).then(assert_origin_unclean);
+  }, name);
+}
+</script>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/w3c-import.log (228002 => 228003)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/w3c-import.log	2018-02-02 12:19:26 UTC (rev 228002)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/w3c-import.log	2018-02-02 12:33:51 UTC (rev 228003)
@@ -14,7 +14,8 @@
 None
 ------------------------------------------------------------------------
 List of files:
-/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.js
+/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.sub.js
 /LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html
 /LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html
+/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html
 /LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-sizeOverflow.html

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/common/namespaces.js (0 => 228003)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/common/namespaces.js	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/common/namespaces.js	2018-02-02 12:33:51 UTC (rev 228003)
@@ -0,0 +1,4 @@
+var NAMESPACES = {
+  "svg": "http://www.w3.org/2000/svg",
+  "xlink": "http://www.w3.org/1999/xlink",
+};

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/common/w3c-import.log (228002 => 228003)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/common/w3c-import.log	2018-02-02 12:19:26 UTC (rev 228002)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/common/w3c-import.log	2018-02-02 12:33:51 UTC (rev 228003)
@@ -43,6 +43,7 @@
 /LayoutTests/imported/w3c/web-platform-tests/common/large.py
 /LayoutTests/imported/w3c/web-platform-tests/common/media.js
 /LayoutTests/imported/w3c/web-platform-tests/common/media.js.headers
+/LayoutTests/imported/w3c/web-platform-tests/common/namespaces.js
 /LayoutTests/imported/w3c/web-platform-tests/common/object-association.js
 /LayoutTests/imported/w3c/web-platform-tests/common/object-association.js.headers
 /LayoutTests/imported/w3c/web-platform-tests/common/performance-timeline-utils.js

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/images/pattern.mp4 (0 => 228003)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/images/pattern.mp4	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/images/pattern.mp4	2018-02-02 12:33:51 UTC (rev 228003)
@@ -0,0 +1,4 @@
+ ftypisomisomiso2avc1mp41free\xE4mdatq\xFF\xFFm\xDCE\xE9\xBD\xE6\xD9H\xB7\x96,\xD8 \xD9#\xEE\xEFx264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=0 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00\x80ce\x88\x84\xE1\x8E(\xE0\xC0Y\xC1\xB6˸\x89rq| @)0TW\xE2y`\xFEB\xAER+\x80BpBXAK"\x90\xBF\xC2\xD5\xF8\x99~$\xB8\xC1\xA22\x97\xF9\x91\x8F\x91\x89\xDB\xE4\xB9Ys:\xD8'\xA3\x80\x9C\xECmoovlmvhd
 \xE8(
 @trak\tkhd(@$edtselst(\x8Emdia mdhd2U\xC4-hdlrvideVideoHandler9minfvmhd$dinfdrefurl \xF9stbl\x95stsd\x85avc1HH\xFF\xFF/avcCB\xC0
+\xFF\xE1gB\xC0
+\xD9	y\xE7\x84\xC8<H\x99 h˃\xCB sttsstscstsz\xDCstco0budtaZmeta!hdlrmdirappl-ilst%\xA9toodataLavf57.83.100
\ No newline at end of file

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/images/pattern.svg (0 => 228003)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/images/pattern.svg	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/images/pattern.svg	2018-02-02 12:33:51 UTC (rev 228003)
@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20">
+  <rect x="00" y="00" width="10" height="10" fill="#ff0000"/>
+  <rect x="10" y="00" width="10" height="10" fill="#00ff00"/>
+  <rect x="00" y="10" width="10" height="10" fill="#0000ff"/>
+  <rect x="10" y="10" width="10" height="10" fill="#000000"/>
+</svg>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/images/w3c-import.log (228002 => 228003)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/images/w3c-import.log	2018-02-02 12:19:26 UTC (rev 228002)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/images/w3c-import.log	2018-02-02 12:33:51 UTC (rev 228003)
@@ -38,8 +38,10 @@
 /LayoutTests/imported/w3c/web-platform-tests/images/green.svg
 /LayoutTests/imported/w3c/web-platform-tests/images/grgr-256x256.png
 /LayoutTests/imported/w3c/web-platform-tests/images/movie_300_frame_0.png
+/LayoutTests/imported/w3c/web-platform-tests/images/pattern.mp4
 /LayoutTests/imported/w3c/web-platform-tests/images/pattern.ogv
 /LayoutTests/imported/w3c/web-platform-tests/images/pattern.png
+/LayoutTests/imported/w3c/web-platform-tests/images/pattern.svg
 /LayoutTests/imported/w3c/web-platform-tests/images/red-16x16.png
 /LayoutTests/imported/w3c/web-platform-tests/images/red-zeroheight.svg
 /LayoutTests/imported/w3c/web-platform-tests/images/red-zerosize.svg

Deleted: trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt (228002 => 228003)


--- trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt	2018-02-02 12:19:26 UTC (rev 228002)
+++ trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt	2018-02-02 12:33:51 UTC (rev 228003)
@@ -1,16 +0,0 @@
-
-PASS createImageBitmap from an HTMLCanvasElement, and drawImage on the created ImageBitmap 
-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"
-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"
-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"
-PASS createImageBitmap from an HTMLImageElement, and drawImage on the created ImageBitmap 
-FAIL createImageBitmap from an 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"
-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)"')"
-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)"')"
-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"
-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"
-PASS createImageBitmap from an ImageBitmap, and drawImage on the created ImageBitmap 
-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"
-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"
-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"
-

Modified: trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt (228002 => 228003)


--- trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt	2018-02-02 12:19:26 UTC (rev 228002)
+++ trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt	2018-02-02 12:33:51 UTC (rev 228003)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 114: Canvas area exceeds the maximum limit (width * height > 268435456).
+CONSOLE MESSAGE: line 137: Canvas area exceeds the maximum limit (width * height > 268435456).
 
 PASS createImageBitmap with a an HTMLCanvasElement source and sw set to 0 
 PASS createImageBitmap with a an HTMLCanvasElement source and sh set to 0 
@@ -6,9 +6,21 @@
 PASS createImageBitmap with a an HTMLVideoElement source and sw set to 0 
 PASS createImageBitmap with a an HTMLVideoElement source and sh set to 0 
 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")
-PASS createImageBitmap with a an HTMLImageElement source and sw set to 0 
-PASS createImageBitmap with a an HTMLImageElement source and sh set to 0 
-FAIL createImageBitmap with a an HTMLImageElement source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code
+PASS createImageBitmap with a an HTMLVideoElement from a data URL source and sw set to 0 
+PASS createImageBitmap with a an HTMLVideoElement from a data URL source and sh set to 0 
+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")
+PASS createImageBitmap with a a bitmap HTMLImageElement source and sw set to 0 
+PASS createImageBitmap with a a bitmap HTMLImageElement source and sh set to 0 
+FAIL createImageBitmap with a a bitmap HTMLImageElement source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code
+PASS createImageBitmap with a a vector HTMLImageElement source and sw set to 0 
+PASS createImageBitmap with a a vector HTMLImageElement source and sh set to 0 
+FAIL createImageBitmap with a a vector HTMLImageElement source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code
+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")
+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")
+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")
+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")
+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")
+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")
 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)"')"
 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)"')"
 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)"')"
@@ -23,6 +35,10 @@
 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")
 PASS createImageBitmap with undefined image source. 
 PASS createImageBitmap with null image source. 
+PASS createImageBitmap with CanvasRenderingContext2D image source. 
+PASS createImageBitmap with WebGLRenderingContext image source. 
+PASS createImageBitmap with Uint8Array image source. 
+PASS createImageBitmap with ArrayBuffer image source. 
 PASS createImageBitmap with empty image source. 
 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
 PASS createImageBitmap with an oversized canvas source. 
@@ -30,5 +46,7 @@
 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
 PASS createImageBitmap with a broken image source. 
 FAIL createImageBitmap with an available but undecodable image source. promise_test: Unhandled rejection with value: object "[object Event]"
+FAIL createImageBitmap with an available but zero height image source. assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL createImageBitmap with an available but zero width image source. assert_unreached: Should have rejected: undefined Reached unreachable code
 PASS createImageBitmap with a closed ImageBitmap. 
 

Added: trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt (0 => 228003)


--- trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt	2018-02-02 12:33:51 UTC (rev 228003)
@@ -0,0 +1,14 @@
+Blocked access to external URL http://www1.localhost:8800/images/red.png
+Blocked access to external URL http://www1.localhost:8800/images/red.png
+Blocked access to external URL http://www1.localhost:8800/media/movie_300.ogv
+Blocked access to external URL http://www1.localhost:8800/media/movie_300.ogv
+
+Harness Error (TIMEOUT), message = null
+
+FAIL cross-origin HTMLImageElement promise_test: Unhandled rejection with value: object "[object Event]"
+FAIL cross-origin SVGImageElement promise_test: Unhandled rejection with value: object "[object Event]"
+FAIL cross-origin HTMLVideoElement promise_test: Unhandled rejection with value: object "[object Event]"
+TIMEOUT redirected to cross-origin HTMLVideoElement Test timed out
+NOTRUN unclean HTMLCanvasElement 
+NOTRUN unclean ImageBitmap 
+

Modified: trunk/LayoutTests/platform/mac/TestExpectations (228002 => 228003)


--- trunk/LayoutTests/platform/mac/TestExpectations	2018-02-02 12:19:26 UTC (rev 228002)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2018-02-02 12:33:51 UTC (rev 228003)
@@ -1791,3 +1791,4 @@
 
 webkit.org/b/181831 [ HighSierra+ ] fast/forms/searchfield-heights.html [ Pass Failure ]
 
+webkit.org/b/182422 imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html [ Crash ]

Deleted: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt (228002 => 228003)


--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt	2018-02-02 12:19:26 UTC (rev 228002)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt	2018-02-02 12:33:51 UTC (rev 228003)
@@ -1,16 +0,0 @@
-
-PASS createImageBitmap from an HTMLCanvasElement, and drawImage on the created ImageBitmap 
-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"
-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"
-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"
-PASS createImageBitmap from an HTMLImageElement, and drawImage on the created ImageBitmap 
-FAIL createImageBitmap from an 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"
-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)"')"
-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)"')"
-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"
-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"
-PASS createImageBitmap from an ImageBitmap, and drawImage on the created ImageBitmap 
-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"
-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"
-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"
-

Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt (228002 => 228003)


--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt	2018-02-02 12:19:26 UTC (rev 228002)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt	2018-02-02 12:33:51 UTC (rev 228003)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 114: Canvas area exceeds the maximum limit (width * height > 268435456).
+CONSOLE MESSAGE: line 137: Canvas area exceeds the maximum limit (width * height > 268435456).
 
 PASS createImageBitmap with a an HTMLCanvasElement source and sw set to 0 
 PASS createImageBitmap with a an HTMLCanvasElement source and sh set to 0 
@@ -6,9 +6,21 @@
 PASS createImageBitmap with a an HTMLVideoElement source and sw set to 0 
 PASS createImageBitmap with a an HTMLVideoElement source and sh set to 0 
 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")
-PASS createImageBitmap with a an HTMLImageElement source and sw set to 0 
-PASS createImageBitmap with a an HTMLImageElement source and sh set to 0 
-FAIL createImageBitmap with a an HTMLImageElement source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code
+PASS createImageBitmap with a an HTMLVideoElement from a data URL source and sw set to 0 
+PASS createImageBitmap with a an HTMLVideoElement from a data URL source and sh set to 0 
+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")
+PASS createImageBitmap with a a bitmap HTMLImageElement source and sw set to 0 
+PASS createImageBitmap with a a bitmap HTMLImageElement source and sh set to 0 
+FAIL createImageBitmap with a a bitmap HTMLImageElement source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code
+PASS createImageBitmap with a a vector HTMLImageElement source and sw set to 0 
+PASS createImageBitmap with a a vector HTMLImageElement source and sh set to 0 
+FAIL createImageBitmap with a a vector HTMLImageElement source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code
+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")
+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")
+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")
+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")
+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")
+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")
 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)"')"
 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)"')"
 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)"')"
@@ -23,6 +35,10 @@
 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")
 PASS createImageBitmap with undefined image source. 
 PASS createImageBitmap with null image source. 
+PASS createImageBitmap with CanvasRenderingContext2D image source. 
+PASS createImageBitmap with WebGLRenderingContext image source. 
+PASS createImageBitmap with Uint8Array image source. 
+PASS createImageBitmap with ArrayBuffer image source. 
 PASS createImageBitmap with empty image source. 
 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
 PASS createImageBitmap with an oversized canvas source. 
@@ -30,5 +46,7 @@
 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
 PASS createImageBitmap with a broken image source. 
 FAIL createImageBitmap with an available but undecodable image source. promise_test: Unhandled rejection with value: object "[object Event]"
+FAIL createImageBitmap with an available but zero height image source. assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL createImageBitmap with an available but zero width image source. assert_unreached: Should have rejected: undefined Reached unreachable code
 PASS createImageBitmap with a closed ImageBitmap. 
 

Added: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt (0 => 228003)


--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt	2018-02-02 12:33:51 UTC (rev 228003)
@@ -0,0 +1,14 @@
+Blocked access to external URL http://www1.localhost:8800/images/red.png
+Blocked access to external URL http://www1.localhost:8800/images/red.png
+Blocked access to external URL http://www1.localhost:8800/media/movie_300.ogv
+Blocked access to external URL http://www1.localhost:8800/media/movie_300.ogv
+
+Harness Error (TIMEOUT), message = null
+
+FAIL cross-origin HTMLImageElement promise_test: Unhandled rejection with value: object "[object Event]"
+FAIL cross-origin SVGImageElement promise_test: Unhandled rejection with value: object "[object Event]"
+FAIL cross-origin HTMLVideoElement promise_test: Unhandled rejection with value: object "[object Event]"
+TIMEOUT redirected to cross-origin HTMLVideoElement Test timed out
+NOTRUN unclean HTMLCanvasElement 
+NOTRUN unclean ImageBitmap 
+
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to