| OLD | NEW |
| 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 android.content.Context; | 7 import android.content.Context; |
| 8 import android.support.test.filters.MediumTest; | 8 import android.support.test.filters.MediumTest; |
| 9 | 9 |
| 10 import org.chromium.base.ThreadUtils; | 10 import org.chromium.base.ThreadUtils; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 "/chrome/test/data/banners/manifest_one_icon.json"; | 36 "/chrome/test/data/banners/manifest_one_icon.json"; |
| 37 | 37 |
| 38 // Data contained in {@link WEBAPK_MANIFEST_URL}. | 38 // Data contained in {@link WEBAPK_MANIFEST_URL}. |
| 39 private static final String WEBAPK_START_URL = | 39 private static final String WEBAPK_START_URL = |
| 40 "/chrome/test/data/banners/manifest_test_page.html"; | 40 "/chrome/test/data/banners/manifest_test_page.html"; |
| 41 private static final String WEBAPK_SCOPE_URL = "/chrome/test/data/banners/"; | 41 private static final String WEBAPK_SCOPE_URL = "/chrome/test/data/banners/"; |
| 42 private static final String WEBAPK_NAME = "Manifest test app"; | 42 private static final String WEBAPK_NAME = "Manifest test app"; |
| 43 private static final String WEBAPK_SHORT_NAME = "Manifest test app"; | 43 private static final String WEBAPK_SHORT_NAME = "Manifest test app"; |
| 44 private static final String WEBAPK_ICON_URL = "/chrome/test/data/banners/ima
ge-512px.png"; | 44 private static final String WEBAPK_ICON_URL = "/chrome/test/data/banners/ima
ge-512px.png"; |
| 45 private static final String WEBAPK_ICON_MURMUR2_HASH = "7742433188808797392"
; | 45 private static final String WEBAPK_ICON_MURMUR2_HASH = "7742433188808797392"
; |
| 46 private static final int WEBAPK_DISPLAY_MODE = WebDisplayMode.kStandalone; | 46 private static final int WEBAPK_DISPLAY_MODE = WebDisplayMode.STANDALONE; |
| 47 private static final int WEBAPK_ORIENTATION = ScreenOrientationValues.LANDSC
APE; | 47 private static final int WEBAPK_ORIENTATION = ScreenOrientationValues.LANDSC
APE; |
| 48 private static final long WEBAPK_THEME_COLOR = 2147483648L; | 48 private static final long WEBAPK_THEME_COLOR = 2147483648L; |
| 49 private static final long WEBAPK_BACKGROUND_COLOR = 2147483648L; | 49 private static final long WEBAPK_BACKGROUND_COLOR = 2147483648L; |
| 50 | 50 |
| 51 private EmbeddedTestServer mTestServer; | 51 private EmbeddedTestServer mTestServer; |
| 52 private Tab mTab; | 52 private Tab mTab; |
| 53 | 53 |
| 54 /** | 54 /** |
| 55 * Subclass of {@link WebApkUpdateManager} which notifies the {@link Callbac
kHelper} passed to | 55 * Subclass of {@link WebApkUpdateManager} which notifies the {@link Callbac
kHelper} passed to |
| 56 * the constructor when it has been determined whether an update is needed. | 56 * the constructor when it has been determined whether an update is needed. |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 // URL canonicalization should replace "%62" with 'b'. | 195 // URL canonicalization should replace "%62" with 'b'. |
| 196 CreationData creationData = defaultCreationData(mTestServer); | 196 CreationData creationData = defaultCreationData(mTestServer); |
| 197 creationData.startUrl = mTestServer.getURL( | 197 creationData.startUrl = mTestServer.getURL( |
| 198 "/chrome/test/data/banners/manifest_%62est_page.html"); | 198 "/chrome/test/data/banners/manifest_%62est_page.html"); |
| 199 | 199 |
| 200 WebappTestPage.navigateToPageWithServiceWorkerAndManifest( | 200 WebappTestPage.navigateToPageWithServiceWorkerAndManifest( |
| 201 mTestServer, mTab, WEBAPK_MANIFEST_URL); | 201 mTestServer, mTab, WEBAPK_MANIFEST_URL); |
| 202 assertTrue(checkUpdateNeeded(creationData)); | 202 assertTrue(checkUpdateNeeded(creationData)); |
| 203 } | 203 } |
| 204 } | 204 } |
| OLD | NEW |