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

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: minor cleanup Created 4 years, 2 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
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 private: 89 private:
83 MockWebBlobRegistryImpl blob_registry_; 90 MockWebBlobRegistryImpl blob_registry_;
84 SimpleWebMimeRegistryImpl mime_registry_; 91 SimpleWebMimeRegistryImpl mime_registry_;
85 std::unique_ptr<MockWebClipboardImpl> mock_clipboard_; 92 std::unique_ptr<MockWebClipboardImpl> mock_clipboard_;
86 WebFileUtilitiesImpl file_utilities_; 93 WebFileUtilitiesImpl file_utilities_;
87 base::ScopedTempDir file_system_root_; 94 base::ScopedTempDir file_system_root_;
88 std::unique_ptr<blink::WebURLLoaderMockFactory> url_loader_factory_; 95 std::unique_ptr<blink::WebURLLoaderMockFactory> url_loader_factory_;
89 cc_blink::WebCompositorSupportImpl compositor_support_; 96 cc_blink::WebCompositorSupportImpl compositor_support_;
90 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler_; 97 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler_;
91 std::unique_ptr<blink::WebThread> web_thread_; 98 std::unique_ptr<blink::WebThread> web_thread_;
99 std::unique_ptr<cc::TestSharedBitmapManager> shared_bitmap_manager_;
92 100
93 #if defined(OS_WIN) || defined(OS_MACOSX) 101 #if defined(OS_WIN) || defined(OS_MACOSX)
94 blink::WebThemeEngine* active_theme_engine_ = nullptr; 102 blink::WebThemeEngine* active_theme_engine_ = nullptr;
95 #endif 103 #endif
96 DISALLOW_COPY_AND_ASSIGN(TestBlinkWebUnitTestSupport); 104 DISALLOW_COPY_AND_ASSIGN(TestBlinkWebUnitTestSupport);
97 }; 105 };
98 106
99 } // namespace content 107 } // namespace content
100 108
101 #endif // CONTENT_TEST_TEST_BLINK_WEB_UNIT_TEST_SUPPORT_H_ 109 #endif // CONTENT_TEST_TEST_BLINK_WEB_UNIT_TEST_SUPPORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698