OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/common/system/tray/tray_details_view.h" | 5 #include "ash/common/system/tray/tray_details_view.h" |
6 | 6 |
7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
8 #include "ash/common/system/tray/hover_highlight_view.h" | 8 #include "ash/common/system/tray/hover_highlight_view.h" |
9 #include "ash/common/system/tray/special_popup_row.h" | 9 #include "ash/common/system/tray/special_popup_row.h" |
10 #include "ash/common/system/tray/system_tray.h" | 10 #include "ash/common/system/tray/system_tray.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 TestItem* test_item_2 = new TestItem; | 150 TestItem* test_item_2 = new TestItem; |
151 tray->AddTrayItem(test_item_1); | 151 tray->AddTrayItem(test_item_1); |
152 tray->AddTrayItem(test_item_2); | 152 tray->AddTrayItem(test_item_2); |
153 | 153 |
154 // Ensure the tray views are created. | 154 // Ensure the tray views are created. |
155 ASSERT_TRUE(test_item_1->tray_view() != NULL); | 155 ASSERT_TRUE(test_item_1->tray_view() != NULL); |
156 ASSERT_TRUE(test_item_2->tray_view() != NULL); | 156 ASSERT_TRUE(test_item_2->tray_view() != NULL); |
157 | 157 |
158 // Show the default view. | 158 // Show the default view. |
159 tray->ShowDefaultView(BUBBLE_CREATE_NEW); | 159 tray->ShowDefaultView(BUBBLE_CREATE_NEW); |
| 160 tray->ActivateBubble(); |
160 RunAllPendingInMessageLoop(); | 161 RunAllPendingInMessageLoop(); |
161 | 162 |
162 // Show the detailed view of item 2. | 163 // Show the detailed view of item 2. |
163 tray->ShowDetailedView(test_item_2, 0, true, BUBBLE_USE_EXISTING); | 164 tray->ShowDetailedView(test_item_2, 0, true, BUBBLE_USE_EXISTING); |
164 EXPECT_TRUE(test_item_2->detailed_view()); | 165 EXPECT_TRUE(test_item_2->detailed_view()); |
165 RunAllPendingInMessageLoop(); | 166 RunAllPendingInMessageLoop(); |
166 EXPECT_FALSE(test_item_2->default_view()); | 167 EXPECT_FALSE(test_item_2->default_view()); |
167 | 168 |
168 // Transition back to default view, the default view of item 2 should have | 169 // Transition back to default view, the default view of item 2 should have |
169 // focus. | 170 // focus. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 gfx::Rect bounds = button->GetBoundsInScreen(); | 282 gfx::Rect bounds = button->GetBoundsInScreen(); |
282 gfx::Point initial_point(bounds.x() - 1, bounds.y()); | 283 gfx::Point initial_point(bounds.x() - 1, bounds.y()); |
283 generator.set_current_location(initial_point); | 284 generator.set_current_location(initial_point); |
284 generator.MoveMouseBy(1, 0); | 285 generator.MoveMouseBy(1, 0); |
285 RunAllPendingInMessageLoop(); | 286 RunAllPendingInMessageLoop(); |
286 EXPECT_TRUE(button->background()); | 287 EXPECT_TRUE(button->background()); |
287 } | 288 } |
288 | 289 |
289 } // namespace test | 290 } // namespace test |
290 } // namespace ash | 291 } // namespace ash |
OLD | NEW |