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

Side by Side Diff: third_party/WebKit/LayoutTests/media/remoteplayback/disable-remote-playback-cancel-watch-availability-throws.html

Issue 2415723002: [Blink, RemotePlayback] watchAvailability() implementation. (Closed)
Patch Set: Added layout test for callback gc 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 <html>
3 <head>
4 <title>Test that calling cancelWatchAvailability() when disableRemotePla yback attribute is set throws an exception</title>
5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script>
7 <script src="../media-file.js"></script>
8 </head>
9 <body>
10 <script>
11 async_test(function(t)
12 {
13 var v = document.createElement('video');
14 var invalidStateErrorException = new DOMException(
15 'disableRemotePlayback attribute is present.',
16 'InvalidStateError');
17 v.src = findMediaFile('video', 'content/test');
18 document.body.appendChild(v);
19
20 v.remote.watchAvailability(function() {})
21 .then(function(id) {
22 v.disableRemotePlayback = true;
23 v.remote.cancelWatchAvailability(id).then(
24 t.unreached_func(),
25 t.step_func(function(e) {
26 assert_equals(e.name, invalidStateErrorException .name);
27 assert_equals(e.message, invalidStateErrorExcept ion.message);
28 v.remote.cancelWatchAvailability().then(
29 t.unreached_func(),
30 t.step_func_done(function(e) {
31 assert_equals(e.name, invalidStateErrorE xception.name);
32 assert_equals(e.message, invalidStateErr orException.message);
33 })
34 );
35 }));
36 },
37 t.unreached_func());
38 }, 'Test that calling cancelWatchAvailability() when disableRemotePl ayback attribute is set throws an exception.');
39 </script>
40 </body>
41 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698