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/history_backend.h" | 5 #include "chrome/browser/history/history_backend.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 return bitmap_data.get() && | 355 return bitmap_data.get() && |
356 bitmap_data->size() == 1u && | 356 bitmap_data->size() == 1u && |
357 *bitmap_data->front() == expected_data; | 357 *bitmap_data->front() == expected_data; |
358 } | 358 } |
359 | 359 |
360 BookmarkModel bookmark_model_; | 360 BookmarkModel bookmark_model_; |
361 | 361 |
362 protected: | 362 protected: |
363 // testing::Test | 363 // testing::Test |
364 virtual void SetUp() { | 364 virtual void SetUp() { |
365 if (!file_util::CreateNewTempDirectory(FILE_PATH_LITERAL("BackendTest"), | 365 if (!base::CreateNewTempDirectory(FILE_PATH_LITERAL("BackendTest"), |
366 &test_dir_)) | 366 &test_dir_)) |
367 return; | 367 return; |
368 backend_ = new HistoryBackend(test_dir_, | 368 backend_ = new HistoryBackend(test_dir_, |
369 0, | 369 0, |
370 new HistoryBackendTestDelegate(this), | 370 new HistoryBackendTestDelegate(this), |
371 &bookmark_model_); | 371 &bookmark_model_); |
372 backend_->Init(std::string(), false); | 372 backend_->Init(std::string(), false); |
373 } | 373 } |
374 | 374 |
375 bool loaded_; | 375 bool loaded_; |
376 | 376 |
(...skipping 2501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2878 // Delete all DTS index databases. | 2878 // Delete all DTS index databases. |
2879 backend_->DeleteFTSIndexDatabases(); | 2879 backend_->DeleteFTSIndexDatabases(); |
2880 EXPECT_FALSE(base::PathExists(db1)); | 2880 EXPECT_FALSE(base::PathExists(db1)); |
2881 EXPECT_FALSE(base::PathExists(db1_wal)); | 2881 EXPECT_FALSE(base::PathExists(db1_wal)); |
2882 EXPECT_FALSE(base::PathExists(db1_journal)); | 2882 EXPECT_FALSE(base::PathExists(db1_journal)); |
2883 EXPECT_FALSE(base::PathExists(db2_symlink)); | 2883 EXPECT_FALSE(base::PathExists(db2_symlink)); |
2884 EXPECT_TRUE(base::PathExists(db2_actual)); // Symlinks shouldn't be followed. | 2884 EXPECT_TRUE(base::PathExists(db2_actual)); // Symlinks shouldn't be followed. |
2885 } | 2885 } |
2886 | 2886 |
2887 } // namespace history | 2887 } // namespace history |
OLD | NEW |