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

Unified Diff: content/browser/frame_host/render_frame_host_manager_unittest.cc

Issue 688343003: Add some missing ENABLE_PLUGINS ifdefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/browser/frame_host/render_frame_host_manager_unittest.cc
diff --git a/content/browser/frame_host/render_frame_host_manager_unittest.cc b/content/browser/frame_host/render_frame_host_manager_unittest.cc
index 7bcd167cc39a0da2668bd421b644c1f6a168a3ad..7146cb53bdb515e35ae7f2ab9a381b505f979557 100644
--- a/content/browser/frame_host/render_frame_host_manager_unittest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_unittest.cc
@@ -210,28 +210,35 @@ class PluginFaviconMessageObserver : public WebContentsObserver {
public:
PluginFaviconMessageObserver(WebContents* web_contents)
: WebContentsObserver(web_contents),
+#if defined(ENABLE_PLUGINS)
Lei Zhang 2014/10/30 21:48:54 I think you can get away without the ifdefs in Plu
tommycli 2014/10/30 22:37:21 Done.
plugin_crashed_(false),
- favicon_received_(false) { }
+#endif
+ favicon_received_(false) {
+ }
+#if defined(ENABLE_PLUGINS)
void PluginCrashed(const base::FilePath& plugin_path,
base::ProcessId plugin_pid) override {
plugin_crashed_ = true;
}
- void DidUpdateFaviconURL(const std::vector<FaviconURL>& candidates) override {
- favicon_received_ = true;
- }
-
bool plugin_crashed() {
return plugin_crashed_;
}
+#endif
+
+ void DidUpdateFaviconURL(const std::vector<FaviconURL>& candidates) override {
+ favicon_received_ = true;
+ }
bool favicon_received() {
return favicon_received_;
}
private:
+#if defined(ENABLE_PLUGINS)
bool plugin_crashed_;
+#endif
bool favicon_received_;
DISALLOW_COPY_AND_ASSIGN(PluginFaviconMessageObserver);
@@ -550,6 +557,7 @@ TEST_F(RenderFrameHostManagerTest, FilterMessagesWhileSwappedOut) {
EXPECT_FALSE(observer.favicon_received());
}
+#if defined(ENABLE_PLUGINS)
// The same logic should apply to RenderFrameHosts as well and routing through
// swapped out RFH shouldn't be allowed. Use a PluginCrashObserver to check
// if the IPC message is allowed through or not.
@@ -560,6 +568,7 @@ TEST_F(RenderFrameHostManagerTest, FilterMessagesWhileSwappedOut) {
ntp_rfh->GetRoutingID(), base::FilePath(), 0)));
EXPECT_FALSE(observer.plugin_crashed());
}
+#endif
// We cannot filter out synchronous IPC messages, because the renderer would
// be left waiting for a reply. We pick RunBeforeUnloadConfirm as an example

Powered by Google App Engine
This is Rietveld 408576698