| 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 // History unit tests come in two flavors: | 5 // History unit tests come in two flavors: |
| 6 // | 6 // |
| 7 // 1. The more complicated style is that the unit test creates a full history | 7 // 1. The more complicated style is that the unit test creates a full history |
| 8 // service. This spawns a background thread for the history backend, and | 8 // service. This spawns a background thread for the history backend, and |
| 9 // all communication is asynchronous. This is useful for testing more | 9 // all communication is asynchronous. This is useful for testing more |
| 10 // complicated things or end-to-end behavior. | 10 // complicated things or end-to-end behavior. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 #include "chrome/tools/profiles/thumbnail-inl.h" | 55 #include "chrome/tools/profiles/thumbnail-inl.h" |
| 56 #include "components/history/core/browser/in_memory_database.h" | 56 #include "components/history/core/browser/in_memory_database.h" |
| 57 #include "components/history/core/browser/page_usage_data.h" | 57 #include "components/history/core/browser/page_usage_data.h" |
| 58 #include "components/history/core/common/thumbnail_score.h" | 58 #include "components/history/core/common/thumbnail_score.h" |
| 59 #include "content/public/browser/download_item.h" | 59 #include "content/public/browser/download_item.h" |
| 60 #include "content/public/browser/notification_details.h" | 60 #include "content/public/browser/notification_details.h" |
| 61 #include "content/public/browser/notification_source.h" | 61 #include "content/public/browser/notification_source.h" |
| 62 #include "sql/connection.h" | 62 #include "sql/connection.h" |
| 63 #include "sql/statement.h" | 63 #include "sql/statement.h" |
| 64 #include "sync/api/attachments/attachment_id.h" | 64 #include "sync/api/attachments/attachment_id.h" |
| 65 #include "sync/api/attachments/attachment_service_proxy_for_test.h" | |
| 66 #include "sync/api/fake_sync_change_processor.h" | 65 #include "sync/api/fake_sync_change_processor.h" |
| 67 #include "sync/api/sync_change.h" | 66 #include "sync/api/sync_change.h" |
| 68 #include "sync/api/sync_change_processor.h" | 67 #include "sync/api/sync_change_processor.h" |
| 69 #include "sync/api/sync_change_processor_wrapper_for_test.h" | 68 #include "sync/api/sync_change_processor_wrapper_for_test.h" |
| 70 #include "sync/api/sync_error.h" | 69 #include "sync/api/sync_error.h" |
| 71 #include "sync/api/sync_error_factory.h" | 70 #include "sync/api/sync_error_factory.h" |
| 72 #include "sync/api/sync_merge_result.h" | 71 #include "sync/api/sync_merge_result.h" |
| 72 #include "sync/internal_api/public/attachments/attachment_service_proxy_for_test
.h" |
| 73 #include "sync/protocol/history_delete_directive_specifics.pb.h" | 73 #include "sync/protocol/history_delete_directive_specifics.pb.h" |
| 74 #include "sync/protocol/sync.pb.h" | 74 #include "sync/protocol/sync.pb.h" |
| 75 #include "testing/gtest/include/gtest/gtest.h" | 75 #include "testing/gtest/include/gtest/gtest.h" |
| 76 #include "third_party/skia/include/core/SkBitmap.h" | 76 #include "third_party/skia/include/core/SkBitmap.h" |
| 77 #include "ui/gfx/codec/jpeg_codec.h" | 77 #include "ui/gfx/codec/jpeg_codec.h" |
| 78 | 78 |
| 79 using base::Time; | 79 using base::Time; |
| 80 using base::TimeDelta; | 80 using base::TimeDelta; |
| 81 using content::DownloadItem; | 81 using content::DownloadItem; |
| 82 | 82 |
| (...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1865 std::vector<PageUsageData*> results; | 1865 std::vector<PageUsageData*> results; |
| 1866 db_->QuerySegmentUsage(segment_time, 10, &results); | 1866 db_->QuerySegmentUsage(segment_time, 10, &results); |
| 1867 ASSERT_EQ(1u, results.size()); | 1867 ASSERT_EQ(1u, results.size()); |
| 1868 EXPECT_EQ(url, results[0]->GetURL()); | 1868 EXPECT_EQ(url, results[0]->GetURL()); |
| 1869 EXPECT_EQ(segment_id, results[0]->GetID()); | 1869 EXPECT_EQ(segment_id, results[0]->GetID()); |
| 1870 EXPECT_EQ(title, results[0]->GetTitle()); | 1870 EXPECT_EQ(title, results[0]->GetTitle()); |
| 1871 STLDeleteElements(&results); | 1871 STLDeleteElements(&results); |
| 1872 } | 1872 } |
| 1873 | 1873 |
| 1874 } // namespace history | 1874 } // namespace history |
| OLD | NEW |