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

Unified Diff: ui/gfx/blit_unittest.cc

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RenderText fixup Created 8 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
Index: ui/gfx/blit_unittest.cc
diff --git a/ui/gfx/blit_unittest.cc b/ui/gfx/blit_unittest.cc
index 72e1c26f1678c98b0ad902b3476b61fa29bf9988..a0c4de983002bd9f9ee3ce4998cbf72e05abf9ca 100644
--- a/ui/gfx/blit_unittest.cc
+++ b/ui/gfx/blit_unittest.cc
@@ -76,12 +76,12 @@ TEST(Blit, ScrollCanvas) {
// Scroll none and make sure it's a NOP.
gfx::ScrollCanvas(&canvas,
gfx::Rect(0, 0, kCanvasWidth, kCanvasHeight),
- gfx::Point(0, 0));
+ gfx::Vector2d(0, 0));
VerifyCanvasValues<5, 5>(&canvas, initial_values);
// Scroll the center 3 pixels up one.
gfx::Rect center_three(1, 1, 3, 3);
- gfx::ScrollCanvas(&canvas, center_three, gfx::Point(0, -1));
+ gfx::ScrollCanvas(&canvas, center_three, gfx::Vector2d(0, -1));
uint8 scroll_up_expected[kCanvasHeight][kCanvasWidth] = {
{ 0x00, 0x01, 0x02, 0x03, 0x04 },
{ 0x10, 0x21, 0x22, 0x23, 0x14 },
@@ -92,7 +92,7 @@ TEST(Blit, ScrollCanvas) {
// Reset and scroll the center 3 pixels down one.
SetToCanvas<5, 5>(&canvas, initial_values);
- gfx::ScrollCanvas(&canvas, center_three, gfx::Point(0, 1));
+ gfx::ScrollCanvas(&canvas, center_three, gfx::Vector2d(0, 1));
uint8 scroll_down_expected[kCanvasHeight][kCanvasWidth] = {
{ 0x00, 0x01, 0x02, 0x03, 0x04 },
{ 0x10, 0x11, 0x12, 0x13, 0x14 },
@@ -103,7 +103,7 @@ TEST(Blit, ScrollCanvas) {
// Reset and scroll the center 3 pixels right one.
SetToCanvas<5, 5>(&canvas, initial_values);
- gfx::ScrollCanvas(&canvas, center_three, gfx::Point(1, 0));
+ gfx::ScrollCanvas(&canvas, center_three, gfx::Vector2d(1, 0));
uint8 scroll_right_expected[kCanvasHeight][kCanvasWidth] = {
{ 0x00, 0x01, 0x02, 0x03, 0x04 },
{ 0x10, 0x11, 0x11, 0x12, 0x14 },
@@ -114,7 +114,7 @@ TEST(Blit, ScrollCanvas) {
// Reset and scroll the center 3 pixels left one.
SetToCanvas<5, 5>(&canvas, initial_values);
- gfx::ScrollCanvas(&canvas, center_three, gfx::Point(-1, 0));
+ gfx::ScrollCanvas(&canvas, center_three, gfx::Vector2d(-1, 0));
uint8 scroll_left_expected[kCanvasHeight][kCanvasWidth] = {
{ 0x00, 0x01, 0x02, 0x03, 0x04 },
{ 0x10, 0x12, 0x13, 0x13, 0x14 },
@@ -125,7 +125,7 @@ TEST(Blit, ScrollCanvas) {
// Diagonal scroll.
SetToCanvas<5, 5>(&canvas, initial_values);
- gfx::ScrollCanvas(&canvas, center_three, gfx::Point(2, 2));
+ gfx::ScrollCanvas(&canvas, center_three, gfx::Vector2d(2, 2));
uint8 scroll_diagonal_expected[kCanvasHeight][kCanvasWidth] = {
{ 0x00, 0x01, 0x02, 0x03, 0x04 },
{ 0x10, 0x11, 0x12, 0x13, 0x14 },

Powered by Google App Engine
This is Rietveld 408576698