Chromium Code Reviews| Index: content/browser/tab_contents/navigation_controller_unittest.cc |
| diff --git a/content/browser/tab_contents/navigation_controller_unittest.cc b/content/browser/tab_contents/navigation_controller_unittest.cc |
| index 47c61e66a501b3658b01a43576ce088f4a2d791a..2fbf0ff590fecba1dd997bf632541c5785edc49d 100644 |
| --- a/content/browser/tab_contents/navigation_controller_unittest.cc |
| +++ b/content/browser/tab_contents/navigation_controller_unittest.cc |
| @@ -423,13 +423,18 @@ TEST_F(NavigationControllerTest, LoadURL_AbortCancelsPending) { |
| // It may abort before committing, if it's a download or due to a stop or |
| // a new navigation from the user. |
| - rvh()->TestOnMessageReceived( |
| - ViewHostMsg_DidFailProvisionalLoadWithError(0, // routing_id |
| - 1, // frame_id |
| - true, // is_main_frame |
| - net::ERR_ABORTED, // error |
| - kNewURL, // url |
| - false)); // repost |
| + { |
|
jam
2011/10/05 17:12:06
nit: here and below, no need for scoping
mkosiba (inactive)
2011/10/05 17:53:18
I can remove the scoping. I was trying to make the
|
| + ViewHostMsg_DidFailProvisionalLoadWithError_Params ipc_params; |
| + ipc_params.frame_id = 1; |
| + ipc_params.is_main_frame = true; |
| + ipc_params.error_code = net::ERR_ABORTED; |
| + ipc_params.error_description = string16(); |
| + ipc_params.url = kNewURL; |
| + ipc_params.showing_repost_interstitial = false; |
| + rvh()->TestOnMessageReceived( |
| + ViewHostMsg_DidFailProvisionalLoadWithError(0, // routing_id |
| + ipc_params)); |
| + } |
| // This should clear the pending entry and notify of a navigation state |
| // change, so that we do not keep displaying kNewURL. |
| @@ -479,13 +484,18 @@ TEST_F(NavigationControllerTest, LoadURL_RedirectAbortCancelsPending) { |
| // It may abort before committing, if it's a download or due to a stop or |
| // a new navigation from the user. |
| - rvh()->TestOnMessageReceived( |
| - ViewHostMsg_DidFailProvisionalLoadWithError(0, // routing_id |
| - 1, // frame_id |
| - true, // is_main_frame |
| - net::ERR_ABORTED, // error |
| - kRedirectURL, // url |
| - false)); // repost |
| + { |
| + ViewHostMsg_DidFailProvisionalLoadWithError_Params ipc_params; |
| + ipc_params.frame_id = 1; |
| + ipc_params.is_main_frame = true; |
| + ipc_params.error_code = net::ERR_ABORTED; |
| + ipc_params.error_description = string16(); |
| + ipc_params.url = kRedirectURL; |
| + ipc_params.showing_repost_interstitial = false; |
| + rvh()->TestOnMessageReceived( |
| + ViewHostMsg_DidFailProvisionalLoadWithError(0, // routing_id |
| + ipc_params)); |
| + } |
| // This should clear the pending entry and notify of a navigation state |
| // change, so that we do not keep displaying kNewURL. |
| @@ -1529,13 +1539,18 @@ TEST_F(NavigationControllerTest, RestoreNavigateAfterFailure) { |
| // which causes the pending entry to be cleared. |
| TestRenderViewHost* rvh = |
| static_cast<TestRenderViewHost*>(our_contents.render_view_host()); |
| - rvh->TestOnMessageReceived( |
| - ViewHostMsg_DidFailProvisionalLoadWithError(0, // routing_id |
| - 1, // frame_id |
| - true, // is_main_frame |
| - net::ERR_ABORTED, // error |
| - url, // url |
| - false)); // repost |
| + { |
| + ViewHostMsg_DidFailProvisionalLoadWithError_Params ipc_params; |
| + ipc_params.frame_id = 1; |
| + ipc_params.is_main_frame = true; |
| + ipc_params.error_code = net::ERR_ABORTED; |
| + ipc_params.error_description = string16(); |
| + ipc_params.url = url; |
| + ipc_params.showing_repost_interstitial = false; |
| + rvh->TestOnMessageReceived( |
| + ViewHostMsg_DidFailProvisionalLoadWithError(0, // routing_id |
| + ipc_params)); |
| + } |
| // Now the pending restored entry commits. |
| ViewHostMsg_FrameNavigate_Params params; |