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

Side by Side Diff: ui/aura_shell/launcher/launcher_unittest.cc

Issue 8953004: Now that the launcher is sized to the width of the root window we need (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaks Created 9 years 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 | « ui/aura_shell/launcher/launcher.cc ('k') | ui/aura_shell/launcher/launcher_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/aura_shell/launcher/launcher.h"
6
7 #include "ui/aura_shell/shell.h"
8 #include "ui/aura_shell/test/aura_shell_test_base.h"
9 #include "ui/views/view.h"
10 #include "ui/views/widget/widget.h"
11
12 typedef aura_shell::test::AuraShellTestBase LauncherTest;
13
14 namespace aura_shell {
15
16 // Makes sure invoking SetStatusWidth on the launcher changes the size of the
17 // LauncherView.
18 TEST_F(LauncherTest, SetStatusWidth) {
19 Launcher* launcher = Shell::GetInstance()->launcher();
20 ASSERT_TRUE(launcher);
21 views::View* launcher_view = launcher->widget()->GetContentsView();
22 ASSERT_EQ(1, launcher_view->child_count());
23 launcher_view = launcher_view->child_at(0);
24
25 int total_width = launcher->widget()->GetWindowScreenBounds().width();
26 ASSERT_GT(total_width, 0);
27 launcher->SetStatusWidth(total_width / 2);
28 EXPECT_EQ(total_width - total_width / 2, launcher_view->width());
29 }
30
31 } // namespace aura_shell
OLDNEW
« no previous file with comments | « ui/aura_shell/launcher/launcher.cc ('k') | ui/aura_shell/launcher/launcher_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698