| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/browser/chromeos/power/power_prefs.h" | 5 #include "chrome/browser/chromeos/power/power_prefs.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #include "content/public/browser/notification_source.h" | 36 #include "content/public/browser/notification_source.h" |
| 37 #include "testing/gtest/include/gtest/gtest.h" | 37 #include "testing/gtest/include/gtest/gtest.h" |
| 38 | 38 |
| 39 namespace chromeos { | 39 namespace chromeos { |
| 40 | 40 |
| 41 class PowerPrefsTest : public testing::Test { | 41 class PowerPrefsTest : public testing::Test { |
| 42 protected: | 42 protected: |
| 43 PowerPrefsTest(); | 43 PowerPrefsTest(); |
| 44 | 44 |
| 45 // testing::Test: | 45 // testing::Test: |
| 46 virtual void SetUp() OVERRIDE; | 46 virtual void SetUp() override; |
| 47 virtual void TearDown() OVERRIDE; | 47 virtual void TearDown() override; |
| 48 | 48 |
| 49 const Profile* GetProfile() const; | 49 const Profile* GetProfile() const; |
| 50 | 50 |
| 51 std::string GetExpectedPowerPolicyForProfile(Profile* profile) const; | 51 std::string GetExpectedPowerPolicyForProfile(Profile* profile) const; |
| 52 std::string GetCurrentPowerPolicy() const; | 52 std::string GetCurrentPowerPolicy() const; |
| 53 bool GetExpectedAllowScreenWakeLocksForProfile(Profile* profile) const; | 53 bool GetExpectedAllowScreenWakeLocksForProfile(Profile* profile) const; |
| 54 bool GetCurrentAllowScreenWakeLocks() const; | 54 bool GetCurrentAllowScreenWakeLocks() const; |
| 55 | 55 |
| 56 TestingProfileManager profile_manager_; | 56 TestingProfileManager profile_manager_; |
| 57 PowerPolicyController* power_policy_controller_; // Not owned. | 57 PowerPolicyController* power_policy_controller_; // Not owned. |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 content::Source<Profile>(user_profile), | 267 content::Source<Profile>(user_profile), |
| 268 content::NotificationService::NoDetails()); | 268 content::NotificationService::NoDetails()); |
| 269 | 269 |
| 270 // The user profile's prefs should still be used. | 270 // The user profile's prefs should still be used. |
| 271 EXPECT_FALSE(GetProfile()); | 271 EXPECT_FALSE(GetProfile()); |
| 272 EXPECT_EQ(GetExpectedPowerPolicyForProfile(user_profile), | 272 EXPECT_EQ(GetExpectedPowerPolicyForProfile(user_profile), |
| 273 GetCurrentPowerPolicy()); | 273 GetCurrentPowerPolicy()); |
| 274 } | 274 } |
| 275 | 275 |
| 276 } // namespace chromeos | 276 } // namespace chromeos |
| OLD | NEW |