#include "chrome/browser/ui/webui/history/foreign_session_handler.h"
#include "base/callback_list.h"
#include "base/memory/raw_ptr.h"
#include "chrome/browser/sync/session_sync_service_factory.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "components/sessions/core/session_id.h"
#include "components/sync_sessions/session_sync_service.h"
#include "content/public/test/test_web_ui.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace browser_sync {
class MockOpenTabsUIDelegate : public sync_sessions::OpenTabsUIDelegate { … };
class FakeSessionSyncService : public sync_sessions::SessionSyncService { … };
class ForeignSessionHandlerTest : public ChromeRenderViewHostTestHarness { … };
TEST_F(ForeignSessionHandlerTest,
ShouldFireForeignSessionsChangedWhileJavascriptAllowed) { … }
TEST_F(ForeignSessionHandlerTest,
ShouldNotFireForeignSessionsChangedBeforeJavascriptAllowed) { … }
TEST_F(ForeignSessionHandlerTest,
ShouldNotFireForeignSessionsChangedAfterJavascriptDisallowed) { … }
TEST_F(ForeignSessionHandlerTest, HandleOpenForeignSessionAllTabs) { … }
TEST_F(ForeignSessionHandlerTest, HandleOpenForeignSessionTab) { … }
}