Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: content/test/test_blink_web_unit_test_support.h

Issue 2362473002: Adding unit test for DrawingBuffer's bitmap recycling mechanism (Closed)
Patch Set: fix nits Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/test/test_blink_web_unit_test_support.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 15 matching lines...) Expand all
26 namespace blink { 26 namespace blink {
27 class WebLayerTreeView; 27 class WebLayerTreeView;
28 } 28 }
29 29
30 namespace blink { 30 namespace blink {
31 namespace scheduler { 31 namespace scheduler {
32 class RendererScheduler; 32 class RendererScheduler;
33 } 33 }
34 } 34 }
35 35
36 namespace cc {
37 class TestSharedBitmapManager;
38 }
39
36 namespace content { 40 namespace content {
37 41
38 // An implementation of BlinkPlatformImpl for tests. 42 // An implementation of BlinkPlatformImpl for tests.
39 class TestBlinkWebUnitTestSupport : public BlinkPlatformImpl { 43 class TestBlinkWebUnitTestSupport : public BlinkPlatformImpl {
40 public: 44 public:
41 TestBlinkWebUnitTestSupport(); 45 TestBlinkWebUnitTestSupport();
42 ~TestBlinkWebUnitTestSupport() override; 46 ~TestBlinkWebUnitTestSupport() override;
43 47
44 blink::WebBlobRegistry* getBlobRegistry() override; 48 blink::WebBlobRegistry* getBlobRegistry() override;
45 blink::WebClipboard* clipboard() override; 49 blink::WebClipboard* clipboard() override;
(...skipping 22 matching lines...) Expand all
68 72
69 blink::WebGestureCurve* createFlingAnimationCurve( 73 blink::WebGestureCurve* createFlingAnimationCurve(
70 blink::WebGestureDevice device_source, 74 blink::WebGestureDevice device_source,
71 const blink::WebFloatPoint& velocity, 75 const blink::WebFloatPoint& velocity,
72 const blink::WebSize& cumulative_scroll) override; 76 const blink::WebSize& cumulative_scroll) override;
73 77
74 blink::WebURLLoaderMockFactory* getURLLoaderMockFactory() override; 78 blink::WebURLLoaderMockFactory* getURLLoaderMockFactory() override;
75 79
76 blink::WebThread* currentThread() override; 80 blink::WebThread* currentThread() override;
77 81
82 std::unique_ptr<cc::SharedBitmap> allocateSharedBitmap(
83 const blink::WebSize& size) override;
84
78 void getPluginList(bool refresh, 85 void getPluginList(bool refresh,
79 const blink::WebSecurityOrigin& mainFrameOrigin, 86 const blink::WebSecurityOrigin& mainFrameOrigin,
80 blink::WebPluginListBuilder* builder) override; 87 blink::WebPluginListBuilder* builder) override;
81 88
82 blink::WebRTCCertificateGenerator* createRTCCertificateGenerator() override; 89 blink::WebRTCCertificateGenerator* createRTCCertificateGenerator() override;
83 90
84 private: 91 private:
85 MockWebBlobRegistryImpl blob_registry_; 92 MockWebBlobRegistryImpl blob_registry_;
86 SimpleWebMimeRegistryImpl mime_registry_; 93 SimpleWebMimeRegistryImpl mime_registry_;
87 std::unique_ptr<MockWebClipboardImpl> mock_clipboard_; 94 std::unique_ptr<MockWebClipboardImpl> mock_clipboard_;
88 WebFileUtilitiesImpl file_utilities_; 95 WebFileUtilitiesImpl file_utilities_;
89 base::ScopedTempDir file_system_root_; 96 base::ScopedTempDir file_system_root_;
90 std::unique_ptr<blink::WebURLLoaderMockFactory> url_loader_factory_; 97 std::unique_ptr<blink::WebURLLoaderMockFactory> url_loader_factory_;
91 cc_blink::WebCompositorSupportImpl compositor_support_; 98 cc_blink::WebCompositorSupportImpl compositor_support_;
92 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler_; 99 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler_;
93 std::unique_ptr<blink::WebThread> web_thread_; 100 std::unique_ptr<blink::WebThread> web_thread_;
101 std::unique_ptr<cc::TestSharedBitmapManager> shared_bitmap_manager_;
94 102
95 #if defined(OS_WIN) || defined(OS_MACOSX) 103 #if defined(OS_WIN) || defined(OS_MACOSX)
96 blink::WebThemeEngine* active_theme_engine_ = nullptr; 104 blink::WebThemeEngine* active_theme_engine_ = nullptr;
97 #endif 105 #endif
98 DISALLOW_COPY_AND_ASSIGN(TestBlinkWebUnitTestSupport); 106 DISALLOW_COPY_AND_ASSIGN(TestBlinkWebUnitTestSupport);
99 }; 107 };
100 108
101 } // namespace content 109 } // namespace content
102 110
103 #endif // CONTENT_TEST_TEST_BLINK_WEB_UNIT_TEST_SUPPORT_H_ 111 #endif // CONTENT_TEST_TEST_BLINK_WEB_UNIT_TEST_SUPPORT_H_
OLDNEW
« no previous file with comments | « no previous file | content/test/test_blink_web_unit_test_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698