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 7382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7393 EXPECT_EQ("lookup", parts[0]); | 7393 EXPECT_EQ("lookup", parts[0]); |
7394 EXPECT_EQ(session_id, parts[1]); | 7394 EXPECT_EQ(session_id, parts[1]); |
7395 } | 7395 } |
7396 } | 7396 } |
7397 } | 7397 } |
7398 } | 7398 } |
7399 | 7399 |
7400 // AssertTwoDistinctSessionsInserted checks that |session_info|, which must be | 7400 // AssertTwoDistinctSessionsInserted checks that |session_info|, which must be |
7401 // the result of fetching "ssl-session-cache" from the test server, indicates | 7401 // the result of fetching "ssl-session-cache" from the test server, indicates |
7402 // that exactly two different sessions were inserted, with no lookups etc. | 7402 // that exactly two different sessions were inserted, with no lookups etc. |
7403 static void AssertTwoDistinctSessionsInserted(const string& session_info) { | 7403 static void AssertTwoDistinctSessionsInserted(const std::string& session_info) { |
7404 std::vector<std::string> lines; | 7404 std::vector<std::string> lines; |
7405 base::SplitString(session_info, '\n', &lines); | 7405 base::SplitString(session_info, '\n', &lines); |
7406 ASSERT_EQ(3u, lines.size()) << session_info; | 7406 ASSERT_EQ(3u, lines.size()) << session_info; |
7407 | 7407 |
7408 std::string session_id; | 7408 std::string session_id; |
7409 for (size_t i = 0; i < 2; i++) { | 7409 for (size_t i = 0; i < 2; i++) { |
7410 std::vector<std::string> parts; | 7410 std::vector<std::string> parts; |
7411 base::SplitString(lines[i], '\t', &parts); | 7411 base::SplitString(lines[i], '\t', &parts); |
7412 ASSERT_EQ(2u, parts.size()); | 7412 ASSERT_EQ(2u, parts.size()); |
7413 EXPECT_EQ("insert", parts[0]); | 7413 EXPECT_EQ("insert", parts[0]); |
(...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8815 | 8815 |
8816 EXPECT_FALSE(r->is_pending()); | 8816 EXPECT_FALSE(r->is_pending()); |
8817 EXPECT_EQ(1, d->response_started_count()); | 8817 EXPECT_EQ(1, d->response_started_count()); |
8818 EXPECT_FALSE(d->received_data_before_response()); | 8818 EXPECT_FALSE(d->received_data_before_response()); |
8819 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); | 8819 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); |
8820 } | 8820 } |
8821 } | 8821 } |
8822 #endif // !defined(DISABLE_FTP_SUPPORT) | 8822 #endif // !defined(DISABLE_FTP_SUPPORT) |
8823 | 8823 |
8824 } // namespace net | 8824 } // namespace net |
OLD | NEW |