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

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

Issue 6651014: Applied the IconType. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: sync Created 9 years, 9 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 7491ed2a7c329662ff27d777cb349d81ff205470..ee085b0b72ebf6edfb264ba8861d91b6efafca66 100644
--- a/chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm
+++ b/chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm
@@ -103,11 +103,8 @@ class HistoryMenuBridgeTest : public CocoaTest {
}
void GotFaviconData(FaviconService::Handle handle,
- bool know_favicon,
- scoped_refptr<RefCountedBytes> data,
- bool expired,
- GURL url) {
- bridge_->GotFaviconData(handle, know_favicon, data, expired, url);
+ history::FaviconData favicon) {
+ bridge_->GotFaviconData(handle, favicon);
}
CancelableRequestConsumerTSimple<HistoryMenuBridge::HistoryItem*>&
@@ -366,7 +363,7 @@ TEST_F(HistoryMenuBridgeTest, GotFaviconData) {
// make icons look pretty.
std::vector<unsigned char> raw;
gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, true, &raw);
- scoped_refptr<RefCountedBytes> bytes(new RefCountedBytes(raw));
+ scoped_refptr<RefCountedBytes> bytes();
// Set up the HistoryItem.
HistoryMenuBridge::HistoryItem item;
@@ -374,7 +371,13 @@ TEST_F(HistoryMenuBridgeTest, GotFaviconData) {
GetFaviconForHistoryItem(&item);
// Pretend to be called back.
- GotFaviconData(item.icon_handle, true, bytes, false, GURL());
+ history::FaviconData favicon;
+ favicon.known_icon = true;
+ favicon.image_data = new RefCountedBytes(raw);
+ favicon.expired = false;
+ favicon.icon_url = GURL();
+ favicon.icon_type = history::FAVICON;
+ GotFaviconData(item.icon_handle, favicon);
// Make sure the callback works.
EXPECT_FALSE(item.icon_requested);

Powered by Google App Engine
This is Rietveld 408576698