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

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

Issue 1582513003: Add a testing restriction for whether Google Play Services is up-to-date. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/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 56d5d0af490d5311e0cc05c61564795cbfcbeb34..1900c3d58993df6eec4faa68b67bf8076c79b547 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
@@ -5,7 +5,6 @@
package org.chromium.chrome.browser.contextualsearch;
import static org.chromium.base.test.util.Restriction.RESTRICTION_TYPE_NON_LOW_END_DEVICE;
-import static org.chromium.base.test.util.Restriction.RESTRICTION_TYPE_PHONE;
import static org.chromium.content.browser.test.util.CriteriaHelper.DEFAULT_POLLING_INTERVAL;
import android.app.Activity;
@@ -46,6 +45,7 @@ import org.chromium.chrome.browser.tabmodel.TabModelSelectorObserver;
import org.chromium.chrome.browser.tabmodel.TabModelUtils;
import org.chromium.chrome.browser.util.FeatureUtilities;
import org.chromium.chrome.test.ChromeActivityTestCaseBase;
+import org.chromium.chrome.test.util.ChromeRestriction;
import org.chromium.chrome.test.util.ChromeTabUtils;
import org.chromium.chrome.test.util.OmniboxTestUtils;
import org.chromium.chrome.test.util.TestHttpServerClient;
@@ -1020,7 +1020,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
+ @Restriction({ChromeRestriction.RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void testSwipeExpand() throws InterruptedException, TimeoutException {
assertNoSearchesLoaded();
clickWordNode("intelligence");
@@ -1046,7 +1046,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
+ @Restriction({ChromeRestriction.RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void testLongPressSwipeExpand() throws InterruptedException, TimeoutException {
longPressNode("intelligence");
assertNoContentViewCore();
@@ -1488,7 +1488,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
+ @Restriction({ChromeRestriction.RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void testTapResolveLimitForDecided() throws InterruptedException, TimeoutException {
mPolicy.setTapResolveLimitForDecidedForTesting(2);
clickToTriggerSearchTermResolution();
@@ -1512,7 +1512,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
+ @Restriction({ChromeRestriction.RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void testTapResolveLimitForUndecided() throws InterruptedException, TimeoutException {
mPolicy.setTapResolveLimitForUndecidedForTesting(2);
mPolicy.overrideDecidedStateForTesting(false);
@@ -1538,7 +1538,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
+ @Restriction({ChromeRestriction.RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void testTapPrefetchLimitForDecided() throws InterruptedException, TimeoutException {
mPolicy.setTapPrefetchLimitForDecidedForTesting(2);
clickToTriggerPrefetch();
@@ -1562,7 +1562,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
+ @Restriction({ChromeRestriction.RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void testTapPrefetchLimitForUndecided() throws InterruptedException, TimeoutException {
mPolicy.setTapPrefetchLimitForUndecidedForTesting(2);
mPolicy.overrideDecidedStateForTesting(false);
@@ -1709,7 +1709,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
+ @Restriction({ChromeRestriction.RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void testAppMenuSuppressedWhenExpanded() throws InterruptedException, TimeoutException {
clickWordNode("states");
tapPeekingBarToExpandAndAssert();
@@ -1803,7 +1803,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
+ @Restriction({ChromeRestriction.RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void testPromoOpenCountForUndecided() throws InterruptedException, TimeoutException {
mPolicy.overrideDecidedStateForTesting(false);
@@ -1830,7 +1830,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
+ @Restriction({ChromeRestriction.RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void testPromoOpenCountForDecided() throws InterruptedException, TimeoutException {
mPolicy.overrideDecidedStateForTesting(true);
@@ -1886,7 +1886,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
+ @Restriction({ChromeRestriction.RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void testNotifyObserverHideAfterLongPress()
throws InterruptedException, TimeoutException {
TestContextualSearchObserver observer = new TestContextualSearchObserver();
@@ -1904,7 +1904,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
+ @Restriction({ChromeRestriction.RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void testNotifyObserverHideAfterTap() throws InterruptedException, TimeoutException {
TestContextualSearchObserver observer = new TestContextualSearchObserver();
mManager.addObserver(observer);
@@ -2110,7 +2110,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
* @SmallTest
* @Feature({"ContextualSearch"})
*/
- @Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
+ @Restriction({ChromeRestriction.RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
@FlakyTest
@CommandLineFlags.Add(ContextualSearchFieldTrial.PEEK_PROMO_ENABLED + "=true")
public void testLongPressShowsPeekPromo() throws InterruptedException, TimeoutException {
@@ -2152,7 +2152,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
+ @Restriction({ChromeRestriction.RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void testTapContentVisibility() throws InterruptedException, TimeoutException {
// Simulate a tap and make sure Content is not visible.
simulateTapSearch("search");
@@ -2173,7 +2173,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
+ @Restriction({ChromeRestriction.RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void testLongPressContentVisibility() throws InterruptedException, TimeoutException {
// Simulate a long press and make sure no Content is created.
simulateLongPressSearch("search");
@@ -2195,7 +2195,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
+ @Restriction({ChromeRestriction.RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void testTapMultipleSwipeOnlyLoadsContentOnce()
throws InterruptedException, TimeoutException {
// Simulate a tap and make sure Content is not visible.
@@ -2230,7 +2230,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
+ @Restriction({ChromeRestriction.RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void testLongPressMultipleSwipeOnlyLoadsContentOnce()
throws InterruptedException, TimeoutException {
// Simulate a long press and make sure no Content is created.
@@ -2305,7 +2305,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
@DisabledTest // https://crbug.com/551711
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
+ @Restriction({ChromeRestriction.RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void testChainedSearchLoadsCorrectSearchTerm()
throws InterruptedException, TimeoutException {
// Simulate a tap and make sure Content is not visible.
@@ -2404,7 +2404,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
+ @Restriction({ChromeRestriction.RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void testTapExpandNotRemovedFromHistory()
throws InterruptedException, TimeoutException {
// Simulate a tap and make sure a URL was loaded.

Powered by Google App Engine
This is Rietveld 408576698