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

Unified Diff: chrome/browser/rlz/rlz_unittest.cc

Issue 1156023006: Bring RFH/RVH unit tests closer to reality of how RF/RV are initialized (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move InitializeRenderFrameIfNeeded to RenderFrameHostTester and fix RlzLibTest code. Created 5 years, 7 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 | « no previous file | chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/rlz/rlz_unittest.cc
diff --git a/chrome/browser/rlz/rlz_unittest.cc b/chrome/browser/rlz/rlz_unittest.cc
index 5dac40bdd9a18154877fbfcc741a1c45ce50e9fc..a1fe65a05aa9e063f0c391972f77a0d51ea23b55 100644
--- a/chrome/browser/rlz/rlz_unittest.cc
+++ b/chrome/browser/rlz/rlz_unittest.cc
@@ -271,6 +271,10 @@ void RlzLibTest::SimulateHomepageUsage() {
content::RenderFrameHostTester* rfht =
content::RenderFrameHostTester::For(main_rfh());
+ // Ensure the RenderFrame is initialized before simulating events coming from
+ // it.
+ rfht->InitializeRenderFrameIfNeeded();
+
// Simulate a navigation to homepage first.
rfht->SendNavigateWithTransition(
0, 0, true, home_url, ui::PAGE_TRANSITION_HOME_PAGE);
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698