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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/test/test_file_util.h" | 8 #include "base/test/test_file_util.h" |
9 #include "base/win/scoped_comptr.h" | 9 #include "base/win/scoped_comptr.h" |
10 #include "base/win/windows_version.h" | 10 #include "base/win/windows_version.h" |
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 public: | 874 public: |
875 HttpHeaderTest() {} | 875 HttpHeaderTest() {} |
876 | 876 |
877 void HeaderTestWithData(const char* content_type, const char* data) { | 877 void HeaderTestWithData(const char* content_type, const char* data) { |
878 const wchar_t* relative_url = L"/header_test"; | 878 const wchar_t* relative_url = L"/header_test"; |
879 const char* kHeaderFormat = | 879 const char* kHeaderFormat = |
880 "HTTP/1.1 200 OK\r\n" | 880 "HTTP/1.1 200 OK\r\n" |
881 "Connection: close\r\n" | 881 "Connection: close\r\n" |
882 "Content-Type: %s\r\n" | 882 "Content-Type: %s\r\n" |
883 "X-UA-Compatible: chrome=1\r\n"; | 883 "X-UA-Compatible: chrome=1\r\n"; |
884 std::string header = StringPrintf(kHeaderFormat, content_type); | 884 std::string header = base::StringPrintf(kHeaderFormat, content_type); |
885 std::wstring url = server_mock_.Resolve(relative_url); | 885 std::wstring url = server_mock_.Resolve(relative_url); |
886 EXPECT_CALL(server_mock_, Get(_, StrEq(relative_url), _)) | 886 EXPECT_CALL(server_mock_, Get(_, StrEq(relative_url), _)) |
887 .WillRepeatedly(SendFast(header, data)); | 887 .WillRepeatedly(SendFast(header, data)); |
888 | 888 |
889 InSequence expect_in_sequence_for_scope; | 889 InSequence expect_in_sequence_for_scope; |
890 | 890 |
891 ie_mock_.ExpectNavigation(IN_CF, url); | 891 ie_mock_.ExpectNavigation(IN_CF, url); |
892 EXPECT_CALL(ie_mock_, OnLoad(IN_CF, StrEq(url))) | 892 EXPECT_CALL(ie_mock_, OnLoad(IN_CF, StrEq(url))) |
893 .WillOnce(CloseBrowserMock(&ie_mock_)); | 893 .WillOnce(CloseBrowserMock(&ie_mock_)); |
894 | 894 |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 .WillOnce(CloseBrowserMock( | 1282 .WillOnce(CloseBrowserMock( |
1283 &no_referrer_target_opener_window_mock)); | 1283 &no_referrer_target_opener_window_mock)); |
1284 | 1284 |
1285 EXPECT_CALL(no_referrer_target_opener_window_mock, OnQuit()) | 1285 EXPECT_CALL(no_referrer_target_opener_window_mock, OnQuit()) |
1286 .WillOnce(CloseBrowserMock(&ie_mock_)); | 1286 .WillOnce(CloseBrowserMock(&ie_mock_)); |
1287 | 1287 |
1288 LaunchIENavigateAndLoop(initial_url, kChromeFrameVeryLongNavigationTimeout); | 1288 LaunchIENavigateAndLoop(initial_url, kChromeFrameVeryLongNavigationTimeout); |
1289 } | 1289 } |
1290 | 1290 |
1291 } // namespace chrome_frame_test | 1291 } // namespace chrome_frame_test |
OLD | NEW |