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

Side by Side Diff: chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm

Issue 10821035: wip 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 368
369 // Set up the HistoryItem. 369 // Set up the HistoryItem.
370 HistoryMenuBridge::HistoryItem item; 370 HistoryMenuBridge::HistoryItem item;
371 item.menu_item.reset([[NSMenuItem alloc] init]); 371 item.menu_item.reset([[NSMenuItem alloc] init]);
372 GetFaviconForHistoryItem(&item); 372 GetFaviconForHistoryItem(&item);
373 373
374 // Pretend to be called back. 374 // Pretend to be called back.
375 history::FaviconData favicon; 375 history::FaviconData favicon;
376 favicon.known_icon = true; 376 favicon.known_icon = true;
377 favicon.bitmap_data = new base::RefCountedBytes(raw); 377 favicon.bitmap_data = new base::RefCountedBytes(raw);
378 favicon.pixel_size = gfx::kFaviconSize; 378 favicon.pixel_size = gfx::Size(gfx::kFaviconSize, gfx::kFaviconSize);
379 favicon.scale_factor = ui::SCALE_FACTOR_100P; 379 //favicon.scale_factor = ui::SCALE_FACTOR_100P;
380 favicon.expired = false; 380 favicon.expired = false;
381 favicon.icon_url = GURL(); 381 favicon.icon_url = GURL();
382 favicon.icon_type = history::FAVICON; 382 favicon.icon_type = history::FAVICON;
383 GotFaviconData(item.icon_handle, favicon); 383 GotFaviconData(item.icon_handle, favicon);
384 384
385 // Make sure the callback works. 385 // Make sure the callback works.
386 EXPECT_FALSE(item.icon_requested); 386 EXPECT_FALSE(item.icon_requested);
387 EXPECT_TRUE(item.icon.get()); 387 EXPECT_TRUE(item.icon.get());
388 EXPECT_TRUE([item.menu_item image]); 388 EXPECT_TRUE([item.menu_item image]);
389 } 389 }
390 390
391 } // namespace 391 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/history_menu_bridge.mm ('k') | chrome/browser/ui/intents/web_intent_picker_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698