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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java

Issue 1426683005: [Contextual Search] Improve testing & add regressions tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync & rebase 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 | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelBase.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java
index 3d74cb934588cbd29a339a7ba551c25aa2a8e1b3..88cdcb5a324e97f36da82f6a3547dfaac2cd126c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java
@@ -156,6 +156,15 @@ public class OverlayPanelContent {
// ============================================================================================
/**
+ * Creates a ContentViewCore. This method will be overridden by tests.
+ * @param activity The ChromeActivity.
+ * @return The newly created ContentViewCore.
+ */
+ protected ContentViewCore createContentViewCore(ChromeActivity activity) {
+ return new ContentViewCore(activity);
+ }
+
+ /**
* Create a new ContentViewCore that will be managed by this panel.
*/
private void createNewContentView() {
@@ -167,7 +176,7 @@ public class OverlayPanelContent {
destroyContentView();
}
- mContentViewCore = new ContentViewCore(mActivity);
+ mContentViewCore = createContentViewCore(mActivity);
if (mContentViewClient == null) {
mContentViewClient = new ContentViewClient();
@@ -248,14 +257,6 @@ public class OverlayPanelContent {
}
/**
- * @return Whether the ContentViewCore was created.
- */
- @VisibleForTesting
- public boolean didCreateContentView() {
- return mContentViewCore != null;
- }
-
- /**
* Load a URL, this will trigger creation of a new ContentViewCore.
* @param url The URL that should be loaded.
*/
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelBase.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698