chromium/chrome/browser/search_engines/template_url_service_browsertest.cc

// Copyright 2024 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/test/scoped_feature_list.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "components/search_engines/prepopulated_engines.h"
#include "components/search_engines/search_engines_switches.h"
#include "components/search_engines/template_url.h"
#include "components/search_engines/template_url_service.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"

class TemplateURLServiceBrowserTest : public InProcessBrowserTest {};

// Checks the logic associated with changing countries when reloading the
// keywords data, using Yahoo! as an indicator. Initially, start the profile in
// Germany and set Yahoo! DE as default search engine. Then when we restart the
// profile when forcing the country as France, we expect that the DSE was
// changed to Yahoo! FR via prepopulate_id matching during the re-merge.
IN_PROC_BROWSER_TEST_F(TemplateURLServiceBrowserTest, PRE_LoadKeywordData) {}

// TODO(crbug.com/41493716): Fails in Mac builds.
#if BUILDFLAG(IS_MAC)
#define MAYBE_LoadKeywordData
#else
#define MAYBE_LoadKeywordData
#endif
IN_PROC_BROWSER_TEST_F(TemplateURLServiceBrowserTest, MAYBE_LoadKeywordData) {}