| Index: chrome/browser/favicon/favicon_handler_unittest.cc
|
| diff --git a/chrome/browser/favicon/favicon_handler_unittest.cc b/chrome/browser/favicon/favicon_handler_unittest.cc
|
| index 43eb49f3371359b4a4b65fc6105bebb7dca447c4..0406a3ba52a630c4f0bde75e0d0f66b464d2bf8e 100644
|
| --- a/chrome/browser/favicon/favicon_handler_unittest.cc
|
| +++ b/chrome/browser/favicon/favicon_handler_unittest.cc
|
| @@ -109,12 +109,12 @@ class HistoryRequestHandler {
|
| HistoryRequestHandler(const GURL& page_url,
|
| const GURL& icon_url,
|
| int icon_type,
|
| - const std::vector<unsigned char>& image_data,
|
| + const std::vector<unsigned char>& bitmap_data,
|
| const FaviconService::FaviconDataCallback& callback)
|
| : page_url_(page_url),
|
| icon_url_(icon_url),
|
| icon_type_(icon_type),
|
| - image_data_(image_data),
|
| + bitmap_data_(bitmap_data),
|
| callback_(callback) {
|
| }
|
|
|
| @@ -124,7 +124,7 @@ class HistoryRequestHandler {
|
| const GURL page_url_;
|
| const GURL icon_url_;
|
| const int icon_type_;
|
| - const std::vector<unsigned char> image_data_;
|
| + const std::vector<unsigned char> bitmap_data_;
|
| history::FaviconData favicon_data_;
|
| FaviconService::FaviconDataCallback callback_;
|
|
|
| @@ -252,10 +252,10 @@ class TestFaviconHandler : public FaviconHandler {
|
|
|
| virtual void SetHistoryFavicon(const GURL& page_url,
|
| const GURL& icon_url,
|
| - const std::vector<unsigned char>& image_data,
|
| + const std::vector<unsigned char>& bitmap_data,
|
| history::IconType icon_type) OVERRIDE {
|
| history_handler_.reset(new HistoryRequestHandler(
|
| - page_url, icon_url,icon_type, image_data,
|
| + page_url, icon_url,icon_type, bitmap_data,
|
| FaviconService::FaviconDataCallback()));
|
| }
|
|
|
| @@ -331,7 +331,7 @@ TEST_F(FaviconHandlerTest, GetFaviconFromHistory) {
|
| history_handler->favicon_data_.icon_url = icon_url;
|
| scoped_refptr<base::RefCountedBytes> data = new base::RefCountedBytes();
|
| FillBitmap(gfx::kFaviconSize, gfx::kFaviconSize, &data->data());
|
| - history_handler->favicon_data_.image_data = data;
|
| + history_handler->favicon_data_.bitmap_data = data;
|
|
|
| // Send history response.
|
| history_handler->InvokeCallback();
|
| @@ -413,7 +413,7 @@ TEST_F(FaviconHandlerTest, DownloadFavicon) {
|
| ASSERT_TRUE(history_handler);
|
| EXPECT_EQ(icon_url, history_handler->icon_url_);
|
| EXPECT_EQ(FaviconURL::FAVICON, history_handler->icon_type_);
|
| - EXPECT_LT(0U, history_handler->image_data_.size());
|
| + EXPECT_LT(0U, history_handler->bitmap_data_.size());
|
| EXPECT_EQ(page_url, history_handler->page_url_);
|
|
|
| // Verify NavigationEntry.
|
| @@ -448,7 +448,7 @@ TEST_F(FaviconHandlerTest, UpdateAndDownloadFavicon) {
|
| history_handler->favicon_data_.icon_url = icon_url;
|
| scoped_refptr<base::RefCountedBytes> data = new base::RefCountedBytes();
|
| FillBitmap(gfx::kFaviconSize, gfx::kFaviconSize, &data->data());
|
| - history_handler->favicon_data_.image_data = data;
|
| + history_handler->favicon_data_.bitmap_data = data;
|
|
|
| // Send history response.
|
| history_handler->InvokeCallback();
|
| @@ -503,7 +503,7 @@ TEST_F(FaviconHandlerTest, UpdateAndDownloadFavicon) {
|
| ASSERT_TRUE(history_handler);
|
| EXPECT_EQ(new_icon_url, history_handler->icon_url_);
|
| EXPECT_EQ(FaviconURL::FAVICON, history_handler->icon_type_);
|
| - EXPECT_LT(0U, history_handler->image_data_.size());
|
| + EXPECT_LT(0U, history_handler->bitmap_data_.size());
|
| EXPECT_EQ(page_url, history_handler->page_url_);
|
|
|
| // Verify NavigationEntry.
|
| @@ -538,7 +538,7 @@ TEST_F(FaviconHandlerTest, UpdateFavicon) {
|
| history_handler->favicon_data_.icon_url = icon_url;
|
| scoped_refptr<base::RefCountedBytes> data = new base::RefCountedBytes();
|
| FillBitmap(gfx::kFaviconSize, gfx::kFaviconSize, &data->data());
|
| - history_handler->favicon_data_.image_data = data;
|
| + history_handler->favicon_data_.bitmap_data = data;
|
|
|
| // Send history response.
|
| history_handler->InvokeCallback();
|
| @@ -575,7 +575,7 @@ TEST_F(FaviconHandlerTest, UpdateFavicon) {
|
| history_handler->favicon_data_.icon_type = history::FAVICON;
|
| history_handler->favicon_data_.expired = false;
|
| history_handler->favicon_data_.icon_url = new_icon_url;
|
| - history_handler->favicon_data_.image_data = data;
|
| + history_handler->favicon_data_.bitmap_data = data;
|
| history_handler->InvokeCallback();
|
|
|
| // Shouldn't request download favicon
|
| @@ -682,7 +682,7 @@ TEST_F(FaviconHandlerTest, Download2ndFaviconURLCandidate) {
|
| history_handler->favicon_data_.icon_url = new_icon_url;
|
| scoped_refptr<base::RefCountedBytes> data = new base::RefCountedBytes();
|
| FillBitmap(gfx::kFaviconSize, gfx::kFaviconSize, &data->data());
|
| - history_handler->favicon_data_.image_data = data;
|
| + history_handler->favicon_data_.bitmap_data = data;
|
| history_handler->InvokeCallback();
|
|
|
| // Verify the download request.
|
| @@ -700,7 +700,7 @@ TEST_F(FaviconHandlerTest, Download2ndFaviconURLCandidate) {
|
| ASSERT_TRUE(history_handler);
|
| EXPECT_EQ(new_icon_url, history_handler->icon_url_);
|
| EXPECT_EQ(FaviconURL::TOUCH_ICON, history_handler->icon_type_);
|
| - EXPECT_LT(0U, history_handler->image_data_.size());
|
| + EXPECT_LT(0U, history_handler->bitmap_data_.size());
|
| EXPECT_EQ(page_url, history_handler->page_url_);
|
| }
|
|
|
| @@ -811,7 +811,7 @@ TEST_F(FaviconHandlerTest, UpdateDuringDownloading) {
|
| handler->favicon_data_.icon_url = latest_icon_url;
|
| scoped_refptr<base::RefCountedBytes> data = new base::RefCountedBytes();
|
| FillBitmap(gfx::kFaviconSize, gfx::kFaviconSize, &data->data());
|
| - handler->favicon_data_.image_data = data;
|
| + handler->favicon_data_.bitmap_data = data;
|
|
|
| handler->InvokeCallback();
|
|
|
| @@ -843,7 +843,7 @@ TEST_F(FaviconHandlerTest, MultipleFavicon) {
|
| history_handler->favicon_data_.icon_url = icon_url;
|
| scoped_refptr<base::RefCountedBytes> data = new base::RefCountedBytes();
|
| FillBitmap(gfx::kFaviconSize, gfx::kFaviconSize, &data->data());
|
| - history_handler->favicon_data_.image_data = data;
|
| + history_handler->favicon_data_.bitmap_data = data;
|
|
|
| // Send history response.
|
| history_handler->InvokeCallback();
|
| @@ -918,7 +918,7 @@ TEST_F(FaviconHandlerTest, FirstFavicon) {
|
| history_handler->favicon_data_.icon_url = icon_url;
|
| scoped_refptr<base::RefCountedBytes> data = new base::RefCountedBytes();
|
| FillBitmap(gfx::kFaviconSize, gfx::kFaviconSize, &data->data());
|
| - history_handler->favicon_data_.image_data = data;
|
| + history_handler->favicon_data_.bitmap_data = data;
|
|
|
| // Send history response.
|
| history_handler->InvokeCallback();
|
|
|