Bug 1411654 - Pre: Clear icon disk storage in test. r=mcomella
Newer versions of Robolectric seem to have different semantics about
clearing disk caches, so this is necessary. But for older versions,
it shouldn't hurt, and is slightly more clear than relying on an
implicit clear.
MozReview-Commit-ID: LRcaEPasXj8
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestLookupIconUrl.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestLookupIconUrl.java
@@ -23,16 +23,17 @@ public class TestLookupIconUrl {
private static final String TEST_ICON_URL_2 = "http://example.org/favicon.ico";
private static final String TEST_ICON_URL_3 = "http://example.com/favicon.ico";
private static final String TEST_ICON_URL_4 = "http://example.net/favicon.ico";
@Before
public void setUp() {
MemoryStorage.get().evictAll();
+ DiskStorage.get(RuntimeEnvironment.application).evictAll();
}
@Test
public void testNoIconUrlIsAddedByDefault() {
final IconRequest request = Icons.with(RuntimeEnvironment.application)
.pageUrl(TEST_PAGE_URL)
.build();