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

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

Issue 16539005: Skip mulitple-dispay tests on win8 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comment Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/wm/window_util.h" 5 #include "ash/wm/window_util.h"
6 6
7 #include "ash/screen_ash.h" 7 #include "ash/screen_ash.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 10
11 namespace ash { 11 namespace ash {
12 12
13 typedef test::AshTestBase WindowUtilTest; 13 typedef test::AshTestBase WindowUtilTest;
14 14
15 TEST_F(WindowUtilTest, CenterWindow) { 15 TEST_F(WindowUtilTest, CenterWindow) {
16 if (!SupportsMultipleDisplays())
17 return;
18
16 UpdateDisplay("500x400, 600x400"); 19 UpdateDisplay("500x400, 600x400");
17 scoped_ptr<aura::Window> window( 20 scoped_ptr<aura::Window> window(
18 CreateTestWindowInShellWithBounds(gfx::Rect(12, 20, 100, 100))); 21 CreateTestWindowInShellWithBounds(gfx::Rect(12, 20, 100, 100)));
19 wm::CenterWindow(window.get()); 22 wm::CenterWindow(window.get());
20 EXPECT_EQ("200,126 100x100", window->bounds().ToString()); 23 EXPECT_EQ("200,126 100x100", window->bounds().ToString());
21 EXPECT_EQ("200,126 100x100", window->GetBoundsInScreen().ToString()); 24 EXPECT_EQ("200,126 100x100", window->GetBoundsInScreen().ToString());
22 window->SetBoundsInScreen(gfx::Rect(600, 0, 100, 100), 25 window->SetBoundsInScreen(gfx::Rect(600, 0, 100, 100),
23 ScreenAsh::GetSecondaryDisplay()); 26 ScreenAsh::GetSecondaryDisplay());
24 wm::CenterWindow(window.get()); 27 wm::CenterWindow(window.get());
25 EXPECT_EQ("250,126 100x100", window->bounds().ToString()); 28 EXPECT_EQ("250,126 100x100", window->bounds().ToString());
26 EXPECT_EQ("750,126 100x100", window->GetBoundsInScreen().ToString()); 29 EXPECT_EQ("750,126 100x100", window->GetBoundsInScreen().ToString());
27 } 30 }
28 31
29 } // namespace ash 32 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_cycle_controller_unittest.cc ('k') | ash/wm/workspace/workspace_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698