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

Side by Side Diff: extensions/browser/api/audio/audio_apitest.cc

Issue 1380103003: Store audio device's active state in preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix string format Created 4 years, 11 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 | « chromeos/dbus/cras_audio_client.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "extensions/shell/test/shell_apitest.h" 10 #include "extensions/shell/test/shell_apitest.h"
(...skipping 15 matching lines...) Expand all
26 26
27 const uint64_t kJabraSpeaker1Id = 30001; 27 const uint64_t kJabraSpeaker1Id = 30001;
28 const uint64_t kJabraSpeaker2Id = 30002; 28 const uint64_t kJabraSpeaker2Id = 30002;
29 const uint64_t kHDMIOutputId = 30003; 29 const uint64_t kHDMIOutputId = 30003;
30 const uint64_t kJabraMic1Id = 40001; 30 const uint64_t kJabraMic1Id = 40001;
31 const uint64_t kJabraMic2Id = 40002; 31 const uint64_t kJabraMic2Id = 40002;
32 const uint64_t kWebcamMicId = 40003; 32 const uint64_t kWebcamMicId = 40003;
33 33
34 const AudioNode kJabraSpeaker1(false, 34 const AudioNode kJabraSpeaker1(false,
35 kJabraSpeaker1Id, 35 kJabraSpeaker1Id,
36 kJabraSpeaker1Id,
36 "Jabra Speaker", 37 "Jabra Speaker",
37 "USB", 38 "USB",
38 "Jabra Speaker 1", 39 "Jabra Speaker 1",
39 false, 40 false,
40 0); 41 0);
41 42
42 const AudioNode kJabraSpeaker2(false, 43 const AudioNode kJabraSpeaker2(false,
43 kJabraSpeaker2Id, 44 kJabraSpeaker2Id,
45 kJabraSpeaker2Id,
44 "Jabra Speaker", 46 "Jabra Speaker",
45 "USB", 47 "USB",
46 "Jabra Speaker 2", 48 "Jabra Speaker 2",
47 false, 49 false,
48 0); 50 0);
49 51
50 const AudioNode kHDMIOutput(false, 52 const AudioNode kHDMIOutput(false,
51 kHDMIOutputId, 53 kHDMIOutputId,
54 kHDMIOutputId,
52 "HDMI output", 55 "HDMI output",
53 "HDMI", 56 "HDMI",
54 "HDA Intel MID", 57 "HDA Intel MID",
55 false, 58 false,
56 0); 59 0);
57 60
58 const AudioNode 61 const AudioNode kJabraMic1(true,
59 kJabraMic1(true, kJabraMic1Id, "Jabra Mic", "USB", "Jabra Mic 1", false, 0); 62 kJabraMic1Id,
63 kJabraMic1Id,
64 "Jabra Mic",
65 "USB",
66 "Jabra Mic 1",
67 false,
68 0);
60 69
61 const AudioNode 70 const AudioNode kJabraMic2(true,
62 kJabraMic2(true, kJabraMic2Id, "Jabra Mic", "USB", "Jabra Mic 2", false, 0); 71 kJabraMic2Id,
72 kJabraMic2Id,
73 "Jabra Mic",
74 "USB",
75 "Jabra Mic 2",
76 false,
77 0);
63 78
64 const AudioNode kUSBCameraMic(true, 79 const AudioNode kUSBCameraMic(true,
65 kWebcamMicId, 80 kWebcamMicId,
81 kWebcamMicId,
66 "Webcam Mic", 82 "Webcam Mic",
67 "USB", 83 "USB",
68 "Logitech Webcam", 84 "Logitech Webcam",
69 false, 85 false,
70 0); 86 0);
71 87
72 class AudioApiTest : public ShellApiTest { 88 class AudioApiTest : public ShellApiTest {
73 public: 89 public:
74 AudioApiTest() : cras_audio_handler_(NULL), fake_cras_audio_client_(NULL) {} 90 AudioApiTest() : cras_audio_handler_(NULL), fake_cras_audio_client_(NULL) {}
75 ~AudioApiTest() override {} 91 ~AudioApiTest() override {}
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 284
269 // Verify the background app got the onNodesChanged event 285 // Verify the background app got the onNodesChanged event
270 // with the last node removed. 286 // with the last node removed.
271 ASSERT_TRUE(result_listener.WaitUntilSatisfied()); 287 ASSERT_TRUE(result_listener.WaitUntilSatisfied());
272 EXPECT_EQ("success", result_listener.message()); 288 EXPECT_EQ("success", result_listener.message());
273 } 289 }
274 290
275 #endif // OS_CHROMEOS 291 #endif // OS_CHROMEOS
276 292
277 } // namespace extensions 293 } // namespace extensions
OLDNEW
« no previous file with comments | « chromeos/dbus/cras_audio_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698