IndexedDBFactory now ForceCloses databases.
[chromium-blink-merge.git] / content / browser / renderer_host / render_process_host_unittest.cc
blob6a830f9d61be26ed9ca326c4dee652948b39f549
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"
8 namespace content {
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));
24 EXPECT_EQ(
25 process(),
26 RenderProcessHost::GetExistingProcessHost(browser_context(), test_url));
29 } // namespace content