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

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

Issue 1608053002: Remove now-unnecessary wrappers around gfx::Screen::GetScreen() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-5
Patch Set: . Created 4 years, 11 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
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/window_util.h" 9 #include "ash/wm/window_util.h"
10 #include "ui/aura/client/cursor_client_observer.h" 10 #include "ui/aura/client/cursor_client_observer.h"
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 596
597 #if defined(OS_WIN) 597 #if defined(OS_WIN)
598 #define MAYBE_TransformActivate DISABLED_TransformActivate 598 #define MAYBE_TransformActivate DISABLED_TransformActivate
599 #else 599 #else
600 #define MAYBE_TransformActivate TransformActivate 600 #define MAYBE_TransformActivate TransformActivate
601 #endif 601 #endif
602 TEST_F(WindowManagerTest, MAYBE_TransformActivate) { 602 TEST_F(WindowManagerTest, MAYBE_TransformActivate) {
603 aura::Window* root_window = Shell::GetPrimaryRootWindow(); 603 aura::Window* root_window = Shell::GetPrimaryRootWindow();
604 gfx::Size size = root_window->bounds().size(); 604 gfx::Size size = root_window->bounds().size();
605 EXPECT_EQ(gfx::Rect(size).ToString(), 605 EXPECT_EQ(gfx::Rect(size).ToString(),
606 Shell::GetScreen()->GetDisplayNearestPoint( 606 gfx::Screen::GetScreen()
607 gfx::Point()).bounds().ToString()); 607 ->GetDisplayNearestPoint(gfx::Point())
608 .bounds()
609 .ToString());
608 610
609 // Rotate it clock-wise 90 degrees. 611 // Rotate it clock-wise 90 degrees.
610 gfx::Transform transform; 612 gfx::Transform transform;
611 transform.Translate(size.width(), 0); 613 transform.Translate(size.width(), 0);
612 transform.Rotate(90.0f); 614 transform.Rotate(90.0f);
613 root_window->GetHost()->SetRootTransform(transform); 615 root_window->GetHost()->SetRootTransform(transform);
614 616
615 test::TestActivationDelegate d1; 617 test::TestActivationDelegate d1;
616 aura::test::TestWindowDelegate wd; 618 aura::test::TestWindowDelegate wd;
617 scoped_ptr<aura::Window> w1( 619 scoped_ptr<aura::Window> w1(
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 generator.MoveMouseTo(50, 50); 852 generator.MoveMouseTo(50, 50);
851 EXPECT_TRUE(observer_a.did_visibility_change()); 853 EXPECT_TRUE(observer_a.did_visibility_change());
852 EXPECT_FALSE(observer_b.did_visibility_change()); 854 EXPECT_FALSE(observer_b.did_visibility_change());
853 EXPECT_TRUE(observer_a.is_cursor_visible()); 855 EXPECT_TRUE(observer_a.is_cursor_visible());
854 856
855 cursor_manager->RemoveObserver(&observer_a); 857 cursor_manager->RemoveObserver(&observer_a);
856 } 858 }
857 #endif // defined(OS_CHROMEOS) 859 #endif // defined(OS_CHROMEOS)
858 860
859 } // namespace ash 861 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698