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.h" | 5 #include "components/offline_pages/offline_page_metadata_store.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 store->GetOfflinePages( | 376 store->GetOfflinePages( |
377 base::Bind(&OfflinePageMetadataStoreTest::GetOfflinePagesCallback, | 377 base::Bind(&OfflinePageMetadataStoreTest::GetOfflinePagesCallback, |
378 base::Unretained(this))); | 378 base::Unretained(this))); |
379 PumpLoop(); | 379 PumpLoop(); |
380 return store; | 380 return store; |
381 } | 381 } |
382 | 382 |
383 std::unique_ptr<OfflinePageMetadataStore> | 383 std::unique_ptr<OfflinePageMetadataStore> |
384 OfflinePageMetadataStoreTest::BuildStoreWithSchemaFromM54() { | 384 OfflinePageMetadataStoreTest::BuildStoreWithSchemaFromM54() { |
385 std::unique_ptr<OfflinePageMetadataStore> store( | 385 std::unique_ptr<OfflinePageMetadataStore> store( |
386 factory_.BuildStoreM53(temp_directory_.path())); | 386 factory_.BuildStoreM53(temp_directory_.GetPath())); |
387 store->GetOfflinePages( | 387 store->GetOfflinePages( |
388 base::Bind(&OfflinePageMetadataStoreTest::GetOfflinePagesCallback, | 388 base::Bind(&OfflinePageMetadataStoreTest::GetOfflinePagesCallback, |
389 base::Unretained(this))); | 389 base::Unretained(this))); |
390 PumpLoop(); | 390 PumpLoop(); |
391 return store; | 391 return store; |
392 } | 392 } |
393 | 393 |
394 // Loads empty store and makes sure that there are no offline pages stored in | 394 // Loads empty store and makes sure that there are no offline pages stored in |
395 // it. | 395 // it. |
396 TEST_F(OfflinePageMetadataStoreTest, LoadEmptyStore) { | 396 TEST_F(OfflinePageMetadataStoreTest, LoadEmptyStore) { |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 base::Unretained(this))); | 719 base::Unretained(this))); |
720 PumpLoop(); | 720 PumpLoop(); |
721 | 721 |
722 EXPECT_EQ(LOAD, last_called_callback_); | 722 EXPECT_EQ(LOAD, last_called_callback_); |
723 EXPECT_EQ(STATUS_TRUE, last_status_); | 723 EXPECT_EQ(STATUS_TRUE, last_status_); |
724 ASSERT_EQ(0U, offline_pages_.size()); | 724 ASSERT_EQ(0U, offline_pages_.size()); |
725 } | 725 } |
726 | 726 |
727 } // namespace | 727 } // namespace |
728 } // namespace offline_pages | 728 } // namespace offline_pages |
OLD | NEW |