4 <script src=
"../resources/js-test.js"></script>
8 description("Tests navigator.requestMIDIAccess fails in a detached frame.");
10 window
.jsTestIsAsync
= true;
11 iframe
= document
.createElement('iframe');
12 document
.body
.appendChild(iframe
);
13 contentNavigator
= iframe
.contentWindow
.navigator
;
14 document
.body
.removeChild(iframe
);
16 // set testRunner configuration so that requestMIDIAccess returns "AbortError".
17 contentNavigator
.requestMIDIAccess().then(function() {
18 testFailed("requestMIDIAccess() does not fail unexpectedly.");
21 window
.errorName
= error
.name
;
22 shouldBeEqualToString("errorName", 'AbortError');
23 testPassed("requestMIDIAccess() fail as expected.");