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

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

Issue 2913733002: Add a browser test for access control for file: scheme (Closed)
Patch Set: just rebase Created 3 years, 6 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') | no next file » | 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 71660655d5ecc93eae6376bec6a90d23f66e3361..9fa57e23afd53a13e631831c8a6d8e54941927b8 100644
--- a/content/public/test/test_navigation_observer.cc
+++ b/content/public/test/test_navigation_observer.cc
@@ -56,7 +56,8 @@ class TestNavigationObserver::TestWebContentsObserver
return;
parent_->OnDidFinishNavigation(navigation_handle->IsErrorPage(),
- navigation_handle->GetURL());
+ navigation_handle->GetURL(),
+ navigation_handle->GetNetErrorCode());
}
TestNavigationObserver* parent_;
@@ -72,6 +73,7 @@ TestNavigationObserver::TestNavigationObserver(
navigations_completed_(0),
number_of_navigations_(number_of_navigations),
last_navigation_succeeded_(false),
+ last_net_error_code_(net::OK),
message_loop_runner_(new MessageLoopRunner(quit_mode)),
web_contents_created_callback_(
base::Bind(&TestNavigationObserver::OnWebContentsCreated,
@@ -156,9 +158,11 @@ void TestNavigationObserver::OnDidStartNavigation() {
}
void TestNavigationObserver::OnDidFinishNavigation(bool is_error_page,
- const GURL& url) {
+ const GURL& url,
+ net::Error error_code) {
last_navigation_url_ = url;
last_navigation_succeeded_ = !is_error_page;
+ last_net_error_code_ = error_code;
}
} // namespace content
« no previous file with comments | « content/public/test/test_navigation_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698