summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authordkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 23:42:36 +0000
committerdkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 23:42:36 +0000
commitc8816c164145d55d46635aface02072461d4824f (patch)
tree554fbf9f5ee4d91f443b15f15ccd0ca1a307ca68 /chrome/browser
parent27866a0b950ded8afb87120628af72dfd0b3582d (diff)
downloadchromium_src-c8816c164145d55d46635aface02072461d4824f.zip
chromium_src-c8816c164145d55d46635aface02072461d4824f.tar.gz
chromium_src-c8816c164145d55d46635aface02072461d4824f.tar.bz2
Undo revert http://codereview.chromium.org/23028
Changes since original http://codereview.chromium.org/16207 : - use Release rather than delete on reference counted objects - Preserve bool WaitToFinish(int milliseconds) and std::wstring GetDataDirectory() at Tommi's request, and add unit test for WaitToFinish(). Review URL: http://codereview.chromium.org/20444 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9992 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/net/url_fetcher_unittest.cc11
-rw-r--r--chrome/browser/ssl/ssl_uitest.cc14
2 files changed, 5 insertions, 20 deletions
diff --git a/chrome/browser/net/url_fetcher_unittest.cc b/chrome/browser/net/url_fetcher_unittest.cc
index 6a6e3ff..6ac3614 100644
--- a/chrome/browser/net/url_fetcher_unittest.cc
+++ b/chrome/browser/net/url_fetcher_unittest.cc
@@ -105,10 +105,6 @@ class URLFetcherBadHTTPSTest : public URLFetcherTest {
const ResponseCookies& cookies,
const std::string& data);
- protected:
- FilePath GetExpiredCertPath();
- SSLTestUtil util_;
-
private:
FilePath cert_dir_;
};
@@ -300,10 +296,6 @@ void URLFetcherBadHTTPSTest::OnURLFetchComplete(
io_loop_.Quit();
}
-FilePath URLFetcherBadHTTPSTest::GetExpiredCertPath() {
- return cert_dir_.AppendASCII("expired_cert.pem");
-}
-
void URLFetcherCancelTest::CreateFetcher(const GURL& url) {
fetcher_ = new URLFetcher(url, URLFetcher::GET, this);
fetcher_->set_request_context(
@@ -436,8 +428,7 @@ TEST_F(URLFetcherBadHTTPSTest, BadHTTPSTest) {
TEST_F(URLFetcherBadHTTPSTest, DISABLED_BadHTTPSTest) {
#endif
scoped_refptr<HTTPSTestServer> server =
- HTTPSTestServer::CreateServer(util_.kHostName, util_.kBadHTTPSPort,
- kDocRoot, util_.GetExpiredCertPath().ToWStringHack());
+ HTTPSTestServer::CreateExpiredServer(kDocRoot);
ASSERT_TRUE(NULL != server.get());
CreateFetcher(GURL(server->TestServerPage("defaultresponse")));
diff --git a/chrome/browser/ssl/ssl_uitest.cc b/chrome/browser/ssl/ssl_uitest.cc
index f31d8f2..47f4753 100644
--- a/chrome/browser/ssl/ssl_uitest.cc
+++ b/chrome/browser/ssl/ssl_uitest.cc
@@ -23,7 +23,6 @@ class SSLUITest : public UITest {
protected:
SSLUITest() {
dom_automation_enabled_ = true;
- EXPECT_TRUE(util_.CheckCATrusted());
}
TabProxy* GetActiveTabProxy() {
@@ -47,18 +46,14 @@ class SSLUITest : public UITest {
}
HTTPSTestServer* GoodCertServer() {
- return HTTPSTestServer::CreateServer(util_.kHostName, util_.kOKHTTPSPort,
- kDocRoot, util_.GetOKCertPath().ToWStringHack());
+ return HTTPSTestServer::CreateGoodServer(kDocRoot);
}
HTTPSTestServer* BadCertServer() {
- return HTTPSTestServer::CreateServer(util_.kHostName, util_.kBadHTTPSPort,
- kDocRoot, util_.GetExpiredCertPath().ToWStringHack());
+ return HTTPSTestServer::CreateExpiredServer(kDocRoot);
}
protected:
- SSLTestUtil util_;
-
DISALLOW_COPY_AND_ASSIGN(SSLUITest);
};
@@ -424,8 +419,7 @@ TEST_F(SSLUITest, TestCachedMixedContents) {
TEST_F(SSLUITest, DISABLED_TestCNInvalidStickiness) {
const std::string kLocalHost = "localhost";
scoped_refptr<HTTPSTestServer> https_server =
- HTTPSTestServer::CreateServer(kLocalHost, util_.kOKHTTPSPort,
- kDocRoot, util_.GetOKCertPath().ToWStringHack());
+ HTTPSTestServer::CreateMismatchedServer(kDocRoot);
ASSERT_TRUE(NULL != https_server.get());
// First we hit the server with hostname, this generates an invalid policy
@@ -462,7 +456,7 @@ TEST_F(SSLUITest, DISABLED_TestCNInvalidStickiness) {
ASSERT_TRUE(hostname_index != std::string::npos); // Test sanity check.
std::string new_url;
new_url.append(url.spec().substr(0, hostname_index));
- new_url.append(util_.kHostName);
+ new_url.append(net::TestServerLauncher::kHostName);
new_url.append(url.spec().substr(hostname_index + kLocalHost.size()));
NavigateTab(tab.get(), GURL(new_url));