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

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

Issue 24063004: Adding a dialog on click of "add to homescreen" menu item to edit the title. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Error uploading patchset, trying again Created 7 years, 3 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/ShortcutHelperTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/ShortcutHelperTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/ShortcutHelperTest.java
index 43e0112ba860ea61ccdce8e99277476c8f5e8610..cfca0dc514be1514d2d6d04e6b64d5e3f6e05504 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/ShortcutHelperTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/ShortcutHelperTest.java
@@ -82,7 +82,7 @@ public class ShortcutHelperTest extends ChromiumTestShellTestBase {
@Feature("{Webapp}")
public void testAddWebappShortcuts() throws InterruptedException {
// Add a webapp shortcut and make sure the intent's parameters make sense.
- addShortcutToURL(WEBAPP_HTML);
+ addShortcutToURL(WEBAPP_HTML, "");
gone 2013/09/13 00:31:53 Can you add a unit test to see if your override wo
Ramya 2013/09/13 01:04:34 Done.
Intent firedIntent = mTestObserver.firedIntent;
assertEquals(WEBAPP_TITLE, firedIntent.getStringExtra(Intent.EXTRA_SHORTCUT_NAME));
@@ -93,7 +93,7 @@ public class ShortcutHelperTest extends ChromiumTestShellTestBase {
// Add a second shortcut and make sure it matches the second webapp's parameters.
mTestObserver.reset();
- addShortcutToURL(SECOND_WEBAPP_HTML);
+ addShortcutToURL(SECOND_WEBAPP_HTML, "");
Intent newFiredIntent = mTestObserver.firedIntent;
assertEquals(SECOND_WEBAPP_TITLE,
newFiredIntent.getStringExtra(Intent.EXTRA_SHORTCUT_NAME));
@@ -107,7 +107,7 @@ public class ShortcutHelperTest extends ChromiumTestShellTestBase {
@MediumTest
@Feature("{Webapp}")
public void testAddBookmarkShortcut() throws InterruptedException {
- addShortcutToURL(NORMAL_HTML);
+ addShortcutToURL(NORMAL_HTML, "");
// Make sure the intent's parameters make sense.
Intent firedIntent = mTestObserver.firedIntent;
@@ -119,7 +119,7 @@ public class ShortcutHelperTest extends ChromiumTestShellTestBase {
assertNull(launchIntent.getComponent());
}
- private void addShortcutToURL(String url) throws InterruptedException {
+ private void addShortcutToURL(String url, final String title) throws InterruptedException {
loadUrlWithSanitization(url);
assertTrue(waitForActiveShellToBeDoneLoading());
@@ -127,7 +127,7 @@ public class ShortcutHelperTest extends ChromiumTestShellTestBase {
getInstrumentation().runOnMainSync(new Runnable() {
@Override
public void run() {
- ShortcutHelper.addShortcut(mActivity.getActiveTab());
+ ShortcutHelper.addShortcut(mActivity.getActiveTab(), title);
}
});

Powered by Google App Engine
This is Rietveld 408576698