| <script src="../../resources/js-test-pre.js"></script> |
| description("Tests that no callbacks are invoked until permission is denied."); |
| window.jsTestIsAsync = true; |
| function denyPermission() { |
| testRunner.setUserMediaPermission(false); |
| testRunner.resetUserMediaPermission(); |
| var options = {audio: true, video: true}; |
| navigator.mediaDevices.getUserMedia(options) |
| testFailed('Success callback invoked unexpectedly'); |
| shouldBeEqualToString('error.name', 'NotAllowedError'); |
| testFailed('Error callback invoked unexpectedly'); |
| window.setTimeout(denyPermission, 100); |
| <script src="../../resources/js-test-post.js"></script> |