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

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

Issue 11418040: gfx::Transform API clean-up (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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 | Annotate | Revision Log
« 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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 #endif 500 #endif
501 TEST_F(WindowManagerTest, MAYBE_TransformActivate) { 501 TEST_F(WindowManagerTest, MAYBE_TransformActivate) {
502 aura::RootWindow* root_window = Shell::GetPrimaryRootWindow(); 502 aura::RootWindow* root_window = Shell::GetPrimaryRootWindow();
503 gfx::Size size = root_window->bounds().size(); 503 gfx::Size size = root_window->bounds().size();
504 EXPECT_EQ(gfx::Rect(size).ToString(), 504 EXPECT_EQ(gfx::Rect(size).ToString(),
505 Shell::GetScreen()->GetDisplayNearestPoint( 505 Shell::GetScreen()->GetDisplayNearestPoint(
506 gfx::Point()).bounds().ToString()); 506 gfx::Point()).bounds().ToString());
507 507
508 // Rotate it clock-wise 90 degrees. 508 // Rotate it clock-wise 90 degrees.
509 gfx::Transform transform; 509 gfx::Transform transform;
510 transform.SetRotate(90.0f); 510 transform.Translate(size.width(), 0);
511 transform.ConcatTranslate(size.width(), 0); 511 transform.Rotate(90.0f);
512 root_window->SetTransform(transform); 512 root_window->SetTransform(transform);
513 513
514 test::TestActivationDelegate d1; 514 test::TestActivationDelegate d1;
515 aura::test::TestWindowDelegate wd; 515 aura::test::TestWindowDelegate wd;
516 scoped_ptr<aura::Window> w1( 516 scoped_ptr<aura::Window> w1(
517 CreateTestWindowWithDelegate(&wd, 1, gfx::Rect(0, 10, 50, 50), NULL)); 517 CreateTestWindowWithDelegate(&wd, 1, gfx::Rect(0, 10, 50, 50), NULL));
518 d1.SetWindow(w1.get()); 518 d1.SetWindow(w1.get());
519 w1->Show(); 519 w1->Show();
520 520
521 gfx::Point miss_point(5, 5); 521 gfx::Point miss_point(5, 5);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 EXPECT_TRUE(cursor_manager->cursor_visible()); 667 EXPECT_TRUE(cursor_manager->cursor_visible());
668 root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&touch_pressed2); 668 root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&touch_pressed2);
669 EXPECT_FALSE(cursor_manager->cursor_visible()); 669 EXPECT_FALSE(cursor_manager->cursor_visible());
670 root_window->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_moved); 670 root_window->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_moved);
671 EXPECT_TRUE(cursor_manager->cursor_visible()); 671 EXPECT_TRUE(cursor_manager->cursor_visible());
672 root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&touch_released2); 672 root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&touch_released2);
673 EXPECT_TRUE(cursor_manager->cursor_visible()); 673 EXPECT_TRUE(cursor_manager->cursor_visible());
674 } 674 }
675 675
676 } // namespace ash 676 } // 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