OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/shelf/shelf_widget.h" | 5 #include "ash/shelf/shelf_widget.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_model.h" | 9 #include "ash/launcher/launcher_model.h" |
10 #include "ash/launcher/launcher_view.h" | 10 #include "ash/launcher/launcher_view.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 TestLauncherAlignment(Shell::GetPrimaryRootWindow(), | 77 TestLauncherAlignment(Shell::GetPrimaryRootWindow(), |
78 SHELF_ALIGNMENT_RIGHT, | 78 SHELF_ALIGNMENT_RIGHT, |
79 "0,0 352x400"); | 79 "0,0 352x400"); |
80 } | 80 } |
81 { | 81 { |
82 SCOPED_TRACE("Single Left"); | 82 SCOPED_TRACE("Single Left"); |
83 TestLauncherAlignment(Shell::GetPrimaryRootWindow(), | 83 TestLauncherAlignment(Shell::GetPrimaryRootWindow(), |
84 SHELF_ALIGNMENT_LEFT, | 84 SHELF_ALIGNMENT_LEFT, |
85 "48,0 352x400"); | 85 "48,0 352x400"); |
86 } | 86 } |
| 87 if (!SupportsMultipleDisplays()) |
| 88 return; |
| 89 |
87 UpdateDisplay("300x300,500x500"); | 90 UpdateDisplay("300x300,500x500"); |
88 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); | 91 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); |
89 { | 92 { |
90 SCOPED_TRACE("Primary Bottom"); | 93 SCOPED_TRACE("Primary Bottom"); |
91 TestLauncherAlignment(root_windows[0], | 94 TestLauncherAlignment(root_windows[0], |
92 SHELF_ALIGNMENT_BOTTOM, | 95 SHELF_ALIGNMENT_BOTTOM, |
93 "0,0 300x252"); | 96 "0,0 300x252"); |
94 } | 97 } |
95 { | 98 { |
96 SCOPED_TRACE("Primary Right"); | 99 SCOPED_TRACE("Primary Right"); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 views::Widget* widget = new views::Widget; | 148 views::Widget* widget = new views::Widget; |
146 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); | 149 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); |
147 params.bounds = gfx::Rect(0, 0, 200, 200); | 150 params.bounds = gfx::Rect(0, 0, 200, 200); |
148 params.context = CurrentContext(); | 151 params.context = CurrentContext(); |
149 // Widget is now owned by the parent window. | 152 // Widget is now owned by the parent window. |
150 widget->Init(params); | 153 widget->Init(params); |
151 widget->SetFullscreen(true); | 154 widget->SetFullscreen(true); |
152 } | 155 } |
153 | 156 |
154 } // namespace ash | 157 } // namespace ash |
OLD | NEW |