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

Unified Diff: chrome/browser/plugins/plugin_info_message_filter_unittest.cc

Issue 2208463002: [HBD] Implement site-origin exceptions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hbd_disableplugincache
Patch Set: Rebase Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/plugins/plugin_info_message_filter.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/plugin_info_message_filter_unittest.cc
diff --git a/chrome/browser/plugins/plugin_info_message_filter_unittest.cc b/chrome/browser/plugins/plugin_info_message_filter_unittest.cc
index a98a2ce0ed13efb9fc1f1fda1f0938a3b8c81dfc..5be5bda07fe70165e67431b27182f8526ddb1fbd 100644
--- a/chrome/browser/plugins/plugin_info_message_filter_unittest.cc
+++ b/chrome/browser/plugins/plugin_info_message_filter_unittest.cc
@@ -12,6 +12,7 @@
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
+#include "chrome/browser/plugins/plugin_filter_utils.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
#include "chrome/test/base/testing_profile.h"
@@ -82,11 +83,12 @@ bool FakePluginServiceFilter::CanLoadPlugin(int render_process_id,
class PluginInfoMessageFilterTest : public ::testing::Test {
public:
- PluginInfoMessageFilterTest() :
- foo_plugin_path_(FILE_PATH_LITERAL("/path/to/foo")),
- bar_plugin_path_(FILE_PATH_LITERAL("/path/to/bar")),
- context_(0, &profile_) {
- }
+ PluginInfoMessageFilterTest()
+ : foo_plugin_path_(FILE_PATH_LITERAL("/path/to/foo")),
+ bar_plugin_path_(FILE_PATH_LITERAL("/path/to/bar")),
+ context_(0, &profile_),
+ host_content_settings_map_(
+ HostContentSettingsMapFactory::GetForProfile(&profile_)) {}
void SetUp() override {
content::WebPluginInfo foo_plugin(base::ASCIIToUTF16("Foo Plugin"),
@@ -142,9 +144,9 @@ class PluginInfoMessageFilterTest : public ::testing::Test {
CONTENT_SETTING_BLOCK : CONTENT_SETTING_DEFAULT;
bool is_default = !expected_is_default;
bool is_managed = !expected_is_managed;
- context()->GetPluginContentSetting(
- content::WebPluginInfo(), url, url, plugin,
- &setting, &is_default, &is_managed);
+ GetPluginContentSetting(host_content_settings_map_,
+ content::WebPluginInfo(), url, url, plugin,
+ &setting, &is_default, &is_managed);
EXPECT_EQ(expected_setting, setting);
EXPECT_EQ(expected_is_default, is_default);
EXPECT_EQ(expected_is_managed, is_managed);
@@ -159,6 +161,7 @@ class PluginInfoMessageFilterTest : public ::testing::Test {
content::TestBrowserThreadBundle test_thread_bundle;
TestingProfile profile_;
PluginInfoMessageFilter::Context context_;
+ HostContentSettingsMap* host_content_settings_map_;
};
TEST_F(PluginInfoMessageFilterTest, FindEnabledPlugin) {
« no previous file with comments | « chrome/browser/plugins/plugin_info_message_filter.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698