| 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/values.h" | 8 #include "base/values.h" |
| 9 #include "components/content_settings/core/browser/content_settings_pref.h" | 9 #include "components/content_settings/core/browser/content_settings_pref.h" |
| 10 #include "components/content_settings/core/browser/content_settings_rule.h" | 10 #include "components/content_settings/core/browser/content_settings_rule.h" |
| 11 #include "components/content_settings/core/browser/content_settings_utils.h" | 11 #include "components/content_settings/core/browser/content_settings_utils.h" |
| 12 #include "components/content_settings/core/common/content_settings_pattern.h" | 12 #include "components/content_settings/core/common/content_settings_pattern.h" |
| 13 #include "components/content_settings/core/common/content_settings_utils.h" |
| 13 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 15 #include "url/gurl.h" | 16 #include "url/gurl.h" |
| 16 | 17 |
| 17 using ::testing::Return; | 18 using ::testing::Return; |
| 18 | 19 |
| 19 namespace { | 20 namespace { |
| 20 const char kTestOrigin[] = "https://example.com"; | 21 const char kTestOrigin[] = "https://example.com"; |
| 21 } // namespace | 22 } // namespace |
| 22 | 23 |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 EXPECT_EQ(CONTENT_SETTING_ALLOW, | 211 EXPECT_EQ(CONTENT_SETTING_ALLOW, |
| 211 content_settings::ValueToContentSetting(first_rule.value.get())); | 212 content_settings::ValueToContentSetting(first_rule.value.get())); |
| 212 EXPECT_TRUE(result->HasNext()); | 213 EXPECT_TRUE(result->HasNext()); |
| 213 content_settings::Rule second_rule = result->Next(); | 214 content_settings::Rule second_rule = result->Next(); |
| 214 EXPECT_EQ(ContentSettingsPattern::FromString("https://xyz.com"), | 215 EXPECT_EQ(ContentSettingsPattern::FromString("https://xyz.com"), |
| 215 second_rule.primary_pattern); | 216 second_rule.primary_pattern); |
| 216 EXPECT_EQ(CONTENT_SETTING_BLOCK, | 217 EXPECT_EQ(CONTENT_SETTING_BLOCK, |
| 217 content_settings::ValueToContentSetting(second_rule.value.get())); | 218 content_settings::ValueToContentSetting(second_rule.value.get())); |
| 218 EXPECT_FALSE(result->HasNext()); | 219 EXPECT_FALSE(result->HasNext()); |
| 219 } | 220 } |
| OLD | NEW |