Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <title>Test that watchAvailability() throws on low-end devices.</title> | |
| 5 <script src="../../resources/testharness.js"></script> | |
| 6 <script src="../../resources/testharnessreport.js"></script> | |
| 7 <script src="../media-file.js"></script> | |
|
mlamouri (slow - plz ping)
2016/11/12 20:53:33
style nit: we don't add that many indentation on L
| |
| 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 internals.setIsLowEndDevice(v.remote, true); | |
| 18 v.remote.watchAvailability(t.step_func(function() {})).then( | |
|
mlamouri (slow - plz ping)
2016/11/12 20:53:33
Instead of "t.step_func(function() {})", should th
| |
| 19 t.unreached_func(), | |
| 20 t.step_func_done(function(e) { | |
| 21 assert_equals(e.name, 'NotSupportedError'); | |
| 22 assert_equals(e.message, | |
| 23 'Availability monitoring is not supported on this dev ice.'); | |
| 24 })); | |
| 25 }, 'Test that watchAvailability() throws on low-end devices.'); | |
| 26 </script> | |
| 27 </body> | |
| 28 </html> | |
| OLD | NEW |