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

Side by Side Diff: chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerTest.java

Issue 2513413004: Remove isIconGenerated parameter from WebApkInfo (Closed)
Patch Set: Merge branch 'update_fail_refactor002' into update_fail_refactor003 Created 4 years, 1 month 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 | « chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkMetaDataUtils.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 package org.chromium.chrome.browser.webapps; 5 package org.chromium.chrome.browser.webapps;
6 6
7 import static org.junit.Assert.assertEquals; 7 import static org.junit.Assert.assertEquals;
8 import static org.junit.Assert.assertFalse; 8 import static org.junit.Assert.assertFalse;
9 import static org.junit.Assert.assertTrue; 9 import static org.junit.Assert.assertTrue;
10 10
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 } 169 }
170 170
171 private WebappDataStorage getStorage() { 171 private WebappDataStorage getStorage() {
172 return WebappRegistry.getInstance().getWebappDataStorage(WEBAPK_ID); 172 return WebappRegistry.getInstance().getWebappDataStorage(WEBAPK_ID);
173 } 173 }
174 174
175 private void updateIfNeeded(WebApkUpdateManager updateManager) { 175 private void updateIfNeeded(WebApkUpdateManager updateManager) {
176 WebApkInfo info = WebApkInfo.create(WEBAPK_ID, WEBAPK_START_URL, null, n ull, null, null, 176 WebApkInfo info = WebApkInfo.create(WEBAPK_ID, WEBAPK_START_URL, null, n ull, null, null,
177 WebDisplayMode.Standalone, ScreenOrientationValues.DEFAULT, Shor tcutSource.UNKNOWN, 177 WebDisplayMode.Standalone, ScreenOrientationValues.DEFAULT, Shor tcutSource.UNKNOWN,
178 ShortcutHelper.MANIFEST_COLOR_INVALID_OR_MISSING, 178 ShortcutHelper.MANIFEST_COLOR_INVALID_OR_MISSING,
179 ShortcutHelper.MANIFEST_COLOR_INVALID_OR_MISSING, false, 179 ShortcutHelper.MANIFEST_COLOR_INVALID_OR_MISSING,
180 WebApkTestHelper.WEBAPK_PACKAGE_NAME); 180 WebApkTestHelper.WEBAPK_PACKAGE_NAME);
181 updateManager.updateIfNeeded(null, info); 181 updateManager.updateIfNeeded(null, info);
182 } 182 }
183 183
184 private void onGotWebApkCompatibleWebManifestForInitialUrl( 184 private void onGotWebApkCompatibleWebManifestForInitialUrl(
185 WebApkUpdateManager updateManager, boolean needsUpdate) { 185 WebApkUpdateManager updateManager, boolean needsUpdate) {
186 FetchedManifestData fetchedManifestData = new FetchedManifestData(); 186 FetchedManifestData fetchedManifestData = new FetchedManifestData();
187 fetchedManifestData.name = WEB_MANIFEST_NAME; 187 fetchedManifestData.name = WEB_MANIFEST_NAME;
188 updateManager.onFinishedFetchingWebManifestForInitialUrl(needsUpdate, fe tchedManifestData); 188 updateManager.onFinishedFetchingWebManifestForInitialUrl(needsUpdate, fe tchedManifestData);
189 } 189 }
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 updateIfNeeded(updateManager); 478 updateIfNeeded(updateManager);
479 updateManager.onFinishedFetchingWebManifestForInitialUrl(false, null); 479 updateManager.onFinishedFetchingWebManifestForInitialUrl(false, null);
480 updateManager.onGotManifestData(false, new FetchedManifestData()); 480 updateManager.onGotManifestData(false, new FetchedManifestData());
481 assertFalse(updateManager.updateRequested()); 481 assertFalse(updateManager.updateRequested());
482 482
483 // We got the Web Manifest. The {@link ManifestUpgradeDetector} should b e destroyed to stop 483 // We got the Web Manifest. The {@link ManifestUpgradeDetector} should b e destroyed to stop
484 // it from fetching the Web Manifest for subsequent page loads. 484 // it from fetching the Web Manifest for subsequent page loads.
485 assertTrue(updateManager.destroyedManifestUpgradeDetector()); 485 assertTrue(updateManager.destroyedManifestUpgradeDetector());
486 } 486 }
487 } 487 }
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkMetaDataUtils.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698