| Index: chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestBase.java
|
| diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestBase.java b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestBase.java
|
| index 8bcc1e53712d8916eb60f4b5ffc379df8d79b5ae..16309e0d1bf93c68618af46b40f55a2f1e27699b 100644
|
| --- a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestBase.java
|
| +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestBase.java
|
| @@ -28,7 +28,6 @@ public abstract class WebappActivityTestBase extends ChromeActivityTestCaseBase<
|
| static final String WEBAPP_ID = "webapp_id";
|
| static final String WEBAPP_NAME = "webapp name";
|
| static final String WEBAPP_SHORT_NAME = "webapp short name";
|
| - static final String WEBAPP_URL = "https://www.google.com";
|
|
|
| // Empty 192x192 image generated with:
|
| // ShortcutHelper.encodeBitmapAsString(Bitmap.createBitmap(192, 192, Bitmap.Config.ARGB_4444));
|
| @@ -90,10 +89,16 @@ public abstract class WebappActivityTestBase extends ChromeActivityTestCaseBase<
|
| super.setUp();
|
|
|
| // Register the webapp so when the data storage is opened, the test doesn't crash. There is
|
| - // no race condition with the retrival as AsyncTasks are run sequentially on the background
|
| + // no race condition with the retrieval as AsyncTasks are run sequentially on the background
|
| // thread.
|
| - WebappRegistry.registerWebapp(getInstrumentation().getTargetContext(),
|
| - WEBAPP_ID, WEBAPP_URL);
|
| + WebappRegistry.registerWebapp(getInstrumentation().getTargetContext(), WEBAPP_ID,
|
| + new WebappRegistry.FetchWebappDataStorageCallback() {
|
| + @Override
|
| + public void onWebappDataStorageRetrieved(WebappDataStorage storage) {
|
| + storage.updateFromShortcutIntent(createIntent());
|
| + }
|
| + }
|
| + );
|
| }
|
|
|
| /**
|
|
|