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

Side by Side Diff: components/reading_list/ios/reading_list_entry_unittest.cc

Issue 2511723002: Enable RL sync by default on iOS (Closed)
Patch Set: rebase Created 4 years 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/reading_list_entry.h" 5 #include "components/reading_list/ios/reading_list_entry.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/test/simple_test_tick_clock.h" 8 #include "base/test/simple_test_tick_clock.h"
9 #include "components/reading_list/proto/reading_list.pb.h" 9 #include "components/reading_list/ios/proto/reading_list.pb.h"
10 #include "components/sync/protocol/reading_list_specifics.pb.h" 10 #include "components/sync/protocol/reading_list_specifics.pb.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace { 13 namespace {
14 const int kFirstBackoff = 10; 14 const int kFirstBackoff = 10;
15 const int kSecondBackoff = 10; 15 const int kSecondBackoff = 10;
16 const int kThirdBackoff = 60; 16 const int kThirdBackoff = 60;
17 const int kFourthBackoff = 120; 17 const int kFourthBackoff = 120;
18 const int kFifthBackoff = 120; 18 const int kFifthBackoff = 120;
19 } // namespace 19 } // namespace
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 EXPECT_EQ(sync_entry.URL().spec(), "http://example2.com/"); 318 EXPECT_EQ(sync_entry.URL().spec(), "http://example2.com/");
319 EXPECT_EQ(sync_entry.Title(), "title2"); 319 EXPECT_EQ(sync_entry.Title(), "title2");
320 EXPECT_EQ(sync_entry.UpdateTime(), sync_update_time_us); 320 EXPECT_EQ(sync_entry.UpdateTime(), sync_update_time_us);
321 EXPECT_EQ(sync_entry.FailedDownloadCounter(), 0); 321 EXPECT_EQ(sync_entry.FailedDownloadCounter(), 0);
322 EXPECT_EQ(sync_entry.DistilledState(), ReadingListEntry::PROCESSED); 322 EXPECT_EQ(sync_entry.DistilledState(), ReadingListEntry::PROCESSED);
323 EXPECT_EQ(sync_entry.DistilledPath().value(), "distilled/page.html"); 323 EXPECT_EQ(sync_entry.DistilledPath().value(), "distilled/page.html");
324 base::Time sync_next_call = base::Time::Now() + sync_entry.TimeUntilNextTry(); 324 base::Time sync_next_call = base::Time::Now() + sync_entry.TimeUntilNextTry();
325 base::TimeDelta delta = next_call - sync_next_call; 325 base::TimeDelta delta = next_call - sync_next_call;
326 EXPECT_NEAR(delta.InMillisecondsRoundedUp(), 0, 10); 326 EXPECT_NEAR(delta.InMillisecondsRoundedUp(), 0, 10);
327 } 327 }
OLDNEW
« no previous file with comments | « components/reading_list/ios/reading_list_entry.cc ('k') | components/reading_list/ios/reading_list_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698