| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "chrome/common/pref_names.h" | 12 #include "chrome/common/pref_names.h" |
| 13 #include "chrome/test/base/scoped_testing_local_state.h" |
| 13 #include "chrome/test/base/testing_browser_process.h" | 14 #include "chrome/test/base/testing_browser_process.h" |
| 14 #include "chrome/test/base/scoped_testing_local_state.h" | |
| 15 #import "ui/gfx/test/ui_cocoa_test_helper.h" | 15 #import "ui/gfx/test/ui_cocoa_test_helper.h" |
| 16 #import "ui/message_center/cocoa/status_item_view.h" | 16 #import "ui/message_center/cocoa/status_item_view.h" |
| 17 #include "ui/message_center/message_center.h" | 17 #include "ui/message_center/message_center.h" |
| 18 #include "ui/message_center/notification.h" | 18 #include "ui/message_center/notification.h" |
| 19 #include "ui/message_center/notifier_settings.h" | 19 #include "ui/message_center/notifier_settings.h" |
| 20 | 20 |
| 21 class MessageCenterTrayBridgeTest : public ui::CocoaTest { | 21 class MessageCenterTrayBridgeTest : public ui::CocoaTest { |
| 22 public: | 22 public: |
| 23 void SetUp() override { | 23 void SetUp() override { |
| 24 ui::CocoaTest::SetUp(); | 24 ui::CocoaTest::SetUp(); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 center_->RemoveNotification("1", /*by_user=*/true); | 146 center_->RemoveNotification("1", /*by_user=*/true); |
| 147 | 147 |
| 148 base::RunLoop().RunUntilIdle(); | 148 base::RunLoop().RunUntilIdle(); |
| 149 | 149 |
| 150 EXPECT_FALSE(status_item()); | 150 EXPECT_FALSE(status_item()); |
| 151 | 151 |
| 152 local_state()->SetBoolean(prefs::kMessageCenterShowIcon, true); | 152 local_state()->SetBoolean(prefs::kMessageCenterShowIcon, true); |
| 153 | 153 |
| 154 EXPECT_TRUE(status_item()); | 154 EXPECT_TRUE(status_item()); |
| 155 } | 155 } |
| OLD | NEW |