Chromium Code Reviews| Index: content/test/web_contents_observer_sanity_checker.cc |
| diff --git a/content/test/web_contents_observer_sanity_checker.cc b/content/test/web_contents_observer_sanity_checker.cc |
| index 8ac2dd0f199b84158997e211d665083696d95ce3..170e5888daecc9b207c3518881b8e5f63b761fe1 100644 |
| --- a/content/test/web_contents_observer_sanity_checker.cc |
| +++ b/content/test/web_contents_observer_sanity_checker.cc |
| @@ -332,10 +332,21 @@ void WebContentsObserverSanityChecker::WebContentsDestroyed() { |
| CHECK(active_media_players_.empty()); |
| } |
| +void WebContentsObserverSanityChecker::DidStartLoading() { |
| + CHECK(!is_loading_); |
| + is_loading_ = true; |
| +} |
| + |
| +void WebContentsObserverSanityChecker::DidStopLoading() { |
| + CHECK(is_loading_); |
| + is_loading_ = false; |
| +} |
| + |
| WebContentsObserverSanityChecker::WebContentsObserverSanityChecker( |
| WebContents* web_contents) |
| - : WebContentsObserver(web_contents), web_contents_destroyed_(false) { |
| -} |
| + : WebContentsObserver(web_contents), |
| + is_loading_(false), |
|
nasko
2016/01/15 01:19:16
What about window.open() with an URL? Does it also
clamy
2016/01/15 16:47:44
I think so. You first create the WebContents then
|
| + web_contents_destroyed_(false) {} |
| WebContentsObserverSanityChecker::~WebContentsObserverSanityChecker() { |
| CHECK(web_contents_destroyed_); |