| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/scoped_bstr_win.h" | 8 #include "base/scoped_bstr_win.h" |
| 9 #include "base/scoped_comptr_win.h" | 9 #include "base/scoped_comptr_win.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 } | 179 } |
| 180 | 180 |
| 181 protected: | 181 protected: |
| 182 ULONG status_; | 182 ULONG status_; |
| 183 std::wstring status_text_; | 183 std::wstring status_text_; |
| 184 ScopedComPtr<IWebBrowser2> browser_; | 184 ScopedComPtr<IWebBrowser2> browser_; |
| 185 }; | 185 }; |
| 186 | 186 |
| 187 TEST_F(HttpNegotiateTest, ReportProgress) { | 187 TEST_F(HttpNegotiateTest, ReportProgress) { |
| 188 if (chrome_frame_test::GetInstalledIEVersion() == IE_6) { | 188 if (chrome_frame_test::GetInstalledIEVersion() == IE_6) { |
| 189 DLOG(INFO) << "Not running test for IE6"; | 189 DVLOG(1) << "Not running test for IE6"; |
| 190 return; | 190 return; |
| 191 } | 191 } |
| 192 static const int kReportProgressIndex = 4; | 192 static const int kReportProgressIndex = 4; |
| 193 CComObjectStackEx<TestInternetProtocolSink> test_sink; | 193 CComObjectStackEx<TestInternetProtocolSink> test_sink; |
| 194 IInternetProtocolSink_ReportProgress_Fn original = | 194 IInternetProtocolSink_ReportProgress_Fn original = |
| 195 reinterpret_cast<IInternetProtocolSink_ReportProgress_Fn>( | 195 reinterpret_cast<IInternetProtocolSink_ReportProgress_Fn>( |
| 196 (*reinterpret_cast<void***>( | 196 (*reinterpret_cast<void***>( |
| 197 static_cast<IInternetProtocolSink*>( | 197 static_cast<IInternetProtocolSink*>( |
| 198 &test_sink)))[kReportProgressIndex]); | 198 &test_sink)))[kReportProgressIndex]); |
| 199 | 199 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 298 |
| 299 // Check additional headers are preserved. | 299 // Check additional headers are preserved. |
| 300 EXPECT_THAT(AppendCFUserAgentString(NULL, | 300 EXPECT_THAT(AppendCFUserAgentString(NULL, |
| 301 L"Authorization: A Zoo That I Ruin\r\n" | 301 L"Authorization: A Zoo That I Ruin\r\n" |
| 302 L"User-Agent: Get a Nurse;\r\n" | 302 L"User-Agent: Get a Nurse;\r\n" |
| 303 L"Accept-Language: Cleanup a Cat Egg\r\n"), | 303 L"Accept-Language: Cleanup a Cat Egg\r\n"), |
| 304 AllOf(ContainsRegex("User-Agent: Get a Nurse; chromeframe.+\r\n"), | 304 AllOf(ContainsRegex("User-Agent: Get a Nurse; chromeframe.+\r\n"), |
| 305 HasSubstr("Authorization: A Zoo That I Ruin\r\n"), | 305 HasSubstr("Authorization: A Zoo That I Ruin\r\n"), |
| 306 HasSubstr("Accept-Language: Cleanup a Cat Egg\r\n"))); | 306 HasSubstr("Accept-Language: Cleanup a Cat Egg\r\n"))); |
| 307 } | 307 } |
| OLD | NEW |