OLD | NEW |
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/system/tray/system_tray.h" | 5 #include "ash/system/tray/system_tray.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/system/status_area_widget.h" | 9 #include "ash/system/status_area_widget.h" |
10 #include "ash/system/tray/system_tray_item.h" | 10 #include "ash/system/tray/system_tray_item.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 // tray. | 157 // tray. |
158 test_item->tray_view()->SetVisible(false); | 158 test_item->tray_view()->SetVisible(false); |
159 EXPECT_EQ(widget_size.ToString(), | 159 EXPECT_EQ(widget_size.ToString(), |
160 tray->GetWidget()->GetWindowScreenBounds().size().ToString()); | 160 tray->GetWidget()->GetWindowScreenBounds().size().ToString()); |
161 | 161 |
162 test_item->tray_view()->SetVisible(true); | 162 test_item->tray_view()->SetVisible(true); |
163 EXPECT_EQ(new_size.ToString(), | 163 EXPECT_EQ(new_size.ToString(), |
164 tray->GetWidget()->GetWindowScreenBounds().size().ToString()); | 164 tray->GetWidget()->GetWindowScreenBounds().size().ToString()); |
165 } | 165 } |
166 | 166 |
167 TEST_F(SystemTrayTest, SystemTrayNotifications) { | 167 // Disabled due to a use-after-free, see http://crbug.com/127539. |
| 168 TEST_F(SystemTrayTest, DISABLED_SystemTrayNotifications) { |
168 scoped_ptr<SystemTray> tray(CreateSystemTray()); | 169 scoped_ptr<SystemTray> tray(CreateSystemTray()); |
169 ASSERT_TRUE(tray->GetWidget()); | 170 ASSERT_TRUE(tray->GetWidget()); |
170 | 171 |
171 TestItem* test_item = new TestItem; | 172 TestItem* test_item = new TestItem; |
172 TestItem* detailed_item = new TestItem; | 173 TestItem* detailed_item = new TestItem; |
173 tray->AddTrayItem(test_item); | 174 tray->AddTrayItem(test_item); |
174 tray->AddTrayItem(detailed_item); | 175 tray->AddTrayItem(detailed_item); |
175 | 176 |
176 // Ensure the tray views are created. | 177 // Ensure the tray views are created. |
177 ASSERT_TRUE(test_item->tray_view() != NULL); | 178 ASSERT_TRUE(test_item->tray_view() != NULL); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 tray->ShowDefaultView(BUBBLE_USE_EXISTING); | 229 tray->ShowDefaultView(BUBBLE_USE_EXISTING); |
229 RunAllPendingInMessageLoop(); | 230 RunAllPendingInMessageLoop(); |
230 | 231 |
231 EXPECT_EQ(bubble_bounds.ToString(), test_item->default_view()->GetWidget()-> | 232 EXPECT_EQ(bubble_bounds.ToString(), test_item->default_view()->GetWidget()-> |
232 GetWindowScreenBounds().ToString()); | 233 GetWindowScreenBounds().ToString()); |
233 EXPECT_EQ(widget, test_item->default_view()->GetWidget()); | 234 EXPECT_EQ(widget, test_item->default_view()->GetWidget()); |
234 } | 235 } |
235 | 236 |
236 } // namespace test | 237 } // namespace test |
237 } // namespace ash | 238 } // namespace ash |
OLD | NEW |