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

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

Issue 731373002: Enable MSVC warning for unused locals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 "base/auto_reset.h" 5 #include "base/auto_reset.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 host, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string())); 910 host, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string()));
911 EXPECT_EQ(CONTENT_SETTING_ALLOW, 911 EXPECT_EQ(CONTENT_SETTING_ALLOW,
912 host_content_settings_map->GetContentSetting( 912 host_content_settings_map->GetContentSetting(
913 embedder, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string())); 913 embedder, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string()));
914 } 914 }
915 915
916 TEST_F(HostContentSettingsMapTest, ShouldAllowAllContent) { 916 TEST_F(HostContentSettingsMapTest, ShouldAllowAllContent) {
917 TestingProfile profile; 917 TestingProfile profile;
918 HostContentSettingsMap* host_content_settings_map = 918 HostContentSettingsMap* host_content_settings_map =
919 profile.GetHostContentSettingsMap(); 919 profile.GetHostContentSettingsMap();
920 ALLOW_UNUSED_LOCAL(host_content_settings_map); // MSVC is retarded
920 921
921 GURL http_host("http://example.com/"); 922 GURL http_host("http://example.com/");
922 GURL https_host("https://example.com/"); 923 GURL https_host("https://example.com/");
923 GURL embedder("chrome://foo"); 924 GURL embedder("chrome://foo");
924 GURL extension("chrome-extension://foo"); 925 GURL extension("chrome-extension://foo");
925 EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent( 926 EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent(
926 http_host, embedder, CONTENT_SETTINGS_TYPE_NOTIFICATIONS)); 927 http_host, embedder, CONTENT_SETTINGS_TYPE_NOTIFICATIONS));
927 EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent( 928 EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent(
928 http_host, embedder, CONTENT_SETTINGS_TYPE_GEOLOCATION)); 929 http_host, embedder, CONTENT_SETTINGS_TYPE_GEOLOCATION));
929 EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent( 930 EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent(
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 CONTENT_SETTINGS_TYPE_IMAGES, true); 1035 CONTENT_SETTINGS_TYPE_IMAGES, true);
1035 EXPECT_EQ(CONTENT_SETTING_ALLOW, 1036 EXPECT_EQ(CONTENT_SETTING_ALLOW,
1036 host_content_settings_map->GetContentSetting( 1037 host_content_settings_map->GetContentSetting(
1037 host, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string())); 1038 host, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string()));
1038 host_content_settings_map->SetDefaultContentSetting( 1039 host_content_settings_map->SetDefaultContentSetting(
1039 CONTENT_SETTINGS_TYPE_IMAGES, CONTENT_SETTING_BLOCK); 1040 CONTENT_SETTINGS_TYPE_IMAGES, CONTENT_SETTING_BLOCK);
1040 EXPECT_EQ(CONTENT_SETTING_BLOCK, 1041 EXPECT_EQ(CONTENT_SETTING_BLOCK,
1041 host_content_settings_map->GetContentSetting( 1042 host_content_settings_map->GetContentSetting(
1042 host, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string())); 1043 host, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string()));
1043 } 1044 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698