Chromium Code Reviews| 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 "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "content/browser/browser_url_handler_impl.h" | 10 #include "content/browser/browser_url_handler_impl.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 bool reverse_on_redirect = false; | 132 bool reverse_on_redirect = false; |
| 133 BrowserURLHandlerImpl::GetInstance()->RewriteURLIfNecessary( | 133 BrowserURLHandlerImpl::GetInstance()->RewriteURLIfNecessary( |
| 134 &loaded_url, GetBrowserContext(), &reverse_on_redirect); | 134 &loaded_url, GetBrowserContext(), &reverse_on_redirect); |
| 135 | 135 |
| 136 // LoadURL created a navigation entry, now simulate the RenderView sending | 136 // LoadURL created a navigation entry, now simulate the RenderView sending |
| 137 // a notification that it actually navigated. | 137 // a notification that it actually navigated. |
| 138 CommitPendingNavigation(); | 138 CommitPendingNavigation(); |
| 139 } | 139 } |
| 140 | 140 |
| 141 void TestWebContents::TestSetIsLoading(bool value) { | 141 void TestWebContents::TestSetIsLoading(bool value) { |
| 142 SetIsLoading(GetRenderViewHost(), value, true, NULL); | 142 SetIsLoading(value, true, NULL); |
|
nasko
2015/03/14 00:01:04
nit: nullptr
Fabrice (no longer in Chrome)
2015/03/16 11:01:46
Done.
| |
| 143 } | 143 } |
| 144 | 144 |
| 145 void TestWebContents::CommitPendingNavigation() { | 145 void TestWebContents::CommitPendingNavigation() { |
| 146 const NavigationEntry* entry = GetController().GetPendingEntry(); | 146 const NavigationEntry* entry = GetController().GetPendingEntry(); |
| 147 DCHECK(entry); | 147 DCHECK(entry); |
| 148 | 148 |
| 149 // If we are doing a cross-site navigation, this simulates the current RFH | 149 // If we are doing a cross-site navigation, this simulates the current RFH |
| 150 // notifying that it has unloaded so the pending RFH is resumed and can | 150 // notifying that it has unloaded so the pending RFH is resumed and can |
| 151 // navigate. | 151 // navigate. |
| 152 // PlzNavigate: the pending RFH is not created before the navigation commit, | 152 // PlzNavigate: the pending RFH is not created before the navigation commit, |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 258 } | 258 } |
| 259 | 259 |
| 260 void TestWebContents::ShowCreatedWidget(int route_id, | 260 void TestWebContents::ShowCreatedWidget(int route_id, |
| 261 const gfx::Rect& initial_rect) { | 261 const gfx::Rect& initial_rect) { |
| 262 } | 262 } |
| 263 | 263 |
| 264 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { | 264 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { |
| 265 } | 265 } |
| 266 | 266 |
| 267 } // namespace content | 267 } // namespace content |
| OLD | NEW |