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

Side by Side Diff: chrome/browser/android/webapps/add_to_homescreen_data_fetcher_unittest.cc

Issue 2773353002: Make minimum PWA icon size the same accross all device densities
Patch Set: Merge branch 'master' into min_size Created 3 years, 8 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/android/webapps/add_to_homescreen_data_fetcher.h" 5 #include "chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 } 200 }
201 201
202 void TearDown() override { 202 void TearDown() override {
203 embedded_worker_test_helper_.reset(); 203 embedded_worker_test_helper_.reset();
204 ChromeRenderViewHostTestHarness::TearDown(); 204 ChromeRenderViewHostTestHarness::TearDown();
205 } 205 }
206 206
207 scoped_refptr<AddToHomescreenDataFetcher> BuildFetcher( 207 scoped_refptr<AddToHomescreenDataFetcher> BuildFetcher(
208 bool check_webapk_compatible, 208 bool check_webapk_compatible,
209 AddToHomescreenDataFetcher::Observer* observer) { 209 AddToHomescreenDataFetcher::Observer* observer) {
210 return new AddToHomescreenDataFetcher(web_contents(), 1, 1, 1, 1, 1, 210 return new AddToHomescreenDataFetcher(web_contents(), 144, 144, 1,
211 check_webapk_compatible, observer); 211 check_webapk_compatible, observer);
212 } 212 }
213 213
214 // Set the manifest to be returned as a result of WebContents::GetManifest(). 214 // Set the manifest to be returned as a result of WebContents::GetManifest().
215 void SetManifest(const GURL& manifest_url, 215 void SetManifest(const GURL& manifest_url,
216 const content::Manifest& manifest, 216 const content::Manifest& manifest,
217 int fetch_delay_ms) { 217 int fetch_delay_ms) {
218 MockWebContents* mock_web_contents = 218 MockWebContents* mock_web_contents =
219 static_cast<MockWebContents*>(web_contents()); 219 static_cast<MockWebContents*>(web_contents());
220 mock_web_contents->SetManifest(manifest_url, manifest, fetch_delay_ms); 220 mock_web_contents->SetManifest(manifest_url, manifest, fetch_delay_ms);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 } 362 }
363 // This callback enables the text field in the add-to-homescreen dialog. 363 // This callback enables the text field in the add-to-homescreen dialog.
364 EXPECT_TRUE(waiter.title_available()); 364 EXPECT_TRUE(waiter.title_available());
365 365
366 fetcher->set_weak_observer(nullptr); 366 fetcher->set_weak_observer(nullptr);
367 } 367 }
368 368
369 INSTANTIATE_TEST_CASE_P(CheckWebApkCompatibility, 369 INSTANTIATE_TEST_CASE_P(CheckWebApkCompatibility,
370 AddToHomescreenDataFetcherTestCommon, 370 AddToHomescreenDataFetcherTestCommon,
371 ::testing::Values(false, true)); 371 ::testing::Values(false, true));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698