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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/NotificationTitleUpdatedTest.java

Issue 2439483003: Link MediaSessionTabHelper with native MediaSession [CL is going to be split] (Closed)
Patch Set: Don't review, this CL is getting huge and needs to be split Created 4 years, 2 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/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..8b20b483823329185faa61164f731a693a0e3fcb 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;
@@ -21,10 +20,10 @@ import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.test.ChromeActivityTestCaseBase;
import org.chromium.chrome.test.util.ChromeRestriction;
import org.chromium.chrome.test.util.browser.TabTitleObserver;
+import org.chromium.content.browser.ChromeMediaSession;
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 +149,8 @@ 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);
- }
+ ChromeMediaSession.fromWebContents(tab.getWebContents())
+ .mediaSessionStateChanged(isControllable, isSuspended);
}
});
}
@@ -163,11 +159,8 @@ 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);
- }
+ ChromeMediaSession.fromWebContents(tab.getWebContents())
+ .mediaSessionMetadataChanged(metadata);
}
});
}
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionTabHelper.java ('k') | content/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698