#include <algorithm>
#include <memory>
#include <string_view>
#include <utility>
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/webui/theme_source.h"
#include "chrome/browser/ui/webui/welcome/helpers.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/url_constants.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/enterprise/browser/controller/fake_browser_dm_token_storage.h"
#include "components/history_clusters/core/features.h"
#include "components/nacl/common/buildflags.h"
#include "components/optimization_guide/core/optimization_guide_features.h"
#include "components/password_manager/core/common/password_manager_features.h"
#include "components/search/ntp_features.h"
#include "components/search_engines/search_engines_switches.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/url_data_source.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "media/base/media_switches.h"
#include "printing/buildflags/buildflags.h"
#include "third_party/abseil-cpp/absl/strings/ascii.h"
#include "ui/base/ui_base_features.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ash/constants/ash_features.h"
#include "ash/constants/ash_switches.h"
#include "chrome/browser/ash/file_system_provider/fake_extension_provider.h"
#include "chrome/browser/ash/file_system_provider/service.h"
#include "chrome/browser/ash/login/login_pref_names.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chromeos/constants/chromeos_features.h"
#include "components/prefs/pref_service.h"
#else
#include "components/signin/public/base/signin_switches.h"
#endif
#if !BUILDFLAG(IS_CHROMEOS)
#include "chrome/browser/ui/webui/whats_new/whats_new_util.h"
#endif
namespace {
class NavigationObserver : public content::WebContentsObserver { … };
}
class ChromeURLDataManagerTest : public InProcessBrowserTest { … };
#if BUILDFLAG(IS_MAC)
#define MAYBE_200 …
#else
#define MAYBE_200 …
#endif
IN_PROC_BROWSER_TEST_F(ChromeURLDataManagerTest, MAYBE_200) { … }
IN_PROC_BROWSER_TEST_F(ChromeURLDataManagerTest, UnknownResource) { … }
IN_PROC_BROWSER_TEST_F(ChromeURLDataManagerTest, LargeResourceScale) { … }
#if BUILDFLAG(IS_CHROMEOS_ASH)
class PrefService;
#endif
class ChromeURLDataManagerWebUITrustedTypesTest
: public InProcessBrowserTest,
public testing::WithParamInterface<const char*> { … };
IN_PROC_BROWSER_TEST_P(ChromeURLDataManagerWebUITrustedTypesTest,
NoTrustedTypesViolation) { … }
IN_PROC_BROWSER_TEST_P(ChromeURLDataManagerWebUITrustedTypesTest,
TrustedTypesEnabled) { … }
static constexpr const char* const kChromeUrls[] = …;
INSTANTIATE_TEST_SUITE_P(…);