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 #endif | |
raymes
2016/07/13 02:44:09
nit: this should have an #else too (as above)
braveyao
2016/07/13 19:51:57
Done.
| |
59 | |
55 // Cookies is registered on all platforms. | 60 // Cookies is registered on all platforms. |
56 EXPECT_TRUE(registry()->Get(CONTENT_SETTINGS_TYPE_COOKIES)); | 61 EXPECT_TRUE(registry()->Get(CONTENT_SETTINGS_TYPE_COOKIES)); |
57 } | 62 } |
58 | 63 |
59 TEST_F(ContentSettingsRegistryTest, Properties) { | 64 TEST_F(ContentSettingsRegistryTest, Properties) { |
60 // The cookies type should be registered. | 65 // The cookies type should be registered. |
61 const ContentSettingsInfo* info = | 66 const ContentSettingsInfo* info = |
62 registry()->Get(CONTENT_SETTINGS_TYPE_COOKIES); | 67 registry()->Get(CONTENT_SETTINGS_TYPE_COOKIES); |
63 ASSERT_TRUE(info); | 68 ASSERT_TRUE(info); |
64 | 69 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
118 #if defined(OS_ANDROID) || defined(OS_IOS) | 123 #if defined(OS_ANDROID) || defined(OS_IOS) |
119 EXPECT_FALSE(plugins_found); | 124 EXPECT_FALSE(plugins_found); |
120 #else | 125 #else |
121 EXPECT_TRUE(plugins_found); | 126 EXPECT_TRUE(plugins_found); |
122 #endif | 127 #endif |
123 | 128 |
124 EXPECT_TRUE(cookies_found); | 129 EXPECT_TRUE(cookies_found); |
125 } | 130 } |
126 | 131 |
127 } // namespace content_settings | 132 } // namespace content_settings |
OLD | NEW |