OLD | NEW |
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 "content/browser/renderer_host/test_render_view_host.h" | 5 #include "content/browser/renderer_host/test_render_view_host.h" |
6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" |
7 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 8 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
8 #include "content/browser/dom_storage/session_storage_namespace_impl.h" | 9 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
9 #include "content/browser/renderer_host/test_backing_store.h" | 10 #include "content/browser/renderer_host/test_backing_store.h" |
10 #include "content/browser/site_instance_impl.h" | 11 #include "content/browser/site_instance_impl.h" |
11 #include "content/common/dom_storage/dom_storage_types.h" | 12 #include "content/common/dom_storage/dom_storage_types.h" |
12 #include "content/common/view_messages.h" | 13 #include "content/common/view_messages.h" |
13 #include "content/public/browser/browser_context.h" | 14 #include "content/public/browser/browser_context.h" |
14 #include "content/public/browser/navigation_controller.h" | 15 #include "content/public/browser/navigation_controller.h" |
15 #include "content/public/browser/storage_partition.h" | 16 #include "content/public/browser/storage_partition.h" |
16 #include "content/public/common/content_client.h" | 17 #include "content/public/common/content_client.h" |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 | 388 |
388 void TestRenderViewHost::set_simulate_fetch_via_proxy(bool proxy) { | 389 void TestRenderViewHost::set_simulate_fetch_via_proxy(bool proxy) { |
389 simulate_fetch_via_proxy_ = proxy; | 390 simulate_fetch_via_proxy_ = proxy; |
390 } | 391 } |
391 | 392 |
392 void TestRenderViewHost::set_simulate_history_list_was_cleared(bool cleared) { | 393 void TestRenderViewHost::set_simulate_history_list_was_cleared(bool cleared) { |
393 simulate_history_list_was_cleared_ = cleared; | 394 simulate_history_list_was_cleared_ = cleared; |
394 } | 395 } |
395 | 396 |
396 RenderViewHostImplTestHarness::RenderViewHostImplTestHarness() { | 397 RenderViewHostImplTestHarness::RenderViewHostImplTestHarness() { |
| 398 std::vector<ui::ScaleFactor> scale_factors; |
| 399 scale_factors.push_back(ui::SCALE_FACTOR_100P); |
| 400 scoped_set_supported_scale_factors_.reset( |
| 401 new ui::test::ScopedSetSupportedScaleFactors(scale_factors)); |
397 } | 402 } |
398 | 403 |
399 RenderViewHostImplTestHarness::~RenderViewHostImplTestHarness() { | 404 RenderViewHostImplTestHarness::~RenderViewHostImplTestHarness() { |
400 } | 405 } |
401 | 406 |
402 TestRenderViewHost* RenderViewHostImplTestHarness::test_rvh() { | 407 TestRenderViewHost* RenderViewHostImplTestHarness::test_rvh() { |
403 return static_cast<TestRenderViewHost*>(rvh()); | 408 return static_cast<TestRenderViewHost*>(rvh()); |
404 } | 409 } |
405 | 410 |
406 TestRenderViewHost* RenderViewHostImplTestHarness::pending_test_rvh() { | 411 TestRenderViewHost* RenderViewHostImplTestHarness::pending_test_rvh() { |
407 return static_cast<TestRenderViewHost*>(pending_rvh()); | 412 return static_cast<TestRenderViewHost*>(pending_rvh()); |
408 } | 413 } |
409 | 414 |
410 TestRenderViewHost* RenderViewHostImplTestHarness::active_test_rvh() { | 415 TestRenderViewHost* RenderViewHostImplTestHarness::active_test_rvh() { |
411 return static_cast<TestRenderViewHost*>(active_rvh()); | 416 return static_cast<TestRenderViewHost*>(active_rvh()); |
412 } | 417 } |
413 | 418 |
414 TestWebContents* RenderViewHostImplTestHarness::contents() { | 419 TestWebContents* RenderViewHostImplTestHarness::contents() { |
415 return static_cast<TestWebContents*>(web_contents()); | 420 return static_cast<TestWebContents*>(web_contents()); |
416 } | 421 } |
417 | 422 |
418 } // namespace content | 423 } // namespace content |
OLD | NEW |