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

Side by Side Diff: content/browser/tab_contents/test_tab_contents.cc

Issue 6973073: Avoid canceling a pending navigation if the old RVH commits right away. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix failing unit tests. Created 9 years, 6 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/tab_contents/test_tab_contents.h" 5 #include "content/browser/tab_contents/test_tab_contents.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "chrome/browser/browser_url_handler.h" 9 #include "chrome/browser/browser_url_handler.h"
10 #include "content/browser/renderer_host/mock_render_process_host.h" 10 #include "content/browser/renderer_host/mock_render_process_host.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 // Simulate the SwapOut_ACK that fires if you commit a cross-site navigation 72 // Simulate the SwapOut_ACK that fires if you commit a cross-site navigation
73 // without making any network requests. 73 // without making any network requests.
74 if (old_rvh != rvh) 74 if (old_rvh != rvh)
75 old_rvh->OnSwapOutACK(); 75 old_rvh->OnSwapOutACK();
76 } 76 }
77 77
78 void TestTabContents::ProceedWithCrossSiteNavigation() { 78 void TestTabContents::ProceedWithCrossSiteNavigation() {
79 if (!pending_rvh()) 79 if (!pending_rvh())
80 return; 80 return;
81 render_manager_.ShouldClosePage(true, true); 81 TestRenderViewHost* rvh = static_cast<TestRenderViewHost*>(
82 render_manager_.current_host());
83 rvh->SendShouldCloseACK(true);
82 } 84 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698