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

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

Issue 1121893004: Have Notifications appear over docked windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « ash/system/web_notification/ash_popup_alignment_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2622b1dbc85e3ea145e41985ddf7abd5a32c8ca8..b56cc47a21780393eb98846bfe2e0e62577cbffc 100644
--- a/ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc
+++ b/ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc
@@ -170,6 +170,19 @@ TEST_F(AshPopupAlignmentDelegateTest, DockedWindow) {
kShellWindowId_DockedContainer);
docked_container->AddChild(window.get());
+ // Left-side dock should not affect popup alignment
+ EXPECT_EQ(origin_x, alignment_delegate()->GetToastOriginX(toast_size));
+ EXPECT_EQ(baseline, alignment_delegate()->GetBaseLine());
+ EXPECT_FALSE(alignment_delegate()->IsTopDown());
+ EXPECT_FALSE(alignment_delegate()->IsFromLeft());
+
+ // Force dock to right-side
+ Shell::GetInstance()->SetShelfAlignment(SHELF_ALIGNMENT_LEFT,
+ Shell::GetPrimaryRootWindow());
+ Shell::GetInstance()->SetShelfAlignment(SHELF_ALIGNMENT_BOTTOM,
+ Shell::GetPrimaryRootWindow());
+
+ // Right-side dock should not affect popup alignment
EXPECT_EQ(origin_x, alignment_delegate()->GetToastOriginX(toast_size));
EXPECT_EQ(baseline, alignment_delegate()->GetBaseLine());
EXPECT_FALSE(alignment_delegate()->IsTopDown());
« no previous file with comments | « ash/system/web_notification/ash_popup_alignment_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698