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

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

Issue 13191007: Pass app_locale directly to AutofillTable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Chrome frame tests fix Created 7 years, 8 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/webdata/keyword_table.cc ('k') | chrome/browser/webdata/logins_table.h » ('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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 16 matching lines...) Expand all
27 virtual ~KeywordTableTest() {} 27 virtual ~KeywordTableTest() {}
28 28
29 protected: 29 protected:
30 virtual void SetUp() { 30 virtual void SetUp() {
31 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 31 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
32 file_ = temp_dir_.path().AppendASCII("TestWebDatabase"); 32 file_ = temp_dir_.path().AppendASCII("TestWebDatabase");
33 33
34 table_.reset(new KeywordTable); 34 table_.reset(new KeywordTable);
35 db_.reset(new WebDatabase); 35 db_.reset(new WebDatabase);
36 db_->AddTable(table_.get()); 36 db_->AddTable(table_.get());
37 ASSERT_EQ(sql::INIT_OK, db_->Init(file_, std::string())); 37 ASSERT_EQ(sql::INIT_OK, db_->Init(file_));
38 } 38 }
39 39
40 base::FilePath file_; 40 base::FilePath file_;
41 base::ScopedTempDir temp_dir_; 41 base::ScopedTempDir temp_dir_;
42 scoped_ptr<KeywordTable> table_; 42 scoped_ptr<KeywordTable> table_;
43 scoped_ptr<WebDatabase> db_; 43 scoped_ptr<WebDatabase> db_;
44 44
45 private: 45 private:
46 DISALLOW_COPY_AND_ASSIGN(KeywordTableTest); 46 DISALLOW_COPY_AND_ASSIGN(KeywordTableTest);
47 }; 47 };
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 sql::Statement s(table_->db_->GetUniqueStatement( 296 sql::Statement s(table_->db_->GetUniqueStatement(
297 "UPDATE keywords SET url=? WHERE id=?")); 297 "UPDATE keywords SET url=? WHERE id=?"));
298 s.BindString16(0, string16()); 298 s.BindString16(0, string16());
299 s.BindInt64(1, 2000); 299 s.BindInt64(1, 2000);
300 EXPECT_TRUE(s.Run()); 300 EXPECT_TRUE(s.Run());
301 301
302 // GetKeywords() should erase the entry with the empty URL field. 302 // GetKeywords() should erase the entry with the empty URL field.
303 EXPECT_TRUE(table_->GetKeywords(&keywords)); 303 EXPECT_TRUE(table_->GetKeywords(&keywords));
304 EXPECT_EQ(1U, keywords.size()); 304 EXPECT_EQ(1U, keywords.size());
305 } 305 }
OLDNEW
« no previous file with comments | « chrome/browser/webdata/keyword_table.cc ('k') | chrome/browser/webdata/logins_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698