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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarTest.java

Issue 2815653003: IPH - connect data saver previews (Closed)
Patch Set: Addressed comments Created 3 years, 8 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/infobar/InfoBarTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarTest.java
index 2fd48a11ac1f5d82eaa4b0148dea123981fd7f69..780be40864ba431614a836d5c905bc48033cd26b 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarTest.java
@@ -92,7 +92,7 @@ public class InfoBarTest extends ChromeActivityTestCaseBase<ChromeActivity> {
});
InfoBarContainer container = getActivity().getActivityTab().getInfoBarContainer();
mListener = new InfoBarTestAnimationListener();
- container.setAnimationListener(mListener);
+ container.addAnimationListener(mListener);
mTestServer = EmbeddedTestServer.createAndStartServer(getInstrumentation().getContext());
@@ -471,7 +471,7 @@ public class InfoBarTest extends ChromeActivityTestCaseBase<ChromeActivity> {
// Swap out the WebContents and send the user somewhere so that the InfoBar gets removed.
InfoBarTestAnimationListener removeListener = new InfoBarTestAnimationListener();
- getActivity().getActivityTab().getInfoBarContainer().setAnimationListener(removeListener);
+ getActivity().getActivityTab().getInfoBarContainer().addAnimationListener(removeListener);
ThreadUtils.runOnUiThread(new Runnable() {
@Override
public void run() {
@@ -485,7 +485,7 @@ public class InfoBarTest extends ChromeActivityTestCaseBase<ChromeActivity> {
// Revisiting the original page should make the InfoBar reappear.
InfoBarTestAnimationListener addListener = new InfoBarTestAnimationListener();
- getActivity().getActivityTab().getInfoBarContainer().setAnimationListener(addListener);
+ getActivity().getActivityTab().getInfoBarContainer().addAnimationListener(addListener);
loadUrl(mTestServer.getURL(GEOLOCATION_PAGE));
addListener.addInfoBarAnimationFinished("InfoBar not added");
assertEquals("Wrong infobar count", 1, getInfoBars().size());

Powered by Google App Engine
This is Rietveld 408576698