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

Unified Diff: ash/wm/workspace/workspace_window_resizer_unittest.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix new addition 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: ash/wm/workspace/workspace_window_resizer_unittest.cc
diff --git a/ash/wm/workspace/workspace_window_resizer_unittest.cc b/ash/wm/workspace/workspace_window_resizer_unittest.cc
index 67f29fb2fb1c290940c0a9dc4c69c1270027e64d..6457d165ad20ed05455b5d977113f3c1aa8b4bee 100644
--- a/ash/wm/workspace/workspace_window_resizer_unittest.cc
+++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc
@@ -485,7 +485,7 @@ TEST_F(WorkspaceWindowResizerTest, MAYBE_WindowDragWithMultiDisplays) {
ASSERT_EQ(2U, root_windows.size());
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- gfx::Screen::GetPrimaryDisplay());
+ Shell::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
{
// Grab (0, 0) of the window.
@@ -503,7 +503,7 @@ TEST_F(WorkspaceWindowResizerTest, MAYBE_WindowDragWithMultiDisplays) {
}
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- gfx::Screen::GetPrimaryDisplay());
+ Shell::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
{
// Grab (0, 0) of the window and move the pointer to (790, 10).
@@ -519,7 +519,7 @@ TEST_F(WorkspaceWindowResizerTest, MAYBE_WindowDragWithMultiDisplays) {
}
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- gfx::Screen::GetPrimaryDisplay());
+ Shell::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
{
// Grab the top-right edge of the window and move the pointer to (0, 10)
@@ -547,7 +547,7 @@ TEST_F(WorkspaceWindowResizerTest,
window_->SetBoundsInScreen(
gfx::Rect(800, 00, 50, 60),
- gfx::Screen::GetDisplayNearestWindow(root_windows[1]));
+ Shell::GetScreen()->GetDisplayNearestWindow(root_windows[1]));
EXPECT_EQ(root_windows[1], window_->GetRootWindow());
{
// Grab (0, 0) of the window.
@@ -569,7 +569,7 @@ TEST_F(WorkspaceWindowResizerTest, MAYBE_PhantomStyle) {
ASSERT_EQ(2U, root_windows.size());
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- gfx::Screen::GetPrimaryDisplay());
+ Shell::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
{
@@ -620,7 +620,7 @@ TEST_F(WorkspaceWindowResizerTest, MAYBE_PhantomStyle) {
// Do the same test with RevertDrag().
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- gfx::Screen::GetPrimaryDisplay());
+ Shell::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
{
@@ -644,7 +644,7 @@ TEST_F(WorkspaceWindowResizerTest, MAYBE_CancelSnapPhantom) {
ASSERT_EQ(2U, root_windows.size());
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- gfx::Screen::GetPrimaryDisplay());
+ Shell::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
{
@@ -768,7 +768,7 @@ TEST_F(WorkspaceWindowResizerTest, DontDragOffBottom) {
Shell::GetInstance()->SetDisplayWorkAreaInsets(
Shell::GetPrimaryRootWindow(), gfx::Insets(0, 0, 10, 0));
- ASSERT_EQ(1, gfx::Screen::GetNumDisplays());
+ ASSERT_EQ(1, Shell::GetScreen()->GetNumDisplays());
window_->SetBounds(gfx::Rect(100, 200, 300, 400));
scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
@@ -784,7 +784,7 @@ TEST_F(WorkspaceWindowResizerTest, DontDragOffBottom) {
// Makes sure we don't allow dragging on the work area with multidisplay.
TEST_F(WorkspaceWindowResizerTest, DontDragOffBottomWithMultiDisplay) {
UpdateDisplay("800x600,800x600");
- ASSERT_EQ(2, gfx::Screen::GetNumDisplays());
+ ASSERT_EQ(2, Shell::GetScreen()->GetNumDisplays());
Shell::GetInstance()->SetDisplayWorkAreaInsets(
Shell::GetPrimaryRootWindow(), gfx::Insets(0, 0, 10, 0));
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer.cc ('k') | chrome/browser/chromeos/display/primary_display_switch_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698