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

Side by Side Diff: content/test/test_web_contents.cc

Issue 161113002: Fix pushState causing stop/reload button and favicon to flicker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/test/data/push_state.html ('k') | ui/views/controls/webview/web_dialog_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/test/test_web_contents.h" 5 #include "content/test/test_web_contents.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "content/browser/browser_url_handler_impl.h" 9 #include "content/browser/browser_url_handler_impl.h"
10 #include "content/browser/frame_host/cross_process_frame_connector.h" 10 #include "content/browser/frame_host/cross_process_frame_connector.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 bool reverse_on_redirect = false; 122 bool reverse_on_redirect = false;
123 BrowserURLHandlerImpl::GetInstance()->RewriteURLIfNecessary( 123 BrowserURLHandlerImpl::GetInstance()->RewriteURLIfNecessary(
124 &loaded_url, GetBrowserContext(), &reverse_on_redirect); 124 &loaded_url, GetBrowserContext(), &reverse_on_redirect);
125 125
126 // LoadURL created a navigation entry, now simulate the RenderView sending 126 // LoadURL created a navigation entry, now simulate the RenderView sending
127 // a notification that it actually navigated. 127 // a notification that it actually navigated.
128 CommitPendingNavigation(); 128 CommitPendingNavigation();
129 } 129 }
130 130
131 void TestWebContents::TestSetIsLoading(bool value) { 131 void TestWebContents::TestSetIsLoading(bool value) {
132 SetIsLoading(GetRenderViewHost(), value, NULL); 132 SetIsLoading(GetRenderViewHost(), value, true, NULL);
133 } 133 }
134 134
135 void TestWebContents::CommitPendingNavigation() { 135 void TestWebContents::CommitPendingNavigation() {
136 // If we are doing a cross-site navigation, this simulates the current RVH 136 // If we are doing a cross-site navigation, this simulates the current RVH
137 // notifying that it has unloaded so the pending RVH is resumed and can 137 // notifying that it has unloaded so the pending RVH is resumed and can
138 // navigate. 138 // navigate.
139 ProceedWithCrossSiteNavigation(); 139 ProceedWithCrossSiteNavigation();
140 RenderViewHost* old_rvh = GetRenderViewHost(); 140 RenderViewHost* old_rvh = GetRenderViewHost();
141 TestRenderViewHost* rvh = 141 TestRenderViewHost* rvh =
142 static_cast<TestRenderViewHost*>(GetPendingRenderViewHost()); 142 static_cast<TestRenderViewHost*>(GetPendingRenderViewHost());
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 } 245 }
246 246
247 void TestWebContents::ShowCreatedWidget(int route_id, 247 void TestWebContents::ShowCreatedWidget(int route_id,
248 const gfx::Rect& initial_pos) { 248 const gfx::Rect& initial_pos) {
249 } 249 }
250 250
251 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { 251 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) {
252 } 252 }
253 253
254 } // namespace content 254 } // namespace content
OLDNEW
« no previous file with comments | « content/test/data/push_state.html ('k') | ui/views/controls/webview/web_dialog_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698