1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/public/test/mock_render_process_host.h"
6 #include "content/test/test_render_view_host.h"
10 class RenderProcessHostUnitTest
: public RenderViewHostTestHarness
{};
12 // Tests that guest RenderProcessHosts are not considered suitable hosts when
13 // searching for RenderProcessHost.
14 TEST_F(RenderProcessHostUnitTest
, GuestsAreNotSuitableHosts
) {
15 GURL
test_url("http://foo.com");
17 MockRenderProcessHost
guest_host(browser_context());
18 guest_host
.SetIsGuest(true);
20 EXPECT_FALSE(RenderProcessHostImpl::IsSuitableHost(
21 &guest_host
, browser_context(), test_url
));
22 EXPECT_TRUE(RenderProcessHostImpl::IsSuitableHost(
23 process(), browser_context(), test_url
));
26 RenderProcessHost::GetExistingProcessHost(browser_context(), test_url
));
29 } // namespace content