| 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 <set> | 6 #include <set> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 content::Details<HistoryDetails> det(details); | 399 content::Details<HistoryDetails> det(details); |
| 400 mem_backend_->Observe(type, content::Source<HistoryBackendTest>(NULL), det); | 400 mem_backend_->Observe(type, content::Source<HistoryBackendTest>(NULL), det); |
| 401 | 401 |
| 402 // The backend passes ownership of the details pointer to us. | 402 // The backend passes ownership of the details pointer to us. |
| 403 delete details; | 403 delete details; |
| 404 } | 404 } |
| 405 | 405 |
| 406 // The number of notifications which were broadcasted. | 406 // The number of notifications which were broadcasted. |
| 407 int num_broadcasted_notifications_; | 407 int num_broadcasted_notifications_; |
| 408 | 408 |
| 409 MessageLoop message_loop_; | 409 base::MessageLoop message_loop_; |
| 410 base::FilePath test_dir_; | 410 base::FilePath test_dir_; |
| 411 history::MostVisitedURLList most_visited_list_; | 411 history::MostVisitedURLList most_visited_list_; |
| 412 history::FilteredURLList filtered_list_; | 412 history::FilteredURLList filtered_list_; |
| 413 }; | 413 }; |
| 414 | 414 |
| 415 void HistoryBackendTestDelegate::SetInMemoryBackend(int backend_id, | 415 void HistoryBackendTestDelegate::SetInMemoryBackend(int backend_id, |
| 416 InMemoryHistoryBackend* backend) { | 416 InMemoryHistoryBackend* backend) { |
| 417 test_->SetInMemoryBackend(backend_id, backend); | 417 test_->SetInMemoryBackend(backend_id, backend); |
| 418 } | 418 } |
| 419 | 419 |
| (...skipping 2355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2775 EXPECT_EQ(url2.spec(), data[0]->GetURL().spec()); | 2775 EXPECT_EQ(url2.spec(), data[0]->GetURL().spec()); |
| 2776 EXPECT_EQ(url2_id, data[0]->GetID()); | 2776 EXPECT_EQ(url2_id, data[0]->GetID()); |
| 2777 EXPECT_EQ(segment2_time_delta.InHours(), data[0]->duration().InHours()); | 2777 EXPECT_EQ(segment2_time_delta.InHours(), data[0]->duration().InHours()); |
| 2778 | 2778 |
| 2779 EXPECT_EQ(url1.spec(), data[1]->GetURL().spec()); | 2779 EXPECT_EQ(url1.spec(), data[1]->GetURL().spec()); |
| 2780 EXPECT_EQ(url1_id, data[1]->GetID()); | 2780 EXPECT_EQ(url1_id, data[1]->GetID()); |
| 2781 EXPECT_EQ(segment1_time_delta.InHours(), data[1]->duration().InHours()); | 2781 EXPECT_EQ(segment1_time_delta.InHours(), data[1]->duration().InHours()); |
| 2782 } | 2782 } |
| 2783 | 2783 |
| 2784 } // namespace history | 2784 } // namespace history |
| OLD | NEW |