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

Unified Diff: content/child/notifications/notification_data_conversions_unittest.cc

Issue 1083683003: Speculative revert by sheriff (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed an unrelated commit that had accidentally slipped in. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: content/child/notifications/notification_data_conversions_unittest.cc
diff --git a/content/child/notifications/notification_data_conversions_unittest.cc b/content/child/notifications/notification_data_conversions_unittest.cc
index daded25dfd5f8eede6b29226cf70e7eb170b7e02..f6a1424cc81b5b48b953b93ab76c9f8a995ead96 100644
--- a/content/child/notifications/notification_data_conversions_unittest.cc
+++ b/content/child/notifications/notification_data_conversions_unittest.cc
@@ -4,8 +4,6 @@
#include "content/child/notifications/notification_data_conversions.h"
-#include <stdint.h>
-
#include "base/strings/utf_string_conversions.h"
#include "content/public/common/platform_notification_data.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -14,18 +12,17 @@
#include "third_party/WebKit/public/platform/modules/notifications/WebNotificationData.h"
namespace content {
+namespace {
const char kNotificationTitle[] = "My Notification";
const char kNotificationLang[] = "nl";
const char kNotificationBody[] = "Hello, world!";
const char kNotificationTag[] = "my_tag";
const char kNotificationIconUrl[] = "https://example.com/icon.png";
-const unsigned char kNotificationData[] = { 0xdf, 0xff, 0x0, 0x0, 0xff, 0xdf };
-TEST(NotificationDataConversionsTest, ToPlatformNotificationData) {
- std::vector<char> developer_data(
- kNotificationData, kNotificationData + arraysize(kNotificationData));
+}
+TEST(NotificationDataConversionsTest, ToPlatformNotificationData) {
blink::WebNotificationData web_data(
blink::WebString::fromUTF8(kNotificationTitle),
blink::WebNotificationData::DirectionLeftToRight,
@@ -33,8 +30,7 @@ TEST(NotificationDataConversionsTest, ToPlatformNotificationData) {
blink::WebString::fromUTF8(kNotificationBody),
blink::WebString::fromUTF8(kNotificationTag),
blink::WebURL(GURL(kNotificationIconUrl)),
- true /* silent */,
- blink::WebVector<char>(developer_data));
+ true /* silent */);
PlatformNotificationData platform_data = ToPlatformNotificationData(web_data);
EXPECT_EQ(base::ASCIIToUTF16(kNotificationTitle), platform_data.title);
@@ -45,10 +41,6 @@ TEST(NotificationDataConversionsTest, ToPlatformNotificationData) {
EXPECT_EQ(kNotificationTag, platform_data.tag);
EXPECT_EQ(kNotificationIconUrl, platform_data.icon.spec());
EXPECT_TRUE(platform_data.silent);
-
- ASSERT_EQ(developer_data.size(), platform_data.data.size());
- for (size_t i = 0; i < developer_data.size(); ++i)
- EXPECT_EQ(developer_data[i], platform_data.data[i]);
}
TEST(NotificationDataConversionsTest,
@@ -68,9 +60,6 @@ TEST(NotificationDataConversionsTest,
}
TEST(NotificationDataConversionsTest, ToWebNotificationData) {
- std::vector<char> developer_data(
- kNotificationData, kNotificationData + arraysize(kNotificationData));
-
PlatformNotificationData platform_data;
platform_data.title = base::ASCIIToUTF16(kNotificationTitle);
platform_data.direction =
@@ -80,7 +69,6 @@ TEST(NotificationDataConversionsTest, ToWebNotificationData) {
platform_data.tag = kNotificationTag;
platform_data.icon = GURL(kNotificationIconUrl);
platform_data.silent = true;
- platform_data.data = developer_data;
blink::WebNotificationData web_data = ToWebNotificationData(platform_data);
EXPECT_EQ(kNotificationTitle, web_data.title);
@@ -91,10 +79,6 @@ TEST(NotificationDataConversionsTest, ToWebNotificationData) {
EXPECT_EQ(kNotificationTag, web_data.tag);
EXPECT_EQ(kNotificationIconUrl, web_data.icon.string());
EXPECT_TRUE(web_data.silent);
-
- ASSERT_EQ(developer_data.size(), web_data.data.size());
- for (size_t i = 0; i < developer_data.size(); ++i)
- EXPECT_EQ(developer_data[i], web_data.data[i]);
}
TEST(NotificationDataConversionsTest, ToWebNotificationDataDirectionality) {
« no previous file with comments | « content/child/notifications/notification_data_conversions.cc ('k') | content/child/notifications/notification_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698