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

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

Issue 10388036: Adds the option of aligning the launcher to the left or right. There (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile Created 8 years, 7 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.h » ('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 "ash/launcher/launcher.h" 7 #include "ash/launcher/launcher.h"
8 #include "ash/launcher/launcher_button.h" 8 #include "ash/launcher/launcher_button.h"
9 #include "ash/launcher/launcher_icon_observer.h" 9 #include "ash/launcher/launcher_icon_observer.h"
10 #include "ash/launcher/launcher_model.h" 10 #include "ash/launcher/launcher_model.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 observer()->Reset(); 90 observer()->Reset();
91 91
92 widget->Show(); 92 widget->Show();
93 widget->GetNativeWindow()->parent()->RemoveChild(widget->GetNativeWindow()); 93 widget->GetNativeWindow()->parent()->RemoveChild(widget->GetNativeWindow());
94 EXPECT_EQ(1, observer()->count()); 94 EXPECT_EQ(1, observer()->count());
95 observer()->Reset(); 95 observer()->Reset();
96 } 96 }
97 97
98 TEST_F(LauncherViewIconObserverTest, BoundsChanged) { 98 TEST_F(LauncherViewIconObserverTest, BoundsChanged) {
99 Launcher* launcher = Shell::GetInstance()->launcher(); 99 Launcher* launcher = Shell::GetInstance()->launcher();
100 int total_width = launcher->widget()->GetWindowScreenBounds().width(); 100 gfx::Size launcher_size = launcher->widget()->GetWindowScreenBounds().size();
101 int total_width = launcher_size.width() / 2;
101 ASSERT_GT(total_width, 0); 102 ASSERT_GT(total_width, 0);
102 launcher->SetStatusWidth(total_width / 2); 103 launcher->SetStatusSize(gfx::Size(total_width, launcher_size.height()));
103 EXPECT_EQ(1, observer()->count()); 104 EXPECT_EQ(1, observer()->count());
104 observer()->Reset(); 105 observer()->Reset();
105 } 106 }
106 107
107 //////////////////////////////////////////////////////////////////////////////// 108 ////////////////////////////////////////////////////////////////////////////////
108 // LauncherView tests. 109 // LauncherView tests.
109 110
110 class LauncherViewTest : public aura::test::AuraTestBase { 111 class LauncherViewTest : public aura::test::AuraTestBase {
111 public: 112 public:
112 LauncherViewTest() {} 113 LauncherViewTest() {}
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 // Verifies non-overflow buttons are visible. 284 // Verifies non-overflow buttons are visible.
284 for (int i = 0; i <= test_api_->GetLastVisibleIndex(); ++i) { 285 for (int i = 0; i <= test_api_->GetLastVisibleIndex(); ++i) {
285 internal::LauncherButton* button = test_api_->GetButton(i); 286 internal::LauncherButton* button = test_api_->GetButton(i);
286 EXPECT_TRUE(button->visible()) << "button index=" << i; 287 EXPECT_TRUE(button->visible()) << "button index=" << i;
287 EXPECT_EQ(1.0f, button->layer()->opacity()) << "button index=" << i; 288 EXPECT_EQ(1.0f, button->layer()->opacity()) << "button index=" << i;
288 } 289 }
289 } 290 }
290 291
291 } // namespace test 292 } // namespace test
292 } // namespace ash 293 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/launcher_view.cc ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698