diff options
author | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-14 23:14:35 +0000 |
---|---|---|
committer | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-14 23:14:35 +0000 |
commit | 518fdec3a07a94dc45d6e7e4ad1b529747dc03d3 (patch) | |
tree | fb2b17479a907a8960a8dc865630fe7272d041fc /net/base/ssl_test_util.h | |
parent | 5e997eacfb2234633831d06c91859ee76af44468 (diff) | |
download | chromium_src-518fdec3a07a94dc45d6e7e4ad1b529747dc03d3.zip chromium_src-518fdec3a07a94dc45d6e7e4ad1b529747dc03d3.tar.gz chromium_src-518fdec3a07a94dc45d6e7e4ad1b529747dc03d3.tar.bz2 |
Reverting r9823 (http://codereview.chromium.org/16207) because
1) the Interactive Tests (dbg) buildbot needs the SSL cert installed
2) the same buildbot showed a refcounting problem, e.g.
FATAL:ref_counted.cc(22)] Check failed: in_dtor_. RefCounted object deleted without calling Release()
c:\b\slave\chromium-dbg-builder\build\src\chrome\browser\views\find_bar_win_interactive_uitest.cc(57): error: Value of: NULL != server.get()
Actual: false
Expected: true
[ FAILED ] FindInPageTest.CrashEscHandlers (2109 ms)
3) the Webkit Linux buildbot failed four tests
redirect302-frames.html cross-frame-access-protocol-explicit-domain.html
cross-frame-access-protocol.html origin-header-for-https.html
I'm leaving the tcp_pinger files in for the moment, they shouldn't hurt anything.
Review URL: http://codereview.chromium.org/23028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9827 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/ssl_test_util.h')
-rw-r--r-- | net/base/ssl_test_util.h | 73 |
1 files changed, 12 insertions, 61 deletions
diff --git a/net/base/ssl_test_util.h b/net/base/ssl_test_util.h index dd6d95d..9daa4cc 100644 --- a/net/base/ssl_test_util.h +++ b/net/base/ssl_test_util.h @@ -5,98 +5,49 @@ #ifndef NET_BASE_SSL_TEST_UTIL_H_ #define NET_BASE_SSL_TEST_UTIL_H_ -#include <string> +#include "build/build_config.h" #include "base/file_path.h" -#include "base/process_util.h" -#include "base/ref_counted.h" -#include "build/build_config.h" -// TODO(dkegel): share this between net/base and +// TODO(dkegel): share this between net/base and // chrome/browser without putting it in net.lib -namespace net { - -// This object bounds the lifetime of an external python-based HTTP/HTTPS/FTP -// server that can provide various responses useful for testing. -// A few basic convenience methods are provided, but no -// URL handling methods (those belong at a higher layer, e.g. in -// url_request_unittest.h). - -class TestServerLauncher { +class SSLTestUtil { public: - TestServerLauncher(); - - virtual ~TestServerLauncher(); - - enum Protocol { - ProtoHTTP, ProtoFTP - }; + SSLTestUtil(); - // Start src/net/tools/test_server/test_server.py and - // ask it to serve the given protocol. - // If protocol is HTTP, and cert_path is not empty, serves HTTPS. - // Returns true on success, false if files not found or root cert - // not trusted. - bool Start(Protocol protocol, - const std::string& host_name, int port, - const FilePath& document_root, - const FilePath& cert_path); + ~SSLTestUtil(); - // Stop the server started by Start(). - void Stop(); + FilePath GetRootCertPath(); - // Paths to a good, an expired, and an invalid server certificate - // (use as arguments to Start()). FilePath GetOKCertPath(); - FilePath GetExpiredCertPath(); - // Issuer name of the root cert that should be trusted for the test to work. - static const wchar_t kCertIssuerName[]; + FilePath GetExpiredCertPath(); // Hostname to use for test server static const char kHostName[]; - // Different hostname to use for test server (that still resolves to same IP) - static const char kMismatchedHostName[]; - // Port to use for test server static const int kOKHTTPSPort; // Port to use for bad test server static const int kBadHTTPSPort; - private: - // Wait a while for the server to start, return whether - // we were able to make a connection to it. - bool Wait(const std::string& host_name, int port); - - // Append to PYTHONPATH so Python can find pyftpdlib and tlslite. - void SetPythonPath(); - - // Path to our test root certificate. - FilePath GetRootCertPath(); + // Issuer name of the cert that should be trusted for the test to work. + static const wchar_t kCertIssuerName[]; // Returns false if our test root certificate is not trusted. bool CheckCATrusted(); - FilePath data_dir_; - + private: FilePath cert_dir_; - FilePath python_runtime_; - - base::ProcessHandle process_handle_; - #if defined(OS_LINUX) struct PrivateCERTCertificate; PrivateCERTCertificate *cert_; #endif - DISALLOW_COPY_AND_ASSIGN(TestServerLauncher); + DISALLOW_COPY_AND_ASSIGN(SSLTestUtil); }; -} - -#endif // NET_BASE_SSL_TEST_UTIL_H_ - +#endif // NET_BASE_SSL_TEST_UTIL_H_ |