Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / webmidi / requestmidiaccess-fail.html
blob070305e49fab433ba27e5d4e18998aab5f4009e2
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
8 description("Tests navigator.requestMIDIAccess failure.");
10 function successCallback(access) {
11 testFailed("requestMIDIAccess() does not fail unexpectedly.");
12 finishJSTest();
15 function errorCallback(error) {
16 errorName = error.name;
17 shouldBe("errorName", "'InvalidStateError'");
18 testPassed("requestMIDIAccess() fail as expected.");
19 finishJSTest();
22 window.jsTestIsAsync = true;
24 // set testRunner configuration so that requestMIDIAccess returns "InvalidStateError".
25 testRunner.setMIDIAccessorResult(false);
26 navigator.requestMIDIAccess().then(successCallback, errorCallback);
28 </script>
29 </body>
30 </html>