| 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="../../resources/js-test.js"></script> |    4 <script src="../../resources/js-test.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 along with f
     lipY option."); |    9 description("Ensure correct behavior of drawImage with ImageBitmaps along with f
     lipY option."); | 
|   10 window.jsTestIsAsync = true; |   10 window.jsTestIsAsync = true; | 
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  242         shouldBeRed(9, 9); |  242         shouldBeRed(9, 9); | 
|  243         shouldBeGreen(11, 9); |  243         shouldBeGreen(11, 9); | 
|  244         shouldBeBlue(9, 11); |  244         shouldBeBlue(9, 11); | 
|  245         shouldBeBlack(11, 11); |  245         shouldBeBlack(11, 11); | 
|  246         shouldBeBlack(19, 19); |  246         shouldBeBlack(19, 19); | 
|  247         shouldBeClear(1, 21); |  247         shouldBeClear(1, 21); | 
|  248         shouldBeClear(21, 1); |  248         shouldBeClear(21, 1); | 
|  249         shouldBeClear(21, 21); |  249         shouldBeClear(21, 21); | 
|  250     } |  250     } | 
|  251  |  251  | 
|  252     /*commenting out these cases because of crbug.com/578889 |  | 
|  253     clearContext(ctx); |  252     clearContext(ctx); | 
|  254     ctx.drawImage(imageBitmap, 0, 0, 10, 10); |  253     ctx.drawImage(imageBitmap, 0, 0, 10, 10); | 
|  255     if (option == "flipY" || option == "bottomLeft") { |  254     if (option == "flipY" || option == "bottomLeft") { | 
|  256         shouldBeBlue(4, 4); |  255         shouldBeBlue(4, 4); | 
|  257         shouldBeBlack(6, 4); |  256         shouldBeBlack(6, 4); | 
|  258         shouldBeRed(4, 6); |  257         shouldBeRed(4, 6); | 
|  259         shouldBeGreen(6, 6); |  258         shouldBeGreen(6, 6); | 
|  260         shouldBeGreen(9, 9); |  259         shouldBeGreen(9, 9); | 
|  261         shouldBeClear(1, 11); |  260         shouldBeClear(1, 11); | 
|  262         shouldBeClear(11, 1); |  261         shouldBeClear(11, 1); | 
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  303         shouldBeClear(1, 21); |  302         shouldBeClear(1, 21); | 
|  304         shouldBeClear(21, 1); |  303         shouldBeClear(21, 1); | 
|  305         shouldBeClear(21, 21); |  304         shouldBeClear(21, 21); | 
|  306     } else { |  305     } else { | 
|  307         shouldBeClear(9, 9); |  306         shouldBeClear(9, 9); | 
|  308         shouldBeBlack(11, 11); |  307         shouldBeBlack(11, 11); | 
|  309         shouldBeBlack(19, 19); |  308         shouldBeBlack(19, 19); | 
|  310         shouldBeClear(1, 21); |  309         shouldBeClear(1, 21); | 
|  311         shouldBeClear(21, 1); |  310         shouldBeClear(21, 1); | 
|  312         shouldBeClear(21, 21); |  311         shouldBeClear(21, 21); | 
|  313     }*/ |  312     } | 
|  314 } |  313 } | 
|  315  |  314  | 
|  316 function checkCrop(imageBitmap, option) { |  315 function checkCrop(imageBitmap, option) { | 
|  317     debug("Check crop."); |  316     debug("Check crop."); | 
|  318     bitmap = imageBitmap; |  317     bitmap = imageBitmap; | 
|  319     shouldBeType("bitmap", "ImageBitmap"); |  318     shouldBeType("bitmap", "ImageBitmap"); | 
|  320     shouldBe("bitmap.width", "10"); |  319     shouldBe("bitmap.width", "10"); | 
|  321     shouldBe("bitmap.height", "10"); |  320     shouldBe("bitmap.height", "10"); | 
|  322  |  321  | 
|  323     clearContext(ctx); |  322     clearContext(ctx); | 
|  324     ctx.drawImage(imageBitmap, 0, 0); |  323     ctx.drawImage(imageBitmap, 0, 0); | 
|  325     if (option == "flipY" || option == "bottomLeft") { |  324     if (option == "flipY" || option == "bottomLeft") { | 
|  326         shouldBeRed(1, 1); |  325         shouldBeRed(1, 1); | 
|  327         shouldBeRed(9, 9); |  326         shouldBeRed(9, 9); | 
|  328         shouldBeClear(12, 12); |  327         shouldBeClear(12, 12); | 
|  329         shouldBeClear(1, 12); |  328         shouldBeClear(1, 12); | 
|  330         shouldBeClear(12, 1); |  329         shouldBeClear(12, 1); | 
|  331     } else { |  330     } else { | 
|  332         shouldBeRed(1, 1); |  331         shouldBeRed(1, 1); | 
|  333         shouldBeRed(9, 9); |  332         shouldBeRed(9, 9); | 
|  334         shouldBeClear(12, 12); |  333         shouldBeClear(12, 12); | 
|  335         shouldBeClear(1, 12); |  334         shouldBeClear(1, 12); | 
|  336         shouldBeClear(12, 1); |  335         shouldBeClear(12, 1); | 
|  337     } |  336     } | 
|  338  |  337  | 
|  339     /*commenting out these cases because of crbug.com/578889 |  | 
|  340     clearContext(ctx); |  338     clearContext(ctx); | 
|  341     ctx.drawImage(imageBitmap, 0, 0, 20, 20); |  339     ctx.drawImage(imageBitmap, 0, 0, 20, 20); | 
|  342     if (option == "flipY" || option == "bottomLeft") { |  340     if (option == "flipY" || option == "bottomLeft") { | 
|  343         shouldBeRed(1, 1); |  341         shouldBeRed(1, 1); | 
|  344         shouldBeRed(18, 18); |  342         shouldBeRed(18, 18); | 
|  345         shouldBeClear(22, 22); |  343         shouldBeClear(22, 22); | 
|  346         shouldBeClear(1, 22); |  344         shouldBeClear(1, 22); | 
|  347         shouldBeClear(22, 1); |  345         shouldBeClear(22, 1); | 
|  348     } else { |  346     } else { | 
|  349         shouldBeRed(1, 1); |  347         shouldBeRed(1, 1); | 
|  350         shouldBeRed(18, 18); |  348         shouldBeRed(18, 18); | 
|  351         shouldBeClear(22, 22); |  349         shouldBeClear(22, 22); | 
|  352         shouldBeClear(1, 22); |  350         shouldBeClear(1, 22); | 
|  353         shouldBeClear(22, 1); |  351         shouldBeClear(22, 1); | 
|  354     }*/ |  352     } | 
|  355 } |  353 } | 
|  356  |  354  | 
|  357 function checkCropCenter(imageBitmap, option) { |  355 function checkCropCenter(imageBitmap, option) { | 
|  358     debug("Check crop center."); |  356     debug("Check crop center."); | 
|  359     bitmap = imageBitmap; |  357     bitmap = imageBitmap; | 
|  360     shouldBeType("bitmap", "ImageBitmap"); |  358     shouldBeType("bitmap", "ImageBitmap"); | 
|  361     shouldBe("bitmap.width", "10"); |  359     shouldBe("bitmap.width", "10"); | 
|  362     shouldBe("bitmap.height", "10"); |  360     shouldBe("bitmap.height", "10"); | 
|  363  |  361  | 
|  364     clearContext(ctx); |  362     clearContext(ctx); | 
| (...skipping 11 matching lines...) Expand all  Loading... | 
|  376         shouldBeRed(4, 4); |  374         shouldBeRed(4, 4); | 
|  377         shouldBeGreen(6, 4); |  375         shouldBeGreen(6, 4); | 
|  378         shouldBeBlue(4, 6); |  376         shouldBeBlue(4, 6); | 
|  379         shouldBeBlack(6, 6); |  377         shouldBeBlack(6, 6); | 
|  380         shouldBeBlack(9, 9); |  378         shouldBeBlack(9, 9); | 
|  381         shouldBeClear(11, 11); |  379         shouldBeClear(11, 11); | 
|  382         shouldBeClear(1, 11); |  380         shouldBeClear(1, 11); | 
|  383         shouldBeClear(11, 1); |  381         shouldBeClear(11, 1); | 
|  384     } |  382     } | 
|  385  |  383  | 
|  386     /*commenting out these cases because of crbug.com/578889 |  | 
|  387     clearContext(ctx); |  384     clearContext(ctx); | 
|  388     ctx.drawImage(imageBitmap, 0, 0, 20, 20); |  385     ctx.drawImage(imageBitmap, 0, 0, 20, 20); | 
|  389     if (option == "flipY" || option == "bottomLeft") { |  386     if (option == "flipY" || option == "bottomLeft") { | 
|  390         shouldBeBlue(8, 8); |  387         shouldBeBlue(8, 8); | 
|  391         shouldBeBlack(11, 8); |  388         shouldBeBlack(11, 8); | 
|  392         shouldBeRed(8, 11); |  389         shouldBeRed(8, 11); | 
|  393         shouldBeGreen(11, 11); |  390         shouldBeGreen(11, 11); | 
|  394         shouldBeGreen(18, 18); |  391         shouldBeGreen(18, 18); | 
|  395         shouldBeClear(22, 22); |  392         shouldBeClear(22, 22); | 
|  396         shouldBeClear(1, 21); |  393         shouldBeClear(1, 21); | 
|  397         shouldBeClear(21, 1); |  394         shouldBeClear(21, 1); | 
|  398     } else { |  395     } else { | 
|  399         shouldBeRed(8, 8); |  396         shouldBeRed(8, 8); | 
|  400         shouldBeGreen(11, 8); |  397         shouldBeGreen(11, 8); | 
|  401         shouldBeBlue(8, 11); |  398         shouldBeBlue(8, 11); | 
|  402         shouldBeBlack(11, 11); |  399         shouldBeBlack(11, 11); | 
|  403         shouldBeBlack(18, 18); |  400         shouldBeBlack(18, 18); | 
|  404         shouldBeClear(22, 22); |  401         shouldBeClear(22, 22); | 
|  405         shouldBeClear(1, 21); |  402         shouldBeClear(1, 21); | 
|  406         shouldBeClear(21, 1); |  403         shouldBeClear(21, 1); | 
|  407     }*/ |  404     } | 
|  408 } |  405 } | 
|  409  |  406  | 
|  410 function checkCropRight(imageBitmap, option) { |  407 function checkCropRight(imageBitmap, option) { | 
|  411     debug("Check crop right."); |  408     debug("Check crop right."); | 
|  412     bitmap = imageBitmap; |  409     bitmap = imageBitmap; | 
|  413     shouldBeType("bitmap", "ImageBitmap"); |  410     shouldBeType("bitmap", "ImageBitmap"); | 
|  414     shouldBe("bitmap.width", "10"); |  411     shouldBe("bitmap.width", "10"); | 
|  415     shouldBe("bitmap.height", "10"); |  412     shouldBe("bitmap.height", "10"); | 
|  416  |  413  | 
|  417     clearContext(ctx); |  414     clearContext(ctx); | 
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  568     clearContext(ctx); |  565     clearContext(ctx); | 
|  569     ctx.drawImage(imageBitmap, 0, 0); |  566     ctx.drawImage(imageBitmap, 0, 0); | 
|  570     shouldBeClear(1, 1); |  567     shouldBeClear(1, 1); | 
|  571     shouldBeClear(9, 9); |  568     shouldBeClear(9, 9); | 
|  572     shouldBeClear(11, 11); |  569     shouldBeClear(11, 11); | 
|  573     shouldBeClear(22, 22); |  570     shouldBeClear(22, 22); | 
|  574 } |  571 } | 
|  575 </script> |  572 </script> | 
|  576 </body> |  573 </body> | 
|  577 </html> |  574 </html> | 
| OLD | NEW |