Title: [223686] trunk/LayoutTests/imported/w3c
Revision
223686
Author
[email protected]
Date
2017-10-19 03:07:26 -0700 (Thu, 19 Oct 2017)

Log Message

Import W3C Web Platform Tests for createImageBitmap
https://bugs.webkit.org/show_bug.cgi?id=178509
<rdar://problem/35070583>

Reviewed by Antoine Quint.

* resources/import-expectations.json:
* web-platform-tests/2dcontext/imagebitmap/common.js: Added.
(testCanvasDisplayingPattern):
(testDrawImageBitmap):
(initializeImageData):
* web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt: Added.
* web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html: Added.
* web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt: Added.
* web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html: Added.
* web-platform-tests/2dcontext/imagebitmap/createImageBitmap-sizeOverflow-expected.txt: Added.
* web-platform-tests/2dcontext/imagebitmap/createImageBitmap-sizeOverflow.html: Added.
* web-platform-tests/2dcontext/imagebitmap/w3c-import.log: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (223685 => 223686)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2017-10-19 10:05:21 UTC (rev 223685)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2017-10-19 10:07:26 UTC (rev 223686)
@@ -1,3 +1,24 @@
+2017-10-19  Dean Jackson  <[email protected]>
+
+        Import W3C Web Platform Tests for createImageBitmap
+        https://bugs.webkit.org/show_bug.cgi?id=178509
+        <rdar://problem/35070583>
+
+        Reviewed by Antoine Quint.
+
+        * resources/import-expectations.json:
+        * web-platform-tests/2dcontext/imagebitmap/common.js: Added.
+        (testCanvasDisplayingPattern):
+        (testDrawImageBitmap):
+        (initializeImageData):
+        * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt: Added.
+        * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html: Added.
+        * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt: Added.
+        * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html: Added.
+        * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-sizeOverflow-expected.txt: Added.
+        * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-sizeOverflow.html: Added.
+        * web-platform-tests/2dcontext/imagebitmap/w3c-import.log: Added.
+
 2017-10-18  Chris Dumez  <[email protected]>
 
         Align ImageData constructor with the specification

Modified: trunk/LayoutTests/imported/w3c/resources/import-expectations.json (223685 => 223686)


--- trunk/LayoutTests/imported/w3c/resources/import-expectations.json	2017-10-19 10:05:21 UTC (rev 223685)
+++ trunk/LayoutTests/imported/w3c/resources/import-expectations.json	2017-10-19 10:07:26 UTC (rev 223686)
@@ -1,6 +1,7 @@
 {
     "css/geometry-1": "import", 
     "web-platform-tests/2dcontext": "skip", 
+    "web-platform-tests/2dcontext/imagebitmap": "import", 
     "web-platform-tests/2dcontext/transformations/canvas_transformations_reset_001-ref.html": "import", 
     "web-platform-tests/2dcontext/transformations/canvas_transformations_reset_001.html": "import", 
     "web-platform-tests/DOM-parsing": "skip", 

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.js (0 => 223686)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.js	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.js	2017-10-19 10:07:26 UTC (rev 223686)
@@ -0,0 +1,58 @@
+function testCanvasDisplayingPattern(canvas)
+{
+    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);
+}
+
+function testDrawImageBitmap(source)
+{
+    var canvas = document.createElement("canvas");
+    canvas.width = 20;
+    canvas.height = 20;
+    var ctx = canvas.getContext("2d");
+    ctx.clearRect(0, 0, canvas.width, canvas.height);
+    return createImageBitmap(source).then(imageBitmap => {
+        ctx.drawImage(imageBitmap, 0, 0);
+        testCanvasDisplayingPattern(canvas);
+    });
+}
+
+function initializeTestCanvas(testCanvas)
+{
+    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);
+}
+
+function initializeImageData(imgData, 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;
+}
Property changes on: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.js
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Date Revision \ No newline at end of property

Added: svn:mime-type

+text/plain \ No newline at end of property

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


--- trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt	2017-10-19 10:07:26 UTC (rev 223686)
@@ -0,0 +1,10 @@
+
+Harness Error (TIMEOUT), message = null
+
+FAIL createImageBitmap from a HTMLImageElement, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap"
+FAIL createImageBitmap from a Blob, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap"
+FAIL createImageBitmap from a HTMLCanvasElement, and drawImage on the created ImageBitmap Can't find variable: createImageBitmap
+FAIL createImageBitmap from an ImageBitmap, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap"
+FAIL createImageBitmap from an ImageData, and drawImage on the created ImageBitmap Can't find variable: createImageBitmap
+TIMEOUT createImageBitmap from a HTMLVideoElement, and drawImage on the created ImageBitmap Test timed out
+
Property changes on: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Date Revision \ No newline at end of property

Added: svn:mime-type

+text/plain \ No newline at end of property

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


--- trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html	2017-10-19 10:07:26 UTC (rev 223686)
@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+<html>
+<title>createImageBitmap + drawImage test</title>
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<link rel="stylesheet" href=""
+<body>
+<script>
+(function() {
+    promise_test(function() {
+        return new Promise(function(resolve, reject) {
+            var img = new Image();
+            img._onload_ = function() { resolve(img); };
+            img.src = ""
+        }).then(function(img) {
+            return testDrawImageBitmap(img);
+        });
+    }, "createImageBitmap from a HTMLImageElement, and drawImage on the created ImageBitmap");
+
+    promise_test(function() {
+        return new Promise(function(resolve, reject) {
+            var xhr = new XMLHttpRequest();
+            xhr.open("GET", '/images/pattern.png');
+            xhr.responseType = 'blob';
+            xhr.send();
+            xhr._onload_ = function() {
+                blob = xhr.response;
+                resolve(blob);
+            };
+        }).then(function(blob) {
+            return testDrawImageBitmap(blob);
+        });
+    }, "createImageBitmap from a Blob, and drawImage on the created ImageBitmap");
+
+    promise_test(function() {
+        var testCanvas = document.createElement("canvas");
+        initializeTestCanvas(testCanvas);
+        return testDrawImageBitmap(testCanvas);
+    }, "createImageBitmap from a HTMLCanvasElement, and drawImage on the created ImageBitmap");
+
+    promise_test(function() {
+        var testCanvas = document.createElement("canvas");
+        initializeTestCanvas(testCanvas);
+        return new Promise(function(resolve, reject) {
+            createImageBitmap(testCanvas).then(function(bitmap) {
+                resolve(bitmap);
+            });
+        }).then(function(bitmap) {
+            return testDrawImageBitmap(bitmap);
+        });
+    }, "createImageBitmap from an ImageBitmap, and drawImage on the created ImageBitmap");
+
+    promise_test(function() {
+        var imgData = new ImageData(20, 20);
+        initializeImageData(imgData, 20, 20);
+        return testDrawImageBitmap(imgData);
+    }, "createImageBitmap from an ImageData, and drawImage on the created ImageBitmap");
+
+    promise_test(function() {
+        return new Promise(function(resolve, reject) {
+            var video = document.createElement("video");
+            video._oncanplaythrough_ = function() {
+                resolve(video);
+            };
+            video.src = ""
+        }).then(function(video) {
+            return testDrawImageBitmap(video);
+        });
+    }, "createImageBitmap from a HTMLVideoElement, and drawImage on the created ImageBitmap");
+})();
+</script>
+</body>
+</html>
Property changes on: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Date Revision \ No newline at end of property

Added: svn:mime-type

