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

Unified Diff: LayoutTests/webmidi/open_close.html

Issue 1043863002: Web MIDI: final IDL updates to conform the latest WD for shipping (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: TODO: ActiveDOMObject Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/webmidi/open_close.html
diff --git a/LayoutTests/webmidi/open_close.html b/LayoutTests/webmidi/open_close.html
index 43ca12b69d92292f4441b430a8ec14d305ff8b14..8f6bcb405d0b51b8a41b37dc0e6ae31997a50f1f 100644
--- a/LayoutTests/webmidi/open_close.html
+++ b/LayoutTests/webmidi/open_close.html
@@ -9,28 +9,28 @@ description("Tests MIDIPort.open and MIDIPort.close.");
function checkStateTransition(options) {
debug("Check state transition for " + options.method + " on " +
- options.initialstate + " state.");
+ options.initialconnection + " state.");
debug("- check initial state.");
window.port = options.port;
- shouldBeEqualToString("port.state", options.initialstate);
+ shouldBeEqualToString("port.connection", options.initialconnection);
port.onstatechange = function(e) {
debug("- check handler port.");
window.eventport = e.port;
testPassed("handler is called with port " + eventport + ".");
- if (options.initialstate == options.finalstate) {
+ if (options.initialconnection == options.finalconnection) {
testFailed("onstatechange handler should not be called here.");
}
shouldBeEqualToString("eventport.id", options.port.id);
- shouldBeEqualToString("eventport.state", options.finalstate);
+ shouldBeEqualToString("eventport.connection", options.finalconnection);
};
return port[options.method]().then(function(p) {
window.callbackport = p;
debug("- check callback arguments.");
testPassed("callback is called with port " + callbackport + ".");
shouldBeEqualToString("callbackport.id", options.port.id);
- shouldBeEqualToString("callbackport.state", options.finalstate);
+ shouldBeEqualToString("callbackport.connection", options.finalconnection);
debug("- check final state.");
- shouldBeEqualToString("port.state", options.finalstate);
+ shouldBeEqualToString("port.connection", options.finalconnection);
}, function(e) {
testFailed("error callback should not be called here.");
throw e;
@@ -41,23 +41,23 @@ function runTests(port) {
return Promise.resolve().then(checkStateTransition.bind(undefined, {
port: port,
method: "close",
- initialstate: "connected",
- finalstate: "connected",
+ initialconnection: "closed",
+ finalconnection: "closed",
})).then(checkStateTransition.bind(undefined, {
port: port,
method: "open",
- initialstate: "connected",
- finalstate: "opened",
+ initialconnection: "closed",
+ finalconnection: "open",
})).then(checkStateTransition.bind(undefined, {
port: port,
method: "open",
- initialstate: "opened",
- finalstate: "opened",
+ initialconnection: "open",
+ finalconnection: "open",
})).then(checkStateTransition.bind(undefined, {
port: port,
method: "close",
- initialstate: "opened",
- finalstate: "connected",
+ initialconnection: "open",
+ finalconnection: "closed",
}));
}
« no previous file with comments | « LayoutTests/webexposed/global-interface-listing-expected.txt ('k') | LayoutTests/webmidi/open_close-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698