| 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 #include <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 GURL(), | 81 GURL(), |
| 82 ASCIIToUTF16("title"), | 82 ASCIIToUTF16("title"), |
| 83 ASCIIToUTF16("message"), | 83 ASCIIToUTF16("message"), |
| 84 WebKit::WebTextDirectionDefault, | 84 WebKit::WebTextDirectionDefault, |
| 85 EmptyString16(), | 85 EmptyString16(), |
| 86 EmptyString16(), | 86 EmptyString16(), |
| 87 new_delegate); | 87 new_delegate); |
| 88 } | 88 } |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 // TODO(rsesek): Implement Message Center on Mac and get these tests passing |
| 92 // for real. http://crbug.com/179904 |
| 93 #if !defined(OS_MACOSX) |
| 94 |
| 91 IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, RetrieveBaseParts) { | 95 IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, RetrieveBaseParts) { |
| 92 // Make sure comamnd-line switch has an effect. | 96 // Make sure comamnd-line switch has an effect. |
| 93 EXPECT_TRUE(NotificationUIManager::DelegatesToMessageCenter()); | 97 EXPECT_TRUE(NotificationUIManager::DelegatesToMessageCenter()); |
| 94 EXPECT_TRUE(manager()); | 98 EXPECT_TRUE(manager()); |
| 95 EXPECT_TRUE(message_center()); | 99 EXPECT_TRUE(message_center()); |
| 96 } | 100 } |
| 97 | 101 |
| 98 IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, BasicAddCancel) { | 102 IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, BasicAddCancel) { |
| 99 manager()->Add(CreateTestNotification("hey"), profile()); | 103 manager()->Add(CreateTestNotification("hey"), profile()); |
| 100 EXPECT_EQ(1u, message_center()->NotificationCount()); | 104 EXPECT_EQ(1u, message_center()->NotificationCount()); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 115 | 119 |
| 116 IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, ButtonClickedDelegate) { | 120 IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, ButtonClickedDelegate) { |
| 117 TestDelegate* delegate; | 121 TestDelegate* delegate; |
| 118 manager()->Add(CreateTestNotification("n", &delegate), profile()); | 122 manager()->Add(CreateTestNotification("n", &delegate), profile()); |
| 119 message_center()->OnButtonClicked("n", 1); | 123 message_center()->OnButtonClicked("n", 1); |
| 120 // Verify that delegate accumulated correct log of events. | 124 // Verify that delegate accumulated correct log of events. |
| 121 EXPECT_EQ("Display_ButtonClick_1_", delegate->log()); | 125 EXPECT_EQ("Display_ButtonClick_1_", delegate->log()); |
| 122 delegate->Release(); | 126 delegate->Release(); |
| 123 } | 127 } |
| 124 | 128 |
| 129 #endif // !defined(OS_MACOSX) |
| OLD | NEW |