Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 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/extension_apitest.h" | |
| 9 #include "components/policy/core/common/mock_configuration_policy_provider.h" | |
| 10 | |
| 11 struct ManagementPolicyRequestLog { | |
|
Devlin
2017/03/29 21:36:49
Any reason this can't be a nested struct in Extens
nrpeter
2017/03/30 00:06:06
Done.
| |
| 12 std::string all_headers; | |
|
Devlin
2017/03/29 21:36:49
iwyu string
nrpeter
2017/03/30 00:06:06
Done.
| |
| 13 std::string host; | |
| 14 }; | |
| 15 | |
| 16 // The ExtensionSettings policy affects host permissions which impacts several | |
| 17 // API integration tests. This class enables easy declaration of | |
| 18 // ExtensionSettings policies and functions commonly used during these tests. | |
| 19 class ExtensionApiTestWithManagementPolicy : public ExtensionApiTest { | |
| 20 public: | |
| 21 ExtensionApiTestWithManagementPolicy(); | |
| 22 ~ExtensionApiTestWithManagementPolicy() override; | |
| 23 void SetUpInProcessBrowserTestFixture() override; | |
| 24 | |
| 25 protected: | |
| 26 void MonitorRequestHandler(const net::test_server::HttpRequest& request); | |
| 27 bool BrowsedTo(const char* test_host); | |
|
Devlin
2017/03/29 21:36:50
Are these methods needed?
nrpeter
2017/03/30 00:06:06
Since I removed the redundant test they are no lon
Devlin
2017/03/30 00:33:53
It's usually preferable to only add stuff as we ne
nrpeter
2017/03/31 21:43:35
Done.
| |
| 28 void ClearRequestLog(); | |
| 29 policy::MockConfigurationPolicyProvider policy_provider_; | |
| 30 | |
| 31 private: | |
| 32 std::vector<ManagementPolicyRequestLog> request_log_; | |
|
Devlin
2017/03/29 21:36:49
iwyu vector
nrpeter
2017/03/30 00:06:06
Done.
| |
| 33 }; | |
|
Devlin
2017/03/29 21:36:49
DISALLOW_COPY_AND_ASSIGN
nrpeter
2017/03/30 00:06:06
Done.
| |
| 34 | |
| 35 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WITH_MANAGEMENT_POLICY_APITEST_H_ | |
| OLD | NEW |