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

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

Issue 4749003: Provide sync integration tests with a way to set a favicon for a bookmark. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" Created 10 years, 1 month 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/bookmark_model_verifier.h
diff --git a/chrome/test/live_sync/bookmark_model_verifier.h b/chrome/test/live_sync/bookmark_model_verifier.h
index 3051ddccc498418175450de7e48e4f9d7c0db4cb..5ba3dd125bd4c0ec9f3570cc83798ce547fcc0d6 100644
--- a/chrome/test/live_sync/bookmark_model_verifier.h
+++ b/chrome/test/live_sync/bookmark_model_verifier.h
@@ -7,6 +7,7 @@
#pragma once
#include <string>
+#include <vector>
#include "base/compiler_specific.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
@@ -29,18 +30,10 @@ class BookmarkModelVerifier {
~BookmarkModelVerifier() {}
// Checks if the hierarchies in |model_a| and |model_b| are equivalent in
- // terms of the data model. Compares favicons if |compare_favicons| is true.
- // Returns true if they match.
+ // terms of the data model and favicon. Returns true if they both match.
// Note: Some peripheral fields like creation times are allowed to mismatch.
static bool ModelsMatch(BookmarkModel* model_a,
- BookmarkModel* model_b,
- bool compare_favicons) WARN_UNUSED_RESULT;
-
- // Same as the above method, but does not check if the favicons match.
- static bool ModelsMatch(BookmarkModel* model_a,
- BookmarkModel* model_b) WARN_UNUSED_RESULT {
- return ModelsMatch(model_a, model_b, false);
- }
+ BookmarkModel* model_b) WARN_UNUSED_RESULT;
// Checks if |model| contains any instances of two bookmarks with the same URL
// under the same parent folder. Returns true if even one instance is found.
@@ -71,6 +64,13 @@ class BookmarkModelVerifier {
const BookmarkNode* node,
const string16& title);
+ // Sets the favicon of the same node in |model| and |verifier_model_| using
+ // the data in |icon_bytes_vector|.
+ // See BookmarkChangeProcessor::ApplyBookmarkFavicon for details.
+ void SetFavicon(BookmarkModel* model,
+ const BookmarkNode* node,
+ const std::vector<unsigned char>& icon_bytes_vector);
+
// Moves the same node to the same position in both |model| and
// |verifier_model_|. See BookmarkModel::Move for details.
void Move(BookmarkModel* model,

Powered by Google App Engine
This is Rietveld 408576698