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

Unified Diff: ui/ozone/platform/dri/screen_manager_unittest.cc

Issue 106633002: GBM Ozone implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 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
« no previous file with comments | « ui/ozone/platform/dri/screen_manager.cc ('k') | ui/ozone/platform/dri/test/mock_surface_generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « ui/ozone/platform/dri/screen_manager.cc ('k') | ui/ozone/platform/dri/test/mock_surface_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698