| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/base64.h" | 8 #include "base/base64.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 | 774 |
| 775 shell()->LoadURL(GURL("about:blank")); | 775 shell()->LoadURL(GURL("about:blank")); |
| 776 Attach(); | 776 Attach(); |
| 777 | 777 |
| 778 // Test capturing a subarea inside the emulated frame at different scales. | 778 // Test capturing a subarea inside the emulated frame at different scales. |
| 779 PlaceAndCaptureBox(kFrameSize, gfx::Size(100, 200), 1.0); | 779 PlaceAndCaptureBox(kFrameSize, gfx::Size(100, 200), 1.0); |
| 780 PlaceAndCaptureBox(kFrameSize, gfx::Size(100, 200), 2.0); | 780 PlaceAndCaptureBox(kFrameSize, gfx::Size(100, 200), 2.0); |
| 781 PlaceAndCaptureBox(kFrameSize, gfx::Size(100, 200), 0.5); | 781 PlaceAndCaptureBox(kFrameSize, gfx::Size(100, 200), 0.5); |
| 782 | 782 |
| 783 // Ensure that content outside the emulated frame is painted, too. | 783 // Ensure that content outside the emulated frame is painted, too. |
| 784 PlaceAndCaptureBox(kFrameSize, gfx::Size(10, 10000), 1.0); | 784 PlaceAndCaptureBox(kFrameSize, gfx::Size(10, 8192), 1.0); |
| 785 } | 785 } |
| 786 | 786 |
| 787 // Verifies that setDefaultBackgroundColor and captureScreenshot support a | 787 // Verifies that setDefaultBackgroundColor and captureScreenshot support a |
| 788 // transparent background, and that setDeviceMetricsOverride doesn't affect it. | 788 // transparent background, and that setDeviceMetricsOverride doesn't affect it. |
| 789 IN_PROC_BROWSER_TEST_F(CaptureScreenshotTest, TransparentScreenshots) { | 789 IN_PROC_BROWSER_TEST_F(CaptureScreenshotTest, TransparentScreenshots) { |
| 790 if (base::SysInfo::IsLowEndDevice()) | 790 if (base::SysInfo::IsLowEndDevice()) |
| 791 return; | 791 return; |
| 792 | 792 |
| 793 shell()->LoadURL( | 793 shell()->LoadURL( |
| 794 GURL("data:text/html,<body style='background:transparent'></body>")); | 794 GURL("data:text/html,<body style='background:transparent'></body>")); |
| (...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1837 EXPECT_EQ("polyglottal", value); | 1837 EXPECT_EQ("polyglottal", value); |
| 1838 found++; | 1838 found++; |
| 1839 } else { | 1839 } else { |
| 1840 FAIL(); | 1840 FAIL(); |
| 1841 } | 1841 } |
| 1842 } | 1842 } |
| 1843 EXPECT_EQ(2u, found); | 1843 EXPECT_EQ(2u, found); |
| 1844 } | 1844 } |
| 1845 | 1845 |
| 1846 } // namespace content | 1846 } // namespace content |
| OLD | NEW |