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

Side by Side Diff: third_party/WebKit/LayoutTests/media/mediasession/mediasession.html

Issue 2584703002: Media Session API: make MediaMetadata mutable. (Closed)
Patch Set: review comments and tests Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/mediasession/mediasessionmetadata.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>MediaSession interface</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script>
6 test(function() {
7 var metadata = new MediaMetadata({});
8 navigator.mediaSession.metadata = metadata;
9 assert_equals(navigator.mediaSession.metadata, metadata);
10 }, "Test that mediaSession.metadata is properly set");
11
12 test(function() {
13 var metadata = new MediaMetadata({});
14 navigator.mediaSession.metadata = metadata;
15 metadata.title = 'foo';
16 assert_equals(navigator.mediaSession.metadata.title, 'foo');
17 }, "Test that changes to metadata propagate properly");
18
19 test(function() {
20 var metadata = new MediaMetadata({});
21 navigator.mediaSession.metadata = metadata;
22 navigator.mediaSession.metadata = null;
23 assert_equals(navigator.mediaSession.metadata, null);
24 }, "Test that resetting metadata to null is reflected");
25 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/mediasession/mediasessionmetadata.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698