OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../js/resources/js-test-pre.js"></script> | 4 <script src="../js/resources/js-test-pre.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 | 8 |
9 description("Ensure correct behavior of drawImage with ImageBitmaps from video e
lements."); | 9 description("Ensure correct behavior of drawImage with ImageBitmaps from video e
lements."); |
10 window.jsTestIsAsync = true; | 10 window.jsTestIsAsync = true; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 var p1 = createImageBitmap(video).then(function (image) { imageBitmaps.noCro
p = image }); | 60 var p1 = createImageBitmap(video).then(function (image) { imageBitmaps.noCro
p = image }); |
61 var p2 = createImageBitmap(video, 0, 0, 100, 100).then(function (image) { i
mageBitmaps.crop = image }); | 61 var p2 = createImageBitmap(video, 0, 0, 100, 100).then(function (image) { i
mageBitmaps.crop = image }); |
62 var p3 = createImageBitmap(video, 50, 50, 100, 100).then(function (image) {
imageBitmaps.cropRight = image }); | 62 var p3 = createImageBitmap(video, 50, 50, 100, 100).then(function (image) {
imageBitmaps.cropRight = image }); |
63 var p4 = createImageBitmap(video, 100, 100, 100, 100).then(function (image)
{ imageBitmaps.cropCenter = image }); | 63 var p4 = createImageBitmap(video, 100, 100, 100, 100).then(function (image)
{ imageBitmaps.cropCenter = image }); |
64 var p5 = createImageBitmap(video, -100, -100, 600, 600).then(function (image
) { imageBitmaps.overCrop = image }); | 64 var p5 = createImageBitmap(video, -100, -100, 600, 600).then(function (image
) { imageBitmaps.overCrop = image }); |
65 var p6 = createImageBitmap(video, 100, 100, 500, 500).then(function (image)
{ imageBitmaps.overCropRight = image }); | 65 var p6 = createImageBitmap(video, 100, 100, 500, 500).then(function (image)
{ imageBitmaps.overCropRight = image }); |
66 var p7 = createImageBitmap(video, 100, 100, -100, -100).then(function (image
) { imageBitmaps.negativeCrop = image }); | 66 var p7 = createImageBitmap(video, 100, 100, -100, -100).then(function (image
) { imageBitmaps.negativeCrop = image }); |
67 var p8 = createImageBitmap(video, -300, -300, 300, 300).then(function (image
) { imageBitmaps.empty = image }); | 67 var p8 = createImageBitmap(video, -300, -300, 300, 300).then(function (image
) { imageBitmaps.empty = image }); |
68 var p9 = createImageBitmap(video, 400, 300, 300, 300).then(function (image)
{ imageBitmaps.emptyTwo = image }); | 68 var p9 = createImageBitmap(video, 400, 300, 300, 300).then(function (image)
{ imageBitmaps.emptyTwo = image }); |
69 | 69 |
70 Promise.every(p1, p2, p3, p4, p5, p6, p7, p8, p9).then(function() { | 70 Promise.all([p1, p2, p3, p4, p5, p6, p7, p8, p9]).then(function() { |
71 checkNoCrop(imageBitmaps.noCrop); | 71 checkNoCrop(imageBitmaps.noCrop); |
72 checkCrop(imageBitmaps.crop); | 72 checkCrop(imageBitmaps.crop); |
73 checkCrop(imageBitmaps.cropRight); | 73 checkCrop(imageBitmaps.cropRight); |
74 checkCrop(imageBitmaps.cropCenter); | 74 checkCrop(imageBitmaps.cropCenter); |
75 checkOverCrop(imageBitmaps.overCrop); | 75 checkOverCrop(imageBitmaps.overCrop); |
76 checkOverCropRight(imageBitmaps.overCropRight); | 76 checkOverCropRight(imageBitmaps.overCropRight); |
77 checkCrop(imageBitmaps.negativeCrop); | 77 checkCrop(imageBitmaps.negativeCrop); |
78 checkEmpty(imageBitmaps.empty); | 78 checkEmpty(imageBitmaps.empty); |
79 checkEmpty(imageBitmaps.emptyTwo); | 79 checkEmpty(imageBitmaps.emptyTwo); |
80 finishJSTest(); | 80 finishJSTest(); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 shouldBeClear(10, 10); | 204 shouldBeClear(10, 10); |
205 shouldBeClear(90, 90); | 205 shouldBeClear(90, 90); |
206 shouldBeClear(110, 110); | 206 shouldBeClear(110, 110); |
207 shouldBeClear(210, 210); | 207 shouldBeClear(210, 210); |
208 } | 208 } |
209 | 209 |
210 </script> | 210 </script> |
211 <script src="../js/resources/js-test-post.js"></script> | 211 <script src="../js/resources/js-test-post.js"></script> |
212 </body> | 212 </body> |
213 </html> | 213 </html> |
OLD | NEW |