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

Unified Diff: athena/wm/window_list_provider_impl_unittest.cc

Issue 574113004: [Athena] Fix switching activities by swiping from the right bezel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@athena_split
Patch Set: Created 6 years, 3 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 | « athena/wm/window_list_provider_impl.cc ('k') | athena/wm/window_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/wm/window_list_provider_impl_unittest.cc
diff --git a/athena/wm/window_list_provider_impl_unittest.cc b/athena/wm/window_list_provider_impl_unittest.cc
index 4579d651174f0f1e3acd3a6516eaaa8e9ee603ff..be7f7e2ecc54f9f782c29bafe4e16298988be3ba 100644
--- a/athena/wm/window_list_provider_impl_unittest.cc
+++ b/athena/wm/window_list_provider_impl_unittest.cc
@@ -206,51 +206,39 @@ TEST_F(WindowListProviderImplTest, TestWindowOrderingFunctions) {
EXPECT_EQ(0, observer.get()->calls());
- // Move 2 to the front.
- list_provider->MoveToFront(window2.get());
- EXPECT_EQ("1 3 2", GetWindowOrder(original_order,
+ // Move 1 (from the back) in front of 2.
+ list_provider->StackWindowFrontOf(window1.get(), window2.get());
+ EXPECT_EQ("2 1 3", GetWindowOrder(original_order,
list_provider->GetWindowList()));
EXPECT_EQ(1, observer->calls());
- // Move 2 to the front again. Should not change anything.
- list_provider->MoveToFront(window2.get());
- EXPECT_EQ("1 3 2", GetWindowOrder(original_order,
- list_provider->GetWindowList()));
- EXPECT_EQ(1, observer->calls());
-
- // Move 1 (from the back) in front of 3.
- list_provider->StackWindowFrontOf(window1.get(), window3.get());
- EXPECT_EQ("3 1 2", GetWindowOrder(original_order,
+ // Move 3 (from the front) in front of 2.
+ list_provider->StackWindowFrontOf(window3.get(), window2.get());
+ EXPECT_EQ("2 3 1", GetWindowOrder(original_order,
list_provider->GetWindowList()));
EXPECT_EQ(2, observer->calls());
- // Move 2 (from the front) in front of 3.
- list_provider->StackWindowFrontOf(window2.get(), window3.get());
- EXPECT_EQ("3 2 1", GetWindowOrder(original_order,
+ // Move 1 (from the front) behind 2.
+ list_provider->StackWindowBehindTo(window1.get(), window2.get());
+ EXPECT_EQ("1 2 3", GetWindowOrder(original_order,
list_provider->GetWindowList()));
EXPECT_EQ(3, observer->calls());
- // Move 1 (from the front) behind 3.
- list_provider->StackWindowBehindTo(window1.get(), window3.get());
- EXPECT_EQ("1 3 2", GetWindowOrder(original_order,
+ // Move 1 (from the back) in front of 3.
+ list_provider->StackWindowFrontOf(window1.get(), window3.get());
+ EXPECT_EQ("2 3 1", GetWindowOrder(original_order,
list_provider->GetWindowList()));
EXPECT_EQ(4, observer->calls());
- // Move 1 (from the back) in front of 2.
- list_provider->StackWindowFrontOf(window1.get(), window2.get());
- EXPECT_EQ("3 2 1", GetWindowOrder(original_order,
- list_provider->GetWindowList()));
- EXPECT_EQ(5, observer->calls());
-
// Test that no change should also report no call.
- list_provider->StackWindowFrontOf(window1.get(), window2.get());
- EXPECT_EQ("3 2 1", GetWindowOrder(original_order,
+ list_provider->StackWindowFrontOf(window1.get(), window3.get());
+ EXPECT_EQ("2 3 1", GetWindowOrder(original_order,
list_provider->GetWindowList()));
- EXPECT_EQ(5, observer->calls());
- list_provider->StackWindowBehindTo(window2.get(), window1.get());
- EXPECT_EQ("3 2 1", GetWindowOrder(original_order,
+ EXPECT_EQ(4, observer->calls());
+ list_provider->StackWindowBehindTo(window3.get(), window1.get());
+ EXPECT_EQ("2 3 1", GetWindowOrder(original_order,
list_provider->GetWindowList()));
- EXPECT_EQ(5, observer->calls());
+ EXPECT_EQ(4, observer->calls());
}
TEST_F(WindowListProviderImplTest, TestWindowRemovalNotification) {
« no previous file with comments | « athena/wm/window_list_provider_impl.cc ('k') | athena/wm/window_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698