Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1085)

Side by Side Diff: components/reading_list/ios/reading_list_model_unittest.mm

Issue 2650643004: [Sync] Make SMTP always have the dump stack function. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/reading_list/ios/reading_list_model.h" 5 #include "components/reading_list/ios/reading_list_model.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #import "base/test/ios/wait_util.h" 9 #import "base/test/ios/wait_util.h"
10 #include "components/reading_list/ios/reading_list_model_impl.h" 10 #include "components/reading_list/ios/reading_list_model_impl.h"
(...skipping 11 matching lines...) Expand all
22 class TestReadingListStorageObserver { 22 class TestReadingListStorageObserver {
23 public: 23 public:
24 virtual void ReadingListDidSaveEntry() = 0; 24 virtual void ReadingListDidSaveEntry() = 0;
25 virtual void ReadingListDidRemoveEntry() = 0; 25 virtual void ReadingListDidRemoveEntry() = 0;
26 }; 26 };
27 27
28 class TestReadingListStorage : public ReadingListModelStorage { 28 class TestReadingListStorage : public ReadingListModelStorage {
29 public: 29 public:
30 TestReadingListStorage(TestReadingListStorageObserver* observer) 30 TestReadingListStorage(TestReadingListStorageObserver* observer)
31 : ReadingListModelStorage( 31 : ReadingListModelStorage(
32 base::Bind(&syncer::ModelTypeChangeProcessor::Create), 32 base::Bind(&syncer::ModelTypeChangeProcessor::Create,
33 base::RepeatingClosure()),
33 syncer::READING_LIST), 34 syncer::READING_LIST),
34 entries_(new ReadingListStoreDelegate::ReadingListEntries()), 35 entries_(new ReadingListStoreDelegate::ReadingListEntries()),
35 observer_(observer) {} 36 observer_(observer) {}
36 37
37 void AddSampleEntries() { 38 void AddSampleEntries() {
38 // Adds timer and interlace read/unread entry creation to avoid having two 39 // Adds timer and interlace read/unread entry creation to avoid having two
39 // entries with the same creation timestamp. 40 // entries with the same creation timestamp.
40 ReadingListEntry unread_a(GURL("http://unread_a.com"), "unread_a"); 41 ReadingListEntry unread_a(GURL("http://unread_a.com"), "unread_a");
41 entries_->insert( 42 entries_->insert(
42 std::make_pair(GURL("http://unread_a.com"), std::move(unread_a))); 43 std::make_pair(GURL("http://unread_a.com"), std::move(unread_a)));
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 } 677 }
677 678
678 // Tests that ReadingListModel calls CallbackModelBeingDeleted when destroyed. 679 // Tests that ReadingListModel calls CallbackModelBeingDeleted when destroyed.
679 TEST_F(ReadingListModelTest, CallbackModelBeingDeleted) { 680 TEST_F(ReadingListModelTest, CallbackModelBeingDeleted) {
680 AssertObserverCount(1, 0, 0, 0, 0, 0, 0, 0, 0); 681 AssertObserverCount(1, 0, 0, 0, 0, 0, 0, 0, 0);
681 model_.reset(); 682 model_.reset();
682 AssertObserverCount(1, 0, 0, 1, 0, 0, 0, 0, 0); 683 AssertObserverCount(1, 0, 0, 1, 0, 0, 0, 0, 0);
683 } 684 }
684 685
685 } // namespace 686 } // namespace
OLDNEW
« no previous file with comments | « components/browser_sync/profile_sync_service.cc ('k') | components/sync/driver/data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698