| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2013 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_POLICY_TEST_LOCAL_POLICY_TEST_SERVER_H_ |
| 6 #define CHROME_BROWSER_POLICY_TEST_LOCAL_POLICY_TEST_SERVER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" |
| 12 #include "base/file_path.h" |
| 13 #include "googleurl/src/gurl.h" |
| 14 #include "net/test/local_test_server.h" |
| 15 |
| 16 namespace policy { |
| 17 |
| 18 // Runs a python implementation of the cloud policy server on the local machine. |
| 19 class LocalPolicyTestServer : public net::LocalTestServer { |
| 20 public: |
| 21 // Initializes a test server configured by the configuration file |
| 22 // |config_file|. |
| 23 explicit LocalPolicyTestServer(const base::FilePath& config_file); |
| 24 |
| 25 // Initializes the test server with the configuration read from |
| 26 // chrome/test/data/policy/policy_|test_name|.json. |
| 27 explicit LocalPolicyTestServer(const std::string& test_name); |
| 28 |
| 29 virtual ~LocalPolicyTestServer(); |
| 30 |
| 31 // Gets the service URL. |
| 32 GURL GetServiceURL() const; |
| 33 |
| 34 // net::LocalTestServer: |
| 35 virtual bool SetPythonPath() const OVERRIDE; |
| 36 virtual bool GetTestServerPath( |
| 37 base::FilePath* testserver_path) const OVERRIDE; |
| 38 virtual bool GenerateAdditionalArguments( |
| 39 base::DictionaryValue* arguments) const OVERRIDE; |
| 40 |
| 41 private: |
| 42 base::FilePath config_file_; |
| 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(LocalPolicyTestServer); |
| 45 }; |
| 46 |
| 47 } // namespace |
| 48 |
| 49 #endif // CHROME_BROWSER_POLICY_TEST_LOCAL_POLICY_TEST_SERVER_H_ |
| OLD | NEW |