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

Unified Diff: content/test/web_contents_observer_sanity_checker.cc

Issue 1545973002: Remove the is_loading_ field from WebContentsImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
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_);
« content/test/test_web_contents.cc ('K') | « content/test/web_contents_observer_sanity_checker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698