diff options
author | yhirano@chromium.org <yhirano@chromium.org> | 2014-10-02 08:35:49 +0000 |
---|---|---|
committer | yhirano@chromium.org <yhirano@chromium.org> | 2014-10-02 08:35:49 +0000 |
commit | 0a5ebd416f6e05ea34591965ef56d3a05a550d72 (patch) | |
tree | 3cb9859bce408aed7278c223bb10447ddfbed6c3 /third_party/WebKit/LayoutTests/webmidi | |
parent | beeeeb16704795baa6023bcf3b3084a576d3540d (diff) | |
download | chromium_src-0a5ebd416f6e05ea34591965ef56d3a05a550d72.zip chromium_src-0a5ebd416f6e05ea34591965ef56d3a05a550d72.tar.gz chromium_src-0a5ebd416f6e05ea34591965ef56d3a05a550d72.tar.bz2 |
ScriptPromiseResolver leaked resource when constructed on stopped context.
ScriptPromiseResolver stops working when the associated ExecutionContext is
stopped. ScriptPromiseResolver can be constructed on a stopped
ExecutionContext. In such a case the constructed resolver is stopped as well.
Moreover, it should release the created (internal) resolver not to leak
resource.
BUG=385384
Review URL: https://codereview.chromium.org/622733002
git-svn-id: svn://svn.chromium.org/blink/trunk@183123 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/webmidi')
-rw-r--r-- | third_party/WebKit/LayoutTests/webmidi/requestmidiaccess-in-detached-frame-expected.txt | 2 | ||||
-rw-r--r-- | third_party/WebKit/LayoutTests/webmidi/requestmidiaccess-in-detached-frame.html | 11 |
2 files changed, 6 insertions, 7 deletions
diff --git a/third_party/WebKit/LayoutTests/webmidi/requestmidiaccess-in-detached-frame-expected.txt b/third_party/WebKit/LayoutTests/webmidi/requestmidiaccess-in-detached-frame-expected.txt index adcd69a..711be74 100644 --- a/third_party/WebKit/LayoutTests/webmidi/requestmidiaccess-in-detached-frame-expected.txt +++ b/third_party/WebKit/LayoutTests/webmidi/requestmidiaccess-in-detached-frame-expected.txt @@ -3,6 +3,8 @@ Tests navigator.requestMIDIAccess fails in a detached frame. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". +PASS errorName is "AbortError" +PASS requestMIDIAccess() fail as expected. PASS successfullyParsed is true TEST COMPLETE diff --git a/third_party/WebKit/LayoutTests/webmidi/requestmidiaccess-in-detached-frame.html b/third_party/WebKit/LayoutTests/webmidi/requestmidiaccess-in-detached-frame.html index 47273b6..dbe30c2 100644 --- a/third_party/WebKit/LayoutTests/webmidi/requestmidiaccess-in-detached-frame.html +++ b/third_party/WebKit/LayoutTests/webmidi/requestmidiaccess-in-detached-frame.html @@ -13,19 +13,16 @@ document.body.appendChild(iframe); contentNavigator = iframe.contentWindow.navigator; document.body.removeChild(iframe); -// set testRunner configuration so that requestMIDIAccess returns "InvalidStateError". +// set testRunner configuration so that requestMIDIAccess returns "AbortError". contentNavigator.requestMIDIAccess().then(function() { testFailed("requestMIDIAccess() does not fail unexpectedly."); finishJSTest(); -}, function() { - errorName = error.name; - shouldBe("errorName", "'InvalidStateError'"); +}, function(error) { + window.errorName = error.name; + shouldBeEqualToString("errorName", 'AbortError'); testPassed("requestMIDIAccess() fail as expected."); finishJSTest(); }); -// FIXME: errorCallback should be called, but due to the Blink Promise impelementation the -// returned Promise never be resolved nor rejected. -finishJSTest(); </script> </body> |