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

Unified Diff: chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc

Issue 2787893003: [Sync] TypedUrlSyncableService should filter expired visits from local (Closed)
Patch Set: more verify Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/sync/test/integration/typed_urls_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc
diff --git a/chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc b/chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc
index 85ce078ac7025e323cb0de4c6cb514b154eb5de0..999bb1fa15a80c5af90efcf88b7c8e495f22c625 100644
--- a/chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc
+++ b/chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc
@@ -26,6 +26,7 @@ using typed_urls_helper::AddUrlToHistoryWithTransition;
using typed_urls_helper::AreVisitsEqual;
using typed_urls_helper::AreVisitsUnique;
using typed_urls_helper::CheckURLRowVectorsAreEqual;
+using typed_urls_helper::CheckSyncDirectoryHasURL;
using typed_urls_helper::DeleteUrlFromHistory;
using typed_urls_helper::GetTypedUrlsFromClient;
using typed_urls_helper::GetUrlFromClient;
@@ -120,6 +121,9 @@ IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest, AddExpired) {
// Second client should still have no URLs since this one is expired.
urls = GetTypedUrlsFromClient(1);
ASSERT_EQ(0U, urls.size());
+
+ // Sync should not receive expired visits.
+ EXPECT_FALSE(CheckSyncDirectoryHasURL(0, new_url));
}
// Flake on mac: http://crbug/115526
@@ -153,6 +157,9 @@ IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest, MAYBE_AddExpiredThenUpdate) {
urls = GetTypedUrlsFromClient(1);
ASSERT_EQ(0U, urls.size());
+ // Sync should not receive expired visits.
+ EXPECT_FALSE(CheckSyncDirectoryHasURL(0, new_url));
+
// Now drive an update on the first client.
AddUrlToHistory(0, new_url);
@@ -162,6 +169,10 @@ IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest, MAYBE_AddExpiredThenUpdate) {
// Second client should have the URL now.
urls = GetTypedUrlsFromClient(1);
ASSERT_EQ(1U, urls.size());
+
+ // Sync should receive the new visit.
+ EXPECT_TRUE(CheckSyncDirectoryHasURL(0, new_url));
+ EXPECT_TRUE(CheckSyncDirectoryHasURL(1, new_url));
}
// TCM: 3705291
« no previous file with comments | « no previous file | chrome/browser/sync/test/integration/typed_urls_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698