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

Unified Diff: Tools/GardeningServer/base/ct-canvas-2d-context-mock.html

Issue 423703002: Fix bugs in sheriff-o-matic's pixel zoomer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | Tools/GardeningServer/ui/ct-results-comparison-zoomer.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/base/ct-canvas-2d-context-mock.html
diff --git a/Tools/GardeningServer/base/ct-canvas-2d-context-mock.html b/Tools/GardeningServer/base/ct-canvas-2d-context-mock.html
new file mode 100644
index 0000000000000000000000000000000000000000..af462127e2966b8b7de2dc27ea8f410f9c5f16f5
--- /dev/null
+++ b/Tools/GardeningServer/base/ct-canvas-2d-context-mock.html
@@ -0,0 +1,37 @@
+<!--
+Copyright 2014 The Chromium Authors. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+-->
+
+<script>
+function CTCanvas2dContextMock() {
+ this.imageSmoothingEnabled = true;
+ this._translate = {x: 0, y: 0};
+ this._strokeRect = {x: 0, y: 0, width: 0, height: 0};
+ this._scale = {x: 1, y: 1};
+ this._drawImagePosition = {x: 0, y: 0};
+}
+
+CTCanvas2dContextMock.prototype.translate = function(x, y) {
+ this._translate = {
+ x: this._translate.x + x,
+ y: this._translate.y + y,
+ };
+}
+
+CTCanvas2dContextMock.prototype.strokeRect = function(x, y, width, height) {
+ this._strokeRect = {x: x, y: y, width: width, height: height};
+}
+
+CTCanvas2dContextMock.prototype.scale = function(x, y) {
+ this._scale = {
+ x: this._scale.x * x,
+ y: this._scale.y * y,
+ };
+}
+
+CTCanvas2dContextMock.prototype.drawImage = function(image, x, y) {
+ this._drawImagePosition = {x: x, y: y};
+}
+</script>
« no previous file with comments | « no previous file | Tools/GardeningServer/ui/ct-results-comparison-zoomer.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698