| 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() &&
|
|
|