| OLD | NEW |
| 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 Loading... |
| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 } | 249 } |
| 250 | 250 |
| 251 void TestWebContents::ShowCreatedWidget(int route_id, | 251 void TestWebContents::ShowCreatedWidget(int route_id, |
| 252 const gfx::Rect& initial_pos) { | 252 const gfx::Rect& initial_pos) { |
| 253 } | 253 } |
| 254 | 254 |
| 255 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { | 255 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { |
| 256 } | 256 } |
| 257 | 257 |
| 258 } // namespace content | 258 } // namespace content |
| OLD | NEW |