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

Unified Diff: ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc

Issue 2103603002: mash: Remove StatusAreaWidget references from system tray classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments, rename SetSystemTrayHeight to SetTrayBubbleHeight Created 4 years, 6 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
Index: ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc
diff --git a/ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc b/ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc
index 72356a59c69e757190b6f98259afc3ad8ffb0989..dd32b3d1c862fa9acd9ece05bc36541e17134351 100644
--- a/ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc
+++ b/ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/system/web_notification/ash_popup_alignment_delegate.h"
+#include "ash/common/system/web_notification/ash_popup_alignment_delegate.h"
#include <utility>
#include <vector>
@@ -15,7 +15,6 @@
#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
#include "ash/display/display_manager.h"
-#include "ash/screen_util.h"
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "base/command_line.h"
@@ -28,6 +27,7 @@
namespace ash {
+// TODO(jamescook): Move this to //ash/common. http://crbug.com/620955
class AshPopupAlignmentDelegateTest : public test::AshTestBase {
public:
AshPopupAlignmentDelegateTest() {}
@@ -255,8 +255,9 @@ TEST_F(AshPopupAlignmentDelegateTest, TrayHeight) {
int origin_x = alignment_delegate()->GetToastOriginX(toast_size);
int baseline = alignment_delegate()->GetBaseLine();
+ // Simulate the system tray bubble being open.
const int kTrayHeight = 100;
- alignment_delegate()->SetSystemTrayHeight(kTrayHeight);
+ alignment_delegate()->SetTrayBubbleHeight(kTrayHeight);
EXPECT_EQ(origin_x, alignment_delegate()->GetToastOriginX(toast_size));
EXPECT_EQ(baseline - kTrayHeight - message_center::kMarginBetweenItems,
@@ -270,7 +271,8 @@ TEST_F(AshPopupAlignmentDelegateTest, Extended) {
SetAlignmentDelegate(
base::WrapUnique(new AshPopupAlignmentDelegate(GetPrimaryShelf())));
- display::Display second_display = ScreenUtil::GetSecondaryDisplay();
+ display::Display second_display =
+ Shell::GetInstance()->display_manager()->GetDisplayAt(1u);
WmShelf* second_shelf =
WmLookup::Get()
->GetRootWindowControllerWithDisplayId(second_display.id())
« no previous file with comments | « ash/system/web_notification/ash_popup_alignment_delegate.cc ('k') | ash/system/web_notification/web_notification_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698