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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 content::Details<HistoryDetails> det(details); | 397 content::Details<HistoryDetails> det(details); |
398 mem_backend_->Observe(type, content::Source<HistoryBackendTest>(NULL), det); | 398 mem_backend_->Observe(type, content::Source<HistoryBackendTest>(NULL), det); |
399 | 399 |
400 // The backend passes ownership of the details pointer to us. | 400 // The backend passes ownership of the details pointer to us. |
401 delete details; | 401 delete details; |
402 } | 402 } |
403 | 403 |
404 // The number of notifications which were broadcasted. | 404 // The number of notifications which were broadcasted. |
405 int num_broadcasted_notifications_; | 405 int num_broadcasted_notifications_; |
406 | 406 |
407 MessageLoop message_loop_; | 407 base::MessageLoop message_loop_; |
408 base::FilePath test_dir_; | 408 base::FilePath test_dir_; |
409 history::MostVisitedURLList most_visited_list_; | 409 history::MostVisitedURLList most_visited_list_; |
410 history::FilteredURLList filtered_list_; | 410 history::FilteredURLList filtered_list_; |
411 }; | 411 }; |
412 | 412 |
413 void HistoryBackendTestDelegate::SetInMemoryBackend(int backend_id, | 413 void HistoryBackendTestDelegate::SetInMemoryBackend(int backend_id, |
414 InMemoryHistoryBackend* backend) { | 414 InMemoryHistoryBackend* backend) { |
415 test_->SetInMemoryBackend(backend_id, backend); | 415 test_->SetInMemoryBackend(backend_id, backend); |
416 } | 416 } |
417 | 417 |
(...skipping 2325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2743 EXPECT_EQ(url2.spec(), data[0]->GetURL().spec()); | 2743 EXPECT_EQ(url2.spec(), data[0]->GetURL().spec()); |
2744 EXPECT_EQ(url2_id, data[0]->GetID()); | 2744 EXPECT_EQ(url2_id, data[0]->GetID()); |
2745 EXPECT_EQ(segment2_time_delta.InHours(), data[0]->duration().InHours()); | 2745 EXPECT_EQ(segment2_time_delta.InHours(), data[0]->duration().InHours()); |
2746 | 2746 |
2747 EXPECT_EQ(url1.spec(), data[1]->GetURL().spec()); | 2747 EXPECT_EQ(url1.spec(), data[1]->GetURL().spec()); |
2748 EXPECT_EQ(url1_id, data[1]->GetID()); | 2748 EXPECT_EQ(url1_id, data[1]->GetID()); |
2749 EXPECT_EQ(segment1_time_delta.InHours(), data[1]->duration().InHours()); | 2749 EXPECT_EQ(segment1_time_delta.InHours(), data[1]->duration().InHours()); |
2750 } | 2750 } |
2751 | 2751 |
2752 } // namespace history | 2752 } // namespace history |
OLD | NEW |