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

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

Issue 12578027: Removed 'show full history' from navigation popup. Cleaned up associated dead code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-show-full-history-from-menu-222282
Patch Set: Removed broken test (checking click on show full history which we removed) Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/NavigationPopup.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/javatests/src/org/chromium/chrome/browser/NavigationPopupTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/NavigationPopupTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/NavigationPopupTest.java
index a4efc38924e653c8fc4b4db6ebbb623ea1fdbf1e..e82abb7ad1063c05215084a33dbac7a7730b1176 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/NavigationPopupTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/NavigationPopupTest.java
@@ -11,7 +11,6 @@ import android.test.suitebuilder.annotation.SmallTest;
import org.chromium.base.ThreadUtils;
import org.chromium.base.test.util.Feature;
import org.chromium.base.test.util.UrlUtils;
-import org.chromium.chrome.browser.NavigationPopup.NavigationPopupDelegate;
import org.chromium.chrome.testshell.ChromiumTestShellActivity;
import org.chromium.chrome.testshell.ChromiumTestShellTestBase;
import org.chromium.content.browser.NavigationClient;
@@ -55,15 +54,6 @@ public class NavigationPopupTest extends ChromiumTestShellTestBase {
}
}
- private static class TestNavigationPopupDelegate implements NavigationPopupDelegate {
- private boolean mHistoryRequested;
-
- @Override
- public void openHistory() {
- mHistoryRequested = true;
- }
- }
-
private static class TestNavigationClient implements NavigationClient {
private TestNavigationHistory mHistory;
private int mNavigatedIndex = INVALID_NAVIGATION_INDEX;
@@ -92,7 +82,7 @@ public class NavigationPopupTest extends ChromiumTestShellTestBase {
public void testFaviconFetching() throws InterruptedException {
final TestNavigationClient client = new TestNavigationClient();
final NavigationPopup popup = new NavigationPopup(
- mActivity, new TestNavigationPopupDelegate(), client, true);
+ mActivity, client, true);
popup.setWidth(300);
popup.setAnchorView(mActivity.getActiveContentView());
ThreadUtils.runOnUiThreadBlocking(new Runnable() {
@@ -136,7 +126,7 @@ public class NavigationPopupTest extends ChromiumTestShellTestBase {
public void testItemSelection() {
final TestNavigationClient client = new TestNavigationClient();
final NavigationPopup popup = new NavigationPopup(
- mActivity, new TestNavigationPopupDelegate(), client, true);
+ mActivity, client, true);
popup.setWidth(300);
popup.setAnchorView(mActivity.getActiveContentView());
ThreadUtils.runOnUiThreadBlocking(new Runnable() {
@@ -157,32 +147,4 @@ public class NavigationPopupTest extends ChromiumTestShellTestBase {
assertEquals("Popup attempted to navigate to the wrong index", 5, client.mNavigatedIndex);
}
- @SmallTest
- @Feature({"Navigation"})
- public void testShowHistorySelection() {
- final TestNavigationClient client = new TestNavigationClient();
- TestNavigationPopupDelegate delegate = new TestNavigationPopupDelegate();
- final NavigationPopup popup = new NavigationPopup(mActivity, delegate, client, true);
- popup.setWidth(300);
- popup.setAnchorView(mActivity.getActiveContentView());
- ThreadUtils.runOnUiThreadBlocking(new Runnable() {
- @Override
- public void run() {
- popup.show();
- }
- });
-
- ThreadUtils.runOnUiThreadBlocking(new Runnable() {
- @Override
- public void run() {
- popup.performItemClick(2);
- }
- });
-
- assertFalse("Popup did not hide as expected.", popup.isShowing());
- assertTrue("Popup did not correctly request history.", delegate.mHistoryRequested);
- assertEquals("Popup attempted to navigate instead of showing history",
- INVALID_NAVIGATION_INDEX, client.mNavigatedIndex);
- }
-
}
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/NavigationPopup.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698