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

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

Issue 1403813003: [Contextual Search] Fixes ContentView regressions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 2 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/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFakeServer.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/contextualsearch/ContextualSearchManagerTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java
index 174b782f3168b5a0f9a4030bc09294ea0af3c0ae..59fa3722af16e1da36db2abaa011f6daa975df2e 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java
@@ -33,6 +33,7 @@ import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.ChromeSwitches;
import org.chromium.chrome.browser.ChromeTabbedActivity;
import org.chromium.chrome.browser.compositor.bottombar.OverlayContentDelegate;
+import org.chromium.chrome.browser.compositor.bottombar.OverlayContentProgressObserver;
import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchPanel.PanelState;
import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchPanelDelegate;
import org.chromium.chrome.browser.externalnav.ExternalNavigationHandler;
@@ -59,6 +60,8 @@ import org.chromium.ui.touch_selection.SelectionEventType;
import java.util.concurrent.TimeoutException;
+// TODO(pedrosimonetti): add tests for recent regressions crbug.com/543319.
+
/**
* Tests the Contextual Search Manager using instrumentation tests.
*/
@@ -95,8 +98,11 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
if (mManager != null) {
mPanelDelegate = mManager.getContextualSearchPanelDelegate();
mFakeServer = new ContextualSearchFakeServer(mManager,
- mManager.getOverlayContentDelegate());
- mPanelDelegate.setOverlayPanelContent(mFakeServer);
+ mManager.getOverlayContentDelegate(),
+ new OverlayContentProgressObserver(),
+ getActivity());
+
+ mPanelDelegate.setOverlayPanelContentFactory(mFakeServer);
mManager.setNetworkCommunicator(mFakeServer);
mSelectionController = mManager.getSelectionController();
mPolicy = ContextualSearchPolicy.getInstance(getActivity());
@@ -290,11 +296,11 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
}
private void assertContentViewCoreCreated() {
- assertTrue(mFakeServer.isSearchContentViewCreated());
+ assertTrue(mFakeServer.didCreateContentView());
}
private void assertNoContentViewCore() {
- assertFalse(mFakeServer.isSearchContentViewCreated());
+ assertFalse(mFakeServer.didCreateContentView());
}
/**
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFakeServer.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698