Index: chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/NotificationTitleUpdatedTest.java |
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/NotificationTitleUpdatedTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/NotificationTitleUpdatedTest.java |
index 2720de1e540665438bfceda326ea41156bdd8ae9..2a81c352d4f1d52068c9baf08a252acac5e6b3b7 100644 |
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/NotificationTitleUpdatedTest.java |
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/NotificationTitleUpdatedTest.java |
@@ -11,7 +11,6 @@ import android.test.suitebuilder.annotation.SmallTest; |
import android.view.View; |
import android.widget.TextView; |
-import org.chromium.base.ObserverList; |
import org.chromium.base.ThreadUtils; |
import org.chromium.base.test.util.Restriction; |
import org.chromium.base.test.util.RetryOnFailure; |
@@ -24,7 +23,6 @@ import org.chromium.chrome.test.util.browser.TabTitleObserver; |
import org.chromium.content.browser.test.util.Criteria; |
import org.chromium.content.browser.test.util.CriteriaHelper; |
import org.chromium.content.browser.test.util.JavaScriptUtils; |
-import org.chromium.content_public.browser.WebContentsObserver; |
import org.chromium.content_public.common.MediaMetadata; |
/** |
@@ -150,11 +148,9 @@ public class NotificationTitleUpdatedTest extends ChromeActivityTestCaseBase<Chr |
ThreadUtils.runOnUiThreadBlocking(new Runnable() { |
@Override |
public void run() { |
- ObserverList.RewindableIterator<WebContentsObserver> observers = |
- tab.getWebContents().getObserversForTesting(); |
- while (observers.hasNext()) { |
- observers.next().mediaSessionStateChanged(isControllable, isSuspended); |
- } |
+ MediaSessionTabHelper.getHelperFromTabForTesting(tab) |
+ .getMediaSessionDelegateForTesting() |
+ .mediaSessionStateChanged(isControllable, isSuspended); |
} |
}); |
} |
@@ -163,11 +159,9 @@ public class NotificationTitleUpdatedTest extends ChromeActivityTestCaseBase<Chr |
ThreadUtils.runOnUiThreadBlocking(new Runnable() { |
@Override |
public void run() { |
- ObserverList.RewindableIterator<WebContentsObserver> observers = |
- tab.getWebContents().getObserversForTesting(); |
- while (observers.hasNext()) { |
- observers.next().mediaSessionMetadataChanged(metadata); |
- } |
+ MediaSessionTabHelper.getHelperFromTabForTesting(tab) |
+ .getMediaSessionDelegateForTesting() |
+ .mediaSessionMetadataChanged(metadata); |
} |
}); |
} |