| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 new HistoryMenuBridge::HistoryItem(); | 86 new HistoryMenuBridge::HistoryItem(); |
| 87 item->title = title; | 87 item->title = title; |
| 88 item->url = GURL(title); | 88 item->url = GURL(title); |
| 89 return item; | 89 return item; |
| 90 } | 90 } |
| 91 | 91 |
| 92 MockTRS::Tab CreateSessionTab(const GURL& url, const string16& title) { | 92 MockTRS::Tab CreateSessionTab(const GURL& url, const string16& title) { |
| 93 MockTRS::Tab tab; | 93 MockTRS::Tab tab; |
| 94 tab.current_navigation_index = 0; | 94 tab.current_navigation_index = 0; |
| 95 tab.navigations.push_back( | 95 tab.navigations.push_back( |
| 96 TabNavigation(0, url, GURL(), title, std::string(), | 96 TabNavigation(0, url, content::Referrer(), title, std::string(), |
| 97 content::PAGE_TRANSITION_LINK)); | 97 content::PAGE_TRANSITION_LINK)); |
| 98 return tab; | 98 return tab; |
| 99 } | 99 } |
| 100 | 100 |
| 101 void GetFaviconForHistoryItem(HistoryMenuBridge::HistoryItem* item) { | 101 void GetFaviconForHistoryItem(HistoryMenuBridge::HistoryItem* item) { |
| 102 bridge_->GetFaviconForHistoryItem(item); | 102 bridge_->GetFaviconForHistoryItem(item); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void GotFaviconData(FaviconService::Handle handle, | 105 void GotFaviconData(FaviconService::Handle handle, |
| 106 history::FaviconData favicon) { | 106 history::FaviconData favicon) { |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 favicon.icon_type = history::FAVICON; | 377 favicon.icon_type = history::FAVICON; |
| 378 GotFaviconData(item.icon_handle, favicon); | 378 GotFaviconData(item.icon_handle, favicon); |
| 379 | 379 |
| 380 // Make sure the callback works. | 380 // Make sure the callback works. |
| 381 EXPECT_FALSE(item.icon_requested); | 381 EXPECT_FALSE(item.icon_requested); |
| 382 EXPECT_TRUE(item.icon.get()); | 382 EXPECT_TRUE(item.icon.get()); |
| 383 EXPECT_TRUE([item.menu_item image]); | 383 EXPECT_TRUE([item.menu_item image]); |
| 384 } | 384 } |
| 385 | 385 |
| 386 } // namespace | 386 } // namespace |
| OLD | NEW |