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

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

Issue 19579005: Move ReadFileToString to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/utility/importer/ie_importer_win.cc ('k') | chrome_frame/test/navigation_test.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 <windows.h> 5 #include <windows.h>
6 #include <atlsecurity.h> 6 #include <atlsecurity.h>
7 #include <shellapi.h> 7 #include <shellapi.h>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 return false; 60 return false;
61 } 61 }
62 62
63 base::FilePath path; 63 base::FilePath path;
64 if (!GetTestPath(test_case, &path)) { 64 if (!GetTestPath(test_case, &path)) {
65 NOTREACHED(); 65 NOTREACHED();
66 return false; 66 return false;
67 } 67 }
68 68
69 std::string raw_data; 69 std::string raw_data;
70 file_util::ReadFileToString(path, &raw_data); 70 base::ReadFileToString(path, &raw_data);
71 71
72 // Convert to wide using the "best effort" assurance described in 72 // Convert to wide using the "best effort" assurance described in
73 // string_util.h 73 // string_util.h
74 data->assign(UTF8ToWide(raw_data)); 74 data->assign(UTF8ToWide(raw_data));
75 return true; 75 return true;
76 } 76 }
77 }; 77 };
78 78
79 TEST_F(HtmlUtilUnittest, BasicTest) { 79 TEST_F(HtmlUtilUnittest, BasicTest) {
80 std::wstring test_data; 80 std::wstring test_data;
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 "Content-Length: 42\r\n" 494 "Content-Length: 42\r\n"
495 "X-Frame-Options: SAMEORIGIN\r\n")); 495 "X-Frame-Options: SAMEORIGIN\r\n"));
496 EXPECT_TRUE(http_utils::HasFrameBustingHeader( 496 EXPECT_TRUE(http_utils::HasFrameBustingHeader(
497 "X-Frame-Options: deny\r\n" 497 "X-Frame-Options: deny\r\n"
498 "X-Frame-Options: ALLOWall\r\n" 498 "X-Frame-Options: ALLOWall\r\n"
499 "Content-Length: 42\r\n")); 499 "Content-Length: 42\r\n"));
500 EXPECT_TRUE(http_utils::HasFrameBustingHeader( 500 EXPECT_TRUE(http_utils::HasFrameBustingHeader(
501 "X-Frame-Options: SAMEORIGIN\r\n" 501 "X-Frame-Options: SAMEORIGIN\r\n"
502 "X-Frame-Options: ALLOWall\r\n")); 502 "X-Frame-Options: ALLOWall\r\n"));
503 } 503 }
OLDNEW
« no previous file with comments | « chrome/utility/importer/ie_importer_win.cc ('k') | chrome_frame/test/navigation_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698