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

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

Issue 1845233002: Store standalone web app data in WebappDataStorage as well as the homescreen intent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@notification-deep-linking
Patch Set: Final nit Created 4 years, 8 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/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());
+ }
+ }
+ );
}
/**

Powered by Google App Engine
This is Rietveld 408576698