| 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 // Disabled due to a use-after-free, see http://crbug.com/127539. | 167 TEST_F(SystemTrayTest, SystemTrayNotifications) { |
| 168 TEST_F(SystemTrayTest, DISABLED_SystemTrayNotifications) { | |
| 169 scoped_ptr<SystemTray> tray(CreateSystemTray()); | 168 scoped_ptr<SystemTray> tray(CreateSystemTray()); |
| 170 ASSERT_TRUE(tray->GetWidget()); | 169 ASSERT_TRUE(tray->GetWidget()); |
| 171 | 170 |
| 172 TestItem* test_item = new TestItem; | 171 TestItem* test_item = new TestItem; |
| 173 TestItem* detailed_item = new TestItem; | 172 TestItem* detailed_item = new TestItem; |
| 174 tray->AddTrayItem(test_item); | 173 tray->AddTrayItem(test_item); |
| 175 tray->AddTrayItem(detailed_item); | 174 tray->AddTrayItem(detailed_item); |
| 176 | 175 |
| 177 // Ensure the tray views are created. | 176 // Ensure the tray views are created. |
| 178 ASSERT_TRUE(test_item->tray_view() != NULL); | 177 ASSERT_TRUE(test_item->tray_view() != NULL); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 tray->ShowDefaultView(BUBBLE_USE_EXISTING); | 228 tray->ShowDefaultView(BUBBLE_USE_EXISTING); |
| 230 RunAllPendingInMessageLoop(); | 229 RunAllPendingInMessageLoop(); |
| 231 | 230 |
| 232 EXPECT_EQ(bubble_bounds.ToString(), test_item->default_view()->GetWidget()-> | 231 EXPECT_EQ(bubble_bounds.ToString(), test_item->default_view()->GetWidget()-> |
| 233 GetWindowScreenBounds().ToString()); | 232 GetWindowScreenBounds().ToString()); |
| 234 EXPECT_EQ(widget, test_item->default_view()->GetWidget()); | 233 EXPECT_EQ(widget, test_item->default_view()->GetWidget()); |
| 235 } | 234 } |
| 236 | 235 |
| 237 } // namespace test | 236 } // namespace test |
| 238 } // namespace ash | 237 } // namespace ash |
| OLD | NEW |