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 #ifndef CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ |
6 #define CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ | 6 #define CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/message_loop/message_loop.h" | |
15 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 #include "base/test/scoped_task_environment.h" |
16 #include "base/test/test_io_thread.h" | 16 #include "base/test/test_io_thread.h" |
17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
18 #include "content/public/browser/native_web_keyboard_event.h" | 18 #include "content/public/browser/native_web_keyboard_event.h" |
19 #include "content/public/common/main_function_params.h" | 19 #include "content/public/common/main_function_params.h" |
20 #include "content/public/common/page_state.h" | 20 #include "content/public/common/page_state.h" |
21 #include "content/public/test/mock_render_thread.h" | 21 #include "content/public/test/mock_render_thread.h" |
22 #include "mojo/edk/embedder/scoped_ipc_support.h" | 22 #include "mojo/edk/embedder/scoped_ipc_support.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
24 #include "third_party/WebKit/public/platform/Platform.h" | 24 #include "third_party/WebKit/public/platform/Platform.h" |
25 #include "third_party/WebKit/public/web/WebFrame.h" | 25 #include "third_party/WebKit/public/web/WebFrame.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 virtual std::unique_ptr<ResizeParams> InitialSizeParams(); | 183 virtual std::unique_ptr<ResizeParams> InitialSizeParams(); |
184 | 184 |
185 // testing::Test | 185 // testing::Test |
186 void SetUp() override; | 186 void SetUp() override; |
187 | 187 |
188 void TearDown() override; | 188 void TearDown() override; |
189 | 189 |
190 // blink::WebLeakDetectorClient implementation. | 190 // blink::WebLeakDetectorClient implementation. |
191 void OnLeakDetectionComplete(const Result& result) override; | 191 void OnLeakDetectionComplete(const Result& result) override; |
192 | 192 |
193 base::MessageLoop msg_loop_; | 193 protected: |
| 194 base::test::ScopedTaskEnvironment scoped_task_environment_; |
| 195 |
194 std::unique_ptr<FakeCompositorDependencies> compositor_deps_; | 196 std::unique_ptr<FakeCompositorDependencies> compositor_deps_; |
195 std::unique_ptr<MockRenderProcess> mock_process_; | 197 std::unique_ptr<MockRenderProcess> mock_process_; |
196 // We use a naked pointer because we don't want to expose RenderViewImpl in | 198 // We use a naked pointer because we don't want to expose RenderViewImpl in |
197 // the embedder's namespace. | 199 // the embedder's namespace. |
198 RenderView* view_; | 200 RenderView* view_; |
199 RendererBlinkPlatformImplTestOverride blink_platform_impl_; | 201 RendererBlinkPlatformImplTestOverride blink_platform_impl_; |
200 std::unique_ptr<ContentClient> content_client_; | 202 std::unique_ptr<ContentClient> content_client_; |
201 std::unique_ptr<ContentBrowserClient> content_browser_client_; | 203 std::unique_ptr<ContentBrowserClient> content_browser_client_; |
202 std::unique_ptr<ContentRendererClient> content_renderer_client_; | 204 std::unique_ptr<ContentRendererClient> content_renderer_client_; |
203 std::unique_ptr<MockRenderThread> render_thread_; | 205 std::unique_ptr<MockRenderThread> render_thread_; |
(...skipping 12 matching lines...) Expand all Loading... |
216 std::unique_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_; | 218 std::unique_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_; |
217 #endif | 219 #endif |
218 | 220 |
219 private: | 221 private: |
220 void GoToOffset(int offset, const GURL& url, const PageState& state); | 222 void GoToOffset(int offset, const GURL& url, const PageState& state); |
221 }; | 223 }; |
222 | 224 |
223 } // namespace content | 225 } // namespace content |
224 | 226 |
225 #endif // CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ | 227 #endif // CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ |
OLD | NEW |