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

Unified Diff: content/test/test_web_contents.cc

Issue 1545973002: Remove the is_loading_ field from WebContentsImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + addressed Nasko's nits Created 4 years, 10 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 | « content/renderer/render_frame_impl.cc ('k') | content/test/web_contents_observer_sanity_checker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_web_contents.cc
diff --git a/content/test/test_web_contents.cc b/content/test/test_web_contents.cc
index d712e5ff8ff85bc3a4c1e113feaf015d6e6e7dfb..d2c7243c9faff83c1a5949b564253d6d9aa7ea9b 100644
--- a/content/test/test_web_contents.cc
+++ b/content/test/test_web_contents.cc
@@ -189,7 +189,29 @@ void TestWebContents::NavigateAndCommit(const GURL& url) {
}
void TestWebContents::TestSetIsLoading(bool value) {
- SetIsLoading(value, true, nullptr);
+ if (value)
+ DidStartLoading(GetMainFrame()->frame_tree_node(), true);
+ else {
+ for (FrameTreeNode* node : frame_tree_.Nodes()) {
+ RenderFrameHostImpl* current_frame_host =
+ node->render_manager()->current_frame_host();
+ DCHECK(current_frame_host);
+ current_frame_host->ResetLoadingState();
+
+ RenderFrameHostImpl* pending_frame_host =
+ node->render_manager()->pending_frame_host();
+
+ if (IsBrowserSideNavigationEnabled()) {
+ RenderFrameHostImpl* speculative_frame_host =
+ node->render_manager()->speculative_frame_host();
+ if (speculative_frame_host)
+ speculative_frame_host->ResetLoadingState();
+ } else {
+ if (pending_frame_host)
+ pending_frame_host->ResetLoadingState();
+ }
+ }
+ }
}
void TestWebContents::CommitPendingNavigation() {
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/test/web_contents_observer_sanity_checker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698