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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java

Issue 2409483002: Read the bare minimum of data from the WebAPK launch intent. (Closed)
Patch Set: Merge branch 'startup_crash' into security Created 4 years, 2 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/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java
index 22667117ee1500c11b8afc0862ee376a64223d14..47700953ad5b075b0556a4beef01e096fb4bd288 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java
@@ -209,68 +209,6 @@ public class WebappInfoTest extends InstrumentationTestCase {
}
@SmallTest
- @Feature({"Webapps", "WebApk"})
- public void testIntentDisplayMode() {
- {
- Intent intent = createIntentWithUrlAndId();
- intent.putExtra(ShortcutHelper.EXTRA_DISPLAY_MODE, WebDisplayMode.MinimalUi);
- WebappInfo info = WebappInfo.create(intent);
- assertEquals(WebDisplayMode.MinimalUi, info.displayMode());
- }
- {
- Intent intent = createIntentWithUrlAndId();
- intent.putExtra(WebApkConstants.EXTRA_WEBAPK_DISPLAY_MODE, "fullscreen");
- WebappInfo info = WebappInfo.create(intent);
- assertEquals(WebDisplayMode.Fullscreen, info.displayMode());
- }
- {
- // EXTRA_WEBAPK_DISPLAY_MODE takes precedence over EXTRA_DISPLAY_MODE.
dominickn 2016/10/11 05:54:52 Strictly speaking, you could keep this test, and j
- Intent intent = createIntentWithUrlAndId();
- intent.putExtra(WebApkConstants.EXTRA_WEBAPK_DISPLAY_MODE, "fullscreen");
- intent.putExtra(ShortcutHelper.EXTRA_DISPLAY_MODE, WebDisplayMode.MinimalUi);
- WebappInfo info = WebappInfo.create(intent);
- assertEquals(WebDisplayMode.Fullscreen, info.displayMode());
- }
- {
- Intent intent = createIntentWithUrlAndId();
- intent.putExtra(WebApkConstants.EXTRA_WEBAPK_DISPLAY_MODE, "invalid");
- WebappInfo info = WebappInfo.create(intent);
- assertEquals(WebDisplayMode.Standalone, info.displayMode());
- }
- }
-
- @SmallTest
- @Feature({"Webapps", "WebApk"})
- public void testIntentOrientation() {
- {
- Intent intent = createIntentWithUrlAndId();
- intent.putExtra(ShortcutHelper.EXTRA_ORIENTATION, ScreenOrientationValues.LANDSCAPE);
- WebappInfo info = WebappInfo.create(intent);
- assertEquals(ScreenOrientationValues.LANDSCAPE, info.orientation());
- }
- {
- Intent intent = createIntentWithUrlAndId();
- intent.putExtra(WebApkConstants.EXTRA_WEBAPK_ORIENTATION, "natural");
- WebappInfo info = WebappInfo.create(intent);
- assertEquals(ScreenOrientationValues.NATURAL, info.orientation());
- }
- {
- // EXTRA_WEBAPK_ORIENTATION takes precedence over EXTRA_ORIENTATION.
dominickn 2016/10/11 05:54:52 Ditto.
- Intent intent = createIntentWithUrlAndId();
- intent.putExtra(WebApkConstants.EXTRA_WEBAPK_ORIENTATION, "natural");
- intent.putExtra(ShortcutHelper.EXTRA_ORIENTATION, ScreenOrientationValues.LANDSCAPE);
- WebappInfo info = WebappInfo.create(intent);
- assertEquals(ScreenOrientationValues.NATURAL, info.orientation());
- }
- {
- Intent intent = createIntentWithUrlAndId();
- intent.putExtra(WebApkConstants.EXTRA_WEBAPK_ORIENTATION, "invalid");
- WebappInfo info = WebappInfo.create(intent);
- assertEquals(ScreenOrientationValues.DEFAULT, info.orientation());
- }
- }
-
- @SmallTest
@Feature({"Webapps"})
public void testIntentGeneratedIcon() {
String id = "webapp id";

Powered by Google App Engine
This is Rietveld 408576698