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

Unified Diff: tests/html/canvasrenderingcontext2d_test.dart

Issue 25785003: "Reverting 28184" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « sdk/lib/math/rectangle.dart ('k') | tests/html/client_rect_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/canvasrenderingcontext2d_test.dart
diff --git a/tests/html/canvasrenderingcontext2d_test.dart b/tests/html/canvasrenderingcontext2d_test.dart
index da9338b8ad2c12a451be3ec10fd6f82b1a66baab..b10756f21dcd502d4ca1dbfe7d68a36ae522287a 100644
--- a/tests/html/canvasrenderingcontext2d_test.dart
+++ b/tests/html/canvasrenderingcontext2d_test.dart
@@ -363,7 +363,7 @@ main() {
var img = new ImageElement();
img.onLoad.listen(expectAsync1((_) {
- context.drawImageToRect(img, new Rectangle(50, 50, 20, 20));
+ context.drawImageToRect(img, new Rect(50, 50, 20, 20));
expectPixelFilled(50, 50);
expectPixelFilled(55, 55);
@@ -393,8 +393,8 @@ main() {
// This will take a 6x6 square from the first canvas from position 2,2
// and then scale it to a 20x20 square and place it to the second
// canvas at 50,50.
- context.drawImageToRect(img, new Rectangle(50, 50, 20, 20),
- sourceRect: new Rectangle(2, 2, 6, 6));
+ context.drawImageToRect(img, new Rect(50, 50, 20, 20),
+ sourceRect: new Rect(2, 2, 6, 6));
checkPixel(readPixel(50, 50), [255, 0, 0, 255]);
checkPixel(readPixel(55, 55), [255, 0, 0, 255]);
@@ -511,7 +511,7 @@ main() {
test('with 5 params', () {
video.onCanPlay.listen(expectAsync1((_) {
- context.drawImageToRect(video, new Rectangle(50, 50, 20, 20));
+ context.drawImageToRect(video, new Rect(50, 50, 20, 20));
expectPixelFilled(50, 50);
expectPixelFilled(55, 55);
@@ -541,8 +541,8 @@ main() {
test('with 9 params', () {
video.onCanPlay.listen(expectAsync1((_) {
- context.drawImageToRect(video, new Rectangle(50, 50, 20, 20),
- sourceRect: new Rectangle(2, 2, 6, 6));
+ context.drawImageToRect(video, new Rect(50, 50, 20, 20),
+ sourceRect: new Rect(2, 2, 6, 6));
expectPixelFilled(50, 50);
expectPixelFilled(55, 55);
@@ -579,8 +579,8 @@ main() {
video = new VideoElement();
canvas = new CanvasElement();
video.onCanPlay.listen(expectAsync1((_) {
- context.drawImageToRect(video, new Rectangle(50, 50, 20, 20),
- sourceRect: new Rectangle(2, 2, 6, 6));
+ context.drawImageToRect(video, new Rect(50, 50, 20, 20),
+ sourceRect: new Rect(2, 2, 6, 6));
expectPixelFilled(50, 50);
expectPixelFilled(55, 55);
@@ -626,7 +626,7 @@ main() {
});
test('with 5 params', () {
// Draw an image to the canvas from a canvas element.
- context.drawImageToRect(otherCanvas, new Rectangle(50, 50, 20, 20));
+ context.drawImageToRect(otherCanvas, new Rect(50, 50, 20, 20));
expectPixelFilled(50, 50);
expectPixelFilled(55, 55);
@@ -641,8 +641,8 @@ main() {
// Draw an image to the canvas from a canvas element.
otherContext.fillStyle = "blue";
otherContext.fillRect(5, 5, 5, 5);
- context.drawImageToRect(otherCanvas, new Rectangle(50, 50, 20, 20),
- sourceRect: new Rectangle(2, 2, 6, 6));
+ context.drawImageToRect(otherCanvas, new Rect(50, 50, 20, 20),
+ sourceRect: new Rect(2, 2, 6, 6));
checkPixel(readPixel(50, 50), [255, 0, 0, 255]);
checkPixel(readPixel(55, 55), [255, 0, 0, 255]);
« no previous file with comments | « sdk/lib/math/rectangle.dart ('k') | tests/html/client_rect_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698