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

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

Issue 13392014: Move c/b/webdata/ code to components/webdata/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pure merge 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
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"
11 #include "base/stl_util.h" 11 #include "base/stl_util.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/time.h" 13 #include "base/time.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "chrome/browser/search_engines/template_url.h" 15 #include "chrome/browser/search_engines/template_url.h"
16 #include "chrome/browser/webdata/keyword_table.h" 16 #include "chrome/browser/webdata/keyword_table.h"
17 #include "chrome/browser/webdata/web_database.h" 17 #include "components/webdata/common/web_database.h"
18 #include "sql/statement.h" 18 #include "sql/statement.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
20 20
21 using base::Time; 21 using base::Time;
22 using base::TimeDelta; 22 using base::TimeDelta;
23 23
24 class KeywordTableTest : public testing::Test { 24 class KeywordTableTest : public testing::Test {
25 public: 25 public:
26 KeywordTableTest() {} 26 KeywordTableTest() {}
27 virtual ~KeywordTableTest() {} 27 virtual ~KeywordTableTest() {}
(...skipping 268 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

Powered by Google App Engine
This is Rietveld 408576698