Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: chrome/browser/extensions/extension_with_management_policy_apitest.h

Issue 2499493004: Communicate ExtensionSettings policy to renderers (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016 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_EXTENSION_WITH_MANAGEMENT_POLICY_APITEST_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WITH_MANAGEMENT_POLICY_APITEST_H_
7
8 #include "chrome/browser/extensions/api/permissions/permissions_api.h"
9 #include "chrome/browser/extensions/extension_apitest.h"
10 #include "chrome/browser/extensions/extension_management_test_util.h"
11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/ui/browser.h"
13 #include "components/policy/core/browser/browser_policy_connector.h"
14 #include "components/policy/core/common/mock_configuration_policy_provider.h"
15 #include "extensions/browser/extension_prefs.h"
16 #include "extensions/common/permissions/permission_set.h"
17 #include "extensions/common/switches.h"
18 #include "net/dns/mock_host_resolver.h"
19 #include "net/test/embedded_test_server/http_request.h"
20
21 namespace extensions {
22
23 namespace {
asargent_no_longer_on_chrome 2016/11/23 01:19:23 no anonymous namespaces in .h files If you want t
nrpeter 2017/01/02 19:57:45 Done.
24 static void AddPattern(URLPatternSet* extent, const std::string& pattern);
25 }
26
27 }
28
29 struct ManagementPolicyRequestLog {
30 std::string all_headers;
31 std::string host;
32 };
33
34 class ExtensionApiTestWithManagementPolicy : public ExtensionApiTest {
asargent_no_longer_on_chrome 2016/11/23 01:19:23 nit: needs brief overview comment about why this c
nrpeter 2017/01/02 19:57:45 Done.
35 public:
36 ExtensionApiTestWithManagementPolicy();
37 ~ExtensionApiTestWithManagementPolicy() override;
38 void SetUpInProcessBrowserTestFixture() override;
39
40 protected:
41 void MonitorRequestHandler(const net::test_server::HttpRequest& request);
42 bool BrowsedTo(const char* test_host);
43 void ClearRequestLog();
44 policy::MockConfigurationPolicyProvider policy_provider_;
45
46 private:
47 std::vector<ManagementPolicyRequestLog> request_log_;
48 };
49
asargent_no_longer_on_chrome 2016/11/23 01:19:23 missing matching brace to close the extensions nam
nrpeter 2017/01/02 19:57:45 Done.
50 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WITH_MANAGEMENT_POLICY_APITEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698