| 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" | 14 #include "base/message_loop/message_loop.h" |
| 15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
| 16 #include "base/test/scoped_async_task_scheduler.h" | |
| 17 #include "base/test/test_io_thread.h" | 16 #include "base/test/test_io_thread.h" |
| 18 #include "build/build_config.h" | 17 #include "build/build_config.h" |
| 19 #include "content/public/browser/native_web_keyboard_event.h" | 18 #include "content/public/browser/native_web_keyboard_event.h" |
| 20 #include "content/public/common/main_function_params.h" | 19 #include "content/public/common/main_function_params.h" |
| 21 #include "content/public/common/page_state.h" | 20 #include "content/public/common/page_state.h" |
| 22 #include "content/public/test/mock_render_thread.h" | 21 #include "content/public/test/mock_render_thread.h" |
| 23 #include "mojo/edk/embedder/scoped_ipc_support.h" | 22 #include "mojo/edk/embedder/scoped_ipc_support.h" |
| 24 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
| 25 #include "third_party/WebKit/public/platform/Platform.h" | 24 #include "third_party/WebKit/public/platform/Platform.h" |
| 26 #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... |
| 184 virtual std::unique_ptr<ResizeParams> InitialSizeParams(); | 183 virtual std::unique_ptr<ResizeParams> InitialSizeParams(); |
| 185 | 184 |
| 186 // testing::Test | 185 // testing::Test |
| 187 void SetUp() override; | 186 void SetUp() override; |
| 188 | 187 |
| 189 void TearDown() override; | 188 void TearDown() override; |
| 190 | 189 |
| 191 // blink::WebLeakDetectorClient implementation. | 190 // blink::WebLeakDetectorClient implementation. |
| 192 void onLeakDetectionComplete(const Result& result) override; | 191 void onLeakDetectionComplete(const Result& result) override; |
| 193 | 192 |
| 194 private: | |
| 195 base::MessageLoop msg_loop_; | 193 base::MessageLoop msg_loop_; |
| 196 | |
| 197 // Required by gin::V8Platform::CallOnBackgroundThread(). Can't be a | |
| 198 // ScopedTaskScheduler because v8 synchronously waits for tasks to run. | |
| 199 base::test::ScopedAsyncTaskScheduler scoped_async_task_scheduler_; | |
| 200 | |
| 201 protected: | |
| 202 std::unique_ptr<FakeCompositorDependencies> compositor_deps_; | 194 std::unique_ptr<FakeCompositorDependencies> compositor_deps_; |
| 203 std::unique_ptr<MockRenderProcess> mock_process_; | 195 std::unique_ptr<MockRenderProcess> mock_process_; |
| 204 // We use a naked pointer because we don't want to expose RenderViewImpl in | 196 // We use a naked pointer because we don't want to expose RenderViewImpl in |
| 205 // the embedder's namespace. | 197 // the embedder's namespace. |
| 206 RenderView* view_; | 198 RenderView* view_; |
| 207 RendererBlinkPlatformImplTestOverride blink_platform_impl_; | 199 RendererBlinkPlatformImplTestOverride blink_platform_impl_; |
| 208 std::unique_ptr<ContentClient> content_client_; | 200 std::unique_ptr<ContentClient> content_client_; |
| 209 std::unique_ptr<ContentBrowserClient> content_browser_client_; | 201 std::unique_ptr<ContentBrowserClient> content_browser_client_; |
| 210 std::unique_ptr<ContentRendererClient> content_renderer_client_; | 202 std::unique_ptr<ContentRendererClient> content_renderer_client_; |
| 211 std::unique_ptr<MockRenderThread> render_thread_; | 203 std::unique_ptr<MockRenderThread> render_thread_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 224 std::unique_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_; | 216 std::unique_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_; |
| 225 #endif | 217 #endif |
| 226 | 218 |
| 227 private: | 219 private: |
| 228 void GoToOffset(int offset, const GURL& url, const PageState& state); | 220 void GoToOffset(int offset, const GURL& url, const PageState& state); |
| 229 }; | 221 }; |
| 230 | 222 |
| 231 } // namespace content | 223 } // namespace content |
| 232 | 224 |
| 233 #endif // CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ | 225 #endif // CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ |
| OLD | NEW |