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

Unified Diff: ash/display/projecting_observer_chromeos_unittest.cc

Issue 2407153008: Delete TestDisplaySnapshot and update tests. (Closed)
Patch Set: Rebase and cleanup. Created 4 years, 2 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 | « ash/display/display_color_manager_chromeos_unittest.cc ('k') | ash/wm/lock_state_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/projecting_observer_chromeos_unittest.cc
diff --git a/ash/display/projecting_observer_chromeos_unittest.cc b/ash/display/projecting_observer_chromeos_unittest.cc
index 06eb7986fb1a6af8690b44adde3567d933df5da4..157da429b39e08e68a72e5d61c92d3dc7ab226e8 100644
--- a/ash/display/projecting_observer_chromeos_unittest.cc
+++ b/ash/display/projecting_observer_chromeos_unittest.cc
@@ -7,21 +7,25 @@
#include "base/memory/scoped_vector.h"
#include "chromeos/dbus/fake_power_manager_client.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/display/chromeos/test/test_display_snapshot.h"
+#include "ui/display/fake_display_snapshot.h"
namespace ash {
namespace {
-ui::TestDisplaySnapshot* CreateInternalSnapshot() {
- ui::TestDisplaySnapshot* output = new ui::TestDisplaySnapshot();
- output->set_type(ui::DISPLAY_CONNECTION_TYPE_INTERNAL);
- return output;
+std::unique_ptr<ui::DisplaySnapshot> CreateInternalSnapshot() {
+ return display::FakeDisplaySnapshot::Builder()
+ .SetId(123)
+ .SetNativeMode(gfx::Size(1024, 768))
+ .SetType(ui::DISPLAY_CONNECTION_TYPE_INTERNAL)
+ .Build();
}
-ui::TestDisplaySnapshot* CreateVGASnapshot() {
- ui::TestDisplaySnapshot* output = new ui::TestDisplaySnapshot();
- output->set_type(ui::DISPLAY_CONNECTION_TYPE_VGA);
- return output;
+std::unique_ptr<ui::DisplaySnapshot> CreateVGASnapshot() {
+ return display::FakeDisplaySnapshot::Builder()
+ .SetId(456)
+ .SetNativeMode(gfx::Size(1024, 768))
+ .SetType(ui::DISPLAY_CONNECTION_TYPE_VGA)
+ .Build();
}
class ProjectingObserverTest : public testing::Test {
« no previous file with comments | « ash/display/display_color_manager_chromeos_unittest.cc ('k') | ash/wm/lock_state_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698