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

Unified Diff: ash/display/display_layout_builder_unittest.cc

Issue 1838833002: Move DisplayLayout and DisplayLayoutBuilder From ash To ui/display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screenwinmove
Patch Set: Fix comment Created 4 years, 8 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_layout_builder.cc ('k') | ash/display/display_layout_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_layout_builder_unittest.cc
diff --git a/ash/display/display_layout_builder_unittest.cc b/ash/display/display_layout_builder_unittest.cc
deleted file mode 100644
index 159790cd48342336e16a0ef126bdbe7ed9625a80..0000000000000000000000000000000000000000
--- a/ash/display/display_layout_builder_unittest.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/display_layout_builder.h"
-
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace ash {
-
-typedef testing::Test DisplayLayoutBuilderTest;
-
-TEST_F(DisplayLayoutBuilderTest, SecondaryPlacement) {
- DisplayLayoutBuilder builder(1);
- builder.SetSecondaryPlacement(2, DisplayPlacement::LEFT, 30);
- scoped_ptr<DisplayLayout> layout(builder.Build());
- ASSERT_EQ(1u, layout->placement_list.size());
-
- EXPECT_EQ(2, layout->placement_list[0].display_id);
- EXPECT_EQ(1, layout->placement_list[0].parent_display_id);
- EXPECT_EQ(30, layout->placement_list[0].offset);
- EXPECT_EQ(DisplayPlacement::LEFT, layout->placement_list[0].position);
-}
-
-TEST_F(DisplayLayoutBuilderTest, MultiplePlacement) {
- DisplayLayoutBuilder builder(1);
- builder.AddDisplayPlacement(5, 1, DisplayPlacement::TOP, 30);
- builder.AddDisplayPlacement(3, 5, DisplayPlacement::LEFT, 20);
- builder.AddDisplayPlacement(4, 5, DisplayPlacement::RIGHT, 10);
- scoped_ptr<DisplayLayout> layout(builder.Build());
-
- ASSERT_EQ(3u, layout->placement_list.size());
-
- // placmenets are sorted by display_id.
- EXPECT_EQ(3, layout->placement_list[0].display_id);
- EXPECT_EQ(5, layout->placement_list[0].parent_display_id);
- EXPECT_EQ(20, layout->placement_list[0].offset);
- EXPECT_EQ(DisplayPlacement::LEFT, layout->placement_list[0].position);
-
- EXPECT_EQ(4, layout->placement_list[1].display_id);
- EXPECT_EQ(5, layout->placement_list[1].parent_display_id);
- EXPECT_EQ(10, layout->placement_list[1].offset);
- EXPECT_EQ(DisplayPlacement::RIGHT, layout->placement_list[1].position);
-
- EXPECT_EQ(5, layout->placement_list[2].display_id);
- EXPECT_EQ(1, layout->placement_list[2].parent_display_id);
- EXPECT_EQ(30, layout->placement_list[2].offset);
- EXPECT_EQ(DisplayPlacement::TOP, layout->placement_list[2].position);
-}
-
-} // namespace ash
« no previous file with comments | « ash/display/display_layout_builder.cc ('k') | ash/display/display_layout_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698