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

Side by Side Diff: third_party/WebKit/LayoutTests/media/remoteplayback/watch-availability-initial-callback.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 the callback is called once watchAvailability() resolve s.</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 v.src = findMediaFile('video', 'content/test');
15 document.body.appendChild(v);
16
17 var promiseResolved = false;
18
19 function callback(available) {
20 assert_false(available);
21 assert_true(promiseResolved);
22 }
23
24 v.remote.watchAvailability(t.step_func_done(callback)).then(
25 function() { promiseResolved = true; },
26 t.unreached_func());
27 }, 'Test that the callback is called once watchAvailability() resolv es.');
28 </script>
29 </body>
30 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698