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

Unified Diff: chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm

Issue 10802066: Adds support for saving favicon size into history database. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/browser/ui/cocoa/history_menu_bridge_unittest.mm
diff --git a/chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm b/chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm
index a143e434420ed0a74408fd01388f6b759968b4bb..e2bf4e08ffd0aacb1b970c12c6292c63d6687c7e 100644
--- a/chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm
+++ b/chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm
@@ -104,8 +104,8 @@ class HistoryMenuBridgeTest : public CocoaProfileTest {
}
void GotFaviconData(FaviconService::Handle handle,
- history::FaviconData favicon) {
- bridge_->GotFaviconData(handle, favicon);
+ history::FaviconData favicon_data) {
+ bridge_->GotFaviconData(handle, favicon_data);
}
CancelableRequestConsumerTSimple<HistoryMenuBridge::HistoryItem*>&
@@ -370,13 +370,17 @@ TEST_F(HistoryMenuBridgeTest, GotFaviconData) {
GetFaviconForHistoryItem(&item);
// Pretend to be called back.
- history::FaviconData favicon;
- favicon.known_icon = true;
- favicon.image_data = new base::RefCountedBytes(raw);
- favicon.expired = false;
- favicon.icon_url = GURL();
- favicon.icon_type = history::FAVICON;
- GotFaviconData(item.icon_handle, favicon);
+ history::FaviconData favicon_data;
+ favicon_data.known_icon = true;
+ favicon_data.expired = false;
+ favicon_data.icon_type = history::FAVICON;
+ history::FaviconDataElement element;
+ element.bitmap_data = new base::RefCountedBytes(raw);
+ element.pixel_size = gfx::Size();
+ element.icon_url = GURL();
+ favicon_data.elements.push_back(element);
+ favicon_data.sizes[icon_url] = history::FaviconSizes("0 0");
+ GotFaviconData(item.icon_handle, favicon_data);
// Make sure the callback works.
EXPECT_FALSE(item.icon_requested);

Powered by Google App Engine
This is Rietveld 408576698