Commit e5857fc3 authored by Andrey Kosyakov's avatar Andrey Kosyakov Committed by Commit Bot

DevTools: disable NoGPUCaptureScreenshotTest.LargeScreenshot when sw compositing is not available

Bug: 1137291
Change-Id: Id9ae17cce017e977adac8d6fee3f2d265f6ad89a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2468945
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816880}
parent 4ee93960
......@@ -570,6 +570,9 @@ IN_PROC_BROWSER_TEST_F(CaptureScreenshotTest, CaptureScreenshotJpeg) {
CaptureScreenshotAndCompareTo(expected_bitmap, ENCODING_JPEG, false);
}
// ChromeOS does not support software compositing.
#if !defined(OS_CHROMEOS)
class NoGPUCaptureScreenshotTest : public CaptureScreenshotTest {
void SetUpCommandLine(base::CommandLine* command_line) override {
CaptureScreenshotTest::SetUpCommandLine(command_line);
......@@ -585,7 +588,12 @@ IN_PROC_BROWSER_TEST_F(NoGPUCaptureScreenshotTest, DISABLED_LargeScreenshot) {
// TODO(eseckler): Reenable with error limit if necessary.
if (base::SysInfo::IsLowEndDevice())
return;
// If disabling software compositing is disabled by the test caller,
// we're out of luck.
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableSoftwareCompositingFallback)) {
return;
}
shell()->LoadURL(
GURL("data:text/html,"
"<style>body,html { padding: 0; margin: 0; }</style>"
......@@ -618,6 +626,8 @@ IN_PROC_BROWSER_TEST_F(NoGPUCaptureScreenshotTest, DISABLED_LargeScreenshot) {
EXPECT_GT(static_cast<int>(SkColorGetB(bottom_left)), 128);
}
#endif // !defined(OS_CHROMEOS)
// Setting frame size (through RWHV) is not supported on Android.
// This test seems to be very flaky on windows: https://crbug.com/801173
#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment