| Index: chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java
|
| diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java
|
| index 757e15ce12d75282e0e6ae61d89e1198ab716cdb..1cafc37ef69c55a52c81dff9729edba3d6abe5e8 100644
|
| --- a/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java
|
| +++ b/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java
|
| @@ -18,7 +18,6 @@ import org.junit.After;
|
| import org.junit.Before;
|
| import org.junit.Test;
|
| import org.junit.runner.RunWith;
|
| -
|
| import org.robolectric.RuntimeEnvironment;
|
| import org.robolectric.annotation.Config;
|
| import org.robolectric.shadows.ShadowLooper;
|
| @@ -188,11 +187,11 @@ public class WebappDataStorageTest {
|
|
|
| // Opening a data storage doesn't count as a launch.
|
| WebappDataStorage storage = WebappDataStorage.open("test");
|
| - assertTrue(!storage.wasLaunchedRecently());
|
| + assertTrue(!storage.wasUsedRecently());
|
|
|
| // When the last used time is updated, then it is a launch.
|
| storage.updateLastUsedTime();
|
| - assertTrue(storage.wasLaunchedRecently());
|
| + assertTrue(storage.wasUsedRecently());
|
|
|
| long lastUsedTime = mSharedPreferences.getLong(WebappDataStorage.KEY_LAST_USED,
|
| WebappDataStorage.LAST_USED_INVALID);
|
| @@ -204,29 +203,29 @@ public class WebappDataStorageTest {
|
| mSharedPreferences.edit()
|
| .putLong(WebappDataStorage.KEY_LAST_USED, lastUsedTime - TimeUnit.DAYS.toMillis(1L))
|
| .apply();
|
| - assertTrue(storage.wasLaunchedRecently());
|
| + assertTrue(storage.wasUsedRecently());
|
|
|
| // Move the last used time three days in the past.
|
| mSharedPreferences.edit()
|
| .putLong(WebappDataStorage.KEY_LAST_USED, lastUsedTime - TimeUnit.DAYS.toMillis(3L))
|
| .apply();
|
| - assertTrue(storage.wasLaunchedRecently());
|
| + assertTrue(storage.wasUsedRecently());
|
|
|
| // Move the last used time one week in the past.
|
| mSharedPreferences.edit()
|
| .putLong(WebappDataStorage.KEY_LAST_USED, lastUsedTime - TimeUnit.DAYS.toMillis(7L))
|
| .apply();
|
| - assertTrue(storage.wasLaunchedRecently());
|
| + assertTrue(storage.wasUsedRecently());
|
|
|
| // Move the last used time just under ten days in the past.
|
| mSharedPreferences.edit().putLong(WebappDataStorage.KEY_LAST_USED,
|
| lastUsedTime - TimeUnit.DAYS.toMillis(10L) + 1).apply();
|
| - assertTrue(storage.wasLaunchedRecently());
|
| + assertTrue(storage.wasUsedRecently());
|
|
|
| // Move the last used time to exactly ten days in the past.
|
| mSharedPreferences.edit().putLong(WebappDataStorage.KEY_LAST_USED,
|
| lastUsedTime - TimeUnit.DAYS.toMillis(10L)).apply();
|
| - assertTrue(!storage.wasLaunchedRecently());
|
| + assertTrue(!storage.wasUsedRecently());
|
| }
|
|
|
| @Test
|
|
|