+text/html \ No newline at end of property

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt (0 => 223686)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt	2017-10-19 10:07:26 UTC (rev 223686)
@@ -0,0 +1,32 @@
+
+Harness Error (TIMEOUT), message = null
+
+FAIL createImageBitmap with a HTMLImageElement source and sw set to 0 rejects with a RangeError. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap"
+FAIL createImageBitmap with a HTMLImageElement source and sh set to 0 rejects with a RangeError. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap"
+FAIL createImageBitmap with a HTMLImageElement source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap"
+TIMEOUT createImageBitmap with a HTMLVideoElement source and sw set to 0 rejects with a RangeError. Test timed out
+NOTRUN createImageBitmap with a HTMLVideoElement source and sh set to 0 rejects with a RangeError. 
+NOTRUN createImageBitmap with a HTMLVideoElement source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. 
+NOTRUN createImageBitmap with a HTMLCanvasElement source and sw set to 0 rejects with a RangeError. 
+NOTRUN createImageBitmap with a HTMLCanvasElement source and sh set to 0 rejects with a RangeError. 
+NOTRUN createImageBitmap with a HTMLCanvasElement source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. 
+NOTRUN createImageBitmap with a OffscreenCanvas source and sw set to 0 rejects with a RangeError. 
+NOTRUN createImageBitmap with a OffscreenCanvas source and sh set to 0 rejects with a RangeError. 
+NOTRUN createImageBitmap with a OffscreenCanvas source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. 
+NOTRUN createImageBitmap with a ImageData source and sw set to 0 rejects with a RangeError. 
+NOTRUN createImageBitmap with a ImageData source and sh set to 0 rejects with a RangeError. 
+NOTRUN createImageBitmap with a ImageData source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. 
+NOTRUN createImageBitmap with a ImageBitmap source and sw set to 0 rejects with a RangeError. 
+NOTRUN createImageBitmap with a ImageBitmap source and sh set to 0 rejects with a RangeError. 
+NOTRUN createImageBitmap with a ImageBitmap source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. 
+NOTRUN createImageBitmap with a Blob source and sw set to 0 rejects with a RangeError. 
+NOTRUN createImageBitmap with a Blob source and sh set to 0 rejects with a RangeError. 
+NOTRUN createImageBitmap with a Blob source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. 
+NOTRUN createImageBitmap with undefined image source rejects with a TypeError. 
+NOTRUN createImageBitmap with null image source rejects with a TypeError. 
+NOTRUN createImageBitmap with empty image source rejects with a InvalidStateError. 
+NOTRUN createImageBitmap with empty video source rejects with a InvalidStateError. 
+NOTRUN createImageBitmap with an oversized canvas source rejects with a RangeError. 
+NOTRUN createImageBitmap with an invalid OffscreenCanvas source rejects with a RangeError. 
+NOTRUN createImageBitmap with an undecodable blob source rejects with an InvalidStateError. 
+
Property changes on: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Date Revision \ No newline at end of property

Added: svn:mime-type

