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

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

Issue 2438043003: Web MIDI: move device state adjustment code from content to Blink (Closed)
Patch Set: Created 4 years, 2 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.cc ('k') | content/test/BUILD.gn » ('j') | 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
deleted file mode 100644
index 45ee19b56200203205c49126f024bb2d7ac2670e..0000000000000000000000000000000000000000
--- a/content/renderer/media/midi_message_filter_unittest.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/renderer/media/midi_message_filter.h"
-
-#include "base/message_loop/message_loop.h"
-#include "media/midi/midi_service.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace content {
-
-namespace {
-
-using midi::mojom::PortState;
-
-TEST(MidiMessageFilterTest, CastMidiPortState) {
- // Check if static_cast of ToMIDIPortState() just works fine for all states.
- EXPECT_EQ(PortState::DISCONNECTED,
- MidiMessageFilter::ToBlinkState(PortState::DISCONNECTED));
- EXPECT_EQ(PortState::CONNECTED,
- MidiMessageFilter::ToBlinkState(PortState::CONNECTED));
- // 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(PortState::CONNECTED,
- MidiMessageFilter::ToBlinkState(PortState::OPENED));
-
- // Check if we do not have any unknown MidiPortState that is added later.
- EXPECT_EQ(PortState::OPENED, PortState::LAST);
-}
-
-} // namespace
-
-} // namespace content
« no previous file with comments | « content/renderer/media/midi_message_filter.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698