| 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 <cstdio> | 5 #include <cstdio> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 history_dir_ = temp_dir_.path().AppendASCII("VisitedLinkTest"); | 184 history_dir_ = temp_dir_.path().AppendASCII("VisitedLinkTest"); |
| 185 ASSERT_TRUE(file_util::CreateDirectory(history_dir_)); | 185 ASSERT_TRUE(file_util::CreateDirectory(history_dir_)); |
| 186 | 186 |
| 187 visited_file_ = history_dir_.Append(FILE_PATH_LITERAL("VisitedLinks")); | 187 visited_file_ = history_dir_.Append(FILE_PATH_LITERAL("VisitedLinks")); |
| 188 } | 188 } |
| 189 | 189 |
| 190 virtual void TearDown() { | 190 virtual void TearDown() { |
| 191 ClearDB(); | 191 ClearDB(); |
| 192 } | 192 } |
| 193 | 193 |
| 194 ScopedTempDir temp_dir_; | 194 base::ScopedTempDir temp_dir_; |
| 195 | 195 |
| 196 MessageLoop message_loop_; | 196 MessageLoop message_loop_; |
| 197 content::TestBrowserThread ui_thread_; | 197 content::TestBrowserThread ui_thread_; |
| 198 content::TestBrowserThread file_thread_; | 198 content::TestBrowserThread file_thread_; |
| 199 | 199 |
| 200 // Filenames for the services; | 200 // Filenames for the services; |
| 201 FilePath history_dir_; | 201 FilePath history_dir_; |
| 202 FilePath visited_file_; | 202 FilePath visited_file_; |
| 203 | 203 |
| 204 scoped_ptr<VisitedLinkMaster> master_; | 204 scoped_ptr<VisitedLinkMaster> master_; |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 EXPECT_EQ(1, profile()->add_event_count()); | 719 EXPECT_EQ(1, profile()->add_event_count()); |
| 720 EXPECT_EQ(0, profile()->reset_event_count()); | 720 EXPECT_EQ(0, profile()->reset_event_count()); |
| 721 | 721 |
| 722 // Activate the tab. | 722 // Activate the tab. |
| 723 rvh_tester()->SimulateWasShown(); | 723 rvh_tester()->SimulateWasShown(); |
| 724 | 724 |
| 725 // We should have only one more reset event. | 725 // We should have only one more reset event. |
| 726 EXPECT_EQ(1, profile()->add_event_count()); | 726 EXPECT_EQ(1, profile()->add_event_count()); |
| 727 EXPECT_EQ(1, profile()->reset_event_count()); | 727 EXPECT_EQ(1, profile()->reset_event_count()); |
| 728 } | 728 } |
| OLD | NEW |