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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>MediaSession Mojo Test</title>
3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script>
5 <script src="../../../resources/mojo-helpers.js"></script>
6 <script src="resources/mediasessionservice-mock.js"></script>
7 <script src="resources/utils.js"></script>
8 <script>
9
10 async_test(function(t) {
11 mediaSessionServiceMock.then(m => {
12 var metadata = new MediaMetadata({
13 title: "title1",
14 artist: "artist1",
15 album: "album1",
16 artwork: [
17 { src: "http://foo.com/bar.png", type: "image/png", sizes: "128x128" }
18 ]});
19
20 m.setMetadataCallback(t.step_func(function(receivedMetadata) {
21 assert_metadata_equals(metadata, receivedMetadata);
22 t.done();
23 }));
24 window.navigator.mediaSession.metadata = metadata;
25 });
26 }, "test that MediaMetadata is correctly propagated");
27
28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698