Chromium Code Reviews| 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 scoped_ptr<ImageTransportFactory>( | |
|
dcheng
2015/05/28 22:16:30
make_scoped_ptr will save you some typing.
kenrb
2015/05/29 19:29:36
Done.
| |
| 277 new NoTransportImageTransportFactory)); | |
| 278 #endif | |
| 273 } | 279 } |
| 274 | 280 |
| 275 void TearDown() override { | 281 void TearDown() override { |
| 276 RenderViewHostImplTestHarness::TearDown(); | 282 RenderViewHostImplTestHarness::TearDown(); |
| 277 WebUIControllerFactory::UnregisterFactoryForTesting(&factory_); | 283 WebUIControllerFactory::UnregisterFactoryForTesting(&factory_); |
| 278 } | 284 } |
| 279 | 285 |
| 280 void set_should_create_webui(bool should_create_webui) { | 286 void set_should_create_webui(bool should_create_webui) { |
| 281 factory_.set_should_create_webui(should_create_webui); | 287 factory_.set_should_create_webui(should_create_webui); |
| 282 } | 288 } |
| (...skipping 1859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2142 EXPECT_FALSE(contents2->GetMainFrame()->IsRenderFrameLive()); | 2148 EXPECT_FALSE(contents2->GetMainFrame()->IsRenderFrameLive()); |
| 2143 contents2->NavigateAndCommit(kUrl3); | 2149 contents2->NavigateAndCommit(kUrl3); |
| 2144 EXPECT_TRUE(contents2->GetMainFrame()->IsRenderFrameLive()); | 2150 EXPECT_TRUE(contents2->GetMainFrame()->IsRenderFrameLive()); |
| 2145 EXPECT_NE(nullptr, | 2151 EXPECT_NE(nullptr, |
| 2146 iframe->GetRenderFrameProxyHost(contents1->GetSiteInstance())); | 2152 iframe->GetRenderFrameProxyHost(contents1->GetSiteInstance())); |
| 2147 EXPECT_EQ(nullptr, | 2153 EXPECT_EQ(nullptr, |
| 2148 iframe->GetRenderFrameProxyHost(contents2->GetSiteInstance())); | 2154 iframe->GetRenderFrameProxyHost(contents2->GetSiteInstance())); |
| 2149 } | 2155 } |
| 2150 | 2156 |
| 2151 } // namespace content | 2157 } // namespace content |
| OLD | NEW |