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

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

Issue 1239923002: webapps: add splashscreen for installed webapps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@manifest-title
Patch Set: Fix test compile Created 5 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/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 54d38c28558fc01c6c7054bb720d48db6788e403..6e38730c81daab258b4e2a5ec937d72e6515bc13 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
@@ -36,6 +36,11 @@ public abstract class WebappActivityTestBase extends ChromeActivityTestCaseBase<
protected void setUp() throws Exception {
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
+ // thread.
+ WebappRegistry.registerWebapp(getInstrumentation().getTargetContext(), WEBAPP_ID);
+
// Default to a webapp that just loads about:blank to avoid a network load. This results
// in the URL bar showing since {@link UrlUtils} cannot parse this type of URL.
Intent intent = new Intent(getInstrumentation().getTargetContext(), WebappActivity0.class);

Powered by Google App Engine
This is Rietveld 408576698