Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: LayoutTests/webmidi/requestmidiaccess-in-detached-frame.html

Issue 622733002: ScriptPromiseResolver leaked resource when constructed on stopped context. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/webmidi/requestmidiaccess-in-detached-frame-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../resources/js-test.js"></script> 4 <script src="../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <script> 7 <script>
8 description("Tests navigator.requestMIDIAccess fails in a detached frame."); 8 description("Tests navigator.requestMIDIAccess fails in a detached frame.");
9 9
10 window.jsTestIsAsync = true; 10 window.jsTestIsAsync = true;
11 iframe = document.createElement('iframe'); 11 iframe = document.createElement('iframe');
12 document.body.appendChild(iframe); 12 document.body.appendChild(iframe);
13 contentNavigator = iframe.contentWindow.navigator; 13 contentNavigator = iframe.contentWindow.navigator;
14 document.body.removeChild(iframe); 14 document.body.removeChild(iframe);
15 15
16 // set testRunner configuration so that requestMIDIAccess returns "InvalidStateE rror". 16 // set testRunner configuration so that requestMIDIAccess returns "AbortError".
17 contentNavigator.requestMIDIAccess().then(function() { 17 contentNavigator.requestMIDIAccess().then(function() {
18 testFailed("requestMIDIAccess() does not fail unexpectedly."); 18 testFailed("requestMIDIAccess() does not fail unexpectedly.");
19 finishJSTest(); 19 finishJSTest();
20 }, function() { 20 }, function(error) {
21 errorName = error.name; 21 window.errorName = error.name;
22 shouldBe("errorName", "'InvalidStateError'"); 22 shouldBeEqualToString("errorName", 'AbortError');
23 testPassed("requestMIDIAccess() fail as expected."); 23 testPassed("requestMIDIAccess() fail as expected.");
24 finishJSTest(); 24 finishJSTest();
25 }); 25 });
26 // FIXME: errorCallback should be called, but due to the Blink Promise impelemen tation the
27 // returned Promise never be resolved nor rejected.
28 finishJSTest();
29 26
30 </script> 27 </script>
31 </body> 28 </body>
32 </html> 29 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/webmidi/requestmidiaccess-in-detached-frame-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698