| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // The test must be in the history namespace for the gtest forward declarations | 49 // The test must be in the history namespace for the gtest forward declarations |
| 50 // to work. It also eliminates a bunch of ugly "history::". | 50 // to work. It also eliminates a bunch of ugly "history::". |
| 51 namespace history { | 51 namespace history { |
| 52 | 52 |
| 53 // ExpireHistoryTest ----------------------------------------------------------- | 53 // ExpireHistoryTest ----------------------------------------------------------- |
| 54 | 54 |
| 55 class ExpireHistoryTest : public testing::Test, | 55 class ExpireHistoryTest : public testing::Test, |
| 56 public BroadcastNotificationDelegate { | 56 public BroadcastNotificationDelegate { |
| 57 public: | 57 public: |
| 58 ExpireHistoryTest() | 58 ExpireHistoryTest() |
| 59 : bookmark_model_(NULL), | 59 : bookmark_model_(NULL, false), |
| 60 ui_thread_(BrowserThread::UI, &message_loop_), | 60 ui_thread_(BrowserThread::UI, &message_loop_), |
| 61 db_thread_(BrowserThread::DB, &message_loop_), | 61 db_thread_(BrowserThread::DB, &message_loop_), |
| 62 expirer_(this, &bookmark_model_), | 62 expirer_(this, &bookmark_model_), |
| 63 now_(Time::Now()) { | 63 now_(Time::Now()) { |
| 64 } | 64 } |
| 65 | 65 |
| 66 protected: | 66 protected: |
| 67 // Called by individual tests when they want data populated. | 67 // Called by individual tests when they want data populated. |
| 68 void AddExampleData(URLID url_ids[3], Time visit_times[4]); | 68 void AddExampleData(URLID url_ids[3], Time visit_times[4]); |
| 69 // Add visits with source information. | 69 // Add visits with source information. |
| (...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 main_db_->GetVisitsForURL(url_id, &archived_visits); | 925 main_db_->GetVisitsForURL(url_id, &archived_visits); |
| 926 EXPECT_EQ(0U, archived_visits.size()); | 926 EXPECT_EQ(0U, archived_visits.size()); |
| 927 } | 927 } |
| 928 | 928 |
| 929 // TODO(brettw) add some visits with no URL to make sure everything is updated | 929 // TODO(brettw) add some visits with no URL to make sure everything is updated |
| 930 // properly. Have the visits also refer to nonexistent FTS rows. | 930 // properly. Have the visits also refer to nonexistent FTS rows. |
| 931 // | 931 // |
| 932 // Maybe also refer to invalid favicons. | 932 // Maybe also refer to invalid favicons. |
| 933 | 933 |
| 934 } // namespace history | 934 } // namespace history |
| OLD | NEW |