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

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

Issue 829113004: Plugin Power Saver: Add back 'Click to play' option as 4th for plugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_ALLOW); 61 CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_ALLOW);
62 EXPECT_EQ(CONTENT_SETTING_ALLOW, 62 EXPECT_EQ(CONTENT_SETTING_ALLOW,
63 host_content_settings_map->GetDefaultContentSetting( 63 host_content_settings_map->GetDefaultContentSetting(
64 CONTENT_SETTINGS_TYPE_PLUGINS, NULL)); 64 CONTENT_SETTINGS_TYPE_PLUGINS, NULL));
65 host_content_settings_map->SetDefaultContentSetting( 65 host_content_settings_map->SetDefaultContentSetting(
66 CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_BLOCK); 66 CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_BLOCK);
67 EXPECT_EQ(CONTENT_SETTING_BLOCK, 67 EXPECT_EQ(CONTENT_SETTING_BLOCK,
68 host_content_settings_map->GetDefaultContentSetting( 68 host_content_settings_map->GetDefaultContentSetting(
69 CONTENT_SETTINGS_TYPE_PLUGINS, NULL)); 69 CONTENT_SETTINGS_TYPE_PLUGINS, NULL));
70 host_content_settings_map->SetDefaultContentSetting( 70 host_content_settings_map->SetDefaultContentSetting(
71 CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_ASK);
72 EXPECT_EQ(CONTENT_SETTING_ASK,
73 host_content_settings_map->GetDefaultContentSetting(
74 CONTENT_SETTINGS_TYPE_PLUGINS, NULL));
75 host_content_settings_map->SetDefaultContentSetting(
71 CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_DETECT_IMPORTANT_CONTENT); 76 CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_DETECT_IMPORTANT_CONTENT);
72 EXPECT_EQ(CONTENT_SETTING_DETECT_IMPORTANT_CONTENT, 77 EXPECT_EQ(CONTENT_SETTING_DETECT_IMPORTANT_CONTENT,
73 host_content_settings_map->GetDefaultContentSetting( 78 host_content_settings_map->GetDefaultContentSetting(
74 CONTENT_SETTINGS_TYPE_PLUGINS, NULL)); 79 CONTENT_SETTINGS_TYPE_PLUGINS, NULL));
75 80
76 host_content_settings_map->SetDefaultContentSetting( 81 host_content_settings_map->SetDefaultContentSetting(
77 CONTENT_SETTINGS_TYPE_POPUPS, CONTENT_SETTING_ALLOW); 82 CONTENT_SETTINGS_TYPE_POPUPS, CONTENT_SETTING_ALLOW);
78 EXPECT_EQ(CONTENT_SETTING_ALLOW, 83 EXPECT_EQ(CONTENT_SETTING_ALLOW,
79 host_content_settings_map->GetDefaultContentSetting( 84 host_content_settings_map->GetDefaultContentSetting(
80 CONTENT_SETTINGS_TYPE_POPUPS, NULL)); 85 CONTENT_SETTINGS_TYPE_POPUPS, NULL));
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 CONTENT_SETTINGS_TYPE_IMAGES, true); 1045 CONTENT_SETTINGS_TYPE_IMAGES, true);
1041 EXPECT_EQ(CONTENT_SETTING_ALLOW, 1046 EXPECT_EQ(CONTENT_SETTING_ALLOW,
1042 host_content_settings_map->GetContentSetting( 1047 host_content_settings_map->GetContentSetting(
1043 host, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string())); 1048 host, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string()));
1044 host_content_settings_map->SetDefaultContentSetting( 1049 host_content_settings_map->SetDefaultContentSetting(
1045 CONTENT_SETTINGS_TYPE_IMAGES, CONTENT_SETTING_BLOCK); 1050 CONTENT_SETTINGS_TYPE_IMAGES, CONTENT_SETTING_BLOCK);
1046 EXPECT_EQ(CONTENT_SETTING_BLOCK, 1051 EXPECT_EQ(CONTENT_SETTING_BLOCK,
1047 host_content_settings_map->GetContentSetting( 1052 host_content_settings_map->GetContentSetting(
1048 host, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string())); 1053 host, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string()));
1049 } 1054 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/plugins/plugin_info_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698