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

Unified Diff: content/public/test/background_sync_test_util.h

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
« no previous file with comments | « content/content_tests.gypi ('k') | content/public/test/background_sync_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/background_sync_test_util.h
diff --git a/content/public/test/background_sync_test_util.h b/content/public/test/background_sync_test_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..586dba08bdb6317a2d5668767ba3707cb127834c
--- /dev/null
+++ b/content/public/test/background_sync_test_util.h
@@ -0,0 +1,30 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_TEST_BACKGROUND_SYNC_TEST_UTILS_H_
+#define CONTENT_PUBLIC_TEST_BACKGROUND_SYNC_TEST_UTILS_H_
+
+namespace content {
+class WebContents;
+
+// Utility namespace for background sync tests.
+namespace background_sync_test_util {
+
+// Enables or disables notifications coming from the NetworkChangeNotifier.
+// (For preventing flakes in tests)
+void SetIgnoreNetworkChangeNotifier(bool ignore);
+
+// Puts background sync manager into online or offline mode for tests.
+//
+// This eventually (asynchronously) runs on the IO thread. However you can
+// start performing background sync operations without waiting for the IO
+// thread task to complete, since those background sync operations also run
+// on the IO thread.
+void SetOnline(WebContents* web_contents, bool online);
+
+} // namespace background_sync_test_util
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_TEST_BACKGROUND_SYNC_TEST_UTILS_H_
« no previous file with comments | « content/content_tests.gypi ('k') | content/public/test/background_sync_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698