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

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

Issue 30323002: [DRAFT] Create RenderFrameHostManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 1 month 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) 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/common/input_messages.h" 9 #include "content/common/input_messages.h"
10 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 test_rvh()->SendNavigateWithFile(1, url, file_path); 281 test_rvh()->SendNavigateWithFile(1, url, file_path);
282 EXPECT_EQ(1, process()->bad_msg_count()); 282 EXPECT_EQ(1, process()->bad_msg_count());
283 283
284 ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadFile( 284 ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadFile(
285 process()->GetID(), file_path); 285 process()->GetID(), file_path);
286 test_rvh()->SendNavigateWithFile(process()->GetID(), url, file_path); 286 test_rvh()->SendNavigateWithFile(process()->GetID(), url, file_path);
287 EXPECT_EQ(1, process()->bad_msg_count()); 287 EXPECT_EQ(1, process()->bad_msg_count());
288 } 288 }
289 289
290 TEST_F(RenderViewHostTest, RoutingIdSane) { 290 TEST_F(RenderViewHostTest, RoutingIdSane) {
291 EXPECT_EQ(test_rvh()->GetProcess(), 291 RenderFrameHostImpl* root_rfh =
292 test_rvh()->main_render_frame_host()->GetProcess()); 292 contents()->GetFrameTree()->root()->render_frame_host();
293 EXPECT_NE(test_rvh()->GetRoutingID(), 293 EXPECT_EQ(test_rvh()->GetProcess(), root_rfh->GetProcess());
294 test_rvh()->main_render_frame_host()->routing_id()); 294 EXPECT_NE(test_rvh()->GetRoutingID(), root_rfh->routing_id());
295 } 295 }
296 296
297 } // namespace content 297 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698