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

Side by Side Diff: chrome/browser/chromeos/display/display_preferences_unittest.cc

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix double registration in Chrome Frame test. Created 7 years, 10 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 "chrome/browser/chromeos/display/display_preferences.h" 5 #include "chrome/browser/chromeos/display/display_preferences.h"
6 6
7 #include "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/screen_ash.h" 8 #include "ash/screen_ash.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/test/ash_test_base.h" 10 #include "ash/test/ash_test_base.h"
11 #include "base/string_number_conversions.h" 11 #include "base/string_number_conversions.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/browser/chromeos/login/mock_user_manager.h" 13 #include "chrome/browser/chromeos/login/mock_user_manager.h"
14 #include "chrome/browser/chromeos/login/user_manager.h" 14 #include "chrome/browser/chromeos/login/user_manager.h"
15 #include "chrome/browser/prefs/scoped_user_pref_update.h" 15 #include "chrome/browser/prefs/scoped_user_pref_update.h"
16 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
17 #include "chrome/test/base/testing_browser_process.h" 17 #include "chrome/test/base/testing_browser_process.h"
18 #include "chrome/test/base/testing_pref_service.h" 18 #include "chrome/test/base/testing_pref_service.h"
19 19
20 namespace chromeos { 20 namespace chromeos {
21 namespace { 21 namespace {
22 22
23 class DisplayPreferencesTest : public ash::test::AshTestBase { 23 class DisplayPreferencesTest : public ash::test::AshTestBase {
24 protected: 24 protected:
25 DisplayPreferencesTest() : ash::test::AshTestBase() {} 25 DisplayPreferencesTest() : ash::test::AshTestBase() {}
26 virtual ~DisplayPreferencesTest() {} 26 virtual ~DisplayPreferencesTest() {}
27 27
28 virtual void SetUp() OVERRIDE { 28 virtual void SetUp() OVERRIDE {
29 ash::test::AshTestBase::SetUp(); 29 ash::test::AshTestBase::SetUp();
30 RegisterDisplayLocalStatePrefs(&local_state_); 30 RegisterDisplayLocalStatePrefs(local_state_.registry());
31 TestingBrowserProcess::GetGlobal()->SetLocalState(&local_state_); 31 TestingBrowserProcess::GetGlobal()->SetLocalState(&local_state_);
32 } 32 }
33 33
34 virtual void TearDown() OVERRIDE { 34 virtual void TearDown() OVERRIDE {
35 TestingBrowserProcess::GetGlobal()->SetLocalState(NULL); 35 TestingBrowserProcess::GetGlobal()->SetLocalState(NULL);
36 ash::test::AshTestBase::TearDown(); 36 ash::test::AshTestBase::TearDown();
37 } 37 }
38 38
39 void LoggedInAsUser() { 39 void LoggedInAsUser() {
40 EXPECT_CALL(*mock_user_manager_.user_manager(), IsUserLoggedIn()) 40 EXPECT_CALL(*mock_user_manager_.user_manager(), IsUserLoggedIn())
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 gfx::Screen* screen = gfx::Screen::GetNativeScreen(); 222 gfx::Screen* screen = gfx::Screen::GetNativeScreen();
223 EXPECT_EQ(id2, screen->GetPrimaryDisplay().id()); 223 EXPECT_EQ(id2, screen->GetPrimaryDisplay().id());
224 EXPECT_EQ(ash::DisplayLayout::BOTTOM, 224 EXPECT_EQ(ash::DisplayLayout::BOTTOM,
225 display_controller->GetCurrentDisplayLayout().position); 225 display_controller->GetCurrentDisplayLayout().position);
226 EXPECT_EQ(-10, display_controller->GetCurrentDisplayLayout().offset); 226 EXPECT_EQ(-10, display_controller->GetCurrentDisplayLayout().offset);
227 EXPECT_EQ("176x178", screen->GetPrimaryDisplay().bounds().size().ToString()); 227 EXPECT_EQ("176x178", screen->GetPrimaryDisplay().bounds().size().ToString());
228 } 228 }
229 229
230 } // namespace 230 } // namespace
231 } // namespace chromeos 231 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/display/display_preferences.cc ('k') | chrome/browser/chromeos/language_preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698