OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/dom_distiller/core/dom_distiller_store.h" | 5 #include "components/dom_distiller/core/dom_distiller_store.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 | 346 |
347 store_->GetAttachments(entry.entry_id(), callbacks.GetCallback()); | 347 store_->GetAttachments(entry.entry_id(), callbacks.GetCallback()); |
348 EXPECT_CALL(callbacks, Get(false, _)); | 348 EXPECT_CALL(callbacks, Get(false, _)); |
349 base::RunLoop().RunUntilIdle(); | 349 base::RunLoop().RunUntilIdle(); |
350 | 350 |
351 ArticleAttachmentsData attachments, got_attachments; | 351 ArticleAttachmentsData attachments, got_attachments; |
352 DistilledArticleProto article_proto; | 352 DistilledArticleProto article_proto; |
353 article_proto.set_title("A title"); | 353 article_proto.set_title("A title"); |
354 attachments.set_distilled_article(article_proto); | 354 attachments.set_distilled_article(article_proto); |
355 store_->UpdateAttachments( | 355 store_->UpdateAttachments( |
356 entry.entry_id(), | 356 entry.entry_id(), base::MakeUnique<ArticleAttachmentsData>(attachments), |
357 base::WrapUnique(new ArticleAttachmentsData(attachments)), | |
358 callbacks.UpdateCallback()); | 357 callbacks.UpdateCallback()); |
359 EXPECT_CALL(callbacks, Update(true)); | 358 EXPECT_CALL(callbacks, Update(true)); |
360 base::RunLoop().RunUntilIdle(); | 359 base::RunLoop().RunUntilIdle(); |
361 | 360 |
362 store_->GetAttachments(entry.entry_id(), callbacks.GetCallback()); | 361 store_->GetAttachments(entry.entry_id(), callbacks.GetCallback()); |
363 EXPECT_CALL(callbacks, Get(true, _)) | 362 EXPECT_CALL(callbacks, Get(true, _)) |
364 .WillOnce(SaveArgPointee<1>(&got_attachments)); | 363 .WillOnce(SaveArgPointee<1>(&got_attachments)); |
365 base::RunLoop().RunUntilIdle(); | 364 base::RunLoop().RunUntilIdle(); |
366 | 365 |
367 EXPECT_EQ(attachments.ToString(), | 366 EXPECT_EQ(attachments.ToString(), |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 EntryMap fake_model; | 586 EntryMap fake_model; |
588 FakeSyncChangeProcessor* fake_sync_change_processor = | 587 FakeSyncChangeProcessor* fake_sync_change_processor = |
589 new FakeSyncChangeProcessor(&fake_model); | 588 new FakeSyncChangeProcessor(&fake_model); |
590 store_->MergeDataAndStartSyncing( | 589 store_->MergeDataAndStartSyncing( |
591 kDomDistillerModelType, change_data, | 590 kDomDistillerModelType, change_data, |
592 base::WrapUnique<SyncChangeProcessor>(fake_sync_change_processor), | 591 base::WrapUnique<SyncChangeProcessor>(fake_sync_change_processor), |
593 base::WrapUnique<SyncErrorFactory>(fake_error_factory)); | 592 base::WrapUnique<SyncErrorFactory>(fake_error_factory)); |
594 } | 593 } |
595 | 594 |
596 } // namespace dom_distiller | 595 } // namespace dom_distiller |
OLD | NEW |