Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/media/remoteplayback/watch-availability-throws-low-end-device.html |
| diff --git a/third_party/WebKit/LayoutTests/media/remoteplayback/watch-availability-throws-low-end-device.html b/third_party/WebKit/LayoutTests/media/remoteplayback/watch-availability-throws-low-end-device.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0f8d2333015b45b25ae527cbd14a9b9907f263c7 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/media/remoteplayback/watch-availability-throws-low-end-device.html |
| @@ -0,0 +1,28 @@ |
| +<!DOCTYPE html> |
| +<html> |
| + <head> |
| + <title>Test that watchAvailability() throws on low-end devices.</title> |
| + <script src="../../resources/testharness.js"></script> |
| + <script src="../../resources/testharnessreport.js"></script> |
| + <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
|
| + </head> |
| + <body> |
| + <script> |
| + async_test(function(t) |
| + { |
| + var v = document.createElement('video'); |
| + v.src = findMediaFile('video', 'content/test'); |
| + document.body.appendChild(v); |
| + |
| + internals.setIsLowEndDevice(v.remote, true); |
| + 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
|
| + t.unreached_func(), |
| + t.step_func_done(function(e) { |
| + assert_equals(e.name, 'NotSupportedError'); |
| + assert_equals(e.message, |
| + 'Availability monitoring is not supported on this device.'); |
| + })); |
| + }, 'Test that watchAvailability() throws on low-end devices.'); |
| + </script> |
| + </body> |
| +</html> |