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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-css-transform-test.html

Issue 1553373002: Canvas2d: Fix incorrect alignment of hit region when applied css/zoom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed layout test Created 4 years, 11 months 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/canvas/canvas-hit-regions-css-transform-test.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-css-transform-test.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-css-transform-test.html
new file mode 100644
index 0000000000000000000000000000000000000000..f7e48da3fea418da9a15ed2f48b1ed22431f2f09
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-css-transform-test.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>HitRegion CSS Size/Transform Test</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="./resources/test-helpers.js"></script>
+<canvas width="400" height="400"></canvas>
+<style>
+
+body {
+ margin : 0px;
+ padding : 0px;
+}
+
+canvas {
+ width : 200px;
+ height : 200px;
+ padding : 100px;
Justin Novosad 2016/01/07 17:31:04 It would make sense separate this test into indivi
zino 2016/01/11 13:53:23 Done.
+ border : 20px;
+ transform : rotate(45deg);
+}
+
+</style>
+<script>
+
+var canvas = document.querySelector('canvas');
+var context = canvas.getContext('2d');
+
+createFace(context);
+
+coroutine(function*() {
+ setup({ explicit_done : true, explicit_timeout : true });
+
+ generate_tests(assert_equals, [
+ [ 'face', yield clickOrTouch(195, 140), 'face' ],
+ [ 'nose', yield clickOrTouch(204, 194), 'nose' ],
+ [ 'mouth', yield clickOrTouch(194, 225), 'mouth' ],
+ [ 'eye', yield clickOrTouch(205, 156), 'eye' ],
+ [ 'eye', yield clickOrTouch(245, 197), 'eye' ],
+ [ 'face', yield clickOrTouch(148, 217), 'face' ],
+ [ 'null', yield clickOrTouch(146, 317), null ]
+ ]);
+
+ done();
+});
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698