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

Unified Diff: chrome/browser/back_forward_menu_model_unittest.cc

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 | « no previous file | chrome/browser/renderer_host/test/test_render_view_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/back_forward_menu_model_unittest.cc
diff --git a/chrome/browser/back_forward_menu_model_unittest.cc b/chrome/browser/back_forward_menu_model_unittest.cc
index b4be3257fc11ee3f25bee00e4719837edb39771f..f6d2ea767b645710e00a47fc42945fb58f51f6ac 100644
--- a/chrome/browser/back_forward_menu_model_unittest.cc
+++ b/chrome/browser/back_forward_menu_model_unittest.cc
@@ -40,27 +40,23 @@ class BackFwdMenuModelTest : public RenderViewHostTestHarness {
// will be pending after we ask to navigate there).
void NavigateToOffset(int offset) {
controller().GoToOffset(offset);
- const NavigationEntry* entry = controller().pending_entry();
- rvh()->SendNavigate(entry->page_id(), entry->url());
+ contents()->CommitPendingNavigation();
}
// Same as NavigateToOffset but goes to an absolute index.
void NavigateToIndex(int index) {
controller().GoToIndex(index);
- const NavigationEntry* entry = controller().pending_entry();
- rvh()->SendNavigate(entry->page_id(), entry->url());
+ contents()->CommitPendingNavigation();
}
// Goes back/forward and commits the load.
void GoBack() {
controller().GoBack();
- const NavigationEntry* entry = controller().pending_entry();
- rvh()->SendNavigate(entry->page_id(), entry->url());
+ contents()->CommitPendingNavigation();
}
void GoForward() {
controller().GoForward();
- const NavigationEntry* entry = controller().pending_entry();
- rvh()->SendNavigate(entry->page_id(), entry->url());
+ contents()->CommitPendingNavigation();
}
};
« no previous file with comments | « no previous file | chrome/browser/renderer_host/test/test_render_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698