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

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

Issue 10795013: Rename bounds accessors to be intuitive and consistent (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_unittest.cc ('k') | ash/root_window_controller_unittest.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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 widget->Show(); 116 widget->Show();
117 widget->GetNativeWindow()->parent()->RemoveChild(widget->GetNativeWindow()); 117 widget->GetNativeWindow()->parent()->RemoveChild(widget->GetNativeWindow());
118 launcher_vew_test()->RunMessageLoopUntilAnimationsDone(); 118 launcher_vew_test()->RunMessageLoopUntilAnimationsDone();
119 EXPECT_TRUE(observer()->change_notified()); 119 EXPECT_TRUE(observer()->change_notified());
120 observer()->Reset(); 120 observer()->Reset();
121 } 121 }
122 122
123 TEST_F(LauncherViewIconObserverTest, BoundsChanged) { 123 TEST_F(LauncherViewIconObserverTest, BoundsChanged) {
124 Launcher* launcher = Shell::GetInstance()->launcher(); 124 Launcher* launcher = Shell::GetInstance()->launcher();
125 gfx::Size launcher_size = launcher->widget()->GetWindowScreenBounds().size(); 125 gfx::Size launcher_size =
126 launcher->widget()->GetWindowBoundsInScreen().size();
126 int total_width = launcher_size.width() / 2; 127 int total_width = launcher_size.width() / 2;
127 ASSERT_GT(total_width, 0); 128 ASSERT_GT(total_width, 0);
128 launcher->SetStatusSize(gfx::Size(total_width, launcher_size.height())); 129 launcher->SetStatusSize(gfx::Size(total_width, launcher_size.height()));
129 // No animation happens for LauncherView bounds change. 130 // No animation happens for LauncherView bounds change.
130 EXPECT_TRUE(observer()->change_notified()); 131 EXPECT_TRUE(observer()->change_notified());
131 observer()->Reset(); 132 observer()->Reset();
132 } 133 }
133 134
134 //////////////////////////////////////////////////////////////////////////////// 135 ////////////////////////////////////////////////////////////////////////////////
135 // LauncherView tests. 136 // LauncherView tests.
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 const int app_list_button_index = test_api_->GetButtonCount() - 1; 621 const int app_list_button_index = test_api_->GetButtonCount() - 1;
621 const gfx::Rect& app_list_ideal_bounds = 622 const gfx::Rect& app_list_ideal_bounds =
622 test_api_->GetIdealBoundsByIndex(app_list_button_index); 623 test_api_->GetIdealBoundsByIndex(app_list_button_index);
623 const gfx::Rect& app_list_bounds = 624 const gfx::Rect& app_list_bounds =
624 test_api_->GetBoundsByIndex(app_list_button_index); 625 test_api_->GetBoundsByIndex(app_list_button_index);
625 EXPECT_EQ(app_list_bounds, app_list_ideal_bounds); 626 EXPECT_EQ(app_list_bounds, app_list_ideal_bounds);
626 } 627 }
627 628
628 } // namespace test 629 } // namespace test
629 } // namespace ash 630 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/launcher_unittest.cc ('k') | ash/root_window_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698