Index: chrome/android/junit/src/org/chromium/chrome/browser/suggestions/TileTest.java |
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/suggestions/TileTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/suggestions/TileTest.java |
index 08ce230936a10b6ce96dacade9f5460a6dd9a4bc..dffc7848f210674042dd716a1baca437f1816c69 100644 |
--- a/chrome/android/junit/src/org/chromium/chrome/browser/suggestions/TileTest.java |
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/suggestions/TileTest.java |
@@ -18,8 +18,6 @@ import org.junit.runner.RunWith; |
import org.mockito.MockitoAnnotations; |
import org.robolectric.annotation.Config; |
-import org.chromium.chrome.browser.ntp.MostVisitedTileType; |
-import org.chromium.chrome.browser.ntp.NTPTileSource; |
import org.chromium.testing.local.LocalRobolectricTestRunner; |
/** |
@@ -37,8 +35,8 @@ public class TileTest { |
@Test |
public void testImportDataWithNewTitle() { |
- Tile tile = new Tile("title", URLS[0], "", 0, NTPTileSource.TOP_SITES); |
- Tile oldTile = new Tile("oldTitle", URLS[0], "", 0, NTPTileSource.TOP_SITES); |
+ Tile tile = new Tile("title", URLS[0], "", 0, TileSource.TOP_SITES); |
+ Tile oldTile = new Tile("oldTitle", URLS[0], "", 0, TileSource.TOP_SITES); |
// importData should report the change, and the new tile should keep its own data. |
assertTrue(tile.importData(oldTile)); |
@@ -47,8 +45,8 @@ public class TileTest { |
@Test(expected = AssertionError.class) |
public void testImportDataWithNewUrl() { |
- Tile tile = new Tile("title", URLS[0], "", 0, NTPTileSource.TOP_SITES); |
- Tile oldTile = new Tile("title", URLS[1], "", 0, NTPTileSource.TOP_SITES); |
+ Tile tile = new Tile("title", URLS[0], "", 0, TileSource.TOP_SITES); |
+ Tile oldTile = new Tile("title", URLS[1], "", 0, TileSource.TOP_SITES); |
// Importing from a tile associated to a different URL should crash, as bug detection |
// measure. |
@@ -57,8 +55,8 @@ public class TileTest { |
@Test |
public void testImportDataWithNewWhitelistIconPath() { |
- Tile tile = new Tile("title", URLS[0], "", 0, NTPTileSource.TOP_SITES); |
- Tile oldTile = new Tile("title", URLS[0], "foobar", 0, NTPTileSource.TOP_SITES); |
+ Tile tile = new Tile("title", URLS[0], "", 0, TileSource.TOP_SITES); |
+ Tile oldTile = new Tile("title", URLS[0], "foobar", 0, TileSource.TOP_SITES); |
// importData should report the change, and the new tile should keep its own data. |
assertTrue(tile.importData(oldTile)); |
@@ -67,8 +65,8 @@ public class TileTest { |
@Test |
public void testImportDataWithNewIndex() { |
- Tile tile = new Tile("title", URLS[0], "", 0, NTPTileSource.TOP_SITES); |
- Tile oldTile = new Tile("title", URLS[0], "", 1, NTPTileSource.TOP_SITES); |
+ Tile tile = new Tile("title", URLS[0], "", 0, TileSource.TOP_SITES); |
+ Tile oldTile = new Tile("title", URLS[0], "", 1, TileSource.TOP_SITES); |
// importData should report the change, and the new tile should keep its own data. |
assertTrue(tile.importData(oldTile)); |
@@ -77,19 +75,19 @@ public class TileTest { |
@Test |
public void testImportDataWithNewSource() { |
- Tile tile = new Tile("title", URLS[0], "", 0, NTPTileSource.TOP_SITES); |
- Tile oldTile = new Tile("title", URLS[0], "", 0, NTPTileSource.POPULAR); |
+ Tile tile = new Tile("title", URLS[0], "", 0, TileSource.TOP_SITES); |
+ Tile oldTile = new Tile("title", URLS[0], "", 0, TileSource.POPULAR); |
// importData should not report the change since it has no visible impact. The new tile |
// still keeps its own data. |
assertFalse(tile.importData(oldTile)); |
- assertThat(tile.getSource(), equalTo(NTPTileSource.TOP_SITES)); |
+ assertThat(tile.getSource(), equalTo(TileSource.TOP_SITES)); |
} |
@Test |
public void testTileImportWithSameData() { |
- Tile tile = new Tile("title", URLS[0], "", 0, NTPTileSource.TOP_SITES); |
- Tile oldTile = new Tile("title", URLS[0], "", 0, NTPTileSource.TOP_SITES); |
+ Tile tile = new Tile("title", URLS[0], "", 0, TileSource.TOP_SITES); |
+ Tile oldTile = new Tile("title", URLS[0], "", 0, TileSource.TOP_SITES); |
// No change should be reported |
assertFalse(tile.importData(oldTile)); |
@@ -97,18 +95,18 @@ public class TileTest { |
@Test |
public void testTileImportWithTransientData() { |
- Tile tile = new Tile("title", URLS[0], "", 0, NTPTileSource.TOP_SITES); |
+ Tile tile = new Tile("title", URLS[0], "", 0, TileSource.TOP_SITES); |
Drawable dummyDrawable = new GradientDrawable(); |
- Tile oldTile = new Tile("title", URLS[0], "", 0, NTPTileSource.TOP_SITES); |
+ Tile oldTile = new Tile("title", URLS[0], "", 0, TileSource.TOP_SITES); |
oldTile.setOfflinePageOfflineId(42L); |
oldTile.setIcon(dummyDrawable); |
- oldTile.setType(MostVisitedTileType.ICON_REAL); |
+ oldTile.setType(TileVisualType.ICON_REAL); |
// Old transient data should be copied over to the new tile without flagging the change. |
assertFalse(tile.importData(oldTile)); |
assertThat(tile.getOfflinePageOfflineId(), equalTo(42L)); |
assertThat(tile.getIcon(), equalTo(dummyDrawable)); |
- assertThat(tile.getType(), equalTo(MostVisitedTileType.ICON_REAL)); |
+ assertThat(tile.getType(), equalTo(TileVisualType.ICON_REAL)); |
} |
} |