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

Unified Diff: chrome/test/live_sync/typed_urls_helper.h

Issue 7461109: Allow sync integration tests to operate on multiple datatypes: Typed Urls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback; rebase Created 9 years, 4 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
Index: chrome/test/live_sync/typed_urls_helper.h
diff --git a/chrome/test/live_sync/typed_urls_helper.h b/chrome/test/live_sync/typed_urls_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..fbf5debdcf4061ae58048b3b5a1c3877c52c99c0
--- /dev/null
+++ b/chrome/test/live_sync/typed_urls_helper.h
@@ -0,0 +1,51 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_TEST_LIVE_SYNC_TYPED_URLS_HELPER_H_
+#define CHROME_TEST_LIVE_SYNC_TYPED_URLS_HELPER_H_
+#pragma once
+
+#include <vector>
+
+#include "chrome/browser/history/history_types.h"
+
+namespace base {
+class Time;
+}
+
+namespace typed_urls_helper {
+
+// Gets the typed URLs from a specific sync profile.
+std::vector<history::URLRow> GetTypedUrlsFromClient(int index);
+
+// Adds a URL to the history DB for a specific sync profile (just registers a
+// new visit if the URL already exists).
+void AddUrlToHistory(int index, const GURL& url);
+
+// Deletes a URL from the history DB for a specific sync profile.
+void DeleteUrlFromHistory(int index, const GURL& url);
+
+// Returns true if all clients match the verifier profile.
+void AssertAllProfilesHaveSameURLsAsVerifier();
+
+// Checks that the two vectors contain the same set of URLRows (possibly in
+// a different order).
+void AssertURLRowVectorsAreEqual(
+ const std::vector<history::URLRow>& left,
+ const std::vector<history::URLRow>& right);
+
+// Checks that the passed URLRows are equivalent.
+void AssertURLRowsAreEqual(const history::URLRow& left,
+ const history::URLRow& right);
+
+// Returns a unique timestamp to use when generating page visits
+// (HistoryService does not like having identical timestamps and will modify
+// the timestamps behind the scenes if it encounters them, which leads to
+// spurious test failures when the resulting timestamps aren't what we
+// expect).
+base::Time GetTimestamp();
+
+} // namespace typed_urls_helper
+
+#endif // CHROME_TEST_LIVE_SYNC_TYPED_URLS_HELPER_H_
« no previous file with comments | « chrome/test/live_sync/two_client_typed_urls_sync_test.cc ('k') | chrome/test/live_sync/typed_urls_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698