OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome_frame/http_negotiate.h" | 12 #include "chrome_frame/http_negotiate.h" |
12 #include "chrome_frame/html_utils.h" | 13 #include "chrome_frame/html_utils.h" |
13 #include "chrome_frame/test/chrome_frame_test_utils.h" | 14 #include "chrome_frame/test/chrome_frame_test_utils.h" |
14 #include "chrome_frame/utils.h" | 15 #include "chrome_frame/utils.h" |
15 #include "gtest/gtest.h" | 16 #include "gtest/gtest.h" |
16 #include "gmock/gmock.h" | 17 #include "gmock/gmock.h" |
17 | 18 |
18 class HttpNegotiateTest : public testing::Test { | 19 class HttpNegotiateTest : public testing::Test { |
19 protected: | 20 protected: |
20 HttpNegotiateTest() { | 21 HttpNegotiateTest() { |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 | 298 |
298 // Check additional headers are preserved. | 299 // Check additional headers are preserved. |
299 EXPECT_THAT(AppendCFUserAgentString(NULL, | 300 EXPECT_THAT(AppendCFUserAgentString(NULL, |
300 L"Authorization: A Zoo That I Ruin\r\n" | 301 L"Authorization: A Zoo That I Ruin\r\n" |
301 L"User-Agent: Get a Nurse;\r\n" | 302 L"User-Agent: Get a Nurse;\r\n" |
302 L"Accept-Language: Cleanup a Cat Egg\r\n"), | 303 L"Accept-Language: Cleanup a Cat Egg\r\n"), |
303 AllOf(ContainsRegex("User-Agent: Get a Nurse; chromeframe.+\r\n"), | 304 AllOf(ContainsRegex("User-Agent: Get a Nurse; chromeframe.+\r\n"), |
304 HasSubstr("Authorization: A Zoo That I Ruin\r\n"), | 305 HasSubstr("Authorization: A Zoo That I Ruin\r\n"), |
305 HasSubstr("Accept-Language: Cleanup a Cat Egg\r\n"))); | 306 HasSubstr("Accept-Language: Cleanup a Cat Egg\r\n"))); |
306 } | 307 } |
OLD | NEW |