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

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

Issue 1237913002: [Contextual Search] Adds basic support for narrow Search Panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync & rebase Created 5 years, 5 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/ContextualSearchEventFilterTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchEventFilterTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchEventFilterTest.java
index b438df3805845c1d89a5a9d15601ee3178253c66..311396a853b76648b9748d4c2d5fd069b490ee28 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchEventFilterTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchEventFilterTest.java
@@ -28,6 +28,9 @@ public class ContextualSearchEventFilterTest extends InstrumentationTestCase
private static final float SEARCH_PANEL_ALMOST_MAXIMIZED_OFFSET_Y_DP = 50.f;
private static final float SEARCH_BAR_HEIGHT_DP = 100.f;
+ private static final float LAYOUT_WIDTH_DP = 600.f;
+ private static final float LAYOUT_HEIGHT_DP = 800.f;
+
private float mTouchSlopDp;
private float mDpToPx;
@@ -135,6 +138,12 @@ public class ContextualSearchEventFilterTest extends InstrumentationTestCase
mContextualSearchPanel);
mContextualSearchPanel.setSearchBarHeightForTesting(SEARCH_BAR_HEIGHT_DP);
+ mContextualSearchPanel.setHeightForTesting(LAYOUT_HEIGHT_DP);
+ mContextualSearchPanel.setIsFullscreenSizePanelForTesting(true);
+
+ // NOTE(pedrosimonetti): This should be called after calling the method
+ // setIsFullscreenSizePanelForTesting(), otherwise it will crash the test.
+ mContextualSearchPanel.onSizeChanged(LAYOUT_WIDTH_DP, LAYOUT_HEIGHT_DP, false);
setSearchContentViewVerticalScroll(0);

Powered by Google App Engine
This is Rietveld 408576698