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

Unified Diff: content/test/fake_plugin_service.cc

Issue 953793003: Ensuring interception of stream get determined by plugin path before checking mime type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding Test Case. Created 5 years, 9 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
Index: content/test/fake_plugin_service.cc
diff --git a/content/test/fake_plugin_service.cc b/content/test/fake_plugin_service.cc
index 75e35d4f9c869c7fab1f3d1b17f57709e3a56422..935975071a14e43c10d85305588ae8235c4b5ccc 100644
--- a/content/test/fake_plugin_service.cc
+++ b/content/test/fake_plugin_service.cc
@@ -4,11 +4,17 @@
#include "content/test/fake_plugin_service.h"
+#include "content/public/common/webplugininfo.h"
+
namespace content {
FakePluginService::FakePluginService() {
}
+FakePluginService::FakePluginService(bool is_plugin_available)
+ : is_plugin_available_(is_plugin_available) {
+}
+
FakePluginService::~FakePluginService() {
}
@@ -38,7 +44,11 @@ bool FakePluginService::GetPluginInfo(int render_process_id,
WebPluginInfo* info,
std::string* actual_mime_type) {
*is_stale = false;
- return false;
+ if (!is_plugin_available_)
+ return false;
+ info->type = WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN;
+ info->path = base::FilePath();
raymes 2015/03/19 00:45:51 If a plugin is available, shouldn't we return a va
Deepak 2015/03/19 10:22:23 Even when we give the proper plugin path then also
+ return true;
raymes 2015/03/19 00:45:51 Rather than adding this stuff here, I think we sho
Deepak 2015/03/19 10:22:23 Done.
}
bool FakePluginService::GetPluginInfoByPath(const base::FilePath& plugin_path,

Powered by Google App Engine
This is Rietveld 408576698