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

Side by Side Diff: chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappRegistryTest.java

Issue 2760103002: Merge WebApkConstants.EXTRA_WEBAPK_PACKAGE_NAME and ShortcutHelper.EXTRA_WEBAPK_PACKAGE_NAME (Closed)
Patch Set: Merge branch 'master' into package_name Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.webapps; 5 package org.chromium.chrome.browser.webapps;
6 6
7 import static org.junit.Assert.assertEquals; 7 import static org.junit.Assert.assertEquals;
8 import static org.junit.Assert.assertTrue; 8 import static org.junit.Assert.assertTrue;
9 9
10 import android.content.Context; 10 import android.content.Context;
(...skipping 10 matching lines...) Expand all
21 import org.robolectric.RuntimeEnvironment; 21 import org.robolectric.RuntimeEnvironment;
22 import org.robolectric.annotation.Config; 22 import org.robolectric.annotation.Config;
23 import org.robolectric.shadows.ShadowLooper; 23 import org.robolectric.shadows.ShadowLooper;
24 24
25 import org.chromium.base.ContextUtils; 25 import org.chromium.base.ContextUtils;
26 import org.chromium.base.test.util.Feature; 26 import org.chromium.base.test.util.Feature;
27 import org.chromium.chrome.browser.ShortcutHelper; 27 import org.chromium.chrome.browser.ShortcutHelper;
28 import org.chromium.chrome.browser.browsing_data.UrlFilters; 28 import org.chromium.chrome.browser.browsing_data.UrlFilters;
29 import org.chromium.testing.local.BackgroundShadowAsyncTask; 29 import org.chromium.testing.local.BackgroundShadowAsyncTask;
30 import org.chromium.testing.local.LocalRobolectricTestRunner; 30 import org.chromium.testing.local.LocalRobolectricTestRunner;
31 import org.chromium.webapk.lib.common.WebApkConstants;
31 32
32 import java.util.Arrays; 33 import java.util.Arrays;
33 import java.util.Collections; 34 import java.util.Collections;
34 import java.util.HashMap; 35 import java.util.HashMap;
35 import java.util.HashSet; 36 import java.util.HashSet;
36 import java.util.Map; 37 import java.util.Map;
37 import java.util.Set; 38 import java.util.Set;
38 39
39 /** 40 /**
40 * Tests the WebappRegistry class by ensuring that it persists data to 41 * Tests the WebappRegistry class by ensuring that it persists data to
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 protected Intent doInBackground(Void... nothing) { 622 protected Intent doInBackground(Void... nothing) {
622 return ShortcutHelper.createWebappShortcutIntentForTesting("id", url); 623 return ShortcutHelper.createWebappShortcutIntentForTesting("id", url);
623 } 624 }
624 }; 625 };
625 return shortcutIntentTask.execute().get(); 626 return shortcutIntentTask.execute().get();
626 } 627 }
627 628
628 private Intent createWebApkIntent(String webappId, String webApkPackage) { 629 private Intent createWebApkIntent(String webappId, String webApkPackage) {
629 Intent intent = new Intent(); 630 Intent intent = new Intent();
630 intent.putExtra(ShortcutHelper.EXTRA_ID, webappId) 631 intent.putExtra(ShortcutHelper.EXTRA_ID, webappId)
631 .putExtra(ShortcutHelper.EXTRA_URL, "https://foo.com") 632 .putExtra(ShortcutHelper.EXTRA_URL, "https://foo.com")
632 .putExtra(ShortcutHelper.EXTRA_WEBAPK_PACKAGE_NAME, webApkPackage) ; 633 .putExtra(WebApkConstants.EXTRA_WEBAPK_PACKAGE_NAME, webApkPacka ge);
633 return intent; 634 return intent;
634 } 635 }
635 } 636 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698