Commit ae910dd7 authored by miguelg's avatar miguelg Committed by Commit bot

Disable the image notification property on MacOS

This is in preparation for the launch of MacOSX native notifications
where the property is not supported.

Intent to remove https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/IKGgHJOVMYE

BUG=571056

Review-Url: https://codereview.chromium.org/2803303002
Cr-Commit-Position: refs/heads/master@{#463050}
parent 6a900aa3
...@@ -351,9 +351,11 @@ IN_PROC_BROWSER_TEST_F(PlatformNotificationServiceBrowserTest, ...@@ -351,9 +351,11 @@ IN_PROC_BROWSER_TEST_F(PlatformNotificationServiceBrowserTest,
EXPECT_EQ("Title", base::UTF16ToUTF8(all_options_notification.title())); EXPECT_EQ("Title", base::UTF16ToUTF8(all_options_notification.title()));
EXPECT_EQ("Contents", base::UTF16ToUTF8(all_options_notification.message())); EXPECT_EQ("Contents", base::UTF16ToUTF8(all_options_notification.message()));
EXPECT_EQ("replace-id", all_options_notification.tag()); EXPECT_EQ("replace-id", all_options_notification.tag());
#if !defined(OS_MACOSX)
EXPECT_FALSE(all_options_notification.image().IsEmpty()); EXPECT_FALSE(all_options_notification.image().IsEmpty());
EXPECT_EQ(kIconWidth, all_options_notification.image().Width()); EXPECT_EQ(kIconWidth, all_options_notification.image().Width());
EXPECT_EQ(kIconHeight, all_options_notification.image().Height()); EXPECT_EQ(kIconHeight, all_options_notification.image().Height());
#endif
EXPECT_FALSE(all_options_notification.icon().IsEmpty()); EXPECT_FALSE(all_options_notification.icon().IsEmpty());
EXPECT_EQ(kIconWidth, all_options_notification.icon().Width()); EXPECT_EQ(kIconWidth, all_options_notification.icon().Width());
EXPECT_EQ(kIconHeight, all_options_notification.icon().Height()); EXPECT_EQ(kIconHeight, all_options_notification.icon().Height());
......
...@@ -68,6 +68,11 @@ static void SetRuntimeFeatureDefaultsForPlatform() { ...@@ -68,6 +68,11 @@ static void SetRuntimeFeatureDefaultsForPlatform() {
#if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX)
WebRuntimeFeatures::enableWebBluetooth(true); WebRuntimeFeatures::enableWebBluetooth(true);
#endif #endif
// The Notification Center on Mac OS X does not support content images.
#if defined(OS_MACOSX)
WebRuntimeFeatures::enableNotificationContentImage(false);
#endif
} }
void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment