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

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

Issue 535773002: Android: Remove more browser extensions code, including some that snuck back in. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 months 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 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent( 928 EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent(
929 http_host, embedder, CONTENT_SETTINGS_TYPE_GEOLOCATION)); 929 http_host, embedder, CONTENT_SETTINGS_TYPE_GEOLOCATION));
930 EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent( 930 EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent(
931 http_host, embedder, CONTENT_SETTINGS_TYPE_COOKIES)); 931 http_host, embedder, CONTENT_SETTINGS_TYPE_COOKIES));
932 EXPECT_TRUE(host_content_settings_map->ShouldAllowAllContent( 932 EXPECT_TRUE(host_content_settings_map->ShouldAllowAllContent(
933 https_host, embedder, CONTENT_SETTINGS_TYPE_COOKIES)); 933 https_host, embedder, CONTENT_SETTINGS_TYPE_COOKIES));
934 EXPECT_TRUE(host_content_settings_map->ShouldAllowAllContent( 934 EXPECT_TRUE(host_content_settings_map->ShouldAllowAllContent(
935 https_host, embedder, CONTENT_SETTINGS_TYPE_COOKIES)); 935 https_host, embedder, CONTENT_SETTINGS_TYPE_COOKIES));
936 EXPECT_TRUE(host_content_settings_map->ShouldAllowAllContent( 936 EXPECT_TRUE(host_content_settings_map->ShouldAllowAllContent(
937 embedder, http_host, CONTENT_SETTINGS_TYPE_COOKIES)); 937 embedder, http_host, CONTENT_SETTINGS_TYPE_COOKIES));
938 #if defined(ENABLE_EXTENSIONS)
938 EXPECT_TRUE(host_content_settings_map->ShouldAllowAllContent( 939 EXPECT_TRUE(host_content_settings_map->ShouldAllowAllContent(
939 extension, extension, CONTENT_SETTINGS_TYPE_COOKIES)); 940 extension, extension, CONTENT_SETTINGS_TYPE_COOKIES));
941 #else
942 EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent(
943 extension, extension, CONTENT_SETTINGS_TYPE_COOKIES));
944 #endif
940 EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent( 945 EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent(
941 extension, extension, CONTENT_SETTINGS_TYPE_PLUGINS)); 946 extension, extension, CONTENT_SETTINGS_TYPE_PLUGINS));
942 EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent( 947 EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent(
943 extension, http_host, CONTENT_SETTINGS_TYPE_COOKIES)); 948 extension, http_host, CONTENT_SETTINGS_TYPE_COOKIES));
944 } 949 }
945 950
946 TEST_F(HostContentSettingsMapTest, MigrateClearOnExit) { 951 TEST_F(HostContentSettingsMapTest, MigrateClearOnExit) {
947 TestingProfile profile; 952 TestingProfile profile;
948 TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService(); 953 TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
949 954
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 EXPECT_EQ(CONTENT_SETTING_ALLOW, 1009 EXPECT_EQ(CONTENT_SETTING_ALLOW,
1005 host_content_settings_map->GetContentSetting( 1010 host_content_settings_map->GetContentSetting(
1006 host, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string())); 1011 host, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string()));
1007 host_content_settings_map->SetContentSetting( 1012 host_content_settings_map->SetContentSetting(
1008 pattern, 1013 pattern,
1009 ContentSettingsPattern::Wildcard(), 1014 ContentSettingsPattern::Wildcard(),
1010 CONTENT_SETTINGS_TYPE_IMAGES, 1015 CONTENT_SETTINGS_TYPE_IMAGES,
1011 std::string(), 1016 std::string(),
1012 CONTENT_SETTING_DEFAULT); 1017 CONTENT_SETTING_DEFAULT);
1013 } 1018 }
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/host_content_settings_map.cc ('k') | chrome/browser/download/download_crx_util_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698