+text/plain \ No newline at end of property

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html (0 => 223686)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html	2017-10-19 10:07:26 UTC (rev 223686)
@@ -0,0 +1,187 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+<script src=""
+</head>
+<body>
+<script>
+
+function makeCanvas() {
+  return new Promise(resolve => {
+    let canvas = document.createElement('canvas');
+    canvas.setAttribute('width', '10');
+    canvas.setAttribute('height', '10');
+    resolve(canvas);
+  });
+}
+
+function makeOffscreenCanvas() {
+  return new Promise(resolve => {
+    let canvas = new OffscreenCanvas(10, 10);
+    resolve(canvas);
+  });
+}
+
+function makeOversizedCanvas() {
+
+  return new Promise(resolve => {
+    let canvas = document.createElement('canvas');
+    canvas.setAttribute('width', '100000000');
+    canvas.setAttribute('height', '100000000');
+    resolve(canvas);
+  });
+}
+
+function makeOversizedOffscreenCanvas() {
+  return new Promise(resolve =>{
+    let canvas = new OffscreenCanvas(100000000, 100000000);
+    resolve(canvas);
+  });
+}
+
+function makeVideo() {
+  return new Promise(resolve => {
+    let video = document.createElement('video');
+    video.addEventListener('canplaythrough', resolve.bind(undefined, video), false);
+    video.src = '';
+  });
+}
+
+function makeImage() {
+  return makeCanvas().then(canvas => {
+    let image = new Image();
+    image.src = ""
+    return new Promise(resolve => {
+      image._onload_ = resolve.bind(undefined, image);
+    });
+  });
+}
+
+function makeImageData() {
+  return makeCanvas().then(canvas => {
+    return new Promise(function(resolve, reject) {
+      resolve(canvas.getContext('2d').getImageData(0, 0, 10, 10));
+    });
+  });
+}
+
+function makeImageBitmap() {
+  return makeCanvas().then(canvas => {
+    return createImageBitmap(canvas);
+  });
+}
+
+function makeBlob() {
+  return makeCanvas().then(canvas => {
+    return new Promise(resolve => {
+      canvas.toBlob(resolve);
+    });
+  });
+}
+
+function makeInvalidBlob() {
+  return new Promise(resolve => {
+    resolve(new Blob()); // Blob with no data cannot be decoded.
+  });
+}
+
+imageSourceTypes = [
+  { name: 'HTMLImageElement',  factory: makeImage },
+  { name: 'HTMLVideoElement',  factory: makeVideo },
+  { name: 'HTMLCanvasElement', factory: makeCanvas },
+  { name: 'OffscreenCanvas',   factory: makeOffscreenCanvas },
+  { name: 'ImageData',         factory: makeImageData },
+  { name: 'ImageBitmap',       factory: makeImageBitmap },
+  { name: 'Blob',              factory: makeBlob },
+];
+
+testCases = [
+  {
+    description: 'createImageBitmap with a <sourceType> source and sw set to ' +
+        '0 rejects with a RangeError.',
+    promiseTestFunction:
+      (source, t) => {
+        return promise_rejects(t, new RangeError(),
+            createImageBitmap(source, 0, 0, 0, 10));
+      }
+  },
+  {
+    description: 'createImageBitmap with a <sourceType> source and sh set to ' +
+        '0 rejects with a RangeError.',
+    promiseTestFunction:
+      (source, t) => {
+        return promise_rejects(t, new RangeError(),
+            createImageBitmap(source, 0, 0, 10, 0));
+      }
+  },
+  {
+    // This case is not explicitly documented in the specification for
+    // createImageBitmap, but it is expected that internal failures cause
+    //
+    description: 'createImageBitmap with a <sourceType> source and oversized ' +
+        '(unallocatable) crop region rejects with an InvalidStateError ' +
+        'DOMException.',
+    promiseTestFunction:
+      (source, t) => {
+        return promise_rejects(t, new DOMException('', 'InvalidStateError'),
+            createImageBitmap(source, 0, 0, 100000000, 100000000));
+      }
+  },
+];
+
+// Generate the test matrix for each sourceType + testCase combo.
+imageSourceTypes.forEach(imageSourceType => {
+  testCases.forEach(testCase => {
+    let description = testCase.description.replace('<sourceType>',
+        imageSourceType.name);
+    promise_test( t => {
+      return imageSourceType.factory().then(source => {
+        return testCase.promiseTestFunction(source, t);
+      });
+    }, description);
+  });
+});
+
+promise_test( t => {
+  return promise_rejects(t, new TypeError(), createImageBitmap(undefined));
+}, "createImageBitmap with undefined image source rejects with a TypeError.");
+
+promise_test( t => {
+  return promise_rejects(t, new TypeError(), createImageBitmap(null));
+}, "createImageBitmap with null image source rejects with a TypeError.");
+
+promise_test( t => {
+  return promise_rejects(t, new DOMException('', 'InvalidStateError'),
+    createImageBitmap(new Image()));
+}, "createImageBitmap with empty image source rejects with a InvalidStateError.");
+
+promise_test( t => {
+  return promise_rejects(t, new DOMException('', 'InvalidStateError'),
+    createImageBitmap(document.createElement('video')));
+}, "createImageBitmap with empty video source rejects with a InvalidStateError.");
+
+promise_test( t => {
+  return makeOversizedCanvas().then(canvas => {
+    return promise_rejects(t, new DOMException('', 'InvalidStateError'),
+        createImageBitmap(canvas));
+  });
+}, "createImageBitmap with an oversized canvas source rejects with a RangeError.");
+
+promise_test( t => {
+  return makeOversizedOffscreenCanvas().then(offscreenCanvas => {
+    return promise_rejects(t, new DOMException('', 'InvalidStateError'),
+        createImageBitmap(offscreenCanvas));
+  });
+}, "createImageBitmap with an invalid OffscreenCanvas source rejects with a RangeError.");
+
+promise_test( t => {
+  return makeInvalidBlob().then(blob => {
+    return promise_rejects(t, new DOMException('', 'InvalidStateError'),
+        createImageBitmap(blob));
+  });
+}, "createImageBitmap with an undecodable blob source rejects with an InvalidStateError.");
+
+</script>
+</body>
+</html>
Property changes on: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Date Revision \ No newline at end of property

