| OLD | NEW |
| 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 "chrome/browser/history/android/android_urls_database.h" | 5 #include "chrome/browser/history/android/android_urls_database.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.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 "chrome/browser/history/history_database.h" | 11 #include "chrome/browser/history/history_database.h" |
| 12 #include "chrome/browser/history/history_unittest_base.h" | 12 #include "chrome/browser/history/history_unittest_base.h" |
| 13 #include "chrome/common/chrome_constants.h" | 13 #include "chrome/common/chrome_constants.h" |
| 14 #include "chrome/common/chrome_paths.h" | 14 #include "chrome/common/chrome_paths.h" |
| 15 #include "chrome/test/base/testing_profile.h" | 15 #include "chrome/test/base/testing_profile.h" |
| 16 | 16 |
| 17 namespace history { | 17 namespace history { |
| 18 | 18 |
| 19 class AndroidURLsMigrationTest : public HistoryUnitTestBase { | 19 class AndroidURLsMigrationTest : public HistoryUnitTestBase { |
| 20 public: | 20 public: |
| 21 AndroidURLsMigrationTest() { | 21 AndroidURLsMigrationTest() { |
| 22 } | 22 } |
| 23 ~AndroidURLsMigrationTest() { | 23 virtual ~AndroidURLsMigrationTest() {} |
| 24 } | |
| 25 | 24 |
| 26 protected: | 25 protected: |
| 27 virtual void SetUp() { | 26 virtual void SetUp() { |
| 28 profile_.reset(new TestingProfile); | 27 profile_.reset(new TestingProfile); |
| 29 | 28 |
| 30 base::FilePath data_path; | 29 base::FilePath data_path; |
| 31 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path)); | 30 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path)); |
| 32 data_path = data_path.AppendASCII("History"); | 31 data_path = data_path.AppendASCII("History"); |
| 33 | 32 |
| 34 history_db_name_ = profile_->GetPath().Append(chrome::kHistoryFilename); | 33 history_db_name_ = profile_->GetPath().Append(chrome::kHistoryFilename); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 60 | 59 |
| 61 ASSERT_TRUE(statement.Step()); | 60 ASSERT_TRUE(statement.Step()); |
| 62 EXPECT_EQ(4, statement.ColumnInt64(0)); | 61 EXPECT_EQ(4, statement.ColumnInt64(0)); |
| 63 EXPECT_EQ("www.google.com/", statement.ColumnString(2)); | 62 EXPECT_EQ("www.google.com/", statement.ColumnString(2)); |
| 64 EXPECT_EQ(3, statement.ColumnInt64(1)); | 63 EXPECT_EQ(3, statement.ColumnInt64(1)); |
| 65 | 64 |
| 66 EXPECT_FALSE(statement.Step()); | 65 EXPECT_FALSE(statement.Step()); |
| 67 } | 66 } |
| 68 | 67 |
| 69 } // namespace history | 68 } // namespace history |
| OLD | NEW |