OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/message_loop/message_loop_proxy.h" | 6 #include "base/message_loop/message_loop_proxy.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "content/browser/gpu/gpu_data_manager_impl.h" | 9 #include "content/browser/gpu/gpu_data_manager_impl.h" |
10 #include "content/browser/renderer_host/dip_util.h" | 10 #include "content/browser/renderer_host/dip_util.h" |
11 #include "content/browser/renderer_host/render_widget_host_impl.h" | 11 #include "content/browser/renderer_host/render_widget_host_impl.h" |
12 #include "content/port/browser/render_widget_host_view_frame_subscriber.h" | 12 #include "content/port/browser/render_widget_host_view_frame_subscriber.h" |
13 #include "content/port/browser/render_widget_host_view_port.h" | 13 #include "content/port/browser/render_widget_host_view_port.h" |
14 #include "content/public/browser/compositor_util.h" | 14 #include "content/public/browser/compositor_util.h" |
15 #include "content/public/browser/render_view_host.h" | 15 #include "content/public/browser/render_view_host.h" |
16 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
17 #include "content/public/common/content_paths.h" | 17 #include "content/public/common/content_paths.h" |
18 #include "content/public/common/content_switches.h" | 18 #include "content/public/common/content_switches.h" |
| 19 #include "content/public/common/url_constants.h" |
19 #include "content/public/test/browser_test_utils.h" | 20 #include "content/public/test/browser_test_utils.h" |
20 #include "content/shell/shell.h" | 21 #include "content/shell/shell.h" |
21 #include "content/test/content_browser_test.h" | 22 #include "content/test/content_browser_test.h" |
22 #include "content/test/content_browser_test_utils.h" | 23 #include "content/test/content_browser_test_utils.h" |
23 #include "media/base/video_frame.h" | 24 #include "media/base/video_frame.h" |
24 #include "media/filters/skcanvas_video_renderer.h" | 25 #include "media/filters/skcanvas_video_renderer.h" |
25 #include "net/base/net_util.h" | 26 #include "net/base/net_util.h" |
26 #include "third_party/skia/include/core/SkBitmap.h" | 27 #include "third_party/skia/include/core/SkBitmap.h" |
27 #include "third_party/skia/include/core/SkCanvas.h" | 28 #include "third_party/skia/include/core/SkCanvas.h" |
28 #include "third_party/skia/include/core/SkDevice.h" | 29 #include "third_party/skia/include/core/SkDevice.h" |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 // are some builds that only use compositing and will ignore this switch. | 264 // are some builds that only use compositing and will ignore this switch. |
264 // Therefore, the call to SetUpSourceSurface() later on will detect whether | 265 // Therefore, the call to SetUpSourceSurface() later on will detect whether |
265 // compositing mode is actually off. If it's on, the tests will pass | 266 // compositing mode is actually off. If it's on, the tests will pass |
266 // blindly, logging a warning message, since we cannot test what the | 267 // blindly, logging a warning message, since we cannot test what the |
267 // platform/implementation does not support. | 268 // platform/implementation does not support. |
268 command_line->AppendSwitch(switches::kDisableAcceleratedCompositing); | 269 command_line->AppendSwitch(switches::kDisableAcceleratedCompositing); |
269 RenderWidgetHostViewBrowserTest::SetUpCommandLine(command_line); | 270 RenderWidgetHostViewBrowserTest::SetUpCommandLine(command_line); |
270 } | 271 } |
271 | 272 |
272 virtual GURL TestUrl() { | 273 virtual GURL TestUrl() { |
273 return GURL("about:blank"); | 274 return GURL(kAboutBlankURL); |
274 } | 275 } |
275 | 276 |
276 virtual bool SetUpSourceSurface(const char* wait_message) OVERRIDE { | 277 virtual bool SetUpSourceSurface(const char* wait_message) OVERRIDE { |
277 if (IsForceCompositingModeEnabled()) | 278 if (IsForceCompositingModeEnabled()) |
278 return false; // See comment in SetUpCommandLine(). | 279 return false; // See comment in SetUpCommandLine(). |
279 | 280 |
280 content::DOMMessageQueue message_queue; | 281 content::DOMMessageQueue message_queue; |
281 NavigateToURL(shell(), TestUrl()); | 282 NavigateToURL(shell(), TestUrl()); |
282 if (wait_message != NULL) { | 283 if (wait_message != NULL) { |
283 std::string result(wait_message); | 284 std::string result(wait_message); |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 copy_rect, | 886 copy_rect, |
886 output_size, | 887 output_size, |
887 expected_bitmap_size, | 888 expected_bitmap_size, |
888 video_frame); | 889 video_frame); |
889 } | 890 } |
890 | 891 |
891 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) | 892 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) |
892 | 893 |
893 } // namespace | 894 } // namespace |
894 } // namespace content | 895 } // namespace content |
OLD | NEW |