blob: 586dba08bdb6317a2d5668767ba3707cb127834c [file] [log] [blame]
// 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.
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