chromium/chrome/browser/browsing_data/navigation_entry_remover_browsertest.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/files/file_path.h"
#include "build/build_config.h"
#include "chrome/browser/browsing_data/navigation_entry_remover.h"
#include "chrome/browser/sessions/tab_restore_service_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/sessions/core/tab_restore_service.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/test_navigation_observer.h"
#include "url/gurl.h"

#if BUILDFLAG(ENABLE_SESSION_SERVICE)
#include "chrome/browser/sessions/session_service.h"
#include "chrome/browser/sessions/session_service_factory.h"
#endif  // BUILDFLAG(ENABLE_SESSION_SERVICE)

DeletionInfo;

class NavigationEntryRemoverTest : public InProcessBrowserTest {};

// === Tests for helper functions ===
IN_PROC_BROWSER_TEST_F(NavigationEntryRemoverTest, AddNavigation) {}

IN_PROC_BROWSER_TEST_F(NavigationEntryRemoverTest, AddTab) {}

IN_PROC_BROWSER_TEST_F(NavigationEntryRemoverTest, AddWindow) {}

IN_PROC_BROWSER_TEST_F(NavigationEntryRemoverTest, GoBack) {}

// === The actual tests ===
IN_PROC_BROWSER_TEST_F(NavigationEntryRemoverTest, DeleteIndividual) {}

IN_PROC_BROWSER_TEST_F(NavigationEntryRemoverTest, DeleteAfterNavigation) {}

IN_PROC_BROWSER_TEST_F(NavigationEntryRemoverTest, DeleteAll) {}

IN_PROC_BROWSER_TEST_F(NavigationEntryRemoverTest, DeleteRestricted) {}

IN_PROC_BROWSER_TEST_F(NavigationEntryRemoverTest, DeleteRange) {}

IN_PROC_BROWSER_TEST_F(NavigationEntryRemoverTest, DeleteRangeRestricted) {}

IN_PROC_BROWSER_TEST_F(NavigationEntryRemoverTest, DeleteAllAfterNavigation) {}

IN_PROC_BROWSER_TEST_F(NavigationEntryRemoverTest, TwoTabsDeletion) {}

IN_PROC_BROWSER_TEST_F(NavigationEntryRemoverTest, TwoWindowsDeletion) {}

IN_PROC_BROWSER_TEST_F(NavigationEntryRemoverTest, GoBackAndDelete) {}

IN_PROC_BROWSER_TEST_F(NavigationEntryRemoverTest, RecentTabDeletion) {}

// TODO(crbug.com/40283363): flaky on windows.
#if BUILDFLAG(IS_WIN)
#define MAYBE_RecentTabWindowDeletion
#else
#define MAYBE_RecentTabWindowDeletion
#endif
IN_PROC_BROWSER_TEST_F(NavigationEntryRemoverTest,
                       MAYBE_RecentTabWindowDeletion) {}

// Checks that we do not attempt to delete SessionService data when processing a
// foreign history delete.
// Test for crbug.com/1424800.
IN_PROC_BROWSER_TEST_F(NavigationEntryRemoverTest,
                       ForeignHistoryDeleteDoesNotDeleteSessionServiceData) {}