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

Side by Side Diff: chrome/browser/ui/ash/launcher/launcher_favicon_loader_browsertest.cc

Issue 266053003: Remove page IDs from three WebContentsObserver APIs that don't need it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 #include "chrome/browser/ui/ash/launcher/launcher_favicon_loader.h" 5 #include "chrome/browser/ui/ash/launcher/launcher_favicon_loader.h"
6 6
7 #include "ash/shelf/shelf_constants.h" 7 #include "ash/shelf/shelf_constants.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 29 matching lines...) Expand all
40 40
41 // WebContentsObserver overrides. 41 // WebContentsObserver overrides.
42 virtual void DidFinishLoad( 42 virtual void DidFinishLoad(
43 int64 frame_id, 43 int64 frame_id,
44 const GURL& validated_url, 44 const GURL& validated_url,
45 bool is_main_frame, 45 bool is_main_frame,
46 content::RenderViewHost* render_view_host) OVERRIDE { 46 content::RenderViewHost* render_view_host) OVERRIDE {
47 loaded_ = true; 47 loaded_ = true;
48 } 48 }
49 49
50 virtual void DidUpdateFaviconURL(int32 page_id, 50 virtual void DidUpdateFaviconURL(
51 const std::vector<content::FaviconURL>& candidates) OVERRIDE { 51 const std::vector<content::FaviconURL>& candidates) OVERRIDE {
52 if (!candidates.empty()) 52 if (!candidates.empty())
53 got_favicons_ = true; 53 got_favicons_ = true;
54 } 54 }
55 55
56 private: 56 private:
57 bool loaded_; 57 bool loaded_;
58 bool got_favicons_; 58 bool got_favicons_;
59 }; 59 };
60 60
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 EXPECT_TRUE(favicon_loader_->GetFavicon().empty()); 180 EXPECT_TRUE(favicon_loader_->GetFavicon().empty());
181 ASSERT_NO_FATAL_FAILURE(ResetDownloads()); 181 ASSERT_NO_FATAL_FAILURE(ResetDownloads());
182 182
183 ASSERT_TRUE(NavigateTo("launcher-largefavicon.html")); 183 ASSERT_TRUE(NavigateTo("launcher-largefavicon.html"));
184 ASSERT_TRUE(WaitForContentsLoaded()); 184 ASSERT_TRUE(WaitForContentsLoaded());
185 EXPECT_TRUE(WaitForFaviconUpdated()); 185 EXPECT_TRUE(WaitForFaviconUpdated());
186 186
187 EXPECT_FALSE(favicon_loader_->GetFavicon().empty()); 187 EXPECT_FALSE(favicon_loader_->GetFavicon().empty());
188 EXPECT_EQ(128, favicon_loader_->GetFavicon().height()); 188 EXPECT_EQ(128, favicon_loader_->GetFavicon().height());
189 } 189 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698