Chromium Code Reviews| 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..c25047a9f201573c2d6bec54c6629c31d7337b2e |
| --- /dev/null |
| +++ b/content/public/test/background_sync_test_util.h |
| @@ -0,0 +1,29 @@ |
| +// 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; |
| +} // namespace content |
|
Avi (use Gerrit)
2015/11/18 18:57:26
Why is this whole file not in namespace content?
lazyboy
2015/11/18 19:35:44
Moved under content namespace.
Done.
|
| + |
| +// 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(content::WebContents* web_contents, bool online); |
| + |
| +} // namespace background_sync_test_util |
| + |
| +#endif // CONTENT_PUBLIC_TEST_BACKGROUND_SYNC_TEST_UTILS_H_ |