blob: a8d812d15074c366678cb1e699af86b226d1bf67 [file] [log] [blame]
Nikita Podguzov77f7c832019-09-16 18:48:091// Copyright 2019 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_EXTENSIONS_POLICY_TEST_UTILS_H_
6#define CHROME_BROWSER_EXTENSIONS_POLICY_TEST_UTILS_H_
7
8#include "extensions/common/extension_id.h"
9
10class GURL;
11class Profile;
12
13namespace net {
14namespace test_server {
15class EmbeddedTestServer;
16} // namespace test_server
17} // namespace net
18
19namespace policy {
20class MockConfigurationPolicyProvider;
21} // namespace policy
22
23namespace extensions {
24
25namespace policy_test_utils {
26
27// Intercepts "update_manifest.xml" files requests.
28void SetUpEmbeddedTestServer(
29 net::test_server::EmbeddedTestServer* embedded_test_server);
30
31// Assigns an |extension_id| and its |update_manifest_url| to the
32// "ExtensionInstallForcelist" user policy.
33// This will cause the extension to get force-installed.
34void SetExtensionInstallForcelistPolicy(
35 const ExtensionId& extension_id,
36 const GURL& update_manifest_url,
37 Profile* profile,
38 policy::MockConfigurationPolicyProvider* policy_provider);
39
40} // namespace policy_test_utils
41
42} // namespace extensions
43
44#endif // CHROME_BROWSER_EXTENSIONS_POLICY_TEST_UTILS_H_