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

Side by Side Diff: components/favicon/content/content_favicon_driver_unittest.cc

Issue 2694333002: Fix leaking page visits in incognito mode via bookmarked favicons (Closed)
Patch Set: Rebased Created 3 years, 3 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
« no previous file with comments | « components/favicon/content/content_favicon_driver.cc ('k') | components/favicon/core/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/favicon/content/content_favicon_driver.h" 5 #include "components/favicon/content/content_favicon_driver.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 ON_CALL(favicon_service_, GetFaviconForPageURL(_, _, _, _, _)) 43 ON_CALL(favicon_service_, GetFaviconForPageURL(_, _, _, _, _))
44 .WillByDefault(PostReply<5>(kEmptyRawBitmapResult)); 44 .WillByDefault(PostReply<5>(kEmptyRawBitmapResult));
45 } 45 }
46 46
47 ~ContentFaviconDriverTest() override {} 47 ~ContentFaviconDriverTest() override {}
48 48
49 // content::RenderViewHostTestHarness: 49 // content::RenderViewHostTestHarness:
50 void SetUp() override { 50 void SetUp() override {
51 RenderViewHostTestHarness::SetUp(); 51 RenderViewHostTestHarness::SetUp();
52 52
53 ContentFaviconDriver::CreateForWebContents( 53 ContentFaviconDriver::CreateForWebContents(web_contents(),
54 web_contents(), &favicon_service_, nullptr, nullptr); 54 &favicon_service_, nullptr);
55 } 55 }
56 56
57 content::WebContentsTester* web_contents_tester() { 57 content::WebContentsTester* web_contents_tester() {
58 return content::WebContentsTester::For(web_contents()); 58 return content::WebContentsTester::For(web_contents());
59 } 59 }
60 60
61 void TestFetchFaviconForPage( 61 void TestFetchFaviconForPage(
62 const GURL& page_url, 62 const GURL& page_url,
63 const std::vector<content::FaviconURL>& candidates) { 63 const std::vector<content::FaviconURL>& candidates) {
64 ContentFaviconDriver* favicon_driver = 64 ContentFaviconDriver* favicon_driver =
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 base::Bucket(/*min=*/3, /*count=*/2))); 175 base::Bucket(/*min=*/3, /*count=*/2)));
176 EXPECT_THAT(tester.GetAllSamples("Favicons.CandidatesWithDefinedSizesCount"), 176 EXPECT_THAT(tester.GetAllSamples("Favicons.CandidatesWithDefinedSizesCount"),
177 ElementsAre(base::Bucket(/*min=*/1, /*count=*/3))); 177 ElementsAre(base::Bucket(/*min=*/1, /*count=*/3)));
178 EXPECT_THAT(tester.GetAllSamples("Favicons.CandidatesWithTouchIconsCount"), 178 EXPECT_THAT(tester.GetAllSamples("Favicons.CandidatesWithTouchIconsCount"),
179 ElementsAre(base::Bucket(/*min=*/0, /*count=*/1), 179 ElementsAre(base::Bucket(/*min=*/0, /*count=*/1),
180 base::Bucket(/*min=*/2, /*count=*/2))); 180 base::Bucket(/*min=*/2, /*count=*/2)));
181 } 181 }
182 182
183 } // namespace 183 } // namespace
184 } // namespace favicon 184 } // namespace favicon
OLDNEW
« no previous file with comments | « components/favicon/content/content_favicon_driver.cc ('k') | components/favicon/core/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698