| 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 <map> | 5 #include <map> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) | 205 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) |
| 206 return; | 206 return; |
| 207 #endif | 207 #endif |
| 208 | 208 |
| 209 TestDelegate* delegate; | 209 TestDelegate* delegate; |
| 210 manager()->Add(CreateTestNotification("n", &delegate), profile()); | 210 manager()->Add(CreateTestNotification("n", &delegate), profile()); |
| 211 TestDelegate* delegate2; | 211 TestDelegate* delegate2; |
| 212 manager()->Add(CreateRichTestNotification("n", &delegate2), profile()); | 212 manager()->Add(CreateRichTestNotification("n", &delegate2), profile()); |
| 213 | 213 |
| 214 manager()->CancelById("n", NotificationUIManager::GetProfileID(profile())); | 214 manager()->CancelById("n", NotificationUIManager::GetProfileID(profile())); |
| 215 EXPECT_EQ("Display_Close_programmatically_", delegate->log()); | 215 EXPECT_EQ("Display_", delegate->log()); |
| 216 EXPECT_EQ("Close_programmatically_", delegate2->log()); | 216 EXPECT_EQ("Close_programmatically_", delegate2->log()); |
| 217 | 217 |
| 218 delegate->Release(); | 218 delegate->Release(); |
| 219 delegate2->Release(); | 219 delegate2->Release(); |
| 220 } | 220 } |
| 221 | 221 |
| 222 IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, QueueWhenCenterVisible) { | 222 IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest, QueueWhenCenterVisible) { |
| 223 #if defined(OS_WIN) && defined(USE_ASH) | 223 #if defined(OS_WIN) && defined(USE_ASH) |
| 224 // Disable this test in Metro+Ash for now (http://crbug.com/262796). | 224 // Disable this test in Metro+Ash for now (http://crbug.com/262796). |
| 225 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) | 225 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 manager()->Update(notification, profile()); | 350 manager()->Update(notification, profile()); |
| 351 | 351 |
| 352 // Expect that the progress notification update is performed. | 352 // Expect that the progress notification update is performed. |
| 353 EXPECT_EQ(base::StringPrintf("update-%s", notification_id.c_str()), | 353 EXPECT_EQ(base::StringPrintf("update-%s", notification_id.c_str()), |
| 354 observer.log(notification_id)); | 354 observer.log(notification_id)); |
| 355 | 355 |
| 356 delegate->Release(); | 356 delegate->Release(); |
| 357 } | 357 } |
| 358 | 358 |
| 359 #endif // !defined(OS_MACOSX) | 359 #endif // !defined(OS_MACOSX) |
| OLD | NEW |