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

Unified Diff: chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkInfoTest.java

Issue 2758193002: [Android WebAPKs] Don't navigate WebAPK when launching it from launcher (Closed)
Patch Set: Merge branch 'master' into twitter Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkInfoTest.java
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkInfoTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkInfoTest.java
index 96608f7f1cfbb709b3ea4563c818614e58e1c8b1..7ff886c866ca080d49951fba3403abb4e9ffe87d 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkInfoTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkInfoTest.java
@@ -73,6 +73,7 @@ public class WebApkInfoTest {
Intent intent = new Intent();
intent.putExtra(
WebApkConstants.EXTRA_WEBAPK_PACKAGE_NAME, WebApkTestHelper.WEBAPK_PACKAGE_NAME);
+ intent.putExtra(WebApkConstants.EXTRA_WEBAPK_FORCE_NAVIGATION, true);
intent.putExtra(ShortcutHelper.EXTRA_URL, START_URL);
intent.putExtra(ShortcutHelper.EXTRA_SOURCE, ShortcutSource.NOTIFICATION);
@@ -80,6 +81,8 @@ public class WebApkInfoTest {
Assert.assertEquals(WebApkConstants.WEBAPK_ID_PREFIX + WebApkTestHelper.WEBAPK_PACKAGE_NAME,
info.id());
+ Assert.assertEquals(START_URL, info.uri().toString());
+ Assert.assertTrue(info.shouldForceNavigation());
Assert.assertEquals(SCOPE, info.scopeUri().toString());
Assert.assertEquals(NAME, info.name());
Assert.assertEquals(SHORT_NAME, info.shortName());

Powered by Google App Engine
This is Rietveld 408576698