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

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

Issue 1304013002: Move functionality for ContentViewCore to ContextualSearchPanel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simple-move-cvc-to-panel
Patch Set: remove extra override Created 5 years, 3 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
Index: chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFakeServer.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFakeServer.java b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFakeServer.java
index 922be5e3fd622aba886f30d1575a0aedff0bbe48..4da2b5152e713bfc35580b4e73815bac1f2f3cce 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFakeServer.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFakeServer.java
@@ -18,9 +18,11 @@ import javax.annotation.Nullable;
* be something like ContextualSearchFakeEnvironment.
*/
@VisibleForTesting
-class ContextualSearchFakeServer implements ContextualSearchNetworkCommunicator {
+class ContextualSearchFakeServer implements ContextualSearchNetworkCommunicator,
+ ContextualSearchContentController {
private final ContextualSearchNetworkCommunicator mBaseManager;
+ private final ContextualSearchContentController mContentController;
private String mLoadedUrl;
private String mSearchTermRequested;
private boolean mShouldUseHttps;
@@ -32,8 +34,10 @@ class ContextualSearchFakeServer implements ContextualSearchNetworkCommunicator
* @param baseManager The manager to call back to for server responses.
*/
@VisibleForTesting
- ContextualSearchFakeServer(ContextualSearchNetworkCommunicator baseManager) {
+ ContextualSearchFakeServer(ContextualSearchNetworkCommunicator baseManager,
+ ContextualSearchContentController contentController) {
mBaseManager = baseManager;
+ mContentController = contentController;
}
@Override
@@ -48,7 +52,7 @@ class ContextualSearchFakeServer implements ContextualSearchNetworkCommunicator
mLoadedUrlCount++;
// This will not actually load a URL because no Search Content View will be created
// when under test -- see comments in createNewSearchContentView.
- mBaseManager.loadUrl(url);
+ mContentController.loadUrl(url);
}
@Override
@@ -80,7 +84,7 @@ class ContextualSearchFakeServer implements ContextualSearchNetworkCommunicator
}
@Override
- public void createNewSearchContentView() {
+ public void createNewContentView() {
mIsSearchContentViewCreated = true;
// Don't call the super method because that will cause loadUrl to make a live request!
// This method is only called by loadUrl, which will subseqently check if the CV was
@@ -89,9 +93,9 @@ class ContextualSearchFakeServer implements ContextualSearchNetworkCommunicator
}
@Override
- public void destroySearchContentView() {
+ public void destroyContentView() {
mIsSearchContentViewCreated = false;
- mBaseManager.destroySearchContentView();
+ mContentController.destroyContentView();
}
/**

Powered by Google App Engine
This is Rietveld 408576698