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

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

Issue 25654005: Remove GetActiveEntry usage from content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comment, added TODO, rebased on ToT. Created 7 years, 2 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
« no previous file with comments | « content/browser/accessibility/accessibility_ui.cc ('k') | content/browser/ssl/ssl_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/path_service.h" 5 #include "base/path_service.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "content/browser/child_process_security_policy_impl.h" 7 #include "content/browser/child_process_security_policy_impl.h"
8 #include "content/browser/renderer_host/test_render_view_host.h" 8 #include "content/browser/renderer_host/test_render_view_host.h"
9 #include "content/browser/web_contents/navigation_controller_impl.h" 9 #include "content/browser/web_contents/navigation_controller_impl.h"
10 #include "content/common/input_messages.h" 10 #include "content/common/input_messages.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 RenderViewHostTestBrowserClient test_browser_client_; 55 RenderViewHostTestBrowserClient test_browser_client_;
56 ContentBrowserClient* old_browser_client_; 56 ContentBrowserClient* old_browser_client_;
57 57
58 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTest); 58 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTest);
59 }; 59 };
60 60
61 // All about URLs reported by the renderer should get rewritten to about:blank. 61 // All about URLs reported by the renderer should get rewritten to about:blank.
62 // See RenderViewHost::OnNavigate for a discussion. 62 // See RenderViewHost::OnNavigate for a discussion.
63 TEST_F(RenderViewHostTest, FilterAbout) { 63 TEST_F(RenderViewHostTest, FilterAbout) {
64 test_rvh()->SendNavigate(1, GURL("about:cache")); 64 test_rvh()->SendNavigate(1, GURL("about:cache"));
65 ASSERT_TRUE(controller().GetActiveEntry()); 65 ASSERT_TRUE(controller().GetVisibleEntry());
66 EXPECT_EQ(GURL(kAboutBlankURL), controller().GetActiveEntry()->GetURL()); 66 EXPECT_EQ(GURL(kAboutBlankURL), controller().GetVisibleEntry()->GetURL());
67 } 67 }
68 68
69 // Create a full screen popup RenderWidgetHost and View. 69 // Create a full screen popup RenderWidgetHost and View.
70 TEST_F(RenderViewHostTest, CreateFullscreenWidget) { 70 TEST_F(RenderViewHostTest, CreateFullscreenWidget) {
71 int routing_id = process()->GetNextRoutingID(); 71 int routing_id = process()->GetNextRoutingID();
72 test_rvh()->CreateNewFullscreenWidget(routing_id); 72 test_rvh()->CreateNewFullscreenWidget(routing_id);
73 } 73 }
74 74
75 // Makes sure that RenderViewHost::is_waiting_for_unload_ack_ is false when 75 // Makes sure that RenderViewHost::is_waiting_for_unload_ack_ is false when
76 // reloading a page. If is_waiting_for_unload_ack_ is not false when reloading 76 // reloading a page. If is_waiting_for_unload_ack_ is not false when reloading
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 } 289 }
290 290
291 TEST_F(RenderViewHostTest, RoutingIdSane) { 291 TEST_F(RenderViewHostTest, RoutingIdSane) {
292 EXPECT_EQ(test_rvh()->GetProcess(), 292 EXPECT_EQ(test_rvh()->GetProcess(),
293 test_rvh()->main_render_frame_host()->GetProcess()); 293 test_rvh()->main_render_frame_host()->GetProcess());
294 EXPECT_NE(test_rvh()->GetRoutingID(), 294 EXPECT_NE(test_rvh()->GetRoutingID(),
295 test_rvh()->main_render_frame_host()->routing_id()); 295 test_rvh()->main_render_frame_host()->routing_id());
296 } 296 }
297 297
298 } // namespace content 298 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/accessibility_ui.cc ('k') | content/browser/ssl/ssl_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698