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/compositor_util.h" | 9 #include "content/browser/gpu/compositor_util.h" |
10 #include "content/browser/gpu/gpu_data_manager_impl.h" | 10 #include "content/browser/gpu/gpu_data_manager_impl.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 if (!SetUpSourceSurface(wait_message)) { \ | 50 if (!SetUpSourceSurface(wait_message)) { \ |
51 LOG(WARNING) \ | 51 LOG(WARNING) \ |
52 << ("Blindly passing this test: This platform does not support " \ | 52 << ("Blindly passing this test: This platform does not support " \ |
53 "forced compositing (or forced-disabled compositing) mode."); \ | 53 "forced compositing (or forced-disabled compositing) mode."); \ |
54 return; \ | 54 return; \ |
55 } | 55 } |
56 | 56 |
57 // Convenience macro: Short-circuit a pass for platforms where setting up | 57 // Convenience macro: Short-circuit a pass for platforms where setting up |
58 // high-DPI fails. | 58 // high-DPI fails. |
59 #define PASS_TEST_IF_SCALE_FACTOR_NOT_SUPPORTED(factor) \ | 59 #define PASS_TEST_IF_SCALE_FACTOR_NOT_SUPPORTED(factor) \ |
60 if (ui::GetImageScale( \ | 60 if (ui::GetScaleFactorScale( \ |
61 GetScaleFactorForView(GetRenderWidgetHostViewPort())) != factor) { \ | 61 GetScaleFactorForView(GetRenderWidgetHostViewPort())) != factor) { \ |
62 LOG(WARNING) << "Blindly passing this test: failed to set up " \ | 62 LOG(WARNING) << "Blindly passing this test: failed to set up " \ |
63 "scale factor: " << factor; \ | 63 "scale factor: " << factor; \ |
64 return false; \ | 64 return false; \ |
65 } | 65 } |
66 | 66 |
67 // Common base class for browser tests. This is subclassed twice: Once to test | 67 // Common base class for browser tests. This is subclassed twice: Once to test |
68 // the browser in forced-compositing mode, and once to test with compositing | 68 // the browser in forced-compositing mode, and once to test with compositing |
69 // mode disabled. | 69 // mode disabled. |
70 class RenderWidgetHostViewBrowserTest : public ContentBrowserTest { | 70 class RenderWidgetHostViewBrowserTest : public ContentBrowserTest { |
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 copy_rect, | 908 copy_rect, |
909 output_size, | 909 output_size, |
910 expected_bitmap_size, | 910 expected_bitmap_size, |
911 video_frame); | 911 video_frame); |
912 } | 912 } |
913 | 913 |
914 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) | 914 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) |
915 | 915 |
916 } // namespace | 916 } // namespace |
917 } // namespace content | 917 } // namespace content |
OLD | NEW |