OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "base/test/histogram_tester.h" | 8 #include "base/test/histogram_tester.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "content/browser/compositor/test/no_transport_image_transport_factory.h
" |
10 #include "content/browser/frame_host/cross_site_transferring_request.h" | 11 #include "content/browser/frame_host/cross_site_transferring_request.h" |
11 #include "content/browser/frame_host/navigation_controller_impl.h" | 12 #include "content/browser/frame_host/navigation_controller_impl.h" |
12 #include "content/browser/frame_host/navigation_entry_impl.h" | 13 #include "content/browser/frame_host/navigation_entry_impl.h" |
13 #include "content/browser/frame_host/navigation_request.h" | 14 #include "content/browser/frame_host/navigation_request.h" |
14 #include "content/browser/frame_host/navigator.h" | 15 #include "content/browser/frame_host/navigator.h" |
15 #include "content/browser/frame_host/render_frame_host_manager.h" | 16 #include "content/browser/frame_host/render_frame_host_manager.h" |
16 #include "content/browser/frame_host/render_frame_proxy_host.h" | 17 #include "content/browser/frame_host/render_frame_proxy_host.h" |
17 #include "content/browser/site_instance_impl.h" | 18 #include "content/browser/site_instance_impl.h" |
18 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 19 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
19 #include "content/common/frame_messages.h" | 20 #include "content/common/frame_messages.h" |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 DISALLOW_COPY_AND_ASSIGN(PluginFaviconMessageObserver); | 264 DISALLOW_COPY_AND_ASSIGN(PluginFaviconMessageObserver); |
264 }; | 265 }; |
265 | 266 |
266 } // namespace | 267 } // namespace |
267 | 268 |
268 class RenderFrameHostManagerTest : public RenderViewHostImplTestHarness { | 269 class RenderFrameHostManagerTest : public RenderViewHostImplTestHarness { |
269 public: | 270 public: |
270 void SetUp() override { | 271 void SetUp() override { |
271 RenderViewHostImplTestHarness::SetUp(); | 272 RenderViewHostImplTestHarness::SetUp(); |
272 WebUIControllerFactory::RegisterFactory(&factory_); | 273 WebUIControllerFactory::RegisterFactory(&factory_); |
| 274 #if !defined(OS_ANDROID) |
| 275 ImageTransportFactory::InitializeForUnitTests( |
| 276 make_scoped_ptr(new NoTransportImageTransportFactory)); |
| 277 #endif |
273 } | 278 } |
274 | 279 |
275 void TearDown() override { | 280 void TearDown() override { |
276 RenderViewHostImplTestHarness::TearDown(); | 281 RenderViewHostImplTestHarness::TearDown(); |
277 WebUIControllerFactory::UnregisterFactoryForTesting(&factory_); | 282 WebUIControllerFactory::UnregisterFactoryForTesting(&factory_); |
278 } | 283 } |
279 | 284 |
280 void set_should_create_webui(bool should_create_webui) { | 285 void set_should_create_webui(bool should_create_webui) { |
281 factory_.set_should_create_webui(should_create_webui); | 286 factory_.set_should_create_webui(should_create_webui); |
282 } | 287 } |
(...skipping 1859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2142 EXPECT_FALSE(contents2->GetMainFrame()->IsRenderFrameLive()); | 2147 EXPECT_FALSE(contents2->GetMainFrame()->IsRenderFrameLive()); |
2143 contents2->NavigateAndCommit(kUrl3); | 2148 contents2->NavigateAndCommit(kUrl3); |
2144 EXPECT_TRUE(contents2->GetMainFrame()->IsRenderFrameLive()); | 2149 EXPECT_TRUE(contents2->GetMainFrame()->IsRenderFrameLive()); |
2145 EXPECT_NE(nullptr, | 2150 EXPECT_NE(nullptr, |
2146 iframe->GetRenderFrameProxyHost(contents1->GetSiteInstance())); | 2151 iframe->GetRenderFrameProxyHost(contents1->GetSiteInstance())); |
2147 EXPECT_EQ(nullptr, | 2152 EXPECT_EQ(nullptr, |
2148 iframe->GetRenderFrameProxyHost(contents2->GetSiteInstance())); | 2153 iframe->GetRenderFrameProxyHost(contents2->GetSiteInstance())); |
2149 } | 2154 } |
2150 | 2155 |
2151 } // namespace content | 2156 } // namespace content |
OLD | NEW |