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

Unified Diff: blimp/engine/session/tab.cc

Issue 2295543002: More Blimp browser tests for navigation (Closed)
Patch Set: log Created 4 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 | « blimp/engine/browser_tests/engine_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/engine/session/tab.cc
diff --git a/blimp/engine/session/tab.cc b/blimp/engine/session/tab.cc
index c1a01616296319466c365de07a68b6099e8799a3..5bd619189d4cb6bd290142bb49f81de5da716fc3 100644
--- a/blimp/engine/session/tab.cc
+++ b/blimp/engine/session/tab.cc
@@ -75,11 +75,19 @@ void Tab::LoadUrl(const GURL& url) {
}
void Tab::GoBack() {
+ if (!web_contents_->GetController().CanGoBack()) {
+ DLOG(ERROR) << "Ignoring back in tab " << tab_id_;
+ return;
+ }
DVLOG(1) << "Back in tab " << tab_id_;
web_contents_->GetController().GoBack();
}
void Tab::GoForward() {
+ if (!web_contents_->GetController().CanGoForward()) {
+ DLOG(ERROR) << "Ignoring forward in tab " << tab_id_;
+ return;
+ }
DVLOG(1) << "Forward in tab " << tab_id_;
web_contents_->GetController().GoForward();
}
« no previous file with comments | « blimp/engine/browser_tests/engine_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698