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

Side by Side Diff: chrome/browser/ui/webui/settings/site_settings_handler_unittest.cc

Issue 2525943002: Display content settings for extensions with extension name. (Closed)
Patch Set: fix missing . Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ui/webui/settings/site_settings_handler.h" 5 #include "chrome/browser/ui/webui/settings/site_settings_handler.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/ui/webui/site_settings_helper.h" 10 #include "chrome/browser/ui/webui/site_settings_helper.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 254
255 // Verify the reset was successful. 255 // Verify the reset was successful.
256 handler()->HandleGetExceptionList(&listArgs); 256 handler()->HandleGetExceptionList(&listArgs);
257 ValidateNoOrigin(4U); 257 ValidateNoOrigin(4U);
258 } 258 }
259 259
260 TEST_F(SiteSettingsHandlerTest, ExceptionHelpers) { 260 TEST_F(SiteSettingsHandlerTest, ExceptionHelpers) {
261 ContentSettingsPattern pattern = 261 ContentSettingsPattern pattern =
262 ContentSettingsPattern::FromString("[*.]google.com"); 262 ContentSettingsPattern::FromString("[*.]google.com");
263 std::unique_ptr<base::DictionaryValue> exception = 263 std::unique_ptr<base::DictionaryValue> exception =
264 site_settings::GetExceptionForPage(pattern, pattern, 264 site_settings::GetExceptionForPage(pattern, pattern, pattern.ToString(),
265 CONTENT_SETTING_BLOCK, "preference", false); 265 CONTENT_SETTING_BLOCK, "preference",
266 false);
266 267
267 std::string primary_pattern, secondary_pattern, type; 268 std::string primary_pattern, secondary_pattern, type;
268 bool incognito; 269 bool incognito;
269 CHECK(exception->GetString(site_settings::kOrigin, &primary_pattern)); 270 CHECK(exception->GetString(site_settings::kOrigin, &primary_pattern));
270 CHECK(exception->GetString(site_settings::kEmbeddingOrigin, 271 CHECK(exception->GetString(site_settings::kEmbeddingOrigin,
271 &secondary_pattern)); 272 &secondary_pattern));
272 CHECK(exception->GetString(site_settings::kSetting, &type)); 273 CHECK(exception->GetString(site_settings::kSetting, &type));
273 CHECK(exception->GetBoolean(site_settings::kIncognito, &incognito)); 274 CHECK(exception->GetBoolean(site_settings::kIncognito, &incognito));
274 275
275 base::ListValue args; 276 base::ListValue args;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 args.AppendString("http://www.google.com"); 354 args.AppendString("http://www.google.com");
354 handler()->HandleRemoveZoomLevel(&args); 355 handler()->HandleRemoveZoomLevel(&args);
355 ValidateZoom("", "", 3U); 356 ValidateZoom("", "", 3U);
356 357
357 double default_level = host_zoom_map->GetDefaultZoomLevel(); 358 double default_level = host_zoom_map->GetDefaultZoomLevel();
358 double level = host_zoom_map->GetZoomLevelForHostAndScheme("http", host); 359 double level = host_zoom_map->GetZoomLevelForHostAndScheme("http", host);
359 EXPECT_EQ(default_level, level); 360 EXPECT_EQ(default_level, level);
360 } 361 }
361 362
362 } // namespace settings 363 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698