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

Unified Diff: content/browser/background_sync/background_sync_manager_unittest.cc

Issue 1445603003: Extension SW - add test for ServiceWorkerRegistration.sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move background_sync_test_util to content namespace Created 5 years, 1 month 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/background_sync/background_sync_manager_unittest.cc
diff --git a/content/browser/background_sync/background_sync_manager_unittest.cc b/content/browser/background_sync/background_sync_manager_unittest.cc
index 1e3d416a3bc68b9b5df2e7d46b0035fcb095de87..138f205b404d27c2232d52bd085e3fc99f8c3cff 100644
--- a/content/browser/background_sync/background_sync_manager_unittest.cc
+++ b/content/browser/background_sync/background_sync_manager_unittest.cc
@@ -25,6 +25,7 @@
#include "content/browser/service_worker/service_worker_storage.h"
#include "content/browser/storage_partition_impl.h"
#include "content/public/browser/background_sync_controller.h"
+#include "content/public/test/background_sync_test_util.h"
#include "content/public/test/test_browser_context.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "net/base/network_change_notifier.h"
@@ -289,7 +290,7 @@ class BackgroundSyncManagerTest : public testing::Test {
void SetUp() override {
// Don't let the tests be confused by the real-world device connectivity
- BackgroundSyncNetworkObserver::SetIgnoreNetworkChangeNotifierForTests(true);
+ background_sync_test_util::SetIgnoreNetworkChangeNotifier(true);
// TODO(jkarlin): Create a new object with all of the necessary SW calls
// so that we can inject test versions instead of bringing up all of this
@@ -328,8 +329,7 @@ class BackgroundSyncManagerTest : public testing::Test {
void TearDown() override {
// Restore the network observer functionality for subsequent tests
- BackgroundSyncNetworkObserver::SetIgnoreNetworkChangeNotifierForTests(
- false);
+ background_sync_test_util::SetIgnoreNetworkChangeNotifier(false);
}
void RegisterServiceWorkers() {

Powered by Google App Engine
This is Rietveld 408576698