| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "chrome/browser/sessions/session_types.h" | 10 #include "chrome/browser/sessions/session_types.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 if (favicon->size() != expected_bytes.size()) | 70 if (favicon->size() != expected_bytes.size()) |
| 71 return false; | 71 return false; |
| 72 for (size_t i = 0; i < favicon->size(); ++i) { | 72 for (size_t i = 0; i < favicon->size(); ++i) { |
| 73 if (expected_bytes[i] != *(favicon->front() + i)) | 73 if (expected_bytes[i] != *(favicon->front() + i)) |
| 74 return false; | 74 return false; |
| 75 } | 75 } |
| 76 return true; | 76 return true; |
| 77 } | 77 } |
| 78 | 78 |
| 79 private: | 79 private: |
| 80 MessageLoopForUI message_loop_; | 80 base::MessageLoopForUI message_loop_; |
| 81 content::TestBrowserThread ui_thread_; | 81 content::TestBrowserThread ui_thread_; |
| 82 NiceMock<ProfileMock> profile_; | 82 NiceMock<ProfileMock> profile_; |
| 83 NiceMock<ProfileSyncServiceMock> sync_service_; | 83 NiceMock<ProfileSyncServiceMock> sync_service_; |
| 84 | 84 |
| 85 protected: | 85 protected: |
| 86 SessionModelAssociator model_associator_; | 86 SessionModelAssociator model_associator_; |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 namespace { | 89 namespace { |
| 90 | 90 |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 // The new page should be mapped to the old favicon data. | 464 // The new page should be mapped to the old favicon data. |
| 465 EXPECT_TRUE(FaviconEquals(GURL(page_url2), std::string())); | 465 EXPECT_TRUE(FaviconEquals(GURL(page_url2), std::string())); |
| 466 LoadTabFavicon(tab2); | 466 LoadTabFavicon(tab2); |
| 467 EXPECT_TRUE(FaviconEquals(GURL(page_url), favicon)); | 467 EXPECT_TRUE(FaviconEquals(GURL(page_url), favicon)); |
| 468 EXPECT_TRUE(FaviconEquals(GURL(page_url2), favicon)); | 468 EXPECT_TRUE(FaviconEquals(GURL(page_url2), favicon)); |
| 469 } | 469 } |
| 470 | 470 |
| 471 } // namespace | 471 } // namespace |
| 472 | 472 |
| 473 } // namespace browser_sync | 473 } // namespace browser_sync |
| OLD | NEW |