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

Unified Diff: content/renderer/media/midi_message_filter_unittest.cc

Issue 1054913002: Web MIDI: do not manage connection state from embedder side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update 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
« no previous file with comments | « content/renderer/media/midi_message_filter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/midi_message_filter_unittest.cc
diff --git a/content/renderer/media/midi_message_filter_unittest.cc b/content/renderer/media/midi_message_filter_unittest.cc
index 5ac0d4ef903e3bb1bec46ccc4b33870036b71c53..b20ebe2f8b13ae3e357c5e2631eef6c5310ef182 100644
--- a/content/renderer/media/midi_message_filter_unittest.cc
+++ b/content/renderer/media/midi_message_filter_unittest.cc
@@ -19,7 +19,11 @@ TEST(MidiMessageFilterTest, CastMidiPortState) {
MidiMessageFilter::ToBlinkState(media::MIDI_PORT_DISCONNECTED));
EXPECT_EQ(BlinkState::MIDIPortStateConnected,
MidiMessageFilter::ToBlinkState(media::MIDI_PORT_CONNECTED));
- EXPECT_EQ(BlinkState::MIDIPortStateOpened,
+ // Web MIDI API manages DeviceState and ConnectionState separately.
+ // "open", "pending", or "closed" are managed separately for ConnectionState
+ // by Blink per MIDIAccess instance. So, MIDI_PORT_OPENED in content can be
+ // converted to MIDIPortStateConnected.
+ EXPECT_EQ(BlinkState::MIDIPortStateConnected,
MidiMessageFilter::ToBlinkState(media::MIDI_PORT_OPENED));
// Check if we do not have any unknown MidiPortState that is added later.
« no previous file with comments | « content/renderer/media/midi_message_filter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698