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

Side by Side Diff: chrome/browser/notifications/message_center_settings_controller_unittest.cc

Issue 2732813002: chromeos: Move files in //ash/common to //ash, part 1 (Closed)
Patch Set: rebase Created 3 years, 9 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
OLDNEW
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"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 12 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
13 #include "chrome/browser/extensions/extension_service.h" 13 #include "chrome/browser/extensions/extension_service.h"
14 #include "chrome/browser/extensions/test_extension_system.h" 14 #include "chrome/browser/extensions/test_extension_system.h"
15 #include "chrome/browser/notifications/message_center_settings_controller.h" 15 #include "chrome/browser/notifications/message_center_settings_controller.h"
16 #include "chrome/browser/permissions/permission_manager.h" 16 #include "chrome/browser/permissions/permission_manager.h"
17 #include "chrome/browser/permissions/permission_result.h" 17 #include "chrome/browser/permissions/permission_result.h"
18 #include "chrome/browser/profiles/profile_manager.h" 18 #include "chrome/browser/profiles/profile_manager.h"
19 #include "chrome/test/base/testing_browser_process.h" 19 #include "chrome/test/base/testing_browser_process.h"
20 #include "chrome/test/base/testing_profile_manager.h" 20 #include "chrome/test/base/testing_profile_manager.h"
21 #include "components/content_settings/core/browser/host_content_settings_map.h" 21 #include "components/content_settings/core/browser/host_content_settings_map.h"
22 #include "components/content_settings/core/common/content_settings_types.h" 22 #include "components/content_settings/core/common/content_settings_types.h"
23 #include "content/public/test/test_browser_thread_bundle.h" 23 #include "content/public/test/test_browser_thread_bundle.h"
24 #include "extensions/common/extension.h" 24 #include "extensions/common/extension.h"
25 #include "extensions/common/extension_builder.h" 25 #include "extensions/common/extension_builder.h"
26 #include "testing/gtest/include/gtest/gtest.h" 26 #include "testing/gtest/include/gtest/gtest.h"
27 #include "ui/message_center/notifier_settings.h" 27 #include "ui/message_center/notifier_settings.h"
28 28
29 #if defined(OS_CHROMEOS) 29 #if defined(OS_CHROMEOS)
30 #include "ash/common/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{};
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698