Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Side by Side Diff: chrome/browser/extensions/api/notifications/notifications_apitest.cc

Issue 15025002: Remove ENABLE_MESSAGE_CENTER (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: one moer fix Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/browser_process.h" 5 #include "chrome/browser/browser_process.h"
6 #include "chrome/browser/extensions/api/notifications/notifications_api.h" 6 #include "chrome/browser/extensions/api/notifications/notifications_api.h"
7 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/browser/extensions/extension_function_test_utils.h" 8 #include "chrome/browser/extensions/extension_function_test_utils.h"
9 #include "chrome/common/chrome_notification_types.h" 9 #include "chrome/common/chrome_notification_types.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 return; 267 return;
268 #endif 268 #endif
269 269
270 ASSERT_TRUE(RunExtensionTest("notifications/api/events")) << message_; 270 ASSERT_TRUE(RunExtensionTest("notifications/api/events")) << message_;
271 } 271 }
272 272
273 IN_PROC_BROWSER_TEST_F(NotificationsApiTest, TestCSP) { 273 IN_PROC_BROWSER_TEST_F(NotificationsApiTest, TestCSP) {
274 ASSERT_TRUE(RunExtensionTest("notifications/api/csp")) << message_; 274 ASSERT_TRUE(RunExtensionTest("notifications/api/csp")) << message_;
275 } 275 }
276 276
277 #ifdef ENABLE_MESSAGE_CENTER
278 #if !defined(OS_WIN) || !defined(USE_ASH) 277 #if !defined(OS_WIN) || !defined(USE_ASH)
279 278
280 IN_PROC_BROWSER_TEST_F(NotificationsApiTest, TestByUser) { 279 IN_PROC_BROWSER_TEST_F(NotificationsApiTest, TestByUser) {
281 if (!message_center::IsRichNotificationEnabled()) 280 SKIP_THIS_TEST_IF_MESSAGE_CENTER_DISABLED();
282 return;
283 281
284 const extensions::Extension* extension = 282 const extensions::Extension* extension =
285 LoadExtensionAndWait("notifications/api/by_user"); 283 LoadExtensionAndWait("notifications/api/by_user");
286 ASSERT_TRUE(extension) << message_; 284 ASSERT_TRUE(extension) << message_;
287 285
288 { 286 {
289 ResultCatcher catcher; 287 ResultCatcher catcher;
290 g_browser_process->message_center()->RemoveNotification( 288 g_browser_process->message_center()->RemoveNotification(
291 extension->id() + "-FOO", 289 extension->id() + "-FOO",
292 false); 290 false);
293 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); 291 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
294 } 292 }
295 293
296 { 294 {
297 ResultCatcher catcher; 295 ResultCatcher catcher;
298 g_browser_process->message_center()->RemoveNotification( 296 g_browser_process->message_center()->RemoveNotification(
299 extension->id() + "-BAR", 297 extension->id() + "-BAR",
300 true); 298 true);
301 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); 299 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
302 } 300 }
303 } 301 }
304 302
305 #endif 303 #endif
306 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698