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

Side by Side Diff: chrome/browser/autofill/autofill_browsertest.cc

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger Created 5 years, 6 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
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 <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 239
240 std::string data; 240 std::string data;
241 base::FilePath data_file = 241 base::FilePath data_file =
242 ui_test_utils::GetTestFilePath(base::FilePath().AppendASCII("autofill"), 242 ui_test_utils::GetTestFilePath(base::FilePath().AppendASCII("autofill"),
243 base::FilePath().AppendASCII(filename)); 243 base::FilePath().AppendASCII(filename));
244 CHECK(base::ReadFileToString(data_file, &data)); 244 CHECK(base::ReadFileToString(data_file, &data));
245 std::vector<std::string> lines; 245 std::vector<std::string> lines;
246 base::SplitString(data, '\n', &lines); 246 base::SplitString(data, '\n', &lines);
247 int parsed_profiles = 0; 247 int parsed_profiles = 0;
248 for (size_t i = 0; i < lines.size(); ++i) { 248 for (size_t i = 0; i < lines.size(); ++i) {
249 if (StartsWithASCII(lines[i], "#", false)) 249 if (base::StartsWithASCII(lines[i], "#", false))
250 continue; 250 continue;
251 251
252 std::vector<std::string> fields; 252 std::vector<std::string> fields;
253 base::SplitString(lines[i], '|', &fields); 253 base::SplitString(lines[i], '|', &fields);
254 if (fields.empty()) 254 if (fields.empty())
255 continue; // Blank line. 255 continue; // Blank line.
256 256
257 ++parsed_profiles; 257 ++parsed_profiles;
258 CHECK_EQ(12u, fields.size()); 258 CHECK_EQ(12u, fields.size());
259 259
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 IN_PROC_BROWSER_TEST_F(AutofillTest, 933 IN_PROC_BROWSER_TEST_F(AutofillTest,
934 DISABLED_MergeAggregatedDuplicatedProfiles) { 934 DISABLED_MergeAggregatedDuplicatedProfiles) {
935 int num_of_profiles = 935 int num_of_profiles =
936 AggregateProfilesIntoAutofillPrefs("dataset_duplicated_profiles.txt"); 936 AggregateProfilesIntoAutofillPrefs("dataset_duplicated_profiles.txt");
937 937
938 ASSERT_GT(num_of_profiles, 938 ASSERT_GT(num_of_profiles,
939 static_cast<int>(personal_data_manager()->GetProfiles().size())); 939 static_cast<int>(personal_data_manager()->GetProfiles().size()));
940 } 940 }
941 941
942 } // namespace autofill 942 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/url_index_private_data.cc ('k') | chrome/browser/chromeos/chromeos_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698