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

Side by Side Diff: chrome/browser/renderer_host/test/render_view_host_unittest.cc

Issue 5384002: net: Remove typedef net::URLRequest URLRequest; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 10 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/renderer_host/test/test_render_view_host.h" 5 #include "chrome/browser/renderer_host/test/test_render_view_host.h"
6 #include "chrome/browser/tab_contents/navigation_controller.h" 6 #include "chrome/browser/tab_contents/navigation_controller.h"
7 #include "chrome/browser/tab_contents/navigation_entry.h" 7 #include "chrome/browser/tab_contents/navigation_entry.h"
8 #include "chrome/browser/tab_contents/test_tab_contents.h" 8 #include "chrome/browser/tab_contents/test_tab_contents.h"
9 #include "chrome/common/render_messages.h" 9 #include "chrome/common/render_messages.h"
10 10
(...skipping 28 matching lines...) Expand all
39 // as one on a site that doesn't exist. 39 // as one on a site that doesn't exist.
40 // . After this step is_waiting_for_unload_ack_ has been set to true on 40 // . After this step is_waiting_for_unload_ack_ has been set to true on
41 // the first RVH. 41 // the first RVH.
42 // . click stop before the page has been commited. 42 // . click stop before the page has been commited.
43 // . click reload. 43 // . click reload.
44 // . is_waiting_for_unload_ack_ is still true, and the if the hang monitor 44 // . is_waiting_for_unload_ack_ is still true, and the if the hang monitor
45 // fires the tab gets closed. 45 // fires the tab gets closed.
46 46
47 NavigateAndCommit(url1); 47 NavigateAndCommit(url1);
48 controller().LoadURL(url2, GURL(), 0); 48 controller().LoadURL(url2, GURL(), 0);
49 // Simulate the ClosePage call which is normally sent by the URLRequest. 49 // Simulate the ClosePage call which is normally sent by the net::URLRequest.
50 rvh()->ClosePage(true, 0, 0); 50 rvh()->ClosePage(true, 0, 0);
51 // Needed so that navigations are not suspended on the RVH. Normally handled 51 // Needed so that navigations are not suspended on the RVH. Normally handled
52 // by way of ViewHostMsg_ShouldClose_ACK. 52 // by way of ViewHostMsg_ShouldClose_ACK.
53 contents()->render_manager()->ShouldClosePage(true, true); 53 contents()->render_manager()->ShouldClosePage(true, true);
54 contents()->Stop(); 54 contents()->Stop();
55 controller().Reload(false); 55 controller().Reload(false);
56 EXPECT_FALSE(rvh()->is_waiting_for_unload_ack()); 56 EXPECT_FALSE(rvh()->is_waiting_for_unload_ack());
57 } 57 }
58 58
59 // The test that follow trigger DCHECKS in debug build. 59 // The test that follow trigger DCHECKS in debug build.
(...skipping 30 matching lines...) Expand all
90 // the code actually expects it to have at least one int para, this this 90 // the code actually expects it to have at least one int para, this this
91 // bogus message will not fail at de-serialization but should fail in 91 // bogus message will not fail at de-serialization but should fail in
92 // OnMsgInputEventAck() processing. 92 // OnMsgInputEventAck() processing.
93 IPC::Message message(0, ViewHostMsg_HandleInputEvent_ACK::ID, 93 IPC::Message message(0, ViewHostMsg_HandleInputEvent_ACK::ID,
94 IPC::Message::PRIORITY_NORMAL); 94 IPC::Message::PRIORITY_NORMAL);
95 rvh()->TestOnMessageReceived(message); 95 rvh()->TestOnMessageReceived(message);
96 EXPECT_EQ(1, process()->bad_msg_count()); 96 EXPECT_EQ(1, process()->bad_msg_count());
97 } 97 }
98 98
99 #endif // NDEBUG 99 #endif // NDEBUG
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698