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

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

Issue 1423723006: Hard-code tap resolve and prefetch limits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tap_promo
Patch Set: Add @VisibleForTesting annotation Created 5 years, 1 month 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/contextualsearch/ContextualSearchPolicy.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 16dc455a8b4bb68c10fb67a6cec8b3af7328b9e8..5f0b8bc53e68717e9933a1c7140fa6c18fcc62c8 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
@@ -1516,8 +1516,8 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
@SmallTest
@Feature({"ContextualSearch"})
@Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
- @CommandLineFlags.Add(ContextualSearchFieldTrial.TAP_RESOLVE_LIMIT_FOR_DECIDED + "=2")
public void testTapResolveLimitForDecided() throws InterruptedException, TimeoutException {
+ mPolicy.setTapResolveLimitForDecidedForTesting(2);
clickToTriggerSearchTermResolution();
assertSearchTermRequested();
clickToTriggerSearchTermResolution();
@@ -1540,8 +1540,8 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
@SmallTest
@Feature({"ContextualSearch"})
@Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
- @CommandLineFlags.Add(ContextualSearchFieldTrial.TAP_RESOLVE_LIMIT_FOR_UNDECIDED + "=2")
public void testTapResolveLimitForUndecided() throws InterruptedException, TimeoutException {
+ mPolicy.setTapResolveLimitForUndecidedForTesting(2);
mPolicy.overrideDecidedStateForTesting(false);
clickToTriggerSearchTermResolution();
@@ -1566,8 +1566,8 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
@SmallTest
@Feature({"ContextualSearch"})
@Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
- @CommandLineFlags.Add(ContextualSearchFieldTrial.TAP_PREFETCH_LIMIT_FOR_DECIDED + "=2")
public void testTapPrefetchLimitForDecided() throws InterruptedException, TimeoutException {
+ mPolicy.setTapPrefetchLimitForDecidedForTesting(2);
clickToTriggerPrefetch();
assertLoadedLowPriorityUrl();
clickToTriggerPrefetch();
@@ -1590,8 +1590,8 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
@SmallTest
@Feature({"ContextualSearch"})
@Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
- @CommandLineFlags.Add(ContextualSearchFieldTrial.TAP_PREFETCH_LIMIT_FOR_UNDECIDED + "=2")
public void testTapPrefetchLimitForUndecided() throws InterruptedException, TimeoutException {
+ mPolicy.setTapPrefetchLimitForUndecidedForTesting(2);
mPolicy.overrideDecidedStateForTesting(false);
clickToTriggerPrefetch();
@@ -1665,9 +1665,9 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
* @Feature({"ContextualSearch"})
*/
@Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE)
- @CommandLineFlags.Add(ContextualSearchFieldTrial.TAP_PREFETCH_LIMIT_FOR_DECIDED + "=2")
@FlakyTest
public void testDisembodiedBar() throws InterruptedException, TimeoutException {
+ mPolicy.setTapPrefetchLimitForDecidedForTesting(2);
clickToTriggerPrefetch();
assertLoadedLowPriorityUrl();
clickToTriggerPrefetch();
@@ -2098,11 +2098,11 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
* of selection bounds, so this helps prevent a regression with that.
*/
@Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE)
- @CommandLineFlags.Add({ContextualSearchFieldTrial.TAP_RESOLVE_LIMIT_FOR_DECIDED + "=200",
- ContextualSearchFieldTrial.TAP_RESOLVE_LIMIT_FOR_UNDECIDED + "=200",
- ContextualSearchFieldTrial.TAP_PREFETCH_LIMIT_FOR_DECIDED + "=200",
- ContextualSearchFieldTrial.TAP_PREFETCH_LIMIT_FOR_UNDECIDED + "=200"})
public void testTapALot() throws InterruptedException, TimeoutException {
+ mPolicy.setTapPrefetchLimitForDecidedForTesting(200);
+ mPolicy.setTapResolveLimitForDecidedForTesting(200);
+ mPolicy.setTapPrefetchLimitForUndecidedForTesting(200);
+ mPolicy.setTapResolveLimitForUndecidedForTesting(200);
for (int i = 0; i < 50; i++) {
clickToTriggerSearchTermResolution();
waitForSelectionDissolved();
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698