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

Side by Side Diff: chrome/browser/history/android/visit_sql_handler_unittest.cc

Issue 10870029: Remove legacy migration code that coupled history and bookmarks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More android fixes. Created 8 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
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 <vector> 5 #include <vector>
6 6
7 #include "chrome/browser/history/android/visit_sql_handler.h" 7 #include "chrome/browser/history/android/visit_sql_handler.h"
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 ~VisitSQLHandlerTest() { 30 ~VisitSQLHandlerTest() {
31 } 31 }
32 32
33 protected: 33 protected:
34 virtual void SetUp() { 34 virtual void SetUp() {
35 // Get a temporary directory for the test DB files. 35 // Get a temporary directory for the test DB files.
36 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 36 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
37 FilePath history_db_name = temp_dir_.path().AppendASCII( 37 FilePath history_db_name = temp_dir_.path().AppendASCII(
38 chrome::kHistoryFilename); 38 chrome::kHistoryFilename);
39 FilePath bookmark_temp = temp_dir_.path().AppendASCII("bookmark_temp"); 39 ASSERT_EQ(sql::INIT_OK, history_db_.Init(history_db_name));
40 ASSERT_TRUE(file_util::CreateDirectory(bookmark_temp));
41 ASSERT_EQ(sql::INIT_OK, history_db_.Init(history_db_name, bookmark_temp));
42 } 40 }
43 41
44 virtual void TearDown() { 42 virtual void TearDown() {
45 } 43 }
46 44
47 HistoryDatabase history_db_; 45 HistoryDatabase history_db_;
48 ScopedTempDir temp_dir_; 46 ScopedTempDir temp_dir_;
49 UrlsSQLHandler urls_sql_handler_; 47 UrlsSQLHandler urls_sql_handler_;
50 VisitSQLHandler visit_sql_handler_; 48 VisitSQLHandler visit_sql_handler_;
51 49
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 296
299 TableIDRow id; 297 TableIDRow id;
300 id.url_id = url_row.id(); 298 id.url_id = url_row.id();
301 TableIDRows ids; 299 TableIDRows ids;
302 ids.push_back(id); 300 ids.push_back(id);
303 ASSERT_TRUE(urls_sql_handler_.Delete(ids)); 301 ASSERT_TRUE(urls_sql_handler_.Delete(ids));
304 EXPECT_FALSE(history_db_.GetURLRow(row.url_id(), &url_row)); 302 EXPECT_FALSE(history_db_.GetURLRow(row.url_id(), &url_row));
305 } 303 }
306 304
307 } // namespace history 305 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/android/urls_sql_handler_unittest.cc ('k') | chrome/browser/history/expire_history_backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698