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

Side by Side Diff: ash/launcher/launcher_view_unittest.cc

Issue 10701051: Polish launcher tooltip visibility (2nd try). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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 | « ash/launcher/launcher_view.cc ('k') | ash/shell.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/launcher/launcher_view.h" 5 #include "ash/launcher/launcher_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/launcher/launcher.h" 10 #include "ash/launcher/launcher.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 class LauncherViewTest : public aura::test::AuraTestBase { 169 class LauncherViewTest : public aura::test::AuraTestBase {
170 public: 170 public:
171 LauncherViewTest() {} 171 LauncherViewTest() {}
172 virtual ~LauncherViewTest() {} 172 virtual ~LauncherViewTest() {}
173 173
174 virtual void SetUp() OVERRIDE { 174 virtual void SetUp() OVERRIDE {
175 aura::test::AuraTestBase::SetUp(); 175 aura::test::AuraTestBase::SetUp();
176 176
177 model_.reset(new LauncherModel); 177 model_.reset(new LauncherModel);
178 178
179 launcher_view_.reset(new internal::LauncherView(model_.get(), &delegate_)); 179 launcher_view_.reset(new internal::LauncherView(
180 model_.get(), &delegate_, NULL));
180 launcher_view_->Init(); 181 launcher_view_->Init();
181 // The bounds should be big enough for 4 buttons + overflow chevron. 182 // The bounds should be big enough for 4 buttons + overflow chevron.
182 launcher_view_->SetBounds(0, 0, 500, 50); 183 launcher_view_->SetBounds(0, 0, 500, 50);
183 184
184 test_api_.reset(new LauncherViewTestAPI(launcher_view_.get())); 185 test_api_.reset(new LauncherViewTestAPI(launcher_view_.get()));
185 test_api_->SetAnimationDuration(1); // Speeds up animation for test. 186 test_api_->SetAnimationDuration(1); // Speeds up animation for test.
186 } 187 }
187 188
188 protected: 189 protected:
189 LauncherID AddAppShortcut() { 190 LauncherID AddAppShortcut() {
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 const int app_list_button_index = test_api_->GetButtonCount() - 1; 620 const int app_list_button_index = test_api_->GetButtonCount() - 1;
620 const gfx::Rect& app_list_ideal_bounds = 621 const gfx::Rect& app_list_ideal_bounds =
621 test_api_->GetIdealBoundsByIndex(app_list_button_index); 622 test_api_->GetIdealBoundsByIndex(app_list_button_index);
622 const gfx::Rect& app_list_bounds = 623 const gfx::Rect& app_list_bounds =
623 test_api_->GetBoundsByIndex(app_list_button_index); 624 test_api_->GetBoundsByIndex(app_list_button_index);
624 EXPECT_EQ(app_list_bounds, app_list_ideal_bounds); 625 EXPECT_EQ(app_list_bounds, app_list_ideal_bounds);
625 } 626 }
626 627
627 } // namespace test 628 } // namespace test
628 } // namespace ash 629 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/launcher_view.cc ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698