Added: svn:mime-type

+text/html \ No newline at end of property

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


--- trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-sizeOverflow-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-sizeOverflow-expected.txt	2017-10-19 10:07:26 UTC (rev 223686)
@@ -0,0 +1,7 @@
+
+FAIL createImageBitmap does not crash or reject the promise when passing very large sx promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap"
+FAIL createImageBitmap does not crash or reject the promise when passing very large sy promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap"
+FAIL createImageBitmap does not crash or reject the promise when passing very large sw promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap"
+FAIL createImageBitmap does not crash or reject the promise when passing very large sh promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap"
+FAIL createImageBitmap does not crash or reject the promise when passing very large sx, sy, sw and sh promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap"
+
Property changes on: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-sizeOverflow-expected.txt
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Date Revision \ No newline at end of property

Added: svn:mime-type

+text/plain \ No newline at end of property

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


--- trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-sizeOverflow.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-sizeOverflow.html	2017-10-19 10:07:26 UTC (rev 223686)
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+<title>createImageBitmap with size overflow</title>
+<script src=""
+<script src=""
+<body>
+<script>
+promise_test(function() {
+    var imgData = new ImageData(20, 20);
+    return new Promise(function(resolve, reject) {
+        createImageBitmap(imgData, 4294967400, 10, 10, 10).then(resolve, reject);
+    });
+}, "createImageBitmap does not crash or reject the promise when passing very large sx");
+
+promise_test(function() {
+    var imgData = new ImageData(20, 20);
+    return new Promise(function(resolve, reject) {
+        createImageBitmap(imgData, 10, 4294967400, 10, 10).then(resolve, reject);
+    });
+}, "createImageBitmap does not crash or reject the promise when passing very large sy");
+
+promise_test(function() {
+    var imgData = new ImageData(20, 20);
+    return new Promise(function(resolve, reject) {
+        createImageBitmap(imgData, 10, 10, 4294967400, 10).then(resolve, reject);
+    });
+}, "createImageBitmap does not crash or reject the promise when passing very large sw");
+
+promise_test(function() {
+    var imgData = new ImageData(20, 20);
+    return new Promise(function(resolve, reject) {
+        createImageBitmap(imgData, 10, 10, 10, 4294967400).then(resolve, reject);
+    });
+}, "createImageBitmap does not crash or reject the promise when passing very large sh");
+
+promise_test(function() {
+    var imgData = new ImageData(20, 20);
+    return new Promise(function(resolve, reject) {
+        createImageBitmap(imgData, 4294967400, 4294967400, 4294967400, 4294967400).then(resolve, reject);
+    });
+}, "createImageBitmap does not crash or reject the promise when passing very large sx, sy, sw and sh");
+</script>
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-sizeOverflow.html
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Date Revision \ No newline at end of property

Added: svn:mime-type

+text/html \ No newline at end of property

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/w3c-import.log (0 => 223686)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/w3c-import.log	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/w3c-import.log	2017-10-19 10:07:26 UTC (rev 223686)
@@ -0,0 +1,20 @@
+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the WPT github:
+	https://github.com/w3c/web-platform-tests
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.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-sizeOverflow.html
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to