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

Unified Diff: content/test/web_contents_observer_sanity_checker.cc

Issue 1159143008: Fix wrong initialization of renderer_initiated_creation parameter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing mmenke@'s comments Created 5 years, 6 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 | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/web_contents_observer_sanity_checker.cc
diff --git a/content/test/web_contents_observer_sanity_checker.cc b/content/test/web_contents_observer_sanity_checker.cc
index 11e8674cc902626c49c2fb8fe24a2d2f33d60640..0b834749681ccd2fdeab00204987b8ae9c3cf6a5 100644
--- a/content/test/web_contents_observer_sanity_checker.cc
+++ b/content/test/web_contents_observer_sanity_checker.cc
@@ -5,6 +5,7 @@
#include "content/test/web_contents_observer_sanity_checker.h"
#include "base/strings/stringprintf.h"
+#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/common/frame_messages.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
@@ -42,6 +43,15 @@ void WebContentsObserverSanityChecker::RenderFrameCreated(
CHECK(false) << "RenderFrameCreated called more than once for routing pair:"
<< Format(render_frame_host);
}
+
+ CHECK(render_frame_host->GetProcess()->HasConnection())
+ << "RenderFrameCreated was called for a RenderFrameHost whose render "
+ "process is not currently live, so there's no way for the RenderFrame "
+ "to have been created.";
+ CHECK(
+ static_cast<RenderFrameHostImpl*>(render_frame_host)->IsRenderFrameLive())
+ << "RenderFrameCreated called on for a RenderFrameHost that thinks it is "
+ "not alive.";
}
void WebContentsObserverSanityChecker::RenderFrameDeleted(
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698