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

Unified Diff: ui/aura/window_unittest.cc

Issue 11087093: Migrate ui::Transform to gfx::Transform (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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/aura/window_unittest.cc
diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc
index 1330742c448879a23efbc3bb7e75d50cfc710095..76a885c58271960cc9b7bba3ea108e10ceb7448f 100644
--- a/ui/aura/window_unittest.cc
+++ b/ui/aura/window_unittest.cc
@@ -353,7 +353,7 @@ TEST_F(WindowTest, ContainsMouse) {
// Test Window::ConvertPointToWindow() with transform to root_window.
TEST_F(WindowTest, MoveCursorToWithTransformRootWindow) {
RootWindow* root = root_window();
- ui::Transform transform;
+ gfx::Transform transform;
transform.ConcatScale(2, 5);
transform.ConcatRotate(90.0f);
transform.ConcatTranslate(100, 100);
@@ -371,25 +371,25 @@ TEST_F(WindowTest, MoveCursorToWithTransformWindow) {
scoped_ptr<Window> w1(
CreateTestWindow(SK_ColorWHITE, 1, gfx::Rect(10, 10, 500, 500), NULL));
- ui::Transform transform1;
+ gfx::Transform transform1;
transform1.ConcatScale(2, 2);
w1->SetTransform(transform1);
w1->MoveCursorTo(gfx::Point(10, 10));
EXPECT_EQ("30,30", gfx::Screen::GetCursorScreenPoint().ToString());
- ui::Transform transform2;
+ gfx::Transform transform2;
transform2.ConcatTranslate(-10, 20);
w1->SetTransform(transform2);
w1->MoveCursorTo(gfx::Point(10, 10));
EXPECT_EQ("10,40", gfx::Screen::GetCursorScreenPoint().ToString());
- ui::Transform transform3;
+ gfx::Transform transform3;
transform3.ConcatRotate(90.0f);
w1->SetTransform(transform3);
w1->MoveCursorTo(gfx::Point(5, 5));
EXPECT_EQ("5,15", gfx::Screen::GetCursorScreenPoint().ToString());
- ui::Transform transform4;
+ gfx::Transform transform4;
transform4.ConcatScale(2, 5);
transform4.ConcatRotate(90.0f);
transform4.ConcatTranslate(100, 100);
@@ -411,7 +411,7 @@ TEST_F(WindowTest, MoveCursorToWithComplexTransform) {
CreateTestWindow(SK_ColorRED, 1111, gfx::Rect(5, 5, 50, 50), w111.get()));
RootWindow* root = root_window();
- ui::Transform transform;
+ gfx::Transform transform;
transform.ConcatScale(0.3f, 0.5f);
transform.ConcatRotate(10.0f);
transform.ConcatTranslate(10, 20);
@@ -1326,7 +1326,7 @@ TEST_F(WindowTest, Transform) {
gfx::Screen::GetDisplayNearestPoint(gfx::Point()).bounds());
// Rotate it clock-wise 90 degrees.
- ui::Transform transform;
+ gfx::Transform transform;
transform.SetRotate(90.0f);
transform.ConcatTranslate(size.height(), 0);
root_window()->SetTransform(transform);
@@ -1353,7 +1353,7 @@ TEST_F(WindowTest, TransformGesture) {
gfx::Rect(0, 0, 20, 20), NULL));
// Rotate the root-window clock-wise 90 degrees.
- ui::Transform transform;
+ gfx::Transform transform;
transform.SetRotate(90.0f);
transform.ConcatTranslate(size.height(), 0);
root_window()->SetTransform(transform);
@@ -1984,14 +1984,14 @@ TEST_F(WindowTest, MouseEventsOnWindowChange) {
EXPECT_EQ("1 1 0", d11.GetMouseMotionCountsAndReset());
// Transform: move d11 by 100 100.
- ui::Transform transform;
+ gfx::Transform transform;
transform.ConcatTranslate(100, 100);
w11->SetTransform(transform);
RunAllPendingInMessageLoop();
EXPECT_EQ("1 1 0", d1.GetMouseMotionCountsAndReset());
EXPECT_EQ("0 0 1", d11.GetMouseMotionCountsAndReset());
- w11->SetTransform(ui::Transform());
+ w11->SetTransform(gfx::Transform());
RunAllPendingInMessageLoop();
EXPECT_EQ("0 0 1", d1.GetMouseMotionCountsAndReset());
EXPECT_EQ("1 1 0", d11.GetMouseMotionCountsAndReset());
« no previous file with comments | « ui/aura/window.cc ('k') | ui/base/animation/tween.h » ('j') | ui/gfx/transform.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698