#include "chrome/browser/sync/test/integration/sessions_helper.h"
#include <stddef.h>
#include <set>
#include <utility>
#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/memory/weak_ptr.h"
#include "base/ranges/algorithm.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/test_timeouts.h"
#include "base/time/time.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/session_sync_service_factory.h"
#include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/singleton_tabs.h"
#include "chrome/browser/ui/tabs/tab_enums.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/sync/service/sync_client.h"
#include "components/sync_sessions/open_tabs_ui_delegate.h"
#include "components/sync_sessions/session_sync_service.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/public/test/test_utils.h"
#include "url/gurl.h"
test;
namespace sessions_helper {
namespace {
bool SessionsSyncBridgeHasTabWithURL(int browser_index, const GURL& url) { … }
}
bool GetLocalSession(int browser_index,
const sync_sessions::SyncedSession** session) { … }
bool OpenTab(int browser_index, const GURL& url) { … }
bool OpenTabAtIndex(int browser_index, int tab_index, const GURL& url) { … }
bool OpenMultipleTabs(int browser_index, const std::vector<GURL>& urls) { … }
bool OpenTabFromSourceIndex(int browser_index,
int index_of_source_tab,
const GURL& url,
WindowOpenDisposition disposition) { … }
void CloseTab(int browser_index, int tab_index) { … }
void MoveTab(int from_browser_index, int to_browser_index, int tab_index) { … }
void NavigateTab(int browser_index, const GURL& url) { … }
void NavigateTabBack(int browser_index) { … }
void NavigateTabForward(int browser_index) { … }
bool ExecJs(int browser_index, int tab_index, const std::string& script) { … }
bool WaitForTabsToLoad(int browser_index, const std::vector<GURL>& urls) { … }
bool WaitForTabToLoad(int browser_index,
const GURL& url,
content::WebContents* web_contents) { … }
bool GetLocalWindows(int browser_index, ScopedWindowMap* local_windows) { … }
bool CheckInitialState(int browser_index) { … }
int GetNumWindows(int browser_index) { … }
int GetNumForeignSessions(int browser_index) { … }
bool GetSessionData(int browser_index, SyncedSessionVector* sessions) { … }
bool CompareSyncedSessions(const sync_sessions::SyncedSession* lhs,
const sync_sessions::SyncedSession* rhs) { … }
void SortSyncedSessions(SyncedSessionVector* sessions) { … }
bool NavigationEquals(const sessions::SerializedNavigationEntry& expected,
const sessions::SerializedNavigationEntry& actual) { … }
bool WindowsMatch(const ScopedWindowMap& win1, const ScopedWindowMap& win2) { … }
void DeleteForeignSession(int browser_index, std::string session_tag) { … }
ForeignSessionsMatchChecker::ForeignSessionsMatchChecker(
int profile_index,
int foreign_profile_index)
: … { … }
bool ForeignSessionsMatchChecker::IsExitConditionSatisfied(std::ostream* os) { … }
}