OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shlobj.h> | 9 #include <shlobj.h> |
10 #endif | 10 #endif |
(...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1411 } | 1411 } |
1412 } | 1412 } |
1413 | 1413 |
1414 class TestSSLConfigService : public SSLConfigService { | 1414 class TestSSLConfigService : public SSLConfigService { |
1415 public: | 1415 public: |
1416 TestSSLConfigService(bool ev_enabled, bool online_rev_checking) | 1416 TestSSLConfigService(bool ev_enabled, bool online_rev_checking) |
1417 : ev_enabled_(ev_enabled), | 1417 : ev_enabled_(ev_enabled), |
1418 online_rev_checking_(online_rev_checking) { | 1418 online_rev_checking_(online_rev_checking) { |
1419 } | 1419 } |
1420 | 1420 |
1421 virtual void GetSSLConfig(SSLConfig* config) { | 1421 // SSLConfigService: |
| 1422 virtual void GetSSLConfig(SSLConfig* config) OVERRIDE { |
1422 *config = SSLConfig(); | 1423 *config = SSLConfig(); |
1423 config->rev_checking_enabled = online_rev_checking_; | 1424 config->rev_checking_enabled = online_rev_checking_; |
1424 config->verify_ev_cert = ev_enabled_; | 1425 config->verify_ev_cert = ev_enabled_; |
1425 } | 1426 } |
1426 | 1427 |
| 1428 protected: |
| 1429 virtual ~TestSSLConfigService() {} |
| 1430 |
1427 private: | 1431 private: |
1428 const bool ev_enabled_; | 1432 const bool ev_enabled_; |
1429 const bool online_rev_checking_; | 1433 const bool online_rev_checking_; |
1430 }; | 1434 }; |
1431 | 1435 |
1432 // This the fingerprint of the "Testing CA" certificate used by the testserver. | 1436 // This the fingerprint of the "Testing CA" certificate used by the testserver. |
1433 // See net/data/ssl/certificates/ocsp-test-root.pem. | 1437 // See net/data/ssl/certificates/ocsp-test-root.pem. |
1434 static const SHA1Fingerprint kOCSPTestCertFingerprint = | 1438 static const SHA1Fingerprint kOCSPTestCertFingerprint = |
1435 { { 0xf1, 0xad, 0xf6, 0xce, 0x42, 0xac, 0xe7, 0xb4, 0xf4, 0x24, | 1439 { { 0xf1, 0xad, 0xf6, 0xce, 0x42, 0xac, 0xe7, 0xb4, 0xf4, 0x24, |
1436 0xdb, 0x1a, 0xf7, 0xa0, 0x9f, 0x09, 0xa1, 0xea, 0xf1, 0x5c } }; | 1440 0xdb, 0x1a, 0xf7, 0xa0, 0x9f, 0x09, 0xa1, 0xea, 0xf1, 0x5c } }; |
(...skipping 3143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4580 req.SetExtraRequestHeaders(headers); | 4584 req.SetExtraRequestHeaders(headers); |
4581 req.Start(); | 4585 req.Start(); |
4582 MessageLoop::current()->Run(); | 4586 MessageLoop::current()->Run(); |
4583 // If the net tests are being run with ChromeFrame then we need to allow for | 4587 // If the net tests are being run with ChromeFrame then we need to allow for |
4584 // the 'chromeframe' suffix which is added to the user agent before the | 4588 // the 'chromeframe' suffix which is added to the user agent before the |
4585 // closing parentheses. | 4589 // closing parentheses. |
4586 EXPECT_TRUE(StartsWithASCII(d.data_received(), "Lynx (textmode", true)); | 4590 EXPECT_TRUE(StartsWithASCII(d.data_received(), "Lynx (textmode", true)); |
4587 } | 4591 } |
4588 | 4592 |
4589 } // namespace net | 4593 } // namespace net |
OLD | NEW |