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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/mediasession/playbackstate.html

Issue 2674793003: Media Session: move all tests but mojo/ ones to external/wpt/. (Closed)
Patch Set: comments Created 3 years, 10 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>MediaSession.playbackState attribute</title> 2 <title>MediaSession.playbackState attribute</title>
3 <script src="../../resources/testharness.js"></script> 3 <script src=/resources/testharness.js></script>
4 <script src="../../resources/testharnessreport.js"></script> 4 <script src="/resources/testharnessreport.js"></script>
5 <script> 5 <script>
6 6
7 test(function() { 7 test(function() {
8 assert_equals(window.navigator.mediaSession.playbackState, "none"); 8 assert_equals(window.navigator.mediaSession.playbackState, "none");
9 }, 'Test that playbackState is initialized as "none"'); 9 }, 'Test that playbackState is initialized as "none"');
10 10
11 test(function() { 11 test(function() {
12 var states = [ "paused", "playing", "none" ]; 12 var states = [ "paused", "playing", "none" ];
13 for (let state of states) { 13 for (let state of states) {
14 window.navigator.mediaSession.playbackState = state; 14 window.navigator.mediaSession.playbackState = state;
15 assert_equals(window.navigator.mediaSession.playbackState, state); 15 assert_equals(window.navigator.mediaSession.playbackState, state);
16 } 16 }
17 }, 'Test that playbackState is read/write'); 17 }, 'Test that playbackState is read/write');
18 18
19 test(function() { 19 test(function() {
20 var invalidStates = [ "invalid", "" ]; 20 var invalidStates = [ "invalid", "" ];
21 for (let state of invalidStates) { 21 for (let state of invalidStates) {
22 window.navigator.mediaSession.playbackState = state; 22 window.navigator.mediaSession.playbackState = state;
23 assert_equals(window.navigator.mediaSession.playbackState, "none"); 23 assert_equals(window.navigator.mediaSession.playbackState, "none");
24 } 24 }
25 }, 'Test that warning is thrown when setting invalid playbackState'); 25 }, 'Test that warning is thrown when setting invalid playbackState');
26 26
27 </script> 27 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698