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

Unified Diff: content/browser/notifications/platform_notification_context_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
« no previous file with comments | « content/browser/notifications/platform_notification_context_impl.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/notifications/platform_notification_context_unittest.cc
diff --git a/content/browser/notifications/platform_notification_context_unittest.cc b/content/browser/notifications/platform_notification_context_unittest.cc
index da5faa0c0129d7ce38e09495590e584acf7c3f26..c42b3c5bebd0a1c38049037934616bb60c109a2f 100644
--- a/content/browser/notifications/platform_notification_context_unittest.cc
+++ b/content/browser/notifications/platform_notification_context_unittest.cc
@@ -2,11 +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/platform_notification_context.h"
-
#include "base/bind.h"
#include "base/run_loop.h"
-#include "content/browser/notifications/notification_database_data.h"
+#include "content/browser/notifications/platform_notification_context_impl.h"
+#include "content/public/browser/notification_database_data.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
@@ -38,12 +37,12 @@ class PlatformNotificationContextTest : public ::testing::Test {
}
protected:
- // Creates a new PlatformNotificationContext instance. When using this method,
- // the underlying database will always be created in memory. The current
- // message loop proxy will be used as the task runner.
- PlatformNotificationContext* CreatePlatformNotificationContext() {
- PlatformNotificationContext* context =
- new PlatformNotificationContext(base::FilePath());
+ // Creates a new PlatformNotificationContextImpl instance. When using this
+ // method, the underlying database will always be created in memory. The
+ // current message loop proxy will be used as the task runner.
+ PlatformNotificationContextImpl* CreatePlatformNotificationContext() {
+ PlatformNotificationContextImpl* context =
+ new PlatformNotificationContextImpl(base::FilePath());
context->SetTaskRunnerForTesting(base::MessageLoopProxy::current());
return context;
@@ -70,7 +69,7 @@ class PlatformNotificationContextTest : public ::testing::Test {
};
TEST_F(PlatformNotificationContextTest, ReadNonExistentNotification) {
- scoped_refptr<PlatformNotificationContext> context =
+ scoped_refptr<PlatformNotificationContextImpl> context =
CreatePlatformNotificationContext();
context->ReadNotificationData(
@@ -86,7 +85,7 @@ TEST_F(PlatformNotificationContextTest, ReadNonExistentNotification) {
}
TEST_F(PlatformNotificationContextTest, WriteReadNotification) {
- scoped_refptr<PlatformNotificationContext> context =
+ scoped_refptr<PlatformNotificationContextImpl> context =
CreatePlatformNotificationContext();
GURL origin("https://example.com");
@@ -121,7 +120,7 @@ TEST_F(PlatformNotificationContextTest, WriteReadNotification) {
}
TEST_F(PlatformNotificationContextTest, DeleteInvalidNotification) {
- scoped_refptr<PlatformNotificationContext> context =
+ scoped_refptr<PlatformNotificationContextImpl> context =
CreatePlatformNotificationContext();
context->DeleteNotificationData(
@@ -139,7 +138,7 @@ TEST_F(PlatformNotificationContextTest, DeleteInvalidNotification) {
}
TEST_F(PlatformNotificationContextTest, DeleteNotification) {
- scoped_refptr<PlatformNotificationContext> context =
+ scoped_refptr<PlatformNotificationContextImpl> context =
CreatePlatformNotificationContext();
GURL origin("https://example.com");
« no previous file with comments | « content/browser/notifications/platform_notification_context_impl.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698