| 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 299 |
| 299 EXPECT_CALL(*mock_bridge_, CreateChannel(kTestOrigin, true /* enabled */)); | 300 EXPECT_CALL(*mock_bridge_, CreateChannel(kTestOrigin, true /* enabled */)); |
| 300 EXPECT_CALL( | 301 EXPECT_CALL( |
| 301 mock_observer, | 302 mock_observer, |
| 302 OnContentSettingChanged(_, _, CONTENT_SETTINGS_TYPE_NOTIFICATIONS, "")); | 303 OnContentSettingChanged(_, _, CONTENT_SETTINGS_TYPE_NOTIFICATIONS, "")); |
| 303 channels_provider_->SetWebsiteSetting( | 304 channels_provider_->SetWebsiteSetting( |
| 304 ContentSettingsPattern::FromString(kTestOrigin), ContentSettingsPattern(), | 305 ContentSettingsPattern::FromString(kTestOrigin), ContentSettingsPattern(), |
| 305 CONTENT_SETTINGS_TYPE_NOTIFICATIONS, std::string(), | 306 CONTENT_SETTINGS_TYPE_NOTIFICATIONS, std::string(), |
| 306 new base::Value(CONTENT_SETTING_ALLOW)); | 307 new base::Value(CONTENT_SETTING_ALLOW)); |
| 307 } | 308 } |
| OLD | NEW |