diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /dom/canvas/test/imagebitmap_extensions.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/canvas/test/imagebitmap_extensions.html')
-rw-r--r-- | dom/canvas/test/imagebitmap_extensions.html | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/dom/canvas/test/imagebitmap_extensions.html b/dom/canvas/test/imagebitmap_extensions.html new file mode 100644 index 000000000..d66fe9ad1 --- /dev/null +++ b/dom/canvas/test/imagebitmap_extensions.html @@ -0,0 +1,49 @@ +<!DOCTYPE HTML> +<head> + <title>Test ImageBitmap Extensions (Bug 1141979)</title> + <meta charset="utf-8"> + <script src="/tests/SimpleTest/SimpleTest.js"></script> + <link rel="stylesheet" href="/tests/SimpleTest/test.css"> +</head> +<body> +<script src="imagebitmap_extensions_prepareSources.js"></script> +<script src="imagebitmap_extensions_data.js"></script> +<script src="imagebitmap_extensions.js"></script> +<script type="text/javascript"> + +runTests(); + +function ok(expect, msg) { + window.parent.postMessage({"type": "status", status: !!expect, msg: msg}, "*"); +} + +function runTests() { + + prepareSources(). + then( function() { return Promise.all([testAccessing_randomTest("Video", gVideo, 20), // video might use slightly different frames + testAccessing_randomTest("Image", gImage, 0), + testAccessing_randomTest("Canvas", gCanvas, 0), + testAccessing_randomTest("Ctx", gCtx, 0), + testAccessing_randomTest("ImageData", gImageData, 0), + testAccessing_randomTest("ImageBitmap", gImageBitmap, 0), + testAccessing_randomTest("PNG", gPNGBlob, 0), + testAccessing_randomTest("JPEG", gJPEGBlob, 10) // JPEG loses information + ]); }). + then( function() { return Promise.all([testCreateFromArrayBffer_randomTest("Video", gVideo, 20), // video might use slightly different frames + testCreateFromArrayBffer_randomTest("Image", gImage, 0), + testCreateFromArrayBffer_randomTest("Canvas", gCanvas, 0), + testCreateFromArrayBffer_randomTest("Ctx", gCtx, 0), + testCreateFromArrayBffer_randomTest("ImageData", gImageData, 0), + testCreateFromArrayBffer_randomTest("ImageBitmap", gImageBitmap, 0), + testCreateFromArrayBffer_randomTest("PNG", gPNGBlob, 0), + testCreateFromArrayBffer_randomTest("JPEG", gJPEGBlob, 10) // JPEG loses information + ]); }). + then(testDraw()). + then(testExceptions). + then(testColorConversions()). + then(function() { return testInvalidAccess([gVideo, gImage, gCanvas, gCtx, gImageData, gImageBitmap, gPNGBlob, gJPEGBlob]); } ). + then(function() {window.parent.postMessage({"type": "finish"}, "*");}, function(ev) { failed(ev); window.parent.postMessage({"type": "finish"}, "*"); }); +} + +</script> +</body> |