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

Side by Side Diff: content/browser/renderer_host/render_view_host_unittest.cc

Issue 8785004: Change NavigationController::LoadURL to take a Referrer class instead of a GURL as referrer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years 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/renderer_host/test_render_view_host.h" 5 #include "content/browser/renderer_host/test_render_view_host.h"
6 #include "content/browser/tab_contents/navigation_controller.h" 6 #include "content/browser/tab_contents/navigation_controller.h"
7 #include "content/browser/tab_contents/navigation_entry.h" 7 #include "content/browser/tab_contents/navigation_entry.h"
8 #include "content/browser/tab_contents/test_tab_contents.h" 8 #include "content/browser/tab_contents/test_tab_contents.h"
9 #include "content/common/view_messages.h" 9 #include "content/common/view_messages.h"
10 #include "content/public/common/page_transition_types.h" 10 #include "content/public/common/page_transition_types.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // as one on a site that doesn't exist. 42 // as one on a site that doesn't exist.
43 // . After this step is_waiting_for_unload_ack_ has been set to true on 43 // . After this step is_waiting_for_unload_ack_ has been set to true on
44 // the first RVH. 44 // the first RVH.
45 // . click stop before the page has been commited. 45 // . click stop before the page has been commited.
46 // . click reload. 46 // . click reload.
47 // . is_waiting_for_unload_ack_ is still true, and the if the hang monitor 47 // . is_waiting_for_unload_ack_ is still true, and the if the hang monitor
48 // fires the tab gets closed. 48 // fires the tab gets closed.
49 49
50 NavigateAndCommit(url1); 50 NavigateAndCommit(url1);
51 controller().LoadURL( 51 controller().LoadURL(
52 url2, GURL(), content::PAGE_TRANSITION_LINK, std::string()); 52 url2, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string());
53 // Simulate the ClosePage call which is normally sent by the net::URLRequest. 53 // Simulate the ClosePage call which is normally sent by the net::URLRequest.
54 rvh()->ClosePage(); 54 rvh()->ClosePage();
55 // Needed so that navigations are not suspended on the RVH. 55 // Needed so that navigations are not suspended on the RVH.
56 rvh()->SendShouldCloseACK(true); 56 rvh()->SendShouldCloseACK(true);
57 contents()->Stop(); 57 contents()->Stop();
58 controller().Reload(false); 58 controller().Reload(false);
59 EXPECT_FALSE(rvh()->is_waiting_for_unload_ack_for_testing()); 59 EXPECT_FALSE(rvh()->is_waiting_for_unload_ack_for_testing());
60 } 60 }
61 61
62 class MockDraggingRenderViewHostDelegateView 62 class MockDraggingRenderViewHostDelegateView
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // the code actually expects it to have at least one int para, this this 177 // the code actually expects it to have at least one int para, this this
178 // bogus message will not fail at de-serialization but should fail in 178 // bogus message will not fail at de-serialization but should fail in
179 // OnMsgInputEventAck() processing. 179 // OnMsgInputEventAck() processing.
180 IPC::Message message(0, ViewHostMsg_HandleInputEvent_ACK::ID, 180 IPC::Message message(0, ViewHostMsg_HandleInputEvent_ACK::ID,
181 IPC::Message::PRIORITY_NORMAL); 181 IPC::Message::PRIORITY_NORMAL);
182 rvh()->TestOnMessageReceived(message); 182 rvh()->TestOnMessageReceived(message);
183 EXPECT_EQ(1, process()->bad_msg_count()); 183 EXPECT_EQ(1, process()->bad_msg_count());
184 } 184 }
185 185
186 #endif 186 #endif
OLDNEW
« no previous file with comments | « content/browser/debugger/devtools_manager_unittest.cc ('k') | content/browser/tab_contents/navigation_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698