Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: third_party/WebKit/LayoutTests/fast/images/paint-subrect-grid.html

Issue 2496663002: Merge css3/image/ and fast/images/ to images/ (Closed)
Patch Set: Address failing tests (3 of them) Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/images/paint-subrect-grid.html
diff --git a/third_party/WebKit/LayoutTests/fast/images/paint-subrect-grid.html b/third_party/WebKit/LayoutTests/fast/images/paint-subrect-grid.html
deleted file mode 100644
index c06648169d514eee58fdda8bfe57056d686823b1..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/images/paint-subrect-grid.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<canvas id="canvas" width="30" height="30"></canvas>
-<script>
-if (window.testRunner)
- testRunner.dumpAsTextWithPixelResults();
-
-var img = new Image();
-// This is a 11x11 black and white grid.
-img.src = 'resources/grid-small.png';
-
-function drawSubRectScaled(ctx, img, x, y, w, h, scale)
-{
- ctx.drawImage(img, x, y, w, h, x * scale, y * scale, w * scale, h * scale);
-}
-
-img.onload = function()
-{
- // Draw the image into canvas with 8 fragments like shown:
- //
- // | 3.66 x 3.66 | | 3.66 x 3.66 | | 3.66 x 3.66 |
- //
- // | 5.5 x 3.66 | | 5.5 x 3.66 |
- //
- // | 3.66 x 3.66 | | 3.66 x 3.66 | | 3.66 x 3.66 |
-
- var ctx = document.getElementById("canvas").getContext("2d");
-
- var scale = 30.0 / 11.0;
-
- // Draw the top row.
- drawSubRectScaled(ctx, img, 0, 0, 3.66, 3.66, scale);
- drawSubRectScaled(ctx, img, 3.66, 0, 3.66, 3.66, scale);
- drawSubRectScaled(ctx, img, 7.33, 0, 3.66, 3.66, scale);
-
- // Draw the middle row.
- drawSubRectScaled(ctx, img, 0, 3.66, 5.5, 3.66, scale);
- drawSubRectScaled(ctx, img, 5.5, 3.66, 5.5, 3.66, scale);
-
- // Draw the bottom row.
- drawSubRectScaled(ctx, img, 0, 7.33, 3.66, 3.66, scale);
- drawSubRectScaled(ctx, img, 3.66, 7.33, 3.66, 3.66, scale);
- drawSubRectScaled(ctx, img, 7.33, 7.33, 3.66, 3.66, scale);
-}
-</script>

Powered by Google App Engine
This is Rietveld 408576698