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

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

Issue 868313004: Revert "Revert of PlzNavigate: Add a browser test for basic navigations" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Nasko's comments Created 5 years, 11 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 | « content/public/test/test_navigation_observer.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bfd7def2617b7a2f7e2b3900df3d692b9f9f3e70..b82bda9a8c34a4be195118aafa3e4e0452918bf9 100644
--- a/content/public/test/test_navigation_observer.cc
+++ b/content/public/test/test_navigation_observer.cc
@@ -46,6 +46,31 @@ class TestNavigationObserver::TestWebContentsObserver
parent_->OnDidStopLoading(web_contents());
}
+ void DidStartProvisionalLoadForFrame(RenderFrameHost* render_frame_host,
+ const GURL& validated_url,
+ bool is_error_page,
+ bool is_iframe_srcdoc) override {
+ parent_->OnDidStartProvisionalLoadForFrame(
+ render_frame_host, validated_url, is_error_page, is_iframe_srcdoc);
+ }
+
+ void DidFailProvisionalLoad(
+ RenderFrameHost* render_frame_host,
+ const GURL& validated_url,
+ int error_code,
+ const base::string16& error_description) override {
+ parent_->OnDidFailProvisionalLoad(render_frame_host, validated_url,
+ error_code, error_description);
+ }
+
+ void DidCommitProvisionalLoadForFrame(
+ RenderFrameHost* render_frame_host,
+ const GURL& url,
+ ui::PageTransition transition_type) override {
+ parent_->OnDidCommitProvisionalLoadForFrame(
+ render_frame_host, url, transition_type);
+ }
+
TestNavigationObserver* parent_;
DISALLOW_COPY_AND_ASSIGN(TestWebContentsObserver);
@@ -146,4 +171,29 @@ void TestNavigationObserver::OnDidStopLoading(WebContents* web_contents) {
}
}
+void TestNavigationObserver::OnDidStartProvisionalLoadForFrame(
+ RenderFrameHost* render_frame_host,
+ const GURL& validated_url,
+ bool is_error_page,
+ bool is_iframe_srcdoc) {
+ last_navigation_succeeded_ = false;
+}
+
+void TestNavigationObserver::OnDidFailProvisionalLoad(
+ RenderFrameHost* render_frame_host,
+ const GURL& validated_url,
+ int error_code,
+ const base::string16& error_description) {
+ last_navigation_url_ = validated_url;
+ last_navigation_succeeded_ = false;
+}
+
+void TestNavigationObserver::OnDidCommitProvisionalLoadForFrame(
+ RenderFrameHost* render_frame_host,
+ const GURL& url,
+ ui::PageTransition transition_type) {
+ last_navigation_url_ = url;
+ last_navigation_succeeded_ = true;
+}
+
} // namespace content
« no previous file with comments | « content/public/test/test_navigation_observer.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698