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

Side by Side Diff: athena/home/home_card_unittest.cc

Issue 503113002: Allows directly entering to VISIBLE_CENTERED state from gesture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years, 4 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 unified diff | Download patch
« no previous file with comments | « athena/home/home_card_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "athena/home/public/home_card.h" 5 #include "athena/home/public/home_card.h"
6 6
7 #include "athena/activity/public/activity_factory.h" 7 #include "athena/activity/public/activity_factory.h"
8 #include "athena/activity/public/activity_manager.h" 8 #include "athena/activity/public/activity_manager.h"
9 #include "athena/test/athena_test_base.h" 9 #include "athena/test/athena_test_base.h"
10 #include "athena/wm/public/window_manager.h" 10 #include "athena/wm/public/window_manager.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // Swipe down to the minimized state. 175 // Swipe down to the minimized state.
176 generator.GestureScrollSequence(gfx::Point(x, 10), 176 generator.GestureScrollSequence(gfx::Point(x, 10),
177 gfx::Point(x, bottom - 1), 177 gfx::Point(x, bottom - 1),
178 base::TimeDelta::FromSeconds(1), 178 base::TimeDelta::FromSeconds(1),
179 10); 179 10);
180 EXPECT_EQ(HomeCard::VISIBLE_MINIMIZED, HomeCard::Get()->GetState()); 180 EXPECT_EQ(HomeCard::VISIBLE_MINIMIZED, HomeCard::Get()->GetState());
181 EXPECT_FALSE(WindowManager::GetInstance()->IsOverviewModeActive()); 181 EXPECT_FALSE(WindowManager::GetInstance()->IsOverviewModeActive());
182 182
183 } 183 }
184 184
185 TEST_F(HomeCardTest, GesturesToFullDirectly) {
186 ASSERT_EQ(HomeCard::VISIBLE_MINIMIZED, HomeCard::Get()->GetState());
187 ui::test::EventGenerator generator(root_window());
188 gfx::Rect screen_rect(root_window()->bounds());
189
190 const int bottom = screen_rect.bottom();
191 const int x = screen_rect.x() + 1;
192
193 generator.GestureScrollSequence(gfx::Point(x, bottom - 1),
194 gfx::Point(x, 20),
195 base::TimeDelta::FromSeconds(1),
196 10);
197 EXPECT_EQ(HomeCard::VISIBLE_CENTERED, HomeCard::Get()->GetState());
198 EXPECT_TRUE(WindowManager::GetInstance()->IsOverviewModeActive());
199 }
200
185 } // namespace athena 201 } // namespace athena
OLDNEW
« no previous file with comments | « athena/home/home_card_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698