#include "base/strings/stringprintf.h"
#include "base/test/simple_test_clock.h"
#include "base/time/time.h"
#include "content/browser/background_sync/background_sync_base_browsertest.h"
#include "content/browser/background_sync/background_sync_manager.h"
#include "content/public/common/content_features.h"
#include "content/public/test/background_sync_test_util.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
namespace {
constexpr base::TimeDelta kMinGapBetweenPeriodicSyncEvents = …;
}
namespace content {
class PeriodicBackgroundSyncBrowserTest : public BackgroundSyncBaseBrowserTest { … };
void PeriodicBackgroundSyncBrowserTest::Register(const std::string& tag,
int min_interval_ms) { … }
EvalJsResult PeriodicBackgroundSyncBrowserTest::RegisterFromCrossOriginFrame(
const std::string& frame_url) { … }
void PeriodicBackgroundSyncBrowserTest::RegisterNoMinInterval(
const std::string& tag) { … }
void PeriodicBackgroundSyncBrowserTest::RegisterFromServiceWorker(
const std::string& tag,
int min_interval_ms) { … }
void PeriodicBackgroundSyncBrowserTest::RegisterFromServiceWorkerNoMinInterval(
const std::string& tag) { … }
bool PeriodicBackgroundSyncBrowserTest::HasTag(const std::string& tag) { … }
bool PeriodicBackgroundSyncBrowserTest::HasTagFromServiceWorker(
const std::string& tag) { … }
void PeriodicBackgroundSyncBrowserTest::Unregister(const std::string& tag) { … }
void PeriodicBackgroundSyncBrowserTest::UnregisterFromServiceWorker(
const std::string& tag) { … }
int PeriodicBackgroundSyncBrowserTest::GetNumPeriodicSyncEvents() { … }
IN_PROC_BROWSER_TEST_F(PeriodicBackgroundSyncBrowserTest,
RegisterFromControlledDocument) { … }
IN_PROC_BROWSER_TEST_F(PeriodicBackgroundSyncBrowserTest,
RegisterNoMinInterval) { … }
IN_PROC_BROWSER_TEST_F(PeriodicBackgroundSyncBrowserTest,
RegisterFromIFrameWithTopLevelFrameForOrigin) { … }
IN_PROC_BROWSER_TEST_F(PeriodicBackgroundSyncBrowserTest,
RegisterFromIFrameWithoutTopLevelFrameForOrigin) { … }
IN_PROC_BROWSER_TEST_F(PeriodicBackgroundSyncBrowserTest,
RegisterFromServiceWorker) { … }
IN_PROC_BROWSER_TEST_F(PeriodicBackgroundSyncBrowserTest,
RegisterFromServiceWorkerNoMinInterval) { … }
IN_PROC_BROWSER_TEST_F(PeriodicBackgroundSyncBrowserTest, FindATag) { … }
IN_PROC_BROWSER_TEST_F(PeriodicBackgroundSyncBrowserTest,
FindATagFromServiceWorker) { … }
IN_PROC_BROWSER_TEST_F(PeriodicBackgroundSyncBrowserTest,
UnregisterFromServiceWorker) { … }
IN_PROC_BROWSER_TEST_F(PeriodicBackgroundSyncBrowserTest,
FirePeriodicSyncOnConnectivity) { … }
IN_PROC_BROWSER_TEST_F(PeriodicBackgroundSyncBrowserTest, MultipleEventsFired) { … }
IN_PROC_BROWSER_TEST_F(PeriodicBackgroundSyncBrowserTest,
MultipleMinIntervalsAndTags) { … }
IN_PROC_BROWSER_TEST_F(PeriodicBackgroundSyncBrowserTest, WaitUntil) { … }
}