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

Unified Diff: content/public/test/test_navigation_observer.cc

Issue 248963004: "Go back" on the block interstitial closes the tab if there is no previous URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Improved test. Created 6 years, 8 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
Index: content/public/test/test_navigation_observer.cc
diff --git a/content/public/test/test_navigation_observer.cc b/content/public/test/test_navigation_observer.cc
index e2c69b74369fabd0f3de5c48c48634464cd39067..1de33d5936ce78e1bd69dbb9c49382c0cbc8cc2d 100644
--- a/content/public/test/test_navigation_observer.cc
+++ b/content/public/test/test_navigation_observer.cc
@@ -30,6 +30,10 @@ class TestNavigationObserver::TestWebContentsObserver
parent_->OnNavigationEntryCommitted(this, web_contents(), load_details);
}
+ virtual void DidAttachInterstitialPage() OVERRIDE {
+ parent_->OnDidAttachInterstitialPage(web_contents());
+ }
+
virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE {
parent_->OnWebContentsDestroyed(this, web_contents);
}
@@ -118,6 +122,13 @@ void TestNavigationObserver::OnNavigationEntryCommitted(
navigation_started_ = true;
}
+void TestNavigationObserver::OnDidAttachInterstitialPage(
+ WebContents* web_contents) {
+ // Going to an interstitial page does not trigger NavigationEntryCommited, but
Bernhard Bauer 2014/04/25 08:30:13 "NavigationEntryCommitted"
Marc Treib 2014/04/25 08:50:34 Done.
Bernhard Bauer 2014/04/29 07:57:37 No, I meant that "committed" is spelled with doubl
Marc Treib 2014/04/29 08:14:31 Might have made that more obvious :P Anyway, juust
+ // has the same meaning for us here.
+ navigation_started_ = true;
Marc Treib 2014/04/25 08:12:38 The situation where this is required is as follows
+}
+
void TestNavigationObserver::OnDidStartLoading(WebContents* web_contents) {
navigation_started_ = true;
}

Powered by Google App Engine
This is Rietveld 408576698