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

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

Issue 1224273003: webapps: propogate name and shortName from manifest to Java (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test compile on Android Created 5 years, 5 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 f380a477b0d83598ea4639a3ddd3a6d15c681acd..8b18299bba7cd2fccdf0d3088fca82eff066c3f7 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
@@ -20,11 +20,12 @@ public class WebappInfoTest extends InstrumentationTestCase {
@Feature({"Webapps"})
public void testAbout() {
String id = "webapp id";
- String title = "webapp title";
+ String name = "longName";
+ String shortName = "name";
String url = "about:blank";
- WebappInfo info = WebappInfo.create(id, url,
- null, title, ScreenOrientationValues.DEFAULT, ShortcutHelper.SOURCE_UNKNOWN);
+ WebappInfo info = WebappInfo.create(id, url, null, name, shortName,
+ ScreenOrientationValues.DEFAULT, ShortcutHelper.SOURCE_UNKNOWN);
assertNotNull(info);
}
@@ -32,11 +33,12 @@ public class WebappInfoTest extends InstrumentationTestCase {
@Feature({"Webapps"})
public void testRandomUrl() {
String id = "webapp id";
- String title = "webapp title";
+ String name = "longName";
+ String shortName = "name";
String url = "http://google.com";
- WebappInfo info = WebappInfo.create(id, url,
- null, title, ScreenOrientationValues.DEFAULT, ShortcutHelper.SOURCE_UNKNOWN);
+ WebappInfo info = WebappInfo.create(id, url, null, name, shortName,
+ ScreenOrientationValues.DEFAULT, ShortcutHelper.SOURCE_UNKNOWN);
assertNotNull(info);
}
@@ -44,12 +46,14 @@ public class WebappInfoTest extends InstrumentationTestCase {
@Feature({"Webapps"})
public void testSpacesInUrl() {
String id = "webapp id";
- String title = "webapp title";
+ String name = "longName";
+ String shortName = "name";
String bustedUrl = "http://money.cnn.com/?category=Latest News";
Intent intent = new Intent();
intent.putExtra(ShortcutHelper.EXTRA_ID, id);
- intent.putExtra(ShortcutHelper.EXTRA_TITLE, title);
+ intent.putExtra(ShortcutHelper.EXTRA_NAME, name);
+ intent.putExtra(ShortcutHelper.EXTRA_SHORT_NAME, shortName);
intent.putExtra(ShortcutHelper.EXTRA_URL, bustedUrl);
WebappInfo info = WebappInfo.create(intent);
@@ -60,11 +64,12 @@ public class WebappInfoTest extends InstrumentationTestCase {
@Feature({"Webapps"})
public void testOrientationAndSource() {
String id = "webapp id";
- String title = "webapp title";
+ String name = "longName";
+ String shortName = "name";
String url = "http://money.cnn.com";
- WebappInfo info = WebappInfo.create(id, url,
- null, title, ScreenOrientationValues.DEFAULT, ShortcutHelper.SOURCE_UNKNOWN);
+ WebappInfo info = WebappInfo.create(id, url, null, name, shortName,
+ ScreenOrientationValues.DEFAULT, ShortcutHelper.SOURCE_UNKNOWN);
assertNotNull(info);
assertEquals(info.orientation(), ScreenOrientationValues.DEFAULT);
assertEquals(info.source(), ShortcutHelper.SOURCE_UNKNOWN);

Powered by Google App Engine
This is Rietveld 408576698