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

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

Issue 1413003007: [Contextual Search] Fix test annotations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | 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 eec06aa1f9dd857fdd6720092ad5776819457eb0..23e9ed2054b973785353028f20ea6b6b4855036e 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
@@ -603,7 +603,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
}
}, TEST_TIMEOUT, DEFAULT_POLLING_INTERVAL);
assertTrue("Panel did not enter " + state + " state. "
- + "Instead, the current state is " + mPanel.getPanelState(), success);
+ + "Instead, the current state is " + mPanel.getPanelState() + ".", success);
}
/**
@@ -2247,7 +2247,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE)
+ @Restriction({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");
@@ -2268,7 +2268,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE)
+ @Restriction({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");
@@ -2298,7 +2298,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
assertContentViewCoreCreatedButNeverMadeVisible();
assertEquals(1, mFakeServer.getLoadedUrlCount());
- // Swiping the Panel should make the Content visible.
+ // Expanding the Panel should make the Content visible.
tapPeekingBarToExpandAndAssert();
assertContentViewCoreVisible();
assertEquals(1, mFakeServer.getLoadedUrlCount());
@@ -2309,7 +2309,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
assertContentViewCoreVisible();
assertEquals(1, mFakeServer.getLoadedUrlCount());
- // Swiping the Panel up should not change the visibility or load content again.
+ // Expanding the Panel should not change the visibility or load content again.
tapPeekingBarToExpandAndAssert();
assertContentViewCoreVisible();
assertEquals(1, mFakeServer.getLoadedUrlCount());
@@ -2333,7 +2333,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
assertNoContentViewCore();
assertNoSearchesLoaded();
- // Swiping the Panel should load the URL and make the Content visible.
+ // Expanding the Panel should load the URL and make the Content visible.
tapPeekingBarToExpandAndAssert();
assertContentViewCoreCreated();
assertContentViewCoreVisible();
@@ -2345,7 +2345,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
assertContentViewCoreVisible();
assertEquals(1, mFakeServer.getLoadedUrlCount());
- // Swiping the Panel up should not change the visibility or load content again.
+ // Expanding the Panel should not change the visibility or load content again.
tapPeekingBarToExpandAndAssert();
assertContentViewCoreVisible();
assertEquals(1, mFakeServer.getLoadedUrlCount());
@@ -2408,7 +2408,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
assertEquals(1, mFakeServer.getLoadedUrlCount());
ContentViewCore cvc1 = getPanelContentViewCore();
- // Swiping the Panel should make the Content visible.
+ // Expanding the Panel should make the Content visible.
tapPeekingBarToExpandAndAssert();
assertContentViewCoreVisible();
assertEquals(1, mFakeServer.getLoadedUrlCount());
@@ -2424,7 +2424,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
// Now simulate a long press, leaving the Panel peeking.
simulateLongPressSearch("resolution");
- // Swiping the Panel up should load and display the new search.
+ // Expanding the Panel should load and display the new search.
tapPeekingBarToExpandAndAssert();
assertContentViewCoreCreated();
assertContentViewCoreVisible();
@@ -2444,7 +2444,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE)
+ @Restriction({RESTRICTION_TYPE_PHONE, RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void testChainedSearchContentVisibility()
throws InterruptedException, TimeoutException {
// Simulate a tap and make sure Content is not visible.
@@ -2460,9 +2460,8 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
assertNeverCalledContentViewCoreOnShow();
assertEquals(1, mFakeServer.getLoadedUrlCount());
- // Swiping the Panel up should load and display the new search.
- flingPanelUp();
- waitForPanelToExpandAndAssert();
+ // Expanding the Panel should load and display the new search.
+ tapPeekingBarToExpandAndAssert();
assertContentViewCoreCreated();
assertContentViewCoreVisible();
assertEquals(2, mFakeServer.getLoadedUrlCount());
@@ -2500,7 +2499,7 @@ public class ContextualSearchManagerTest extends ChromeActivityTestCaseBase<Chro
*/
@SmallTest
@Feature({"ContextualSearch"})
- @Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE)
+ @Restriction({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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698