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

Unified Diff: ash/monitor/multi_monitor_manager_unittest.cc

Issue 10540123: Rename gfx::Screen::GetMonitorXXXX to gfx::Screen::GetDisplayXXX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/monitor/multi_monitor_manager.cc ('k') | ash/screen_ash.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/monitor/multi_monitor_manager_unittest.cc
diff --git a/ash/monitor/multi_monitor_manager_unittest.cc b/ash/monitor/multi_monitor_manager_unittest.cc
index 3a31fd343a621f55a31d8fc4f4c30186e4f8c69c..94a28cdf6204869a88a0f07ae32366feb194073e 100644
--- a/ash/monitor/multi_monitor_manager_unittest.cc
+++ b/ash/monitor/multi_monitor_manager_unittest.cc
@@ -92,14 +92,14 @@ class MultiMonitorManagerTest : public test::AshTestBase,
TEST_F(MultiMonitorManagerTest, NativeMonitorTest) {
aura::MonitorManager::set_use_fullscreen_host_window(true);
- EXPECT_EQ(1U, monitor_manager()->GetNumMonitors());
+ EXPECT_EQ(1U, monitor_manager()->GetNumDisplays());
// Update primary and add seconary.
UpdateMonitor("0+0-500x500,0+501-400x400");
- EXPECT_EQ(2U, monitor_manager()->GetNumMonitors());
+ EXPECT_EQ(2U, monitor_manager()->GetNumDisplays());
EXPECT_EQ("1 1 0", GetCountSummary());
- EXPECT_EQ(monitor_manager()->GetMonitorAt(0).id(), changed()[0].id());
- EXPECT_EQ(monitor_manager()->GetMonitorAt(1).id(), added()[0].id());
+ EXPECT_EQ(monitor_manager()->GetDisplayAt(0).id(), changed()[0].id());
+ EXPECT_EQ(monitor_manager()->GetDisplayAt(1).id(), added()[0].id());
EXPECT_EQ("0,0 500x500", changed()[0].bounds().ToString());
EXPECT_EQ("0,0 400x400", added()[0].bounds().ToString());
EXPECT_EQ("0,501 400x400", added()[0].bounds_in_pixel().ToString());
@@ -113,41 +113,41 @@ TEST_F(MultiMonitorManagerTest, NativeMonitorTest) {
// Change primary.
UpdateMonitor("0+0-1000x600");
EXPECT_EQ("1 0 0", GetCountSummary());
- EXPECT_EQ(monitor_manager()->GetMonitorAt(0).id(), changed()[0].id());
+ EXPECT_EQ(monitor_manager()->GetDisplayAt(0).id(), changed()[0].id());
EXPECT_EQ("0,0 1000x600", changed()[0].bounds().ToString());
reset();
// Add secondary.
UpdateMonitor("0+0-1000x600,1001+0-600x400");
- EXPECT_EQ(2U, monitor_manager()->GetNumMonitors());
+ EXPECT_EQ(2U, monitor_manager()->GetNumDisplays());
EXPECT_EQ("0 1 0", GetCountSummary());
- EXPECT_EQ(monitor_manager()->GetMonitorAt(1).id(), added()[0].id());
+ EXPECT_EQ(monitor_manager()->GetDisplayAt(1).id(), added()[0].id());
EXPECT_EQ("0,0 600x400", added()[0].bounds().ToString());
EXPECT_EQ("1001,0 600x400", added()[0].bounds_in_pixel().ToString());
reset();
// Secondary removed, primary changed.
UpdateMonitor("0+0-800x300");
- EXPECT_EQ(1U, monitor_manager()->GetNumMonitors());
+ EXPECT_EQ(1U, monitor_manager()->GetNumDisplays());
EXPECT_EQ("1 0 1", GetCountSummary());
- EXPECT_EQ(monitor_manager()->GetMonitorAt(0).id(), changed()[0].id());
+ EXPECT_EQ(monitor_manager()->GetDisplayAt(0).id(), changed()[0].id());
EXPECT_EQ("0,0 800x300", changed()[0].bounds().ToString());
reset();
// # of display can go to zero when screen is off.
const vector<gfx::Display> empty;
monitor_manager()->OnNativeMonitorsChanged(empty);
- EXPECT_EQ(1U, monitor_manager()->GetNumMonitors());
+ EXPECT_EQ(1U, monitor_manager()->GetNumDisplays());
EXPECT_EQ("0 0 0", GetCountSummary());
EXPECT_FALSE(root_window_destroyed());
// Monitor configuration stays the same
EXPECT_EQ("0,0 800x300",
- monitor_manager()->GetMonitorAt(0).bounds().ToString());
+ monitor_manager()->GetDisplayAt(0).bounds().ToString());
reset();
// Connect to monitor again
UpdateMonitor("100+100-500x400");
- EXPECT_EQ(1U, monitor_manager()->GetNumMonitors());
+ EXPECT_EQ(1U, monitor_manager()->GetNumDisplays());
EXPECT_EQ("1 0 0", GetCountSummary());
EXPECT_FALSE(root_window_destroyed());
EXPECT_EQ("0,0 500x400", changed()[0].bounds().ToString());
@@ -156,19 +156,19 @@ TEST_F(MultiMonitorManagerTest, NativeMonitorTest) {
// Go back to zero and wake up with multiple monitors.
monitor_manager()->OnNativeMonitorsChanged(empty);
- EXPECT_EQ(1U, monitor_manager()->GetNumMonitors());
+ EXPECT_EQ(1U, monitor_manager()->GetNumDisplays());
EXPECT_FALSE(root_window_destroyed());
reset();
// Add secondary.
UpdateMonitor("0+0-1000x600,1000+0-600x400");
- EXPECT_EQ(2U, monitor_manager()->GetNumMonitors());
+ EXPECT_EQ(2U, monitor_manager()->GetNumDisplays());
EXPECT_EQ("0,0 1000x600",
- monitor_manager()->GetMonitorAt(0).bounds().ToString());
+ monitor_manager()->GetDisplayAt(0).bounds().ToString());
EXPECT_EQ("0,0 600x400",
- monitor_manager()->GetMonitorAt(1).bounds().ToString());
+ monitor_manager()->GetDisplayAt(1).bounds().ToString());
EXPECT_EQ("1000,0 600x400",
- monitor_manager()->GetMonitorAt(1).bounds_in_pixel().ToString());
+ monitor_manager()->GetDisplayAt(1).bounds_in_pixel().ToString());
reset();
aura::MonitorManager::set_use_fullscreen_host_window(false);
@@ -176,11 +176,11 @@ TEST_F(MultiMonitorManagerTest, NativeMonitorTest) {
// Test in emulation mode (use_fullscreen_host_window=false)
TEST_F(MultiMonitorManagerTest, EmulatorTest) {
- EXPECT_EQ(1U, monitor_manager()->GetNumMonitors());
+ EXPECT_EQ(1U, monitor_manager()->GetNumDisplays());
internal::MultiMonitorManager::AddRemoveMonitor();
// Update primary and add seconary.
- EXPECT_EQ(2U, monitor_manager()->GetNumMonitors());
+ EXPECT_EQ(2U, monitor_manager()->GetNumDisplays());
#if defined(OS_WIN)
// TODO(oshima): Windows receives resize event for some reason.
EXPECT_EQ("1 1 0", GetCountSummary());
@@ -190,7 +190,7 @@ TEST_F(MultiMonitorManagerTest, EmulatorTest) {
reset();
internal::MultiMonitorManager::CycleMonitor();
- EXPECT_EQ(2U, monitor_manager()->GetNumMonitors());
+ EXPECT_EQ(2U, monitor_manager()->GetNumDisplays());
// Observer gets called twice in this mode because
// it gets notified both from |OnNativeMonitorChagned|
// and from |RootWindowObserver|, which is the consequence of
@@ -199,12 +199,12 @@ TEST_F(MultiMonitorManagerTest, EmulatorTest) {
reset();
internal::MultiMonitorManager::AddRemoveMonitor();
- EXPECT_EQ(1U, monitor_manager()->GetNumMonitors());
+ EXPECT_EQ(1U, monitor_manager()->GetNumDisplays());
EXPECT_EQ("0 0 1", GetCountSummary());
reset();
internal::MultiMonitorManager::CycleMonitor();
- EXPECT_EQ(1U, monitor_manager()->GetNumMonitors());
+ EXPECT_EQ(1U, monitor_manager()->GetNumDisplays());
EXPECT_EQ("0 0 0", GetCountSummary());
reset();
}
« no previous file with comments | « ash/monitor/multi_monitor_manager.cc ('k') | ash/screen_ash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698