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

Side by Side Diff: media/midi/midi_manager_unittest.cc

Issue 1079333002: Require udev for MidiManagerAlsa (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simple-hotplug
Patch Set: Rebase Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « media/midi/midi_manager_alsa.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/midi/midi_manager.h" 5 #include "media/midi/midi_manager.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 251
252 scoped_ptr<FakeMidiManagerClient> client; 252 scoped_ptr<FakeMidiManagerClient> client;
253 client.reset(new FakeMidiManagerClient); 253 client.reset(new FakeMidiManagerClient);
254 254
255 scoped_ptr<MidiManager> manager(MidiManager::Create()); 255 scoped_ptr<MidiManager> manager(MidiManager::Create());
256 manager->StartSession(client.get()); 256 manager->StartSession(client.get());
257 257
258 MidiResult result = client->WaitForResult(); 258 MidiResult result = client->WaitForResult();
259 // This #ifdef needs to be identical to the one in media/midi/midi_manager.cc. 259 // This #ifdef needs to be identical to the one in media/midi/midi_manager.cc.
260 // Do not change the condition for disabling this test. 260 // Do not change the condition for disabling this test.
261 #if !defined(OS_MACOSX) && !defined(OS_WIN) && !defined(USE_ALSA) && \ 261 #if !defined(OS_MACOSX) && !defined(OS_WIN) && \
262 !defined(OS_ANDROID) && !defined(OS_CHROMEOS) 262 !(defined(USE_ALSA) && defined(USE_UDEV)) && !defined(OS_ANDROID)
263 EXPECT_EQ(MIDI_NOT_SUPPORTED, result); 263 EXPECT_EQ(MIDI_NOT_SUPPORTED, result);
264 #elif defined(USE_ALSA) 264 #elif defined(USE_ALSA)
265 // Temporary until http://crbug.com/371230 is resolved. 265 // Temporary until http://crbug.com/371230 is resolved.
266 EXPECT_TRUE((result == MIDI_OK) || (result == MIDI_INITIALIZATION_ERROR)); 266 EXPECT_TRUE((result == MIDI_OK) || (result == MIDI_INITIALIZATION_ERROR));
267 #else 267 #else
268 EXPECT_EQ(MIDI_OK, result); 268 EXPECT_EQ(MIDI_OK, result);
269 #endif 269 #endif
270 } 270 }
271 271
272 } // namespace 272 } // namespace
273 273
274 } // namespace media 274 } // namespace media
OLDNEW
« no previous file with comments | « media/midi/midi_manager_alsa.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698