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

Side by Side Diff: android_webview/browser/test/rendering_test.h

Issue 1852513003: Convert //android_webview to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git is hard Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 ANDROID_WEBVIEW_BROWSER_TEST_RENDERING_TEST_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_TEST_RENDERING_TEST_H_
6 #define ANDROID_WEBVIEW_BROWSER_TEST_RENDERING_TEST_H_ 6 #define ANDROID_WEBVIEW_BROWSER_TEST_RENDERING_TEST_H_
7 7
8 #include <memory>
9
8 #include "android_webview/browser/browser_view_renderer_client.h" 10 #include "android_webview/browser/browser_view_renderer_client.h"
9 #include "android_webview/browser/shared_renderer_state_client.h" 11 #include "android_webview/browser/shared_renderer_state_client.h"
10 #include "android_webview/browser/test/fake_window.h" 12 #include "android_webview/browser/test/fake_window.h"
11 #include "base/macros.h" 13 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/single_thread_task_runner.h" 14 #include "base/single_thread_task_runner.h"
14 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
15 16
16 namespace base { 17 namespace base {
17 class MessageLoop; 18 class MessageLoop;
18 } 19 }
19 20
20 namespace cc { 21 namespace cc {
21 class CompositorFrame; 22 class CompositorFrame;
22 } 23 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 RenderingTest(); 71 RenderingTest();
71 ~RenderingTest() override; 72 ~RenderingTest() override;
72 73
73 virtual void SetUpTestHarness(); 74 virtual void SetUpTestHarness();
74 virtual void StartTest(); 75 virtual void StartTest();
75 76
76 void RunTest(); 77 void RunTest();
77 void InitializeCompositor(); 78 void InitializeCompositor();
78 void Attach(); 79 void Attach();
79 void EndTest(); 80 void EndTest();
80 scoped_ptr<cc::CompositorFrame> ConstructEmptyFrame(); 81 std::unique_ptr<cc::CompositorFrame> ConstructEmptyFrame();
81 82
82 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; 83 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
83 scoped_ptr<SharedRendererState> shared_renderer_state_; 84 std::unique_ptr<SharedRendererState> shared_renderer_state_;
84 scoped_ptr<BrowserViewRenderer> browser_view_renderer_; 85 std::unique_ptr<BrowserViewRenderer> browser_view_renderer_;
85 scoped_ptr<content::TestSynchronousCompositor> compositor_; 86 std::unique_ptr<content::TestSynchronousCompositor> compositor_;
86 scoped_ptr<FakeWindow> window_; 87 std::unique_ptr<FakeWindow> window_;
87 88
88 private: 89 private:
89 void QuitMessageLoop(); 90 void QuitMessageLoop();
90 91
91 const scoped_ptr<base::MessageLoop> message_loop_; 92 const std::unique_ptr<base::MessageLoop> message_loop_;
92 93
93 DISALLOW_COPY_AND_ASSIGN(RenderingTest); 94 DISALLOW_COPY_AND_ASSIGN(RenderingTest);
94 }; 95 };
95 96
96 #define RENDERING_TEST_F(TEST_FIXTURE_NAME) \ 97 #define RENDERING_TEST_F(TEST_FIXTURE_NAME) \
97 TEST_F(TEST_FIXTURE_NAME, RunTest) { RunTest(); } \ 98 TEST_F(TEST_FIXTURE_NAME, RunTest) { RunTest(); } \
98 class NeedsSemicolon##TEST_FIXTURE_NAME {} 99 class NeedsSemicolon##TEST_FIXTURE_NAME {}
99 100
100 } // namespace android_webview 101 } // namespace android_webview
101 102
102 #endif // ANDROID_WEBVIEW_BROWSER_TEST_RENDERING_TEST_H_ 103 #endif // ANDROID_WEBVIEW_BROWSER_TEST_RENDERING_TEST_H_
OLDNEW
« no previous file with comments | « android_webview/browser/test/fake_window.h ('k') | android_webview/browser/test/rendering_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698