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

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

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 | « chrome/test/base/in_process_browser_test.cc ('k') | content/public/test/test_navigation_observer.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.h
diff --git a/content/public/test/test_navigation_observer.h b/content/public/test/test_navigation_observer.h
index 51e92c71ac3c15397ef5ed7395c75d8787abdaf0..1136c8f26bf0618d8f0e6f0a1441f013b7f00e3d 100644
--- a/content/public/test/test_navigation_observer.h
+++ b/content/public/test/test_navigation_observer.h
@@ -11,6 +11,7 @@
#include "base/callback.h"
#include "base/macros.h"
#include "content/public/test/test_utils.h"
+#include "net/base/net_errors.h"
#include "url/gurl.h"
namespace content {
@@ -43,7 +44,9 @@ class TestNavigationObserver {
const GURL& last_navigation_url() const { return last_navigation_url_; }
- int last_navigation_succeeded() const { return last_navigation_succeeded_; }
+ bool last_navigation_succeeded() const { return last_navigation_succeeded_; }
+
+ net::Error last_net_error_code() const { return last_net_error_code_; }
protected:
// Register this TestNavigationObserver as an observer of the |web_contents|.
@@ -64,7 +67,9 @@ class TestNavigationObserver {
void OnDidStartLoading(WebContents* web_contents);
void OnDidStopLoading(WebContents* web_contents);
void OnDidStartNavigation();
- void OnDidFinishNavigation(bool is_error_page, const GURL& url);
+ void OnDidFinishNavigation(bool is_error_page,
+ const GURL& url,
+ net::Error error_code);
// If true the navigation has started.
bool navigation_started_;
@@ -81,6 +86,9 @@ class TestNavigationObserver {
// True if the last navigation succeeded.
bool last_navigation_succeeded_;
+ // The net error code of the last navigation.
+ net::Error last_net_error_code_;
+
// The MessageLoopRunner used to spin the message loop.
scoped_refptr<MessageLoopRunner> message_loop_runner_;
« no previous file with comments | « chrome/test/base/in_process_browser_test.cc ('k') | content/public/test/test_navigation_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698