Index: LayoutTests/webmidi/open_close.html |
diff --git a/LayoutTests/webmidi/open_close.html b/LayoutTests/webmidi/open_close.html |
index 8f6bcb405d0b51b8a41b37dc0e6ae31997a50f1f..39d70234d57bc0000e5b4794517122e7e3e7560c 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."); |
+ var checkHandler = function(e) { |
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."); |