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

Unified Diff: ash/common/system/date/system_info_default_view_unittest.cc

Issue 2732813002: chromeos: Move files in //ash/common to //ash, part 1 (Closed)
Patch Set: rebase Created 3 years, 9 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/common/system/date/system_info_default_view.cc ('k') | ash/common/system/date/tray_date.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/date/system_info_default_view_unittest.cc
diff --git a/ash/common/system/date/system_info_default_view_unittest.cc b/ash/common/system/date/system_info_default_view_unittest.cc
deleted file mode 100644
index 79c95775f7a9974b415978a2fa43fd5144fefdb9..0000000000000000000000000000000000000000
--- a/ash/common/system/date/system_info_default_view_unittest.cc
+++ /dev/null
@@ -1,77 +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/common/system/date/system_info_default_view.h"
-#include "ash/common/system/tray/tray_constants.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/views/view.h"
-
-namespace ash {
-
-class SystemInfoDefaultViewTest : public testing::Test {
- public:
- SystemInfoDefaultViewTest() {}
-
- protected:
- // Wrapper calls for SystemInfoDefaultView internals.
- int CalculateDateViewWidth(int preferred_width) {
- return SystemInfoDefaultView::CalculateDateViewWidth(preferred_width);
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SystemInfoDefaultViewTest);
-};
-
-TEST_F(SystemInfoDefaultViewTest, PreferredWidthSmallerThanButtonWidth) {
- const int kPreferredWidth = 10;
- EXPECT_LT(kPreferredWidth, kMenuButtonSize);
- const int effective_width = CalculateDateViewWidth(kPreferredWidth);
-
- EXPECT_EQ(effective_width,
- kMenuButtonSize + kSeparatorWidth + kMenuButtonSize);
-}
-
-TEST_F(SystemInfoDefaultViewTest, PreferredWidthGreaterThanOneButtonWidth) {
- const int kPreferredWidth = kMenuButtonSize + 1;
- const int effective_width = CalculateDateViewWidth(kPreferredWidth);
-
- EXPECT_EQ(effective_width,
- kMenuButtonSize + kSeparatorWidth + kMenuButtonSize);
-}
-
-TEST_F(SystemInfoDefaultViewTest, PreferredWidthEqualToTwoButtonWidths) {
- const int kPreferredWidth =
- kMenuButtonSize + kSeparatorWidth + kMenuButtonSize;
- const int effective_width = CalculateDateViewWidth(kPreferredWidth);
-
- EXPECT_EQ(effective_width, kPreferredWidth);
-}
-
-TEST_F(SystemInfoDefaultViewTest, PreferredWidthGreaterThanTwoButtonWidths) {
- const int kPreferredWidth =
- kMenuButtonSize + (kSeparatorWidth + kMenuButtonSize) + 1;
- const int effective_width = CalculateDateViewWidth(kPreferredWidth);
-
- EXPECT_EQ(effective_width,
- kMenuButtonSize + (kSeparatorWidth + kMenuButtonSize) * 2);
-}
-
-TEST_F(SystemInfoDefaultViewTest, PreferredWidthEqualToThreeButtonWidths) {
- const int kPreferredWidth =
- kMenuButtonSize + (kSeparatorWidth + kMenuButtonSize) * 2;
- const int effective_width = CalculateDateViewWidth(kPreferredWidth);
-
- EXPECT_EQ(effective_width, kPreferredWidth);
-}
-
-TEST_F(SystemInfoDefaultViewTest, PreferredWidthGreaterThanThreeButtonWidths) {
- const int kPreferredWidth =
- kMenuButtonSize + (kSeparatorWidth + kMenuButtonSize) * 2 + 1;
- const int effective_width = CalculateDateViewWidth(kPreferredWidth);
-
- EXPECT_EQ(effective_width,
- kMenuButtonSize + (kSeparatorWidth + kMenuButtonSize) * 2);
-}
-
-} // namespace ash
« no previous file with comments | « ash/common/system/date/system_info_default_view.cc ('k') | ash/common/system/date/tray_date.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698