#include "chrome/browser/sessions/session_service_test_helper.h"
#include "base/task/sequenced_task_runner.h"
#include "chrome/browser/sessions/session_service.h"
#include "chrome/browser/sessions/session_service_factory.h"
#include "components/sessions/core/command_storage_backend.h"
#include "components/sessions/core/command_storage_manager_test_helper.h"
#include "components/sessions/core/serialized_navigation_entry_test_helper.h"
#include "components/sessions/core/session_id.h"
#include "components/sessions/core/session_types.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
Time;
SessionServiceTestHelper::SessionServiceTestHelper()
: … { … }
SessionServiceTestHelper::SessionServiceTestHelper(Profile* profile)
: … { … }
SessionServiceTestHelper::SessionServiceTestHelper(SessionService* service)
: … { … }
SessionServiceTestHelper::~SessionServiceTestHelper() { … }
void SessionServiceTestHelper::SaveNow() { … }
void SessionServiceTestHelper::PrepareTabInWindow(SessionID window_id,
SessionID tab_id,
int visual_index,
bool select) { … }
void SessionServiceTestHelper::SetTabExtensionAppID(
SessionID window_id,
SessionID tab_id,
const std::string& extension_app_id) { … }
void SessionServiceTestHelper::SetTabUserAgentOverride(
SessionID window_id,
SessionID tab_id,
const sessions::SerializedUserAgentOverride& user_agent_override) { … }
void SessionServiceTestHelper::SetForceBrowserNotAliveWithNoWindows(
bool force_browser_not_alive_with_no_windows) { … }
void SessionServiceTestHelper::ReadWindows(
std::vector<std::unique_ptr<sessions::SessionWindow>>* windows,
SessionID* active_window_id) { … }
void SessionServiceTestHelper::AssertTabEquals(
SessionID window_id,
SessionID tab_id,
int visual_index,
int nav_index,
size_t nav_count,
const sessions::SessionTab& session_tab) { … }
void SessionServiceTestHelper::AssertTabEquals(
int visual_index,
int nav_index,
size_t nav_count,
const sessions::SessionTab& session_tab) { … }
void SessionServiceTestHelper::AssertNavigationEquals(
const sessions::SerializedNavigationEntry& expected,
const sessions::SerializedNavigationEntry& actual) { … }
void SessionServiceTestHelper::AssertSingleWindowWithSingleTab(
const std::vector<std::unique_ptr<sessions::SessionWindow>>& windows,
size_t nav_count) { … }
void SessionServiceTestHelper::SetService(SessionService* service) { … }
void SessionServiceTestHelper::RunTaskOnBackendThread(
const base::Location& from_here,
base::OnceClosure task) { … }
scoped_refptr<base::SequencedTaskRunner>
SessionServiceTestHelper::GetBackendTaskRunner() { … }
void SessionServiceTestHelper::SetAvailableRange(
SessionID tab_id,
const std::pair<int, int>& range) { … }
bool SessionServiceTestHelper::GetAvailableRange(SessionID tab_id,
std::pair<int, int>* range) { … }
void SessionServiceTestHelper::SetHasOpenTrackableBrowsers(
bool has_open_trackable_browsers) { … }
bool SessionServiceTestHelper::GetHasOpenTrackableBrowsers() { … }
void SessionServiceTestHelper::SetIsOnlyOneTabLeft(bool is_only_one_tab_left) { … }
bool SessionServiceTestHelper::HasPendingReset() { … }
bool SessionServiceTestHelper::HasPendingSave() { … }
void SessionServiceTestHelper::SetSavingEnabled(bool enabled) { … }
bool SessionServiceTestHelper::did_save_commands_at_least_once() const { … }
sessions::CommandStorageManager*
SessionServiceTestHelper::command_storage_manager() { … }