Chromium Code Reviews| Index: LayoutTests/webmidi/open_close.html |
| diff --git a/LayoutTests/webmidi/open_close.html b/LayoutTests/webmidi/open_close.html |
| index 8f6bcb405d0b51b8a41b37dc0e6ae31997a50f1f..98b414bfbe4d44e6266ee6437d18e17bc796f2f2 100644 |
| --- a/LayoutTests/webmidi/open_close.html |
| +++ b/LayoutTests/webmidi/open_close.html |
| @@ -13,8 +13,7 @@ function checkStateTransition(options) { |
| debug("- check initial state."); |
| window.port = options.port; |
| shouldBeEqualToString("port.connection", options.initialconnection); |
| - port.onstatechange = function(e) { |
| - debug("- check handler port."); |
| + checkHandler = function(e) { |
|
yhirano
2015/03/31 07:27:20
var
Takashi Toyoshima
2015/03/31 11:22:02
Done.
|
| window.eventport = e.port; |
| testPassed("handler is called with port " + eventport + "."); |
| if (options.initialconnection == options.finalconnection) { |
| @@ -23,6 +22,14 @@ function checkStateTransition(options) { |
| shouldBeEqualToString("eventport.id", options.port.id); |
| shouldBeEqualToString("eventport.connection", options.finalconnection); |
| }; |
| + port.onstatechange = function(e) { |
| + debug("- check port handler."); |
| + checkHandler(e); |
| + }; |
| + access.onstatechange = function(e) { |
| + debug("- check access handler."); |
| + checkHandler(e); |
| + }; |
| return port[options.method]().then(function(p) { |
| window.callbackport = p; |
| debug("- check callback arguments."); |