#include <map>
#include <optional>
#include <string>
#include "base/command_line.h"
#include "base/synchronization/lock.h"
#include "base/test/bind.h"
#include "base/values.h"
#include "chrome/browser/policy/safe_search_policy_test.h"
#include "chrome/browser/ui/browser.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/google/core/common/google_switches.h"
#include "components/network_session_configurator/common/network_switches.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/policy_constants.h"
#include "components/safe_search_api/safe_search_util.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "net/http/http_request_headers.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/embedded_test_server/http_request.h"
#include "url/gurl.h"
namespace policy {
void CheckYouTubeRestricted(int youtube_restrict_mode,
const net::HttpRequestHeaders& headers) { … }
void CheckAllowedDomainsHeader(const std::string& allowed_domain,
const net::HttpRequestHeaders& headers) { … }
class PolicyTestGoogle : public SafeSearchPolicyTest,
public testing::WithParamInterface<bool> { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(PolicyTestGoogle, ForceGoogleSafeSearch) { … }
IN_PROC_BROWSER_TEST_P(PolicyTestGoogle, ForceYouTubeRestrict) { … }
IN_PROC_BROWSER_TEST_P(PolicyTestGoogle, AllowedDomainsForApps) { … }
}