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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 TestLauncherAlignment(root_windows[0], | 97 TestLauncherAlignment(root_windows[0], |
98 SHELF_ALIGNMENT_RIGHT, | 98 SHELF_ALIGNMENT_RIGHT, |
99 "0,0 252x300"); | 99 "0,0 252x300"); |
100 } | 100 } |
101 { | 101 { |
102 SCOPED_TRACE("Primary Left"); | 102 SCOPED_TRACE("Primary Left"); |
103 TestLauncherAlignment(root_windows[0], | 103 TestLauncherAlignment(root_windows[0], |
104 SHELF_ALIGNMENT_LEFT, | 104 SHELF_ALIGNMENT_LEFT, |
105 "48,0 252x300"); | 105 "48,0 252x300"); |
106 } | 106 } |
107 if (Shell::IsLauncherPerDisplayEnabled()) { | 107 { |
108 { | 108 SCOPED_TRACE("Secondary Bottom"); |
109 SCOPED_TRACE("Secondary Bottom"); | 109 TestLauncherAlignment(root_windows[1], |
110 TestLauncherAlignment(root_windows[1], | 110 SHELF_ALIGNMENT_BOTTOM, |
111 SHELF_ALIGNMENT_BOTTOM, | 111 "300,0 500x452"); |
112 "300,0 500x452"); | 112 } |
113 } | 113 { |
114 { | 114 SCOPED_TRACE("Secondary Right"); |
115 SCOPED_TRACE("Secondary Right"); | 115 TestLauncherAlignment(root_windows[1], |
116 TestLauncherAlignment(root_windows[1], | 116 SHELF_ALIGNMENT_RIGHT, |
117 SHELF_ALIGNMENT_RIGHT, | 117 "300,0 452x500"); |
118 "300,0 452x500"); | 118 } |
119 } | 119 { |
120 { | 120 SCOPED_TRACE("Secondary Left"); |
121 SCOPED_TRACE("Secondary Left"); | 121 TestLauncherAlignment(root_windows[1], |
122 TestLauncherAlignment(root_windows[1], | 122 SHELF_ALIGNMENT_LEFT, |
123 SHELF_ALIGNMENT_LEFT, | 123 "348,0 452x500"); |
124 "348,0 452x500"); | |
125 } | |
126 } | 124 } |
127 } | 125 } |
128 | 126 |
129 // Makes sure the launcher is initially sized correctly. | 127 // Makes sure the launcher is initially sized correctly. |
130 TEST_F(ShelfWidgetTest, LauncherInitiallySized) { | 128 TEST_F(ShelfWidgetTest, LauncherInitiallySized) { |
131 ShelfWidget* shelf_widget = GetShelfWidget(); | 129 ShelfWidget* shelf_widget = GetShelfWidget(); |
132 Launcher* launcher = shelf_widget->launcher(); | 130 Launcher* launcher = shelf_widget->launcher(); |
133 ASSERT_TRUE(launcher); | 131 ASSERT_TRUE(launcher); |
134 internal::ShelfLayoutManager* shelf_layout_manager = GetShelfLayoutManager(); | 132 internal::ShelfLayoutManager* shelf_layout_manager = GetShelfLayoutManager(); |
135 ASSERT_TRUE(shelf_layout_manager); | 133 ASSERT_TRUE(shelf_layout_manager); |
(...skipping 11 matching lines...) Expand all Loading... |
147 views::Widget* widget = new views::Widget; | 145 views::Widget* widget = new views::Widget; |
148 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); | 146 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); |
149 params.bounds = gfx::Rect(0, 0, 200, 200); | 147 params.bounds = gfx::Rect(0, 0, 200, 200); |
150 params.context = CurrentContext(); | 148 params.context = CurrentContext(); |
151 // Widget is now owned by the parent window. | 149 // Widget is now owned by the parent window. |
152 widget->Init(params); | 150 widget->Init(params); |
153 widget->SetFullscreen(true); | 151 widget->SetFullscreen(true); |
154 } | 152 } |
155 | 153 |
156 } // namespace ash | 154 } // namespace ash |
OLD | NEW |