OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/test/live_sync/bookmarks_helper.h" | 5 #include "chrome/test/live_sync/bookmarks_helper.h" |
6 | 6 |
7 #include "base/rand_util.h" | 7 #include "base/rand_util.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/bookmarks/bookmark_model.h" | 11 #include "chrome/browser/bookmarks/bookmark_model.h" |
12 #include "chrome/browser/bookmarks/bookmark_model_observer.h" | 12 #include "chrome/browser/bookmarks/bookmark_model_observer.h" |
13 #include "chrome/browser/bookmarks/bookmark_utils.h" | 13 #include "chrome/browser/bookmarks/bookmark_utils.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/sync/glue/bookmark_change_processor.h" | 15 #include "chrome/browser/sync/glue/bookmark_change_processor.h" |
16 #include "chrome/browser/sync/profile_sync_service_harness.h" | 16 #include "chrome/browser/sync/profile_sync_service_harness.h" |
| 17 #include "chrome/test/base/ui_test_utils.h" |
17 #include "chrome/test/live_sync/live_sync_test.h" | 18 #include "chrome/test/live_sync/live_sync_test.h" |
18 #include "chrome/test/ui_test_utils.h" | |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 #include "third_party/skia/include/core/SkBitmap.h" | 20 #include "third_party/skia/include/core/SkBitmap.h" |
21 #include "ui/base/models/tree_node_iterator.h" | 21 #include "ui/base/models/tree_node_iterator.h" |
22 #include "ui/gfx/codec/png_codec.h" | 22 #include "ui/gfx/codec/png_codec.h" |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 // Helper class used to wait for changes to take effect on the favicon of a | 26 // Helper class used to wait for changes to take effect on the favicon of a |
27 // particular bookmark node in a particular bookmark model. | 27 // particular bookmark node in a particular bookmark model. |
28 class FaviconChangeObserver : public BookmarkModelObserver { | 28 class FaviconChangeObserver : public BookmarkModelObserver { |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 if (memcmp(node_pixel_addr_a, node_pixel_addr_b, bitmap_a.getSize()) != 0) { | 624 if (memcmp(node_pixel_addr_a, node_pixel_addr_b, bitmap_a.getSize()) != 0) { |
625 LOG(ERROR) << "Favicon bitmap mismatch"; | 625 LOG(ERROR) << "Favicon bitmap mismatch"; |
626 return false; | 626 return false; |
627 } else { | 627 } else { |
628 return true; | 628 return true; |
629 } | 629 } |
630 } | 630 } |
631 | 631 |
632 // static | 632 // static |
633 std::set<GURL>* BookmarksHelper::urls_with_favicons_ = NULL; | 633 std::set<GURL>* BookmarksHelper::urls_with_favicons_ = NULL; |
OLD | NEW |