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