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 "components/offline_pages/offline_page_metadata_store_impl.h" | 5 #include "components/offline_pages/offline_page_metadata_store_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/files/scoped_temp_dir.h" | 13 #include "base/files/scoped_temp_dir.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
16 #include "base/test/test_simple_task_runner.h" | 16 #include "base/test/test_simple_task_runner.h" |
17 #include "base/thread_task_runner_handle.h" | 17 #include "base/threading/thread_task_runner_handle.h" |
18 #include "components/leveldb_proto/proto_database_impl.h" | 18 #include "components/leveldb_proto/proto_database_impl.h" |
19 #include "components/offline_pages/offline_page_item.h" | 19 #include "components/offline_pages/offline_page_item.h" |
20 #include "components/offline_pages/offline_page_metadata_store_sql.h" | 20 #include "components/offline_pages/offline_page_metadata_store_sql.h" |
21 #include "components/offline_pages/offline_page_model.h" | 21 #include "components/offline_pages/offline_page_model.h" |
22 #include "components/offline_pages/proto/offline_pages.pb.h" | 22 #include "components/offline_pages/proto/offline_pages.pb.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
24 | 24 |
25 using leveldb_proto::ProtoDatabaseImpl; | 25 using leveldb_proto::ProtoDatabaseImpl; |
26 | 26 |
27 namespace offline_pages { | 27 namespace offline_pages { |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 offline_pages_[0].client_id.name_space); | 549 offline_pages_[0].client_id.name_space); |
550 EXPECT_EQ(base::Int64ToString(offline_page_proto.deprecated_bookmark_id()), | 550 EXPECT_EQ(base::Int64ToString(offline_page_proto.deprecated_bookmark_id()), |
551 offline_pages_[0].client_id.id); | 551 offline_pages_[0].client_id.id); |
552 EXPECT_EQ(GURL(kTestURL), offline_pages_[0].url); | 552 EXPECT_EQ(GURL(kTestURL), offline_pages_[0].url); |
553 EXPECT_EQ(offline_page_proto.version(), offline_pages_[0].version); | 553 EXPECT_EQ(offline_page_proto.version(), offline_pages_[0].version); |
554 EXPECT_EQ(offline_page_proto.file_path(), | 554 EXPECT_EQ(offline_page_proto.file_path(), |
555 offline_pages_[0].file_path.MaybeAsASCII()); | 555 offline_pages_[0].file_path.MaybeAsASCII()); |
556 } | 556 } |
557 | 557 |
558 } // namespace offline_pages | 558 } // namespace offline_pages |
OLD | NEW |