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

Unified Diff: content/browser/notifications/notification_database_data_unittest.cc

Issue 1010833002: Expose bits of the Web Notification database in the //content API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-db-DeleteInContext
Patch Set: add NON_EXPORTED_BASE Created 5 years, 9 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/browser/notifications/notification_database_data_unittest.cc
diff --git a/content/browser/notifications/notification_database_data_unittest.cc b/content/browser/notifications/notification_database_data_unittest.cc
index 80acae1183603e849cfb190f4f0dc9bce5da0ee8..df147d0e3324a0c1d57ef486bfa715d96def5380 100644
--- a/content/browser/notifications/notification_database_data_unittest.cc
+++ b/content/browser/notifications/notification_database_data_unittest.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/browser/notifications/notification_database_data.h"
-
#include "base/strings/utf_string_conversions.h"
#include "content/browser/notifications/notification_database_data.pb.h"
+#include "content/browser/notifications/notification_database_data_conversions.h"
+#include "content/public/browser/notification_database_data.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
@@ -40,12 +40,14 @@ TEST(NotificationDatabaseDataTest, SerializeAndDeserializeData) {
std::string serialized_data;
// Serialize the data in |notification_data| to the string |serialized_data|.
- ASSERT_TRUE(database_data.SerializeToString(&serialized_data));
+ ASSERT_TRUE(SerializeNotificationDatabaseData(database_data,
+ &serialized_data));
NotificationDatabaseData copied_data;
// Deserialize the data in |serialized_data| to |copied_data|.
- ASSERT_TRUE(copied_data.ParseFromString(serialized_data));
+ ASSERT_TRUE(DeserializeNotificationDatabaseData(serialized_data,
+ &copied_data));
EXPECT_EQ(database_data.notification_id, copied_data.notification_id);
EXPECT_EQ(database_data.origin, copied_data.origin);

Powered by Google App Engine
This is Rietveld 408576698