Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "net/base/address_list.h" | 5 #include "net/base/address_list.h" |
| 6 #include "net/base/client_socket_factory.h" | 6 #include "net/base/client_socket_factory.h" |
| 7 #include "net/base/host_resolver.h" | 7 #include "net/base/host_resolver.h" |
| 8 #include "net/base/io_buffer.h" | 8 #include "net/base/io_buffer.h" |
| 9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
| 10 #include "net/base/ssl_client_socket.h" | 10 #include "net/base/ssl_client_socket.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 47 } | 47 } |
| 48 | 48 |
| 49 protected: | 49 protected: |
| 50 net::ClientSocketFactory* socket_factory_; | 50 net::ClientSocketFactory* socket_factory_; |
| 51 net::TestServerLauncher server_; | 51 net::TestServerLauncher server_; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 //----------------------------------------------------------------------------- | 54 //----------------------------------------------------------------------------- |
| 55 | 55 |
| 56 #if defined(OS_MACOSX) | 56 #if defined(OS_MACOSX) |
| 57 // Status 6/19/09: | |
| 58 // | |
| 59 // If these tests are enabled on OSX, we choke at the point | |
| 60 // SSLHandshake() (Security framework call) is called from | |
| 61 // SSLClientSocketMac::DoHandshake(). Return value is -9812 (cert | |
| 62 // valid but root not trusted), but if you don't have the cert in your | |
| 63 // keychain as documented on | |
| 64 // http://dev.chromium.org/developers/testing, the -9812 becomes a | |
|
wtc
2009/06/19 18:15:25
This seems to imply that after importing the test
| |
| 65 // -9813 (no root cert). | |
| 66 // | |
| 67 // See related handshake failures exhibited by disabled tests in | |
| 68 // net/url_request/url_request_unittest.cc. | |
| 57 #define MAYBE_Connect DISABLED_Connect | 69 #define MAYBE_Connect DISABLED_Connect |
| 58 #define MAYBE_ConnectExpired DISABLED_ConnectExpired | 70 #define MAYBE_ConnectExpired DISABLED_ConnectExpired |
| 59 #define MAYBE_ConnectMismatched DISABLED_ConnectMismatched | 71 #define MAYBE_ConnectMismatched DISABLED_ConnectMismatched |
| 60 #define MAYBE_Read DISABLED_Read | 72 #define MAYBE_Read DISABLED_Read |
| 61 #define MAYBE_Read_SmallChunks DISABLED_Read_SmallChunks | 73 #define MAYBE_Read_SmallChunks DISABLED_Read_SmallChunks |
| 62 #define MAYBE_Read_Interrupted DISABLED_Read_Interrupted | 74 #define MAYBE_Read_Interrupted DISABLED_Read_Interrupted |
| 63 #else | 75 #else |
| 64 #define MAYBE_Connect Connect | 76 #define MAYBE_Connect Connect |
| 65 #define MAYBE_ConnectExpired ConnectExpired | 77 #define MAYBE_ConnectExpired ConnectExpired |
| 66 #define MAYBE_ConnectMismatched ConnectMismatched | 78 #define MAYBE_ConnectMismatched ConnectMismatched |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 349 // Do a partial read and then exit. This test should not crash! | 361 // Do a partial read and then exit. This test should not crash! |
| 350 scoped_refptr<net::IOBuffer> buf = new net::IOBuffer(512); | 362 scoped_refptr<net::IOBuffer> buf = new net::IOBuffer(512); |
| 351 rv = sock->Read(buf, 512, &callback); | 363 rv = sock->Read(buf, 512, &callback); |
| 352 EXPECT_TRUE(rv >= 0 || rv == net::ERR_IO_PENDING); | 364 EXPECT_TRUE(rv >= 0 || rv == net::ERR_IO_PENDING); |
| 353 | 365 |
| 354 if (rv == net::ERR_IO_PENDING) | 366 if (rv == net::ERR_IO_PENDING) |
| 355 rv = callback.WaitForResult(); | 367 rv = callback.WaitForResult(); |
| 356 | 368 |
| 357 EXPECT_NE(rv, 0); | 369 EXPECT_NE(rv, 0); |
| 358 } | 370 } |
| OLD | NEW |