| 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 #import "chrome/browser/ui/cocoa/notifications/message_center_tray_bridge.h" | 5 #import "chrome/browser/ui/cocoa/notifications/message_center_tray_bridge.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_nsobject.h" | 7 #include "base/mac/scoped_nsobject.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #import "ui/base/test/ui_cocoa_test_helper.h" |
| 11 #import "ui/message_center/cocoa/status_item_view.h" | 12 #import "ui/message_center/cocoa/status_item_view.h" |
| 12 #include "ui/message_center/message_center.h" | 13 #include "ui/message_center/message_center.h" |
| 13 #include "ui/message_center/notification.h" | 14 #include "ui/message_center/notification.h" |
| 14 #import "ui/base/test/ui_cocoa_test_helper.h" | |
| 15 | 15 |
| 16 class MessageCenterTrayBridgeTest : public ui::CocoaTest { | 16 class MessageCenterTrayBridgeTest : public ui::CocoaTest { |
| 17 public: | 17 public: |
| 18 virtual void SetUp() OVERRIDE { | 18 virtual void SetUp() OVERRIDE { |
| 19 ui::CocoaTest::SetUp(); | 19 ui::CocoaTest::SetUp(); |
| 20 | 20 |
| 21 message_center::MessageCenter::Initialize(); | 21 message_center::MessageCenter::Initialize(); |
| 22 center_ = message_center::MessageCenter::Get(); | 22 center_ = message_center::MessageCenter::Get(); |
| 23 | 23 |
| 24 bridge_.reset(new MessageCenterTrayBridge(center_)); | 24 bridge_.reset(new MessageCenterTrayBridge(center_)); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 EXPECT_TRUE(status_item()); | 61 EXPECT_TRUE(status_item()); |
| 62 EXPECT_EQ(1u, [status_item() unreadCount]); | 62 EXPECT_EQ(1u, [status_item() unreadCount]); |
| 63 | 63 |
| 64 center_->RemoveNotification("1", /*by_user=*/true); | 64 center_->RemoveNotification("1", /*by_user=*/true); |
| 65 | 65 |
| 66 base::RunLoop().RunUntilIdle(); | 66 base::RunLoop().RunUntilIdle(); |
| 67 | 67 |
| 68 EXPECT_FALSE(status_item()); | 68 EXPECT_FALSE(status_item()); |
| 69 } | 69 } |
| OLD | NEW |