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

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

Issue 443273002: Re-enable HomeCardTest.AppSelection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 29 matching lines...) Expand all
40 EXPECT_EQ(HomeCard::VISIBLE_CENTERED, HomeCard::Get()->GetState()); 40 EXPECT_EQ(HomeCard::VISIBLE_CENTERED, HomeCard::Get()->GetState());
41 HomeCard::Get()->UpdateVirtualKeyboardBounds(gfx::Rect()); 41 HomeCard::Get()->UpdateVirtualKeyboardBounds(gfx::Rect());
42 EXPECT_EQ(HomeCard::VISIBLE_BOTTOM, HomeCard::Get()->GetState()); 42 EXPECT_EQ(HomeCard::VISIBLE_BOTTOM, HomeCard::Get()->GetState());
43 43
44 // Overview mode has to finish before ending test, otherwise it crashes. 44 // Overview mode has to finish before ending test, otherwise it crashes.
45 // TODO(mukai): fix this. 45 // TODO(mukai): fix this.
46 WindowManager::GetInstance()->ToggleOverview(); 46 WindowManager::GetInstance()->ToggleOverview();
47 } 47 }
48 48
49 // Verify if the home card is correctly minimized after app launch. 49 // Verify if the home card is correctly minimized after app launch.
50 // TODO(flackr): Fix memory leak and re-enable - http://crbug.com/399241 50 TEST_F(HomeCardTest, AppSelection) {
51 TEST_F(HomeCardTest, DISABLED_AppSelection) {
52 EXPECT_EQ(HomeCard::VISIBLE_MINIMIZED, HomeCard::Get()->GetState()); 51 EXPECT_EQ(HomeCard::VISIBLE_MINIMIZED, HomeCard::Get()->GetState());
53 52
54 WindowManager::GetInstance()->ToggleOverview(); 53 WindowManager::GetInstance()->ToggleOverview();
55 EXPECT_EQ(HomeCard::VISIBLE_BOTTOM, HomeCard::Get()->GetState()); 54 EXPECT_EQ(HomeCard::VISIBLE_BOTTOM, HomeCard::Get()->GetState());
56 55
57 athena::ActivityManager::Get()->AddActivity( 56 athena::ActivityManager::Get()->AddActivity(
58 athena::ActivityFactory::Get()->CreateWebActivity( 57 athena::ActivityFactory::Get()->CreateWebActivity(
59 NULL, GURL("http://www.google.com/"))); 58 NULL, GURL("http://www.google.com/")));
60 EXPECT_EQ(HomeCard::VISIBLE_MINIMIZED, HomeCard::Get()->GetState()); 59 EXPECT_EQ(HomeCard::VISIBLE_MINIMIZED, HomeCard::Get()->GetState());
61 } 60 }
(...skipping 15 matching lines...) Expand all
77 EXPECT_EQ(HomeCard::VISIBLE_BOTTOM, HomeCard::Get()->GetState()); 76 EXPECT_EQ(HomeCard::VISIBLE_BOTTOM, HomeCard::Get()->GetState());
78 77
79 // Do nothing if the centered state is a temporary state. 78 // Do nothing if the centered state is a temporary state.
80 HomeCard::Get()->UpdateVirtualKeyboardBounds(gfx::Rect(0, 0, 100, 100)); 79 HomeCard::Get()->UpdateVirtualKeyboardBounds(gfx::Rect(0, 0, 100, 100));
81 EXPECT_EQ(HomeCard::VISIBLE_CENTERED, HomeCard::Get()->GetState()); 80 EXPECT_EQ(HomeCard::VISIBLE_CENTERED, HomeCard::Get()->GetState());
82 generator.PressKey(ui::VKEY_L, ui::EF_CONTROL_DOWN); 81 generator.PressKey(ui::VKEY_L, ui::EF_CONTROL_DOWN);
83 EXPECT_EQ(HomeCard::VISIBLE_CENTERED, HomeCard::Get()->GetState()); 82 EXPECT_EQ(HomeCard::VISIBLE_CENTERED, HomeCard::Get()->GetState());
84 } 83 }
85 84
86 } // namespace athena 85 } // namespace athena
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698