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

Side by Side Diff: ash/monitor/multi_monitor_manager_unittest.cc

Issue 10255020: Get the default device scale factor from monitor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 8 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) 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/monitor/multi_monitor_manager.h" 5 #include "ash/monitor/multi_monitor_manager.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
(...skipping 13 matching lines...) Expand all
24 24
25 namespace { 25 namespace {
26 26
27 vector<Monitor> CreateMonitorsFromString( 27 vector<Monitor> CreateMonitorsFromString(
28 const std::string specs) { 28 const std::string specs) {
29 vector<Monitor> monitors; 29 vector<Monitor> monitors;
30 vector<string> parts; 30 vector<string> parts;
31 base::SplitString(specs, ',', &parts); 31 base::SplitString(specs, ',', &parts);
32 for (vector<string>::const_iterator iter = parts.begin(); 32 for (vector<string>::const_iterator iter = parts.begin();
33 iter != parts.end(); ++iter) { 33 iter != parts.end(); ++iter) {
34 monitors.push_back(aura::MonitorManager::CreateMonitorFromSpec(*iter)); 34 monitors.push_back(
35 aura::MonitorManager::CreateMonitorFromSpec(1.0f, *iter));
35 } 36 }
36 return monitors; 37 return monitors;
37 } 38 }
38 39
39 } // namespace 40 } // namespace
40 41
41 class MultiMonitorManagerTest : public test::AshTestBase, 42 class MultiMonitorManagerTest : public test::AshTestBase,
42 public aura::MonitorObserver, 43 public aura::MonitorObserver,
43 public aura::WindowObserver { 44 public aura::WindowObserver {
44 public: 45 public:
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 reset(); 228 reset();
228 229
229 internal::MultiMonitorManager::CycleMonitor(); 230 internal::MultiMonitorManager::CycleMonitor();
230 EXPECT_EQ(1U, monitor_manager()->GetNumMonitors()); 231 EXPECT_EQ(1U, monitor_manager()->GetNumMonitors());
231 EXPECT_EQ("0 0 0", GetCountSummary()); 232 EXPECT_EQ("0 0 0", GetCountSummary());
232 reset(); 233 reset();
233 } 234 }
234 235
235 } // namespace test 236 } // namespace test
236 } // namespace ash 237 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698