Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: chrome_frame/test/test_with_web_server.cc

Issue 19052005: Move PathIsWritable, DirectoryExists, ContentsEqual, and TextContentsEqual to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome_frame/simple_resource_loader.cc ('k') | cloud_print/virtual_driver/win/install/setup.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 if (query_index != std::string::npos) { 393 if (query_index != std::string::npos) {
394 path = path.erase(query_index); 394 path = path.erase(query_index);
395 } 395 }
396 base::FilePath file_path = root_dir_; 396 base::FilePath file_path = root_dir_;
397 if (path.size()) 397 if (path.size())
398 file_path = file_path.Append(path.substr(1)); // remove first '/' 398 file_path = file_path.Append(path.substr(1)); // remove first '/'
399 399
400 std::string headers, body; 400 std::string headers, body;
401 std::string content_type; 401 std::string content_type;
402 if (base::PathExists(file_path) && 402 if (base::PathExists(file_path) &&
403 !file_util::DirectoryExists(file_path)) { 403 !base::DirectoryExists(file_path)) {
404 base::FilePath mock_http_headers(file_path.value() + L".mock-http-headers"); 404 base::FilePath mock_http_headers(file_path.value() + L".mock-http-headers");
405 if (base::PathExists(mock_http_headers)) { 405 if (base::PathExists(mock_http_headers)) {
406 headers = GetMockHttpHeaders(mock_http_headers); 406 headers = GetMockHttpHeaders(mock_http_headers);
407 content_type = http_utils::GetHttpHeaderFromHeaderList("Content-type", 407 content_type = http_utils::GetHttpHeaderFromHeaderList("Content-type",
408 headers); 408 headers);
409 } else { 409 } else {
410 EXPECT_TRUE(net::GetMimeTypeFromFile(file_path, &content_type)); 410 EXPECT_TRUE(net::GetMimeTypeFromFile(file_path, &content_type));
411 VLOG(1) << "Going to send file (" << WideToUTF8(file_path.value()) 411 VLOG(1) << "Going to send file (" << WideToUTF8(file_path.value())
412 << ") with content type (" << content_type << ")"; 412 << ") with content type (" << content_type << ")";
413 headers = CreateHttpHeaders(invocation, add_no_cache_header, 413 headers = CreateHttpHeaders(invocation, add_no_cache_header,
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « chrome_frame/simple_resource_loader.cc ('k') | cloud_print/virtual_driver/win/install/setup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698