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

Side by Side Diff: ash/wm/window_manager_unittest.cc

Issue 11145005: Migrate ui::Transform to gfx::Transform (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Hopefully should work this time 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 unified diff | Download patch
« no previous file with comments | « ash/wm/window_animations_unittest.cc ('k') | ash/wm/workspace/workspace_animations.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/shell.h" 5 #include "ash/shell.h"
6 #include "ash/shell_window_ids.h" 6 #include "ash/shell_window_ids.h"
7 #include "ash/test/ash_test_base.h" 7 #include "ash/test/ash_test_base.h"
8 #include "ash/test/test_activation_delegate.h" 8 #include "ash/test/test_activation_delegate.h"
9 #include "ash/wm/activation_controller.h" 9 #include "ash/wm/activation_controller.h"
10 #include "ash/wm/cursor_manager.h" 10 #include "ash/wm/cursor_manager.h"
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 #define MAYBE_TransformActivate TransformActivate 462 #define MAYBE_TransformActivate TransformActivate
463 #endif 463 #endif
464 TEST_F(WindowManagerTest, MAYBE_TransformActivate) { 464 TEST_F(WindowManagerTest, MAYBE_TransformActivate) {
465 aura::RootWindow* root_window = Shell::GetPrimaryRootWindow(); 465 aura::RootWindow* root_window = Shell::GetPrimaryRootWindow();
466 gfx::Size size = root_window->bounds().size(); 466 gfx::Size size = root_window->bounds().size();
467 EXPECT_EQ(gfx::Rect(size).ToString(), 467 EXPECT_EQ(gfx::Rect(size).ToString(),
468 Shell::GetScreen()->GetDisplayNearestPoint( 468 Shell::GetScreen()->GetDisplayNearestPoint(
469 gfx::Point()).bounds().ToString()); 469 gfx::Point()).bounds().ToString());
470 470
471 // Rotate it clock-wise 90 degrees. 471 // Rotate it clock-wise 90 degrees.
472 ui::Transform transform; 472 gfx::Transform transform;
473 transform.SetRotate(90.0f); 473 transform.SetRotate(90.0f);
474 transform.ConcatTranslate(size.width(), 0); 474 transform.ConcatTranslate(size.width(), 0);
475 root_window->SetTransform(transform); 475 root_window->SetTransform(transform);
476 476
477 test::TestActivationDelegate d1; 477 test::TestActivationDelegate d1;
478 aura::test::TestWindowDelegate wd; 478 aura::test::TestWindowDelegate wd;
479 scoped_ptr<aura::Window> w1( 479 scoped_ptr<aura::Window> w1(
480 CreateTestWindowWithDelegate(&wd, 1, gfx::Rect(0, 10, 50, 50), NULL)); 480 CreateTestWindowWithDelegate(&wd, 1, gfx::Rect(0, 10, 50, 50), NULL));
481 d1.SetWindow(w1.get()); 481 d1.SetWindow(w1.get());
482 w1->Show(); 482 w1->Show();
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 EXPECT_TRUE(cursor_manager->cursor_visible()); 630 EXPECT_TRUE(cursor_manager->cursor_visible());
631 root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&touch_pressed2); 631 root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&touch_pressed2);
632 EXPECT_FALSE(cursor_manager->cursor_visible()); 632 EXPECT_FALSE(cursor_manager->cursor_visible());
633 root_window->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_moved); 633 root_window->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_moved);
634 EXPECT_TRUE(cursor_manager->cursor_visible()); 634 EXPECT_TRUE(cursor_manager->cursor_visible());
635 root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&touch_released2); 635 root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&touch_released2);
636 EXPECT_TRUE(cursor_manager->cursor_visible()); 636 EXPECT_TRUE(cursor_manager->cursor_visible());
637 } 637 }
638 638
639 } // namespace ash 639 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_animations_unittest.cc ('k') | ash/wm/workspace/workspace_animations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698