Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1448)

Side by Side Diff: chrome/browser/content_settings/host_content_settings_map_unittest.cc

Issue 2512563003: Convert enable_plugins to a buildflag header. (Closed)
Patch Set: Merge Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <memory> 5 #include <memory>
6 #include <string> 6 #include <string>
7 7
8 #include "base/auto_reset.h" 8 #include "base/auto_reset.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 10 matching lines...) Expand all
21 #include "components/content_settings/core/browser/cookie_settings.h" 21 #include "components/content_settings/core/browser/cookie_settings.h"
22 #include "components/content_settings/core/browser/host_content_settings_map.h" 22 #include "components/content_settings/core/browser/host_content_settings_map.h"
23 #include "components/content_settings/core/browser/website_settings_info.h" 23 #include "components/content_settings/core/browser/website_settings_info.h"
24 #include "components/content_settings/core/browser/website_settings_registry.h" 24 #include "components/content_settings/core/browser/website_settings_registry.h"
25 #include "components/content_settings/core/common/pref_names.h" 25 #include "components/content_settings/core/common/pref_names.h"
26 #include "components/prefs/pref_service.h" 26 #include "components/prefs/pref_service.h"
27 #include "components/prefs/scoped_user_pref_update.h" 27 #include "components/prefs/scoped_user_pref_update.h"
28 #include "components/sync_preferences/testing_pref_service_syncable.h" 28 #include "components/sync_preferences/testing_pref_service_syncable.h"
29 #include "content/public/test/test_browser_thread.h" 29 #include "content/public/test/test_browser_thread.h"
30 #include "net/base/static_cookie_policy.h" 30 #include "net/base/static_cookie_policy.h"
31 #include "ppapi/features/features.h"
31 #include "testing/gtest/include/gtest/gtest.h" 32 #include "testing/gtest/include/gtest/gtest.h"
32 #include "url/gurl.h" 33 #include "url/gurl.h"
33 34
34 using content::BrowserThread; 35 using content::BrowserThread;
35 36
36 using ::testing::_; 37 using ::testing::_;
37 38
38 namespace { 39 namespace {
39 40
40 bool MatchPrimaryPattern(const ContentSettingsPattern& expected_primary, 41 bool MatchPrimaryPattern(const ContentSettingsPattern& expected_primary,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 CONTENT_SETTINGS_TYPE_JAVASCRIPT, CONTENT_SETTING_BLOCK); 134 CONTENT_SETTINGS_TYPE_JAVASCRIPT, CONTENT_SETTING_BLOCK);
134 EXPECT_EQ(CONTENT_SETTING_BLOCK, 135 EXPECT_EQ(CONTENT_SETTING_BLOCK,
135 host_content_settings_map->GetDefaultContentSetting( 136 host_content_settings_map->GetDefaultContentSetting(
136 CONTENT_SETTINGS_TYPE_JAVASCRIPT, NULL)); 137 CONTENT_SETTINGS_TYPE_JAVASCRIPT, NULL));
137 EXPECT_EQ( 138 EXPECT_EQ(
138 CONTENT_SETTING_ALLOW, 139 CONTENT_SETTING_ALLOW,
139 host_content_settings_map->GetContentSetting( 140 host_content_settings_map->GetContentSetting(
140 GURL(chrome::kChromeUINewTabURL), GURL(chrome::kChromeUINewTabURL), 141 GURL(chrome::kChromeUINewTabURL), GURL(chrome::kChromeUINewTabURL),
141 CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string())); 142 CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string()));
142 143
143 #if defined(ENABLE_PLUGINS) 144 #if BUILDFLAG(ENABLE_PLUGINS)
144 host_content_settings_map->SetDefaultContentSetting( 145 host_content_settings_map->SetDefaultContentSetting(
145 CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_ALLOW); 146 CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_ALLOW);
146 EXPECT_EQ(CONTENT_SETTING_ALLOW, 147 EXPECT_EQ(CONTENT_SETTING_ALLOW,
147 host_content_settings_map->GetDefaultContentSetting( 148 host_content_settings_map->GetDefaultContentSetting(
148 CONTENT_SETTINGS_TYPE_PLUGINS, NULL)); 149 CONTENT_SETTINGS_TYPE_PLUGINS, NULL));
149 host_content_settings_map->SetDefaultContentSetting( 150 host_content_settings_map->SetDefaultContentSetting(
150 CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_BLOCK); 151 CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_BLOCK);
151 EXPECT_EQ(CONTENT_SETTING_BLOCK, 152 EXPECT_EQ(CONTENT_SETTING_BLOCK,
152 host_content_settings_map->GetDefaultContentSetting( 153 host_content_settings_map->GetDefaultContentSetting(
153 CONTENT_SETTINGS_TYPE_PLUGINS, NULL)); 154 CONTENT_SETTINGS_TYPE_PLUGINS, NULL));
(...skipping 29 matching lines...) Expand all
183 CONTENT_SETTING_DEFAULT); 184 CONTENT_SETTING_DEFAULT);
184 EXPECT_EQ(CONTENT_SETTING_ALLOW, 185 EXPECT_EQ(CONTENT_SETTING_ALLOW,
185 host_content_settings_map->GetContentSetting( 186 host_content_settings_map->GetContentSetting(
186 host, host, CONTENT_SETTINGS_TYPE_COOKIES, std::string())); 187 host, host, CONTENT_SETTINGS_TYPE_COOKIES, std::string()));
187 host_content_settings_map->SetContentSettingDefaultScope( 188 host_content_settings_map->SetContentSettingDefaultScope(
188 host, GURL(), CONTENT_SETTINGS_TYPE_COOKIES, std::string(), 189 host, GURL(), CONTENT_SETTINGS_TYPE_COOKIES, std::string(),
189 CONTENT_SETTING_BLOCK); 190 CONTENT_SETTING_BLOCK);
190 EXPECT_EQ(CONTENT_SETTING_BLOCK, 191 EXPECT_EQ(CONTENT_SETTING_BLOCK,
191 host_content_settings_map->GetContentSetting( 192 host_content_settings_map->GetContentSetting(
192 host, host, CONTENT_SETTINGS_TYPE_COOKIES, std::string())); 193 host, host, CONTENT_SETTINGS_TYPE_COOKIES, std::string()));
193 #if defined(ENABLE_PLUGINS) 194 #if BUILDFLAG(ENABLE_PLUGINS)
194 EXPECT_EQ(CONTENT_SETTING_DETECT_IMPORTANT_CONTENT, 195 EXPECT_EQ(CONTENT_SETTING_DETECT_IMPORTANT_CONTENT,
195 host_content_settings_map->GetContentSetting( 196 host_content_settings_map->GetContentSetting(
196 host, host, CONTENT_SETTINGS_TYPE_PLUGINS, std::string())); 197 host, host, CONTENT_SETTINGS_TYPE_PLUGINS, std::string()));
197 #endif 198 #endif
198 199
199 // Check returning all settings for a host. 200 // Check returning all settings for a host.
200 host_content_settings_map->SetContentSettingDefaultScope( 201 host_content_settings_map->SetContentSettingDefaultScope(
201 host, GURL(), CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string(), 202 host, GURL(), CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string(),
202 CONTENT_SETTING_BLOCK); 203 CONTENT_SETTING_BLOCK);
203 EXPECT_EQ(CONTENT_SETTING_BLOCK, 204 EXPECT_EQ(CONTENT_SETTING_BLOCK,
204 host_content_settings_map->GetContentSetting( 205 host_content_settings_map->GetContentSetting(
205 host, host, CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string())); 206 host, host, CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string()));
206 #if defined(ENABLE_PLUGINS) 207 #if BUILDFLAG(ENABLE_PLUGINS)
207 host_content_settings_map->SetContentSettingDefaultScope( 208 host_content_settings_map->SetContentSettingDefaultScope(
208 host, GURL(), CONTENT_SETTINGS_TYPE_PLUGINS, std::string(), 209 host, GURL(), CONTENT_SETTINGS_TYPE_PLUGINS, std::string(),
209 CONTENT_SETTING_ALLOW); 210 CONTENT_SETTING_ALLOW);
210 EXPECT_EQ(CONTENT_SETTING_ALLOW, 211 EXPECT_EQ(CONTENT_SETTING_ALLOW,
211 host_content_settings_map->GetContentSetting( 212 host_content_settings_map->GetContentSetting(
212 host, host, CONTENT_SETTINGS_TYPE_PLUGINS, std::string())); 213 host, host, CONTENT_SETTINGS_TYPE_PLUGINS, std::string()));
213 #endif 214 #endif
214 EXPECT_EQ(CONTENT_SETTING_BLOCK, 215 EXPECT_EQ(CONTENT_SETTING_BLOCK,
215 host_content_settings_map->GetContentSetting( 216 host_content_settings_map->GetContentSetting(
216 host, host, CONTENT_SETTINGS_TYPE_POPUPS, std::string())); 217 host, host, CONTENT_SETTINGS_TYPE_POPUPS, std::string()));
(...skipping 17 matching lines...) Expand all
234 CONTENT_SETTING_BLOCK); 235 CONTENT_SETTING_BLOCK);
235 EXPECT_EQ(CONTENT_SETTING_BLOCK, 236 EXPECT_EQ(CONTENT_SETTING_BLOCK,
236 host_content_settings_map->GetContentSetting( 237 host_content_settings_map->GetContentSetting(
237 host, host, CONTENT_SETTINGS_TYPE_AUTOPLAY, std::string())); 238 host, host, CONTENT_SETTINGS_TYPE_AUTOPLAY, std::string()));
238 239
239 // Check returning all hosts for a setting. 240 // Check returning all hosts for a setting.
240 GURL host2("http://example.org/"); 241 GURL host2("http://example.org/");
241 host_content_settings_map->SetContentSettingDefaultScope( 242 host_content_settings_map->SetContentSettingDefaultScope(
242 host2, GURL(), CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string(), 243 host2, GURL(), CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string(),
243 CONTENT_SETTING_BLOCK); 244 CONTENT_SETTING_BLOCK);
244 #if defined(ENABLE_PLUGINS) 245 #if BUILDFLAG(ENABLE_PLUGINS)
245 host_content_settings_map->SetContentSettingDefaultScope( 246 host_content_settings_map->SetContentSettingDefaultScope(
246 host2, GURL(), CONTENT_SETTINGS_TYPE_PLUGINS, std::string(), 247 host2, GURL(), CONTENT_SETTINGS_TYPE_PLUGINS, std::string(),
247 CONTENT_SETTING_BLOCK); 248 CONTENT_SETTING_BLOCK);
248 #endif 249 #endif
249 ContentSettingsForOneType host_settings; 250 ContentSettingsForOneType host_settings;
250 host_content_settings_map->GetSettingsForOneType( 251 host_content_settings_map->GetSettingsForOneType(
251 CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string(), &host_settings); 252 CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string(), &host_settings);
252 // |host_settings| contains the default setting and 2 exception. 253 // |host_settings| contains the default setting and 2 exception.
253 EXPECT_EQ(3U, host_settings.size()); 254 EXPECT_EQ(3U, host_settings.size());
254 #if defined(ENABLE_PLUGINS) 255 #if BUILDFLAG(ENABLE_PLUGINS)
255 host_content_settings_map->GetSettingsForOneType( 256 host_content_settings_map->GetSettingsForOneType(
256 CONTENT_SETTINGS_TYPE_PLUGINS, std::string(), &host_settings); 257 CONTENT_SETTINGS_TYPE_PLUGINS, std::string(), &host_settings);
257 // |host_settings| contains the default setting and 2 exceptions. 258 // |host_settings| contains the default setting and 2 exceptions.
258 EXPECT_EQ(3U, host_settings.size()); 259 EXPECT_EQ(3U, host_settings.size());
259 #endif 260 #endif
260 host_content_settings_map->GetSettingsForOneType( 261 host_content_settings_map->GetSettingsForOneType(
261 CONTENT_SETTINGS_TYPE_POPUPS, std::string(), &host_settings); 262 CONTENT_SETTINGS_TYPE_POPUPS, std::string(), &host_settings);
262 // |host_settings| contains only the default setting. 263 // |host_settings| contains only the default setting.
263 EXPECT_EQ(1U, host_settings.size()); 264 EXPECT_EQ(1U, host_settings.size());
264 } 265 }
265 266
266 TEST_F(HostContentSettingsMapTest, Clear) { 267 TEST_F(HostContentSettingsMapTest, Clear) {
267 TestingProfile profile; 268 TestingProfile profile;
268 HostContentSettingsMap* host_content_settings_map = 269 HostContentSettingsMap* host_content_settings_map =
269 HostContentSettingsMapFactory::GetForProfile(&profile); 270 HostContentSettingsMapFactory::GetForProfile(&profile);
270 271
271 // Check clearing one type. 272 // Check clearing one type.
272 GURL host("http://example.org/"); 273 GURL host("http://example.org/");
273 GURL host2("http://example.net/"); 274 GURL host2("http://example.net/");
274 host_content_settings_map->SetContentSettingDefaultScope( 275 host_content_settings_map->SetContentSettingDefaultScope(
275 host2, GURL(), CONTENT_SETTINGS_TYPE_COOKIES, std::string(), 276 host2, GURL(), CONTENT_SETTINGS_TYPE_COOKIES, std::string(),
276 CONTENT_SETTING_BLOCK); 277 CONTENT_SETTING_BLOCK);
277 host_content_settings_map->SetContentSettingDefaultScope( 278 host_content_settings_map->SetContentSettingDefaultScope(
278 host, GURL(), CONTENT_SETTINGS_TYPE_COOKIES, std::string(), 279 host, GURL(), CONTENT_SETTINGS_TYPE_COOKIES, std::string(),
279 CONTENT_SETTING_BLOCK); 280 CONTENT_SETTING_BLOCK);
280 #if defined(ENABLE_PLUGINS) 281 #if BUILDFLAG(ENABLE_PLUGINS)
281 host_content_settings_map->SetContentSettingDefaultScope( 282 host_content_settings_map->SetContentSettingDefaultScope(
282 host, GURL(), CONTENT_SETTINGS_TYPE_PLUGINS, std::string(), 283 host, GURL(), CONTENT_SETTINGS_TYPE_PLUGINS, std::string(),
283 CONTENT_SETTING_BLOCK); 284 CONTENT_SETTING_BLOCK);
284 #endif 285 #endif
285 host_content_settings_map->SetContentSettingDefaultScope( 286 host_content_settings_map->SetContentSettingDefaultScope(
286 host2, GURL(), CONTENT_SETTINGS_TYPE_COOKIES, std::string(), 287 host2, GURL(), CONTENT_SETTINGS_TYPE_COOKIES, std::string(),
287 CONTENT_SETTING_BLOCK); 288 CONTENT_SETTING_BLOCK);
288 host_content_settings_map->ClearSettingsForOneType( 289 host_content_settings_map->ClearSettingsForOneType(
289 CONTENT_SETTINGS_TYPE_COOKIES); 290 CONTENT_SETTINGS_TYPE_COOKIES);
290 ContentSettingsForOneType host_settings; 291 ContentSettingsForOneType host_settings;
291 host_content_settings_map->GetSettingsForOneType( 292 host_content_settings_map->GetSettingsForOneType(
292 CONTENT_SETTINGS_TYPE_COOKIES, std::string(), &host_settings); 293 CONTENT_SETTINGS_TYPE_COOKIES, std::string(), &host_settings);
293 // |host_settings| contains only the default setting. 294 // |host_settings| contains only the default setting.
294 EXPECT_EQ(1U, host_settings.size()); 295 EXPECT_EQ(1U, host_settings.size());
295 #if defined(ENABLE_PLUGINS) 296 #if BUILDFLAG(ENABLE_PLUGINS)
296 host_content_settings_map->GetSettingsForOneType( 297 host_content_settings_map->GetSettingsForOneType(
297 CONTENT_SETTINGS_TYPE_PLUGINS, std::string(), &host_settings); 298 CONTENT_SETTINGS_TYPE_PLUGINS, std::string(), &host_settings);
298 // |host_settings| contains the default setting and an exception. 299 // |host_settings| contains the default setting and an exception.
299 EXPECT_EQ(2U, host_settings.size()); 300 EXPECT_EQ(2U, host_settings.size());
300 #endif 301 #endif
301 } 302 }
302 303
303 TEST_F(HostContentSettingsMapTest, Patterns) { 304 TEST_F(HostContentSettingsMapTest, Patterns) {
304 TestingProfile profile; 305 TestingProfile profile;
305 HostContentSettingsMap* host_content_settings_map = 306 HostContentSettingsMap* host_content_settings_map =
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 host_content_settings_map->SetContentSettingDefaultScope( 517 host_content_settings_map->SetContentSettingDefaultScope(
517 host_ending_with_dot, GURL(), CONTENT_SETTINGS_TYPE_JAVASCRIPT, 518 host_ending_with_dot, GURL(), CONTENT_SETTINGS_TYPE_JAVASCRIPT,
518 std::string(), CONTENT_SETTING_BLOCK); 519 std::string(), CONTENT_SETTING_BLOCK);
519 EXPECT_EQ(CONTENT_SETTING_BLOCK, 520 EXPECT_EQ(CONTENT_SETTING_BLOCK,
520 host_content_settings_map->GetContentSetting( 521 host_content_settings_map->GetContentSetting(
521 host_ending_with_dot, 522 host_ending_with_dot,
522 host_ending_with_dot, 523 host_ending_with_dot,
523 CONTENT_SETTINGS_TYPE_JAVASCRIPT, 524 CONTENT_SETTINGS_TYPE_JAVASCRIPT,
524 std::string())); 525 std::string()));
525 526
526 #if defined(ENABLE_PLUGINS) 527 #if BUILDFLAG(ENABLE_PLUGINS)
527 EXPECT_EQ(CONTENT_SETTING_DETECT_IMPORTANT_CONTENT, 528 EXPECT_EQ(CONTENT_SETTING_DETECT_IMPORTANT_CONTENT,
528 host_content_settings_map->GetContentSetting( 529 host_content_settings_map->GetContentSetting(
529 host_ending_with_dot, 530 host_ending_with_dot,
530 host_ending_with_dot, 531 host_ending_with_dot,
531 CONTENT_SETTINGS_TYPE_PLUGINS, 532 CONTENT_SETTINGS_TYPE_PLUGINS,
532 std::string())); 533 std::string()));
533 host_content_settings_map->SetContentSettingDefaultScope( 534 host_content_settings_map->SetContentSettingDefaultScope(
534 host_ending_with_dot, GURL(), CONTENT_SETTINGS_TYPE_PLUGINS, 535 host_ending_with_dot, GURL(), CONTENT_SETTINGS_TYPE_PLUGINS,
535 std::string(), CONTENT_SETTING_DEFAULT); 536 std::string(), CONTENT_SETTING_DEFAULT);
536 EXPECT_EQ(CONTENT_SETTING_DETECT_IMPORTANT_CONTENT, 537 EXPECT_EQ(CONTENT_SETTING_DETECT_IMPORTANT_CONTENT,
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 EXPECT_EQ(CONTENT_SETTING_BLOCK, 1018 EXPECT_EQ(CONTENT_SETTING_BLOCK,
1018 host_content_settings_map->GetDefaultContentSetting( 1019 host_content_settings_map->GetDefaultContentSetting(
1019 CONTENT_SETTINGS_TYPE_JAVASCRIPT, NULL)); 1020 CONTENT_SETTINGS_TYPE_JAVASCRIPT, NULL));
1020 1021
1021 // Remove managed-default-content-settings-preferences. 1022 // Remove managed-default-content-settings-preferences.
1022 prefs->RemoveManagedPref(prefs::kManagedDefaultJavaScriptSetting); 1023 prefs->RemoveManagedPref(prefs::kManagedDefaultJavaScriptSetting);
1023 EXPECT_EQ(CONTENT_SETTING_ALLOW, 1024 EXPECT_EQ(CONTENT_SETTING_ALLOW,
1024 host_content_settings_map->GetDefaultContentSetting( 1025 host_content_settings_map->GetDefaultContentSetting(
1025 CONTENT_SETTINGS_TYPE_JAVASCRIPT, NULL)); 1026 CONTENT_SETTINGS_TYPE_JAVASCRIPT, NULL));
1026 1027
1027 #if defined(ENABLE_PLUGINS) 1028 #if BUILDFLAG(ENABLE_PLUGINS)
1028 // Set preference to manage the default-content-setting for Plugins. 1029 // Set preference to manage the default-content-setting for Plugins.
1029 prefs->SetManagedPref(prefs::kManagedDefaultPluginsSetting, 1030 prefs->SetManagedPref(prefs::kManagedDefaultPluginsSetting,
1030 new base::FundamentalValue(CONTENT_SETTING_BLOCK)); 1031 new base::FundamentalValue(CONTENT_SETTING_BLOCK));
1031 EXPECT_EQ(CONTENT_SETTING_BLOCK, 1032 EXPECT_EQ(CONTENT_SETTING_BLOCK,
1032 host_content_settings_map->GetDefaultContentSetting( 1033 host_content_settings_map->GetDefaultContentSetting(
1033 CONTENT_SETTINGS_TYPE_PLUGINS, NULL)); 1034 CONTENT_SETTINGS_TYPE_PLUGINS, NULL));
1034 1035
1035 // Remove the preference to manage the default-content-setting for Plugins. 1036 // Remove the preference to manage the default-content-setting for Plugins.
1036 prefs->RemoveManagedPref(prefs::kManagedDefaultPluginsSetting); 1037 prefs->RemoveManagedPref(prefs::kManagedDefaultPluginsSetting);
1037 EXPECT_EQ(CONTENT_SETTING_DETECT_IMPORTANT_CONTENT, 1038 EXPECT_EQ(CONTENT_SETTING_DETECT_IMPORTANT_CONTENT,
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
1734 host_content_settings_map->ClearSettingsForOneTypeWithPredicate( 1735 host_content_settings_map->ClearSettingsForOneTypeWithPredicate(
1735 CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT, 1736 CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT,
1736 base::Bind(&MatchPrimaryPattern, http_pattern)); 1737 base::Bind(&MatchPrimaryPattern, http_pattern));
1737 // Verify we only have one, and it's url1. 1738 // Verify we only have one, and it's url1.
1738 host_content_settings_map->GetSettingsForOneType( 1739 host_content_settings_map->GetSettingsForOneType(
1739 CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT, std::string(), &host_settings); 1740 CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT, std::string(), &host_settings);
1740 EXPECT_EQ(1u, host_settings.size()); 1741 EXPECT_EQ(1u, host_settings.size());
1741 EXPECT_EQ(ContentSettingsPattern::FromURLNoWildcard(url1), 1742 EXPECT_EQ(ContentSettingsPattern::FromURLNoWildcard(url1),
1742 host_settings[0].primary_pattern); 1743 host_settings[0].primary_pattern);
1743 } 1744 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698