| Index: chrome/test/chromedriver/chrome/navigation_tracker.cc
|
| diff --git a/chrome/test/chromedriver/chrome/navigation_tracker.cc b/chrome/test/chromedriver/chrome/navigation_tracker.cc
|
| index 981d747eee83611aede8f7168853cf872a36d97d..cd04f819dcd82ff21cad30f63bc51b8845943e52 100644
|
| --- a/chrome/test/chromedriver/chrome/navigation_tracker.cc
|
| +++ b/chrome/test/chromedriver/chrome/navigation_tracker.cc
|
| @@ -61,8 +61,11 @@ Status NavigationTracker::IsPendingNavigation(const std::string& frame_id,
|
| if (loading_state_ == kUnknown)
|
| loading_state_ = kLoading;
|
| }
|
| - *is_pending = (loading_state_ == kLoading) ||
|
| - scheduled_frame_set_.count(frame_id) > 0;
|
| + *is_pending = loading_state_ == kLoading;
|
| + if (frame_id.empty())
|
| + *is_pending |= scheduled_frame_set_.size() > 0;
|
| + else
|
| + *is_pending |= scheduled_frame_set_.count(frame_id) > 0;
|
| return Status(kOk);
|
| }
|
|
|
| @@ -118,5 +121,8 @@ void NavigationTracker::OnEvent(DevToolsClient* client,
|
| const base::Value* unused_value;
|
| if (!params.Get("frame.parentId", &unused_value))
|
| scheduled_frame_set_.clear();
|
| + } else if (method == "Inspector.targetCrashed") {
|
| + loading_state_ = kNotLoading;
|
| + scheduled_frame_set_.clear();
|
| }
|
| }
|
|
|