Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Unified Diff: content/browser/compositor/software_output_device_ozone_unittest.cc

Issue 1575943002: ozone: gracefully handle SoftwareOutputDeviceOzoneTest.CheckCorrectResizeBehavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/compositor/software_output_device_ozone_unittest.cc
diff --git a/content/browser/compositor/software_output_device_ozone_unittest.cc b/content/browser/compositor/software_output_device_ozone_unittest.cc
index 78a00f1d8d0f174ea8cb0b4b0ff825cf355dc500..71c8bd941e5bb9540a97f62cf63c14be562ab95f 100644
--- a/content/browser/compositor/software_output_device_ozone_unittest.cc
+++ b/content/browser/compositor/software_output_device_ozone_unittest.cc
@@ -95,9 +95,10 @@ void SoftwareOutputDeviceOzoneTest::SetUp() {
compositor_->SetAcceleratedWidget(window_delegate_.GetAcceleratedWidget());
compositor_->SetScaleAndSize(1.0f, size);
- output_device_.reset(new content::SoftwareOutputDeviceOzone(
- compositor_.get()));
- output_device_->Resize(size, 1.f);
+ output_device_ =
+ content::SoftwareOutputDeviceOzone::Create(compositor_.get());
+ if (output_device_)
+ output_device_->Resize(size, 1.f);
}
void SoftwareOutputDeviceOzoneTest::TearDown() {
@@ -119,6 +120,10 @@ void SoftwareOutputDeviceOzonePixelTest::SetUp() {
}
TEST_F(SoftwareOutputDeviceOzoneTest, CheckCorrectResizeBehavior) {
+ // Check if software rendering mode is not supported.
+ if (!output_device_)
+ return;
+
gfx::Rect damage(0, 0, 100, 100);
gfx::Size size(200, 100);
// Reduce size.
« no previous file with comments | « content/browser/compositor/software_output_device_ozone.cc ('k') | ui/ozone/platform/drm/gpu/gbm_surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698