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

Side by Side Diff: chrome/browser/notifications/platform_notification_service_interactive_uitest.cc

Issue 2811583002: Revert of Disable the image notification property on MacOS (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | content/child/runtime_features.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <memory> 5 #include <memory>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 EXPECT_EQ("ok", script_result); 344 EXPECT_EQ("ok", script_result);
345 345
346 ASSERT_EQ(2u, ui_manager()->GetNotificationCount()); 346 ASSERT_EQ(2u, ui_manager()->GetNotificationCount());
347 347
348 // We don't use or check the notification's direction and language. 348 // We don't use or check the notification's direction and language.
349 const Notification& all_options_notification = 349 const Notification& all_options_notification =
350 ui_manager()->GetNotificationAt(1); 350 ui_manager()->GetNotificationAt(1);
351 EXPECT_EQ("Title", base::UTF16ToUTF8(all_options_notification.title())); 351 EXPECT_EQ("Title", base::UTF16ToUTF8(all_options_notification.title()));
352 EXPECT_EQ("Contents", base::UTF16ToUTF8(all_options_notification.message())); 352 EXPECT_EQ("Contents", base::UTF16ToUTF8(all_options_notification.message()));
353 EXPECT_EQ("replace-id", all_options_notification.tag()); 353 EXPECT_EQ("replace-id", all_options_notification.tag());
354 #if !defined(OS_MACOSX)
355 EXPECT_FALSE(all_options_notification.image().IsEmpty()); 354 EXPECT_FALSE(all_options_notification.image().IsEmpty());
356 EXPECT_EQ(kIconWidth, all_options_notification.image().Width()); 355 EXPECT_EQ(kIconWidth, all_options_notification.image().Width());
357 EXPECT_EQ(kIconHeight, all_options_notification.image().Height()); 356 EXPECT_EQ(kIconHeight, all_options_notification.image().Height());
358 #endif
359 EXPECT_FALSE(all_options_notification.icon().IsEmpty()); 357 EXPECT_FALSE(all_options_notification.icon().IsEmpty());
360 EXPECT_EQ(kIconWidth, all_options_notification.icon().Width()); 358 EXPECT_EQ(kIconWidth, all_options_notification.icon().Width());
361 EXPECT_EQ(kIconHeight, all_options_notification.icon().Height()); 359 EXPECT_EQ(kIconHeight, all_options_notification.icon().Height());
362 EXPECT_TRUE(all_options_notification.small_image().IsEmpty()); 360 EXPECT_TRUE(all_options_notification.small_image().IsEmpty());
363 EXPECT_TRUE(all_options_notification.renotify()); 361 EXPECT_TRUE(all_options_notification.renotify());
364 EXPECT_TRUE(all_options_notification.silent()); 362 EXPECT_TRUE(all_options_notification.silent());
365 EXPECT_TRUE(all_options_notification.never_timeout()); 363 EXPECT_TRUE(all_options_notification.never_timeout());
366 EXPECT_DOUBLE_EQ(kNotificationTimestamp, 364 EXPECT_DOUBLE_EQ(kNotificationTimestamp,
367 all_options_notification.timestamp().ToJsTime()); 365 all_options_notification.timestamp().ToJsTime());
368 EXPECT_EQ(1u, all_options_notification.buttons().size()); 366 EXPECT_EQ(1u, all_options_notification.buttons().size());
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 RunScript("DisplayPersistentAllOptionsNotification()", &script_result)); 841 RunScript("DisplayPersistentAllOptionsNotification()", &script_result));
844 EXPECT_EQ("ok", script_result); 842 EXPECT_EQ("ok", script_result);
845 843
846 ASSERT_EQ(1u, ui_manager()->GetNotificationCount()); 844 ASSERT_EQ(1u, ui_manager()->GetNotificationCount());
847 const Notification& notification = ui_manager()->GetNotificationAt(0); 845 const Notification& notification = ui_manager()->GetNotificationAt(0);
848 846
849 // Since the kNotificationContentImage kill switch has disabled images, the 847 // Since the kNotificationContentImage kill switch has disabled images, the
850 // notification should be shown without an image. 848 // notification should be shown without an image.
851 EXPECT_TRUE(notification.image().IsEmpty()); 849 EXPECT_TRUE(notification.image().IsEmpty());
852 } 850 }
OLDNEW
« no previous file with comments | « no previous file | content/child/runtime_features.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698