| OLD | NEW |
| 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/home/home_card_constants.h" | 9 #include "athena/home/home_card_constants.h" |
| 10 #include "athena/home/home_card_impl.h" | 10 #include "athena/home/home_card_impl.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 // Verify if the home card is correctly minimized after app launch. | 91 // Verify if the home card is correctly minimized after app launch. |
| 92 TEST_F(HomeCardTest, AppSelection) { | 92 TEST_F(HomeCardTest, AppSelection) { |
| 93 EXPECT_EQ(HomeCard::VISIBLE_MINIMIZED, HomeCard::Get()->GetState()); | 93 EXPECT_EQ(HomeCard::VISIBLE_MINIMIZED, HomeCard::Get()->GetState()); |
| 94 | 94 |
| 95 WindowManager::GetInstance()->ToggleOverview(); | 95 WindowManager::GetInstance()->ToggleOverview(); |
| 96 EXPECT_EQ(HomeCard::VISIBLE_BOTTOM, HomeCard::Get()->GetState()); | 96 EXPECT_EQ(HomeCard::VISIBLE_BOTTOM, HomeCard::Get()->GetState()); |
| 97 | 97 |
| 98 athena::ActivityManager::Get()->AddActivity( | 98 athena::ActivityManager::Get()->AddActivity( |
| 99 athena::ActivityFactory::Get()->CreateWebActivity( | 99 athena::ActivityFactory::Get()->CreateWebActivity( |
| 100 NULL, GURL("http://www.google.com/"))); | 100 NULL, base::string16(), GURL("http://www.google.com/"))); |
| 101 EXPECT_EQ(HomeCard::VISIBLE_MINIMIZED, HomeCard::Get()->GetState()); | 101 EXPECT_EQ(HomeCard::VISIBLE_MINIMIZED, HomeCard::Get()->GetState()); |
| 102 } | 102 } |
| 103 | 103 |
| 104 TEST_F(HomeCardTest, Accelerators) { | 104 TEST_F(HomeCardTest, Accelerators) { |
| 105 EXPECT_EQ(HomeCard::VISIBLE_MINIMIZED, HomeCard::Get()->GetState()); | 105 EXPECT_EQ(HomeCard::VISIBLE_MINIMIZED, HomeCard::Get()->GetState()); |
| 106 | 106 |
| 107 ui::test::EventGenerator generator(root_window()); | 107 ui::test::EventGenerator generator(root_window()); |
| 108 generator.PressKey(ui::VKEY_L, ui::EF_CONTROL_DOWN); | 108 generator.PressKey(ui::VKEY_L, ui::EF_CONTROL_DOWN); |
| 109 EXPECT_EQ(HomeCard::VISIBLE_CENTERED, HomeCard::Get()->GetState()); | 109 EXPECT_EQ(HomeCard::VISIBLE_CENTERED, HomeCard::Get()->GetState()); |
| 110 | 110 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 262 |
| 263 generator.GestureScrollSequence(gfx::Point(x, 10), | 263 generator.GestureScrollSequence(gfx::Point(x, 10), |
| 264 gfx::Point(x, bottom - 100), | 264 gfx::Point(x, bottom - 100), |
| 265 base::TimeDelta::FromSeconds(1), | 265 base::TimeDelta::FromSeconds(1), |
| 266 10); | 266 10); |
| 267 EXPECT_EQ(HomeCard::VISIBLE_BOTTOM, HomeCard::Get()->GetState()); | 267 EXPECT_EQ(HomeCard::VISIBLE_BOTTOM, HomeCard::Get()->GetState()); |
| 268 EXPECT_FALSE(IsSearchBoxFocused(home_card)); | 268 EXPECT_FALSE(IsSearchBoxFocused(home_card)); |
| 269 } | 269 } |
| 270 | 270 |
| 271 } // namespace athena | 271 } // namespace athena |
| OLD | NEW |