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

Side by Side Diff: chrome/browser/webdata/web_database_unittest.cc

Issue 3056029: Move the number conversions from string_util to a new file.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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/browser/views/bookmark_bar_view_test.cc ('k') | chrome/browser/wrench_menu_model.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <list> 5 #include <list>
6 #include <map> 6 #include <map>
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/file_util.h" 12 #include "base/file_util.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "base/stl_util-inl.h" 14 #include "base/stl_util-inl.h"
15 #include "base/string_util.h" 15 #include "base/string_number_conversions.h"
16 #include "base/string16.h" 16 #include "base/string16.h"
17 #include "base/time.h" 17 #include "base/time.h"
18 #include "base/values.h" 18 #include "base/values.h"
19 #include "chrome/browser/autofill/autofill_profile.h" 19 #include "chrome/browser/autofill/autofill_profile.h"
20 #include "chrome/browser/autofill/autofill_type.h" 20 #include "chrome/browser/autofill/autofill_type.h"
21 #include "chrome/browser/autofill/credit_card.h" 21 #include "chrome/browser/autofill/credit_card.h"
22 #include "chrome/browser/search_engines/template_url.h" 22 #include "chrome/browser/search_engines/template_url.h"
23 #include "chrome/browser/password_manager/encryptor.h" 23 #include "chrome/browser/password_manager/encryptor.h"
24 #include "chrome/browser/webdata/autofill_change.h" 24 #include "chrome/browser/webdata/autofill_change.h"
25 #include "chrome/browser/webdata/autofill_entry.h" 25 #include "chrome/browser/webdata/autofill_entry.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 typedef std::set<AutofillEntry, 93 typedef std::set<AutofillEntry,
94 bool (*)(const AutofillEntry&, const AutofillEntry&)> AutofillEntrySet; 94 bool (*)(const AutofillEntry&, const AutofillEntry&)> AutofillEntrySet;
95 typedef std::set<AutofillEntry, bool (*)(const AutofillEntry&, 95 typedef std::set<AutofillEntry, bool (*)(const AutofillEntry&,
96 const AutofillEntry&)>::iterator AutofillEntrySetIterator; 96 const AutofillEntry&)>::iterator AutofillEntrySetIterator;
97 virtual void SetUp() { 97 virtual void SetUp() {
98 #if defined(OS_MACOSX) 98 #if defined(OS_MACOSX)
99 Encryptor::UseMockKeychain(true); 99 Encryptor::UseMockKeychain(true);
100 #endif 100 #endif
101 PathService::Get(chrome::DIR_TEST_DATA, &file_); 101 PathService::Get(chrome::DIR_TEST_DATA, &file_);
102 const std::string test_db = "TestWebDatabase" + 102 const std::string test_db = "TestWebDatabase" +
103 Int64ToString(base::Time::Now().ToInternalValue()) + 103 base::Int64ToString(base::Time::Now().ToInternalValue()) +
104 ".db"; 104 ".db";
105 file_ = file_.AppendASCII(test_db); 105 file_ = file_.AppendASCII(test_db);
106 file_util::Delete(file_, false); 106 file_util::Delete(file_, false);
107 } 107 }
108 108
109 virtual void TearDown() { 109 virtual void TearDown() {
110 file_util::Delete(file_, false); 110 file_util::Delete(file_, false);
111 } 111 }
112 112
113 static int GetKeyCount(const DictionaryValue& d) { 113 static int GetKeyCount(const DictionaryValue& d) {
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 1382
1383 // make sure the lists of entries match 1383 // make sure the lists of entries match
1384 ASSERT_EQ(expected_entries.size(), entry_set.size()); 1384 ASSERT_EQ(expected_entries.size(), entry_set.size());
1385 AutofillEntrySetIterator it; 1385 AutofillEntrySetIterator it;
1386 for (it = entry_set.begin(); it != entry_set.end(); it++) { 1386 for (it = entry_set.begin(); it != entry_set.end(); it++) {
1387 expected_entries.erase(*it); 1387 expected_entries.erase(*it);
1388 } 1388 }
1389 1389
1390 EXPECT_EQ(0U, expected_entries.size()); 1390 EXPECT_EQ(0U, expected_entries.size());
1391 } 1391 }
OLDNEW
« no previous file with comments | « chrome/browser/views/bookmark_bar_view_test.cc ('k') | chrome/browser/wrench_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698