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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/mediasession/setactionhandler.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>Test that setting MediaSession event handler should notify the service</t itle> 2 <title>Test that setting MediaSession event handler should notify the service</t itle>
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(t) { 7 test(function(t) {
8 window.navigator.mediaSession.setActionHandler("play", null); 8 window.navigator.mediaSession.setActionHandler("play", null);
9 window.navigator.mediaSession.setActionHandler("pause", null); 9 window.navigator.mediaSession.setActionHandler("pause", null);
10 window.navigator.mediaSession.setActionHandler("previoustrack", null); 10 window.navigator.mediaSession.setActionHandler("previoustrack", null);
11 window.navigator.mediaSession.setActionHandler("nexttrack", null); 11 window.navigator.mediaSession.setActionHandler("nexttrack", null);
12 window.navigator.mediaSession.setActionHandler("seekbackward", null); 12 window.navigator.mediaSession.setActionHandler("seekbackward", null);
13 window.navigator.mediaSession.setActionHandler("seekforward", null); 13 window.navigator.mediaSession.setActionHandler("seekforward", null);
14 }, "Test that setActionHandler() can be executed for supported actions"); 14 }, "Test that setActionHandler() can be executed for supported actions");
15 15
16 test(function(t) { 16 test(function(t) {
17 assert_throws( 17 assert_throws(
18 new TypeError("Failed to execute 'setActionHandler' on 'MediaSession':" + 18 new TypeError("Failed to execute 'setActionHandler' on 'MediaSession':" +
19 "The provided value 'invalid' is not a valid enum value" + 19 "The provided value 'invalid' is not a valid enum value" +
20 "of type MediaSessionAction."), 20 "of type MediaSessionAction."),
21 _ => { window.navigator.mediaSession.setActionHandler("invalid", null); }) ; 21 _ => { window.navigator.mediaSession.setActionHandler("invalid", null); }) ;
22 }, "Test that setActionHandler() throws exception for unsupported actions"); 22 }, "Test that setActionHandler() throws exception for unsupported actions");
23 23
24 </script> 24 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698