OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/notifications/notification_channels_provider_android.h" | 5 #include "chrome/browser/notifications/notification_channels_provider_android.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "base/task_scheduler/task_scheduler.h" | 8 #include "base/task_scheduler/task_scheduler.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/content_settings/content_settings_mock_observer.h" | 10 #include "chrome/browser/content_settings/content_settings_mock_observer.h" |
11 #include "components/content_settings/core/browser/content_settings_pref.h" | 11 #include "components/content_settings/core/browser/content_settings_pref.h" |
12 #include "components/content_settings/core/browser/content_settings_rule.h" | 12 #include "components/content_settings/core/browser/content_settings_rule.h" |
13 #include "components/content_settings/core/browser/content_settings_utils.h" | 13 #include "components/content_settings/core/browser/content_settings_utils.h" |
14 #include "components/content_settings/core/common/content_settings_pattern.h" | 14 #include "components/content_settings/core/common/content_settings_pattern.h" |
| 15 #include "components/content_settings/core/common/content_settings_utils.h" |
15 #include "content/public/test/test_browser_thread_bundle.h" | 16 #include "content/public/test/test_browser_thread_bundle.h" |
16 #include "content/public/test/test_utils.h" | 17 #include "content/public/test/test_utils.h" |
17 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
19 #include "url/gurl.h" | 20 #include "url/gurl.h" |
20 | 21 |
21 using ::testing::_; | 22 using ::testing::_; |
22 using ::testing::InSequence; | 23 using ::testing::InSequence; |
23 using ::testing::MockFunction; | 24 using ::testing::MockFunction; |
24 using ::testing::Return; | 25 using ::testing::Return; |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 TEST_F(NotificationChannelsProviderAndroidTest, | 346 TEST_F(NotificationChannelsProviderAndroidTest, |
346 ClearAllContentSettingsRulesNoopsIfNotUsingChannels) { | 347 ClearAllContentSettingsRulesNoopsIfNotUsingChannels) { |
347 InitChannelsProvider(false /* should_use_channels */); | 348 InitChannelsProvider(false /* should_use_channels */); |
348 | 349 |
349 EXPECT_CALL(*mock_bridge_, GetChannels()).Times(0); | 350 EXPECT_CALL(*mock_bridge_, GetChannels()).Times(0); |
350 EXPECT_CALL(*mock_bridge_, DeleteChannel(_)).Times(0); | 351 EXPECT_CALL(*mock_bridge_, DeleteChannel(_)).Times(0); |
351 | 352 |
352 channels_provider_->ClearAllContentSettingsRules( | 353 channels_provider_->ClearAllContentSettingsRules( |
353 CONTENT_SETTINGS_TYPE_NOTIFICATIONS); | 354 CONTENT_SETTINGS_TYPE_NOTIFICATIONS); |
354 } | 355 } |
OLD | NEW |