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

Side by Side Diff: content/browser/frame_host/render_frame_host_manager_unittest.cc

Issue 2781383002: Followup comments from r460581. (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/frame_host/render_frame_host_manager.h" 5 #include "content/browser/frame_host/render_frame_host_manager.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <tuple> 9 #include <tuple>
10 #include <utility> 10 #include <utility>
(...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 rfh1->GetSiteInstance()->IncrementActiveFrameCount(); 1257 rfh1->GetSiteInstance()->IncrementActiveFrameCount();
1258 1258
1259 contents()->NavigateAndCommit(kUrl2); 1259 contents()->NavigateAndCommit(kUrl2);
1260 TestRenderFrameHost* rfh2 = main_test_rfh(); 1260 TestRenderFrameHost* rfh2 = main_test_rfh();
1261 rfh2->GetSiteInstance()->IncrementActiveFrameCount(); 1261 rfh2->GetSiteInstance()->IncrementActiveFrameCount();
1262 1262
1263 // Now go back, but suppose the SwapOut_ACK isn't received. This shouldn't 1263 // Now go back, but suppose the SwapOut_ACK isn't received. This shouldn't
1264 // happen, but we have seen it when going back quickly across many entries 1264 // happen, but we have seen it when going back quickly across many entries
1265 // (http://crbug.com/93427). 1265 // (http://crbug.com/93427).
1266 contents()->GetController().GoBack(); 1266 contents()->GetController().GoBack();
1267 contents()->GetMainFrame()->PrepareForCommit();
1268 1267
1269 // The back navigation commits. 1268 // The back navigation commits.
1270 const NavigationEntry* entry1 = contents()->GetController().GetPendingEntry(); 1269 const NavigationEntry* entry1 = contents()->GetController().GetPendingEntry();
1271 contents()->GetPendingMainFrame()->SendNavigate( 1270 contents()->GetPendingMainFrame()->SendNavigate(
1272 entry1->GetUniqueID(), false, entry1->GetURL()); 1271 entry1->GetUniqueID(), false, entry1->GetURL());
1273 EXPECT_TRUE(rfh2->IsWaitingForUnloadACK()); 1272 EXPECT_TRUE(rfh2->IsWaitingForUnloadACK());
1274 EXPECT_FALSE(rfh2->is_active()); 1273 EXPECT_FALSE(rfh2->is_active());
1275 1274
1276 // We should be able to navigate forward. 1275 // We should be able to navigate forward.
1277 contents()->GetController().GoForward(); 1276 contents()->GetController().GoForward();
(...skipping 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after
3151 ASSERT_FALSE(delete_observer.deleted()); 3150 ASSERT_FALSE(delete_observer.deleted());
3152 EXPECT_FALSE(initial_rfh->is_active()); 3151 EXPECT_FALSE(initial_rfh->is_active());
3153 3152
3154 // The initial RFH receives a DidStartProvisionalLoad IPC. It should not 3153 // The initial RFH receives a DidStartProvisionalLoad IPC. It should not
3155 // create a NavigationHandle. 3154 // create a NavigationHandle.
3156 initial_rfh->SimulateNavigationStart(kUrl3); 3155 initial_rfh->SimulateNavigationStart(kUrl3);
3157 EXPECT_FALSE(initial_rfh->navigation_handle()); 3156 EXPECT_FALSE(initial_rfh->navigation_handle());
3158 } 3157 }
3159 3158
3160 } // namespace content 3159 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698