#include "content/browser/background_sync/background_sync_base_browsertest.h"
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/strings/string_split.h"
#include "base/task/single_thread_task_runner.h"
#include "content/browser/background_sync/background_sync_manager.h"
#include "content/browser/background_sync/background_sync_network_observer.h"
#include "content/browser/service_worker/service_worker_context_wrapper.h"
#include "content/browser/storage_partition_impl.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.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"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/test_utils.h"
#include "content/shell/browser/shell.h"
#include "net/base/network_change_notifier.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
class OneShotBackgroundSyncBrowserTest : public BackgroundSyncBaseBrowserTest { … };
void OneShotBackgroundSyncBrowserTest::Register(const std::string& tag) { … }
void OneShotBackgroundSyncBrowserTest::RegisterFromServiceWorker(
const std::string& tag) { … }
EvalJsResult OneShotBackgroundSyncBrowserTest::RegisterFromCrossOriginFrame(
const std::string& frame_url) { … }
void OneShotBackgroundSyncBrowserTest::WaitForTagRemoval(const std::string& tag,
int64_t pauses_ms) { … }
bool OneShotBackgroundSyncBrowserTest::HasTag(const std::string& tag) { … }
bool OneShotBackgroundSyncBrowserTest::HasTagFromServiceWorker(
const std::string& tag) { … }
bool OneShotBackgroundSyncBrowserTest::MatchTags(
const std::string& script_result,
const std::vector<std::string>& expected_tags) { … }
bool OneShotBackgroundSyncBrowserTest::GetTags(
const std::vector<std::string>& expected_tags) { … }
bool OneShotBackgroundSyncBrowserTest::GetTagsFromServiceWorker(
const std::vector<std::string>& expected_tags) { … }
void OneShotBackgroundSyncBrowserTest::RejectDelayedSyncEvent() { … }
IN_PROC_BROWSER_TEST_F(OneShotBackgroundSyncBrowserTest,
RegisterFromControlledDocument) { … }
IN_PROC_BROWSER_TEST_F(OneShotBackgroundSyncBrowserTest,
RegisterFromUncontrolledDocument) { … }
IN_PROC_BROWSER_TEST_F(OneShotBackgroundSyncBrowserTest,
RegisterFromServiceWorker) { … }
IN_PROC_BROWSER_TEST_F(OneShotBackgroundSyncBrowserTest,
RegistrationDelaysForNetwork) { … }
IN_PROC_BROWSER_TEST_F(OneShotBackgroundSyncBrowserTest, WaitUntil) { … }
IN_PROC_BROWSER_TEST_F(OneShotBackgroundSyncBrowserTest, WaitUntilReject) { … }
IN_PROC_BROWSER_TEST_F(OneShotBackgroundSyncBrowserTest, Incognito) { … }
IN_PROC_BROWSER_TEST_F(OneShotBackgroundSyncBrowserTest, GetTags) { … }
IN_PROC_BROWSER_TEST_F(OneShotBackgroundSyncBrowserTest,
GetRegistrationsFromServiceWorker) { … }
IN_PROC_BROWSER_TEST_F(OneShotBackgroundSyncBrowserTest,
HasTagFromServiceWorker) { … }
IN_PROC_BROWSER_TEST_F(OneShotBackgroundSyncBrowserTest,
SyncRegistrationDeletedWhenClearingSiteData) { … }
IN_PROC_BROWSER_TEST_F(OneShotBackgroundSyncBrowserTest,
SyncRegistrationFromSWDeletedWhenClearingSiteData) { … }
IN_PROC_BROWSER_TEST_F(OneShotBackgroundSyncBrowserTest,
SyncRegistrationsDeletedWhenClearingSiteData) { … }
IN_PROC_BROWSER_TEST_F(OneShotBackgroundSyncBrowserTest,
FiringSyncEventDeletedWhenClearingSiteData) { … }
IN_PROC_BROWSER_TEST_F(OneShotBackgroundSyncBrowserTest,
RegisterFromIFrameWithMainFrameHost) { … }
IN_PROC_BROWSER_TEST_F(OneShotBackgroundSyncBrowserTest,
RegisterFromIFrameWithoutMainFrameHost) { … }
IN_PROC_BROWSER_TEST_F(OneShotBackgroundSyncBrowserTest,
RegisterFromServiceWorkerWithoutMainFrameHost) { … }
}