| 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 <string> | 5 #include <string> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "ash/system/system_notifier.h" | 30 #include "ash/system/system_notifier.h" |
| 31 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" | 31 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" |
| 32 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" | 32 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" |
| 33 #endif | 33 #endif |
| 34 | 34 |
| 35 class MessageCenterSettingsControllerBaseTest : public testing::Test { | 35 class MessageCenterSettingsControllerBaseTest : public testing::Test { |
| 36 protected: | 36 protected: |
| 37 MessageCenterSettingsControllerBaseTest() | 37 MessageCenterSettingsControllerBaseTest() |
| 38 : testing_profile_manager_(TestingBrowserProcess::GetGlobal()) {} | 38 : testing_profile_manager_(TestingBrowserProcess::GetGlobal()) {} |
| 39 | 39 |
| 40 ~MessageCenterSettingsControllerBaseTest() override{}; | 40 ~MessageCenterSettingsControllerBaseTest() override {} |
| 41 | 41 |
| 42 base::FilePath GetProfilePath(const std::string& base_name) { | 42 base::FilePath GetProfilePath(const std::string& base_name) { |
| 43 return testing_profile_manager_.profile_manager()->user_data_dir() | 43 return testing_profile_manager_.profile_manager()->user_data_dir() |
| 44 .AppendASCII(base_name); | 44 .AppendASCII(base_name); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void SetUp() override { ASSERT_TRUE(testing_profile_manager_.SetUp()); } | 47 void SetUp() override { ASSERT_TRUE(testing_profile_manager_.SetUp()); } |
| 48 | 48 |
| 49 virtual TestingProfile* CreateProfile(const std::string& name) { | 49 virtual TestingProfile* CreateProfile(const std::string& name) { |
| 50 return testing_profile_manager_.CreateTestingProfile(name); | 50 return testing_profile_manager_.CreateTestingProfile(name); |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 .content_setting); | 365 .content_setting); |
| 366 | 366 |
| 367 // (6) Disable the permission when the default is blocked (expected to clear). | 367 // (6) Disable the permission when the default is blocked (expected to clear). |
| 368 controller()->SetNotifierEnabled(enabled_notifier, false); | 368 controller()->SetNotifierEnabled(enabled_notifier, false); |
| 369 EXPECT_EQ(CONTENT_SETTING_BLOCK, | 369 EXPECT_EQ(CONTENT_SETTING_BLOCK, |
| 370 permission_manager | 370 permission_manager |
| 371 ->GetPermissionStatus(CONTENT_SETTINGS_TYPE_NOTIFICATIONS, | 371 ->GetPermissionStatus(CONTENT_SETTINGS_TYPE_NOTIFICATIONS, |
| 372 origin, origin) | 372 origin, origin) |
| 373 .content_setting); | 373 .content_setting); |
| 374 } | 374 } |
| OLD | NEW |