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 "chrome_frame/test/test_with_web_server.h" | 5 #include "chrome_frame/test/test_with_web_server.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
10 #include "base/files/memory_mapped_file.h" | 10 #include "base/files/memory_mapped_file.h" |
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1011 } | 1011 } |
1012 | 1012 |
1013 virtual size_t ContentLength() const { | 1013 virtual size_t ContentLength() const { |
1014 DCHECK(!is_post_); | 1014 DCHECK(!is_post_); |
1015 return sizeof(kHtml) - 1; | 1015 return sizeof(kHtml) - 1; |
1016 } | 1016 } |
1017 | 1017 |
1018 virtual bool GetCustomHeaders(std::string* headers) const { | 1018 virtual bool GetCustomHeaders(std::string* headers) const { |
1019 if (!is_post_) | 1019 if (!is_post_) |
1020 return false; | 1020 return false; |
1021 *headers = StringPrintf( | 1021 *headers = base::StringPrintf( |
1022 "HTTP/1.1 200 OK\r\n" | 1022 "HTTP/1.1 200 OK\r\n" |
1023 "Content-Disposition: attachment;filename=\"test.txt\"\r\n" | 1023 "Content-Disposition: attachment;filename=\"test.txt\"\r\n" |
1024 "Content-Type: application/text\r\n" | 1024 "Content-Type: application/text\r\n" |
1025 "Connection: close\r\n" | 1025 "Connection: close\r\n" |
1026 "Content-Length: %i\r\n\r\n", sizeof(kText) - 1); | 1026 "Content-Length: %i\r\n\r\n", sizeof(kText) - 1); |
1027 return true; | 1027 return true; |
1028 } | 1028 } |
1029 | 1029 |
1030 virtual bool Matches(const test_server::Request& r) const { | 1030 virtual bool Matches(const test_server::Request& r) const { |
1031 bool match = __super::Matches(r); | 1031 bool match = __super::Matches(r); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 // This test loads a large page and ensures that the full page contents are | 1090 // This test loads a large page and ensures that the full page contents are |
1091 // actually loaded via a self-validating HTML page. This is done due to a bug | 1091 // actually loaded via a self-validating HTML page. This is done due to a bug |
1092 // whereby the middle of the response stream would sometimes be truncated when | 1092 // whereby the middle of the response stream would sometimes be truncated when |
1093 // loading a CF document. See http://crbug.com/178421 for details. | 1093 // loading a CF document. See http://crbug.com/178421 for details. |
1094 TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_LargePageLoad) { | 1094 TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_LargePageLoad) { |
1095 const wchar_t kLargePageLoadPage[] = | 1095 const wchar_t kLargePageLoadPage[] = |
1096 L"chrome_frame_large_page.html"; | 1096 L"chrome_frame_large_page.html"; |
1097 | 1097 |
1098 SimpleBrowserTest(IE, kLargePageLoadPage); | 1098 SimpleBrowserTest(IE, kLargePageLoadPage); |
1099 } | 1099 } |
OLD | NEW |