OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "components/content_settings/core/browser/content_settings_info.h" | 10 #include "components/content_settings/core/browser/content_settings_info.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 // Protected media identifier only get registered on android and chromeos. | 46 // Protected media identifier only get registered on android and chromeos. |
47 #if defined(ANDROID) || defined(OS_CHROMEOS) | 47 #if defined(ANDROID) || defined(OS_CHROMEOS) |
48 EXPECT_TRUE( | 48 EXPECT_TRUE( |
49 registry()->Get(CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER)); | 49 registry()->Get(CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER)); |
50 #else | 50 #else |
51 EXPECT_FALSE( | 51 EXPECT_FALSE( |
52 registry()->Get(CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER)); | 52 registry()->Get(CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER)); |
53 #endif | 53 #endif |
54 | 54 |
| 55 #if defined(OS_ANDROID) |
| 56 // Media stream screen only gets registered on android. |
| 57 EXPECT_TRUE(registry()->Get(CONTENT_SETTINGS_TYPE_MEDIASTREAM_SCREEN)); |
| 58 #else |
| 59 EXPECT_FALSE(registry()->Get(CONTENT_SETTINGS_TYPE_MEDIASTREAM_SCREEN)); |
| 60 #endif |
| 61 |
55 // Cookies is registered on all platforms. | 62 // Cookies is registered on all platforms. |
56 EXPECT_TRUE(registry()->Get(CONTENT_SETTINGS_TYPE_COOKIES)); | 63 EXPECT_TRUE(registry()->Get(CONTENT_SETTINGS_TYPE_COOKIES)); |
57 } | 64 } |
58 | 65 |
59 TEST_F(ContentSettingsRegistryTest, Properties) { | 66 TEST_F(ContentSettingsRegistryTest, Properties) { |
60 // The cookies type should be registered. | 67 // The cookies type should be registered. |
61 const ContentSettingsInfo* info = | 68 const ContentSettingsInfo* info = |
62 registry()->Get(CONTENT_SETTINGS_TYPE_COOKIES); | 69 registry()->Get(CONTENT_SETTINGS_TYPE_COOKIES); |
63 ASSERT_TRUE(info); | 70 ASSERT_TRUE(info); |
64 | 71 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 #if defined(OS_ANDROID) || defined(OS_IOS) | 125 #if defined(OS_ANDROID) || defined(OS_IOS) |
119 EXPECT_FALSE(plugins_found); | 126 EXPECT_FALSE(plugins_found); |
120 #else | 127 #else |
121 EXPECT_TRUE(plugins_found); | 128 EXPECT_TRUE(plugins_found); |
122 #endif | 129 #endif |
123 | 130 |
124 EXPECT_TRUE(cookies_found); | 131 EXPECT_TRUE(cookies_found); |
125 } | 132 } |
126 | 133 |
127 } // namespace content_settings | 134 } // namespace content_settings |
OLD | NEW |