Index: ui/ozone/platform/dri/screen_manager_unittest.cc |
diff --git a/ui/ozone/platform/dri/screen_manager_unittest.cc b/ui/ozone/platform/dri/screen_manager_unittest.cc |
index 457bef70112025b0f1ecbc9c1eb3f4de67fded75..ce50f4bd3c46a2c2cac693d925b866d3799aad2d 100644 |
--- a/ui/ozone/platform/dri/screen_manager_unittest.cc |
+++ b/ui/ozone/platform/dri/screen_manager_unittest.cc |
@@ -5,8 +5,8 @@ |
#include "testing/gtest/include/gtest/gtest.h" |
#include "ui/ozone/platform/dri/hardware_display_controller.h" |
#include "ui/ozone/platform/dri/screen_manager.h" |
-#include "ui/ozone/platform/dri/test/mock_dri_surface.h" |
#include "ui/ozone/platform/dri/test/mock_dri_wrapper.h" |
+#include "ui/ozone/platform/dri/test/mock_surface_generator.h" |
namespace { |
@@ -16,12 +16,11 @@ const drmModeModeInfo kDefaultMode = |
class MockScreenManager : public ui::ScreenManager { |
public: |
- MockScreenManager(ui::DriWrapper* dri) : ScreenManager(dri), dri_(dri) {} |
+ MockScreenManager(ui::DriWrapper* dri, |
+ ui::ScanoutSurfaceGenerator* surface_generator) |
+ : ScreenManager(dri, surface_generator), dri_(dri) {} |
virtual void ForceInitializationOfPrimaryDisplay() OVERRIDE {} |
- virtual ui::DriSurface* CreateSurface(const gfx::Size& size) OVERRIDE { |
- return new ui::MockDriSurface(dri_, size); |
- } |
private: |
ui::DriWrapper* dri_; |
@@ -38,7 +37,9 @@ class ScreenManagerTest : public testing::Test { |
virtual void SetUp() OVERRIDE { |
dri_.reset(new ui::MockDriWrapper(3)); |
- screen_manager_.reset(new MockScreenManager(dri_.get())); |
+ surface_generator_.reset(new ui::MockSurfaceGenerator(dri_.get())); |
+ screen_manager_.reset(new MockScreenManager( |
+ dri_.get(), surface_generator_.get())); |
} |
virtual void TearDown() OVERRIDE { |
screen_manager_.reset(); |
@@ -47,6 +48,7 @@ class ScreenManagerTest : public testing::Test { |
protected: |
scoped_ptr<ui::MockDriWrapper> dri_; |
+ scoped_ptr<ui::MockSurfaceGenerator> surface_generator_; |
scoped_ptr<MockScreenManager> screen_manager_; |
private: |