| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |