| 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 <atlbase.h> | 5 #include <atlbase.h> |
| 6 #include <atlcom.h> | 6 #include <atlcom.h> |
| 7 | 7 |
| 8 #include "base/win/scoped_com_initializer.h" | 8 #include "base/win/scoped_com_initializer.h" |
| 9 #include "chrome/common/automation_messages.h" | 9 #include "chrome/common/automation_messages.h" |
| 10 #include "chrome_frame/test/chrome_frame_test_utils.h" | 10 #include "chrome_frame/test/chrome_frame_test_utils.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 182 |
| 183 // Expect headers | 183 // Expect headers |
| 184 EXPECT_CALL(mock, OnResponseStarted(1, testing::_, | 184 EXPECT_CALL(mock, OnResponseStarted(1, testing::_, |
| 185 testing::StartsWith("HTTP/1.1 404"), | 185 testing::StartsWith("HTTP/1.1 404"), |
| 186 testing::_, testing::_, testing::_, | 186 testing::_, testing::_, testing::_, |
| 187 testing::_, testing::_)) | 187 testing::_, testing::_)) |
| 188 .Times(1) | 188 .Times(1) |
| 189 .WillOnce(QUIT_LOOP_SOON(loop, 2)); | 189 .WillOnce(QUIT_LOOP_SOON(loop, 2)); |
| 190 | 190 |
| 191 EXPECT_CALL(mock, OnResponseEnd(1, testing::Property( | 191 EXPECT_CALL(mock, OnResponseEnd(1, testing::Property( |
| 192 &net::URLRequestStatus::os_error, | 192 &net::URLRequestStatus::error, |
| 193 net::ERR_TUNNEL_CONNECTION_FAILED))) | 193 net::ERR_TUNNEL_CONNECTION_FAILED))) |
| 194 .Times(testing::AtMost(1)); | 194 .Times(testing::AtMost(1)); |
| 195 | 195 |
| 196 request.Start(); | 196 request.Start(); |
| 197 loop.RunFor(kChromeFrameLongNavigationTimeoutInSeconds); | 197 loop.RunFor(kChromeFrameLongNavigationTimeoutInSeconds); |
| 198 request.Release(); | 198 request.Release(); |
| 199 } | 199 } |
| 200 | 200 |
| 201 TEST(UrlmonUrlRequestTest, ZeroLengthResponse) { | 201 TEST(UrlmonUrlRequestTest, ZeroLengthResponse) { |
| 202 MockUrlDelegate mock; | 202 MockUrlDelegate mock; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 EXPECT_CALL(mock, OnReadComplete(1, testing::_)) | 311 EXPECT_CALL(mock, OnReadComplete(1, testing::_)) |
| 312 .Times(0); | 312 .Times(0); |
| 313 | 313 |
| 314 EXPECT_CALL(mock, OnResponseEnd(1, testing::_)) | 314 EXPECT_CALL(mock, OnResponseEnd(1, testing::_)) |
| 315 .Times(0); | 315 .Times(0); |
| 316 | 316 |
| 317 mgr->StartUrlRequest(1, r1); | 317 mgr->StartUrlRequest(1, r1); |
| 318 loop.RunFor(kChromeFrameLongNavigationTimeoutInSeconds); | 318 loop.RunFor(kChromeFrameLongNavigationTimeoutInSeconds); |
| 319 mgr.reset(); | 319 mgr.reset(); |
| 320 } | 320 } |
| OLD | NEW |