| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/offline_pages/offline_page_metadata_store_impl.h" | 5 #include "components/offline_pages/offline_page_metadata_store_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "chrome/browser/offline_pages/offline_pages.pb.h" | |
| 15 #include "components/leveldb_proto/proto_database_impl.h" | 14 #include "components/leveldb_proto/proto_database_impl.h" |
| 16 #include "components/offline_pages/offline_page_item.h" | 15 #include "components/offline_pages/offline_page_item.h" |
| 16 #include "components/offline_pages/proto/offline_pages.pb.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 18 | 18 |
| 19 using leveldb_proto::ProtoDatabaseImpl; | 19 using leveldb_proto::ProtoDatabaseImpl; |
| 20 | 20 |
| 21 namespace offline_pages { | 21 namespace offline_pages { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 const char kTestURL[] = "https://example.com"; | 25 const char kTestURL[] = "https://example.com"; |
| 26 const base::string16 kTestTitle = base::ASCIIToUTF16("Example site title"); | 26 const base::string16 kTestTitle = base::ASCIIToUTF16("Example site title"); |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 EXPECT_EQ(offline_page_2.file_path, offline_pages_[0].file_path); | 301 EXPECT_EQ(offline_page_2.file_path, offline_pages_[0].file_path); |
| 302 EXPECT_EQ(offline_page_2.file_size, offline_pages_[0].file_size); | 302 EXPECT_EQ(offline_page_2.file_size, offline_pages_[0].file_size); |
| 303 EXPECT_EQ(offline_page_2.creation_time, offline_pages_[0].creation_time); | 303 EXPECT_EQ(offline_page_2.creation_time, offline_pages_[0].creation_time); |
| 304 EXPECT_EQ(offline_page_2.last_access_time, | 304 EXPECT_EQ(offline_page_2.last_access_time, |
| 305 offline_pages_[0].last_access_time); | 305 offline_pages_[0].last_access_time); |
| 306 } | 306 } |
| 307 | 307 |
| 308 } // namespace | 308 } // namespace |
| 309 | 309 |
| 310 } // namespace offline_pages | 310 } // namespace offline_pages |
| OLD | NEW |