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 #ifndef CONTENT_TEST_TEST_BLINK_WEB_UNIT_TEST_SUPPORT_H_ | 5 #ifndef CONTENT_TEST_TEST_BLINK_WEB_UNIT_TEST_SUPPORT_H_ |
6 #define CONTENT_TEST_TEST_BLINK_WEB_UNIT_TEST_SUPPORT_H_ | 6 #define CONTENT_TEST_TEST_BLINK_WEB_UNIT_TEST_SUPPORT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/files/scoped_temp_dir.h" | 11 #include "base/files/scoped_temp_dir.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "cc/blink/web_compositor_support_impl.h" | 14 #include "cc/blink/web_compositor_support_impl.h" |
15 #include "content/child/blink_platform_impl.h" | 15 #include "content/child/blink_platform_impl.h" |
16 #include "content/child/simple_webmimeregistry_impl.h" | |
17 #include "content/child/webfileutilities_impl.h" | 16 #include "content/child/webfileutilities_impl.h" |
18 #include "content/test/mock_webblob_registry_impl.h" | 17 #include "content/test/mock_webblob_registry_impl.h" |
19 #include "content/test/mock_webclipboard_impl.h" | 18 #include "content/test/mock_webclipboard_impl.h" |
20 #include "third_party/WebKit/public/platform/WebURLLoaderMockFactory.h" | 19 #include "third_party/WebKit/public/platform/WebURLLoaderMockFactory.h" |
21 | 20 |
22 namespace base { | 21 namespace base { |
23 class StatsTable; | 22 class StatsTable; |
24 } | 23 } |
25 | 24 |
26 namespace blink { | 25 namespace blink { |
(...skipping 15 matching lines...) Expand all Loading... |
42 // An implementation of BlinkPlatformImpl for tests. | 41 // An implementation of BlinkPlatformImpl for tests. |
43 class TestBlinkWebUnitTestSupport : public BlinkPlatformImpl { | 42 class TestBlinkWebUnitTestSupport : public BlinkPlatformImpl { |
44 public: | 43 public: |
45 TestBlinkWebUnitTestSupport(); | 44 TestBlinkWebUnitTestSupport(); |
46 ~TestBlinkWebUnitTestSupport() override; | 45 ~TestBlinkWebUnitTestSupport() override; |
47 | 46 |
48 blink::WebBlobRegistry* getBlobRegistry() override; | 47 blink::WebBlobRegistry* getBlobRegistry() override; |
49 blink::WebClipboard* clipboard() override; | 48 blink::WebClipboard* clipboard() override; |
50 blink::WebFileUtilities* fileUtilities() override; | 49 blink::WebFileUtilities* fileUtilities() override; |
51 blink::WebIDBFactory* idbFactory() override; | 50 blink::WebIDBFactory* idbFactory() override; |
52 blink::WebMimeRegistry* mimeRegistry() override; | |
53 | 51 |
54 blink::WebURLLoader* createURLLoader() override; | 52 blink::WebURLLoader* createURLLoader() override; |
55 blink::WebString userAgent() override; | 53 blink::WebString userAgent() override; |
56 blink::WebString queryLocalizedString( | 54 blink::WebString queryLocalizedString( |
57 blink::WebLocalizedString::Name name) override; | 55 blink::WebLocalizedString::Name name) override; |
58 blink::WebString queryLocalizedString(blink::WebLocalizedString::Name name, | 56 blink::WebString queryLocalizedString(blink::WebLocalizedString::Name name, |
59 const blink::WebString& value) override; | 57 const blink::WebString& value) override; |
60 blink::WebString queryLocalizedString( | 58 blink::WebString queryLocalizedString( |
61 blink::WebLocalizedString::Name name, | 59 blink::WebLocalizedString::Name name, |
62 const blink::WebString& value1, | 60 const blink::WebString& value1, |
(...skipping 20 matching lines...) Expand all Loading... |
83 const blink::WebSize& size) override; | 81 const blink::WebSize& size) override; |
84 | 82 |
85 void getPluginList(bool refresh, | 83 void getPluginList(bool refresh, |
86 const blink::WebSecurityOrigin& mainFrameOrigin, | 84 const blink::WebSecurityOrigin& mainFrameOrigin, |
87 blink::WebPluginListBuilder* builder) override; | 85 blink::WebPluginListBuilder* builder) override; |
88 | 86 |
89 blink::WebRTCCertificateGenerator* createRTCCertificateGenerator() override; | 87 blink::WebRTCCertificateGenerator* createRTCCertificateGenerator() override; |
90 | 88 |
91 private: | 89 private: |
92 MockWebBlobRegistryImpl blob_registry_; | 90 MockWebBlobRegistryImpl blob_registry_; |
93 SimpleWebMimeRegistryImpl mime_registry_; | |
94 std::unique_ptr<MockWebClipboardImpl> mock_clipboard_; | 91 std::unique_ptr<MockWebClipboardImpl> mock_clipboard_; |
95 WebFileUtilitiesImpl file_utilities_; | 92 WebFileUtilitiesImpl file_utilities_; |
96 base::ScopedTempDir file_system_root_; | 93 base::ScopedTempDir file_system_root_; |
97 std::unique_ptr<blink::WebURLLoaderMockFactory> url_loader_factory_; | 94 std::unique_ptr<blink::WebURLLoaderMockFactory> url_loader_factory_; |
98 cc_blink::WebCompositorSupportImpl compositor_support_; | 95 cc_blink::WebCompositorSupportImpl compositor_support_; |
99 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler_; | 96 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler_; |
100 std::unique_ptr<blink::WebThread> web_thread_; | 97 std::unique_ptr<blink::WebThread> web_thread_; |
101 std::unique_ptr<cc::TestSharedBitmapManager> shared_bitmap_manager_; | 98 std::unique_ptr<cc::TestSharedBitmapManager> shared_bitmap_manager_; |
102 | 99 |
103 #if defined(OS_WIN) || defined(OS_MACOSX) | 100 #if defined(OS_WIN) || defined(OS_MACOSX) |
104 blink::WebThemeEngine* active_theme_engine_ = nullptr; | 101 blink::WebThemeEngine* active_theme_engine_ = nullptr; |
105 #endif | 102 #endif |
106 DISALLOW_COPY_AND_ASSIGN(TestBlinkWebUnitTestSupport); | 103 DISALLOW_COPY_AND_ASSIGN(TestBlinkWebUnitTestSupport); |
107 }; | 104 }; |
108 | 105 |
109 } // namespace content | 106 } // namespace content |
110 | 107 |
111 #endif // CONTENT_TEST_TEST_BLINK_WEB_UNIT_TEST_SUPPORT_H_ | 108 #endif // CONTENT_TEST_TEST_BLINK_WEB_UNIT_TEST_SUPPORT_H_ |
OLD | NEW |