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

Unified Diff: chrome/browser/tab_contents/test_tab_contents.h

Issue 3346005: Don't create pending entries when a navigation is initiated by the page. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 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/tab_contents/tab_contents.cc ('k') | chrome/browser/tab_contents/test_tab_contents.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/test_tab_contents.h
diff --git a/chrome/browser/tab_contents/test_tab_contents.h b/chrome/browser/tab_contents/test_tab_contents.h
index f0750d73783149d06886b0c4dbd9fb170d9f9726..21bc096fe0f0d22c9b6a6b425bdd8e0cb9439bb1 100644
--- a/chrome/browser/tab_contents/test_tab_contents.h
+++ b/chrome/browser/tab_contents/test_tab_contents.h
@@ -20,7 +20,7 @@ class TestTabContents : public TabContents {
// The render view host factory will be passed on to the
TestTabContents(Profile* profile, SiteInstance* instance);
- TestRenderViewHost* pending_rvh();
+ TestRenderViewHost* pending_rvh() const;
// State accessor.
bool cross_navigation_pending() {
@@ -62,6 +62,15 @@ class TestTabContents : public TabContents {
// emulates what happens on a new navigation.
void NavigateAndCommit(const GURL& url);
+ // Simulates the appropriate RenderView (pending if any, current otherwise)
+ // sending a navigate notification for the NavigationController pending entry.
+ void CommitPendingNavigation();
+
+ // Simulates the current RVH notifying that it has unloaded so that the
+ // pending RVH navigation can proceed.
+ // Does nothing if no cross-navigation is pending.
+ void ProceedWithCrossSiteNavigation();
+
// Set by individual tests.
bool transition_cross_site;
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/browser/tab_contents/test_tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698