| 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.Intent; | 7 import android.content.Intent; |
| 8 import android.os.Bundle; | 8 import android.os.Bundle; |
| 9 | 9 |
| 10 import org.junit.Assert; | 10 import org.junit.Assert; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 WebApkInfo info = WebApkInfo.create(intent); | 80 WebApkInfo info = WebApkInfo.create(intent); |
| 81 | 81 |
| 82 Assert.assertEquals(WebApkConstants.WEBAPK_ID_PREFIX + WebApkTestHelper.
WEBAPK_PACKAGE_NAME, | 82 Assert.assertEquals(WebApkConstants.WEBAPK_ID_PREFIX + WebApkTestHelper.
WEBAPK_PACKAGE_NAME, |
| 83 info.id()); | 83 info.id()); |
| 84 Assert.assertEquals(START_URL, info.uri().toString()); | 84 Assert.assertEquals(START_URL, info.uri().toString()); |
| 85 Assert.assertTrue(info.shouldForceNavigation()); | 85 Assert.assertTrue(info.shouldForceNavigation()); |
| 86 Assert.assertEquals(SCOPE, info.scopeUri().toString()); | 86 Assert.assertEquals(SCOPE, info.scopeUri().toString()); |
| 87 Assert.assertEquals(NAME, info.name()); | 87 Assert.assertEquals(NAME, info.name()); |
| 88 Assert.assertEquals(SHORT_NAME, info.shortName()); | 88 Assert.assertEquals(SHORT_NAME, info.shortName()); |
| 89 Assert.assertEquals(WebDisplayMode.kMinimalUi, info.displayMode()); | 89 Assert.assertEquals(WebDisplayMode.MINIMAL_UI, info.displayMode()); |
| 90 Assert.assertEquals(ScreenOrientationValues.PORTRAIT, info.orientation()
); | 90 Assert.assertEquals(ScreenOrientationValues.PORTRAIT, info.orientation()
); |
| 91 Assert.assertTrue(info.hasValidThemeColor()); | 91 Assert.assertTrue(info.hasValidThemeColor()); |
| 92 Assert.assertEquals(1L, info.themeColor()); | 92 Assert.assertEquals(1L, info.themeColor()); |
| 93 Assert.assertTrue(info.hasValidBackgroundColor()); | 93 Assert.assertTrue(info.hasValidBackgroundColor()); |
| 94 Assert.assertEquals(2L, info.backgroundColor()); | 94 Assert.assertEquals(2L, info.backgroundColor()); |
| 95 Assert.assertEquals(WebApkTestHelper.WEBAPK_PACKAGE_NAME, info.webApkPac
kageName()); | 95 Assert.assertEquals(WebApkTestHelper.WEBAPK_PACKAGE_NAME, info.webApkPac
kageName()); |
| 96 Assert.assertEquals(SHELL_APK_VERSION, info.shellApkVersion()); | 96 Assert.assertEquals(SHELL_APK_VERSION, info.shellApkVersion()); |
| 97 Assert.assertEquals(MANIFEST_URL, info.manifestUrl()); | 97 Assert.assertEquals(MANIFEST_URL, info.manifestUrl()); |
| 98 Assert.assertEquals(START_URL, info.manifestStartUrl()); | 98 Assert.assertEquals(START_URL, info.manifestStartUrl()); |
| 99 | 99 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 225 |
| 226 Intent intent = new Intent(); | 226 Intent intent = new Intent(); |
| 227 intent.putExtra( | 227 intent.putExtra( |
| 228 WebApkConstants.EXTRA_WEBAPK_PACKAGE_NAME, WebApkTestHelper.WEBA
PK_PACKAGE_NAME); | 228 WebApkConstants.EXTRA_WEBAPK_PACKAGE_NAME, WebApkTestHelper.WEBA
PK_PACKAGE_NAME); |
| 229 intent.putExtra(ShortcutHelper.EXTRA_URL, START_URL); | 229 intent.putExtra(ShortcutHelper.EXTRA_URL, START_URL); |
| 230 | 230 |
| 231 WebApkInfo info = WebApkInfo.create(intent); | 231 WebApkInfo info = WebApkInfo.create(intent); |
| 232 Assert.assertTrue(info.shouldForceNavigation()); | 232 Assert.assertTrue(info.shouldForceNavigation()); |
| 233 } | 233 } |
| 234 } | 234 } |
| OLD | NEW |