OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <shlobj.h> | 8 #include <shlobj.h> |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif | 10 #endif |
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 EXPECT_EQ(1, d.response_started_count()); | 904 EXPECT_EQ(1, d.response_started_count()); |
905 EXPECT_FALSE(d.received_data_before_response()); | 905 EXPECT_FALSE(d.received_data_before_response()); |
906 VLOG(1) << " Received " << d.bytes_received() << " bytes" | 906 VLOG(1) << " Received " << d.bytes_received() << " bytes" |
907 << " status = " << r.status().status() | 907 << " status = " << r.status().status() |
908 << " error = " << r.status().error(); | 908 << " error = " << r.status().error(); |
909 if (test_expect_success[i]) { | 909 if (test_expect_success[i]) { |
910 EXPECT_EQ(URLRequestStatus::SUCCESS, r.status().status()) | 910 EXPECT_EQ(URLRequestStatus::SUCCESS, r.status().status()) |
911 << " Parameter = \"" << test_file << "\""; | 911 << " Parameter = \"" << test_file << "\""; |
912 } else { | 912 } else { |
913 EXPECT_EQ(URLRequestStatus::FAILED, r.status().status()); | 913 EXPECT_EQ(URLRequestStatus::FAILED, r.status().status()); |
914 EXPECT_EQ(-100, r.status().error()) | 914 EXPECT_EQ(ERR_CONTENT_LENGTH_MISMATCH, r.status().error()) |
915 << " Parameter = \"" << test_file << "\""; | 915 << " Parameter = \"" << test_file << "\""; |
916 } | 916 } |
917 } | 917 } |
918 } | 918 } |
919 } | 919 } |
920 | 920 |
921 TEST_F(URLRequestTestHTTP, HTTPSToHTTPRedirectNoRefererTest) { | 921 TEST_F(URLRequestTestHTTP, HTTPSToHTTPRedirectNoRefererTest) { |
922 ASSERT_TRUE(test_server_.Start()); | 922 ASSERT_TRUE(test_server_.Start()); |
923 | 923 |
924 TestServer https_test_server( | 924 TestServer https_test_server( |
(...skipping 2697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3622 req.SetExtraRequestHeaders(headers); | 3622 req.SetExtraRequestHeaders(headers); |
3623 req.Start(); | 3623 req.Start(); |
3624 MessageLoop::current()->Run(); | 3624 MessageLoop::current()->Run(); |
3625 // If the net tests are being run with ChromeFrame then we need to allow for | 3625 // If the net tests are being run with ChromeFrame then we need to allow for |
3626 // the 'chromeframe' suffix which is added to the user agent before the | 3626 // the 'chromeframe' suffix which is added to the user agent before the |
3627 // closing parentheses. | 3627 // closing parentheses. |
3628 EXPECT_TRUE(StartsWithASCII(d.data_received(), "Lynx (textmode", true)); | 3628 EXPECT_TRUE(StartsWithASCII(d.data_received(), "Lynx (textmode", true)); |
3629 } | 3629 } |
3630 | 3630 |
3631 } // namespace net | 3631 } // namespace net |
OLD | NEW |