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

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

Issue 2820933002: [subresource_filter] add //chrome level unit test harness (Closed)
Patch Set: remove dep Created 3 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
« no previous file with comments | « components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/navigation_simulator.cc
diff --git a/content/public/test/navigation_simulator.cc b/content/public/test/navigation_simulator.cc
index 33ae14213359fd3022f617241adfe66b5240a2c7..a83df10f43ec10b9defb36a73927d412863e0d18 100644
--- a/content/public/test/navigation_simulator.cc
+++ b/content/public/test/navigation_simulator.cc
@@ -168,8 +168,11 @@ void NavigationSimulator::Redirect(const GURL& new_url) {
<< "NavigationSimulator::Redirect cannot be called after the "
"navigation has finished";
- if (state_ == INITIALIZATION)
+ if (state_ == INITIALIZATION) {
Start();
+ if (state_ == FAILED)
+ return;
+ }
navigation_url_ = new_url;
@@ -225,8 +228,11 @@ void NavigationSimulator::Commit() {
<< "NavigationSimulator::Commit cannot be called after the "
"navigation has finished";
- if (state_ == INITIALIZATION)
+ if (state_ == INITIALIZATION) {
Start();
+ if (state_ == FAILED)
+ return;
+ }
PrepareCompleteCallbackOnHandle();
if (IsBrowserSideNavigationEnabled() &&
« no previous file with comments | « components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698