| <script src="../resources/js-test.js"></script> |
| <div id="description"></div> |
| description("Tests that AudioContext suspend method resolve promises immediately when already suspended."); |
| window.jsTestIsAsync = true; |
| context = new AudioContext(); |
| shouldBeEqualToString("context.state", "suspended"); |
| context.suspend().then(function() { |
| testPassed('context resolve callback called'); |
| shouldBeEqualToString("context.state", "suspended"); |
| testFailed('context reject callback called'); |
| shouldBeEqualToString("context.state", "suspended"); |