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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 if (favicon->size() != expected_bytes.size()) | 72 if (favicon->size() != expected_bytes.size()) |
73 return false; | 73 return false; |
74 for (size_t i = 0; i < favicon->size(); ++i) { | 74 for (size_t i = 0; i < favicon->size(); ++i) { |
75 if (expected_bytes[i] != *(favicon->front() + i)) | 75 if (expected_bytes[i] != *(favicon->front() + i)) |
76 return false; | 76 return false; |
77 } | 77 } |
78 return true; | 78 return true; |
79 } | 79 } |
80 | 80 |
81 private: | 81 private: |
82 MessageLoopForUI message_loop_; | 82 base::MessageLoopForUI message_loop_; |
83 content::TestBrowserThread ui_thread_; | 83 content::TestBrowserThread ui_thread_; |
84 NiceMock<ProfileMock> profile_; | 84 NiceMock<ProfileMock> profile_; |
85 NiceMock<ProfileSyncServiceMock> sync_service_; | 85 NiceMock<ProfileSyncServiceMock> sync_service_; |
86 | 86 |
87 protected: | 87 protected: |
88 SessionModelAssociator model_associator_; | 88 SessionModelAssociator model_associator_; |
89 }; | 89 }; |
90 | 90 |
91 namespace { | 91 namespace { |
92 | 92 |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 // The new page should be mapped to the old favicon data. | 546 // The new page should be mapped to the old favicon data. |
547 EXPECT_TRUE(FaviconEquals(GURL(page_url2), std::string())); | 547 EXPECT_TRUE(FaviconEquals(GURL(page_url2), std::string())); |
548 LoadTabFavicon(tab2); | 548 LoadTabFavicon(tab2); |
549 EXPECT_TRUE(FaviconEquals(GURL(page_url), favicon)); | 549 EXPECT_TRUE(FaviconEquals(GURL(page_url), favicon)); |
550 EXPECT_TRUE(FaviconEquals(GURL(page_url2), favicon)); | 550 EXPECT_TRUE(FaviconEquals(GURL(page_url2), favicon)); |
551 } | 551 } |
552 | 552 |
553 } // namespace | 553 } // namespace |
554 | 554 |
555 } // namespace browser_sync | 555 } // namespace browser_sync |
OLD | NEW |