Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / content / public / test / test_navigation_observer.cc
index e2c69b7..bfe74f6 100644 (file)
@@ -30,8 +30,12 @@ class TestNavigationObserver::TestWebContentsObserver
     parent_->OnNavigationEntryCommitted(this, web_contents(), load_details);
   }
 
-  virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE {
-    parent_->OnWebContentsDestroyed(this, web_contents);
+  virtual void DidAttachInterstitialPage() OVERRIDE {
+    parent_->OnDidAttachInterstitialPage(web_contents());
+  }
+
+  virtual void WebContentsDestroyed() OVERRIDE {
+    parent_->OnWebContentsDestroyed(this, web_contents());
   }
 
   virtual void DidStartLoading(RenderViewHost* render_view_host) OVERRIDE {
@@ -118,6 +122,13 @@ void TestNavigationObserver::OnNavigationEntryCommitted(
   navigation_started_ = true;
 }
 
+void TestNavigationObserver::OnDidAttachInterstitialPage(
+    WebContents* web_contents) {
+  // Going to an interstitial page does not trigger NavigationEntryCommitted,
+  // but has the same meaning for us here.
+  navigation_started_ = true;
+}
+
 void TestNavigationObserver::OnDidStartLoading(WebContents* web_contents) {
   navigation_started_ = true;
 }