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

Unified Diff: chrome/browser/content_settings/content_settings_browsertest.cc

Issue 12315023: Merge 180159 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1364/src/
Patch Set: Created 7 years, 10 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/chrome_plugin_service_filter.cc ('k') | chrome/browser/plugins/plugin_infobar_delegates.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/content_settings/content_settings_browsertest.cc
===================================================================
--- chrome/browser/content_settings/content_settings_browsertest.cc (revision 183671)
+++ chrome/browser/content_settings/content_settings_browsertest.cc (working copy)
@@ -6,6 +6,7 @@
#include "base/path_service.h"
#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
+#include "chrome/browser/chrome_plugin_service_filter.h"
#include "chrome/browser/content_settings/cookie_settings.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
@@ -20,6 +21,8 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/plugin_service.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
@@ -311,6 +314,12 @@
content::RenderViewHost* host =
chrome::GetActiveWebContents(browser())->GetRenderViewHost();
+ ChromePluginServiceFilter* filter = ChromePluginServiceFilter::GetInstance();
+ int process_id = host->GetProcess()->GetID();
+ FilePath path(FILE_PATH_LITERAL("blah"));
+ EXPECT_FALSE(filter->CanLoadPlugin(process_id, path));
+ filter->AuthorizeAllPlugins(process_id);
+ EXPECT_TRUE(filter->CanLoadPlugin(process_id, path));
host->Send(new ChromeViewMsg_LoadBlockedPlugins(
host->GetRoutingID(), std::string()));
@@ -371,6 +380,8 @@
content::RenderViewHost* host =
chrome::GetActiveWebContents(browser())->GetRenderViewHost();
+ ChromePluginServiceFilter::GetInstance()->AuthorizeAllPlugins(
+ host->GetProcess()->GetID());
host->Send(new ChromeViewMsg_LoadBlockedPlugins(
host->GetRoutingID(), std::string()));
EXPECT_EQ(expected_title1, title_watcher1.WaitAndGetTitle());
@@ -405,6 +416,8 @@
content::RenderViewHost* host =
chrome::GetActiveWebContents(browser())->GetRenderViewHost();
+ ChromePluginServiceFilter::GetInstance()->AuthorizeAllPlugins(
+ host->GetProcess()->GetID());
host->Send(new ChromeViewMsg_LoadBlockedPlugins(
host->GetRoutingID(), std::string()));
@@ -425,6 +438,8 @@
content::RenderViewHost* host =
chrome::GetActiveWebContents(browser())->GetRenderViewHost();
+ ChromePluginServiceFilter::GetInstance()->AuthorizeAllPlugins(
+ host->GetProcess()->GetID());
host->Send(new ChromeViewMsg_LoadBlockedPlugins(
host->GetRoutingID(), std::string()));
« no previous file with comments | « chrome/browser/chrome_plugin_service_filter.cc ('k') | chrome/browser/plugins/plugin_infobar_delegates.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698