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

Unified Diff: third_party/WebKit/LayoutTests/media/mediasession/mojo/metadata-propagated.html

Issue 2401013002: Make MediaSession per frame as an attribute of Navigator (Closed)
Patch Set: split mojo tests 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: third_party/WebKit/LayoutTests/media/mediasession/mojo/metadata-propagated.html
diff --git a/third_party/WebKit/LayoutTests/media/mediasession/mojo/metadata-propagated.html b/third_party/WebKit/LayoutTests/media/mediasession/mojo/metadata-propagated.html
new file mode 100644
index 0000000000000000000000000000000000000000..28d594b3cae6fa62e04276370719a8513cf28b7f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/mediasession/mojo/metadata-propagated.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<title>MediaSession Mojo Test</title>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script src="../../../resources/mojo-helpers.js"></script>
+<script src="resources/mediasessionservice-mock.js"></script>
+<script src="resources/utils.js"></script>
+<script>
+
+async_test(function(t) {
+ mediaSessionServiceMock.then(m => {
+ var metadata = new MediaMetadata({
+ title: "title1",
+ artist: "artist1",
+ album: "album1",
+ artwork: [
+ { src: "http://foo.com/bar.png", type: "image/png", sizes: "128x128" }
+ ]});
+
+ m.setMetadataCallback(t.step_func(function(receivedMetadata) {
+ assert_metadata_equals(metadata, receivedMetadata);
+ t.done();
+ }));
+ window.navigator.mediaSession.metadata = metadata;
+ });
+}, "test that MediaMetadata is correctly propagated");
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698