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

Side by Side Diff: content/browser/renderer_host/media/audio_renderer_host_unittest.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/environment.h" 6 #include "base/environment.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/sync_socket.h" 10 #include "base/sync_socket.h"
11 #include "content/browser/mock_resource_context.h" 11 #include "content/browser/mock_resource_context.h"
12 #include "content/browser/renderer_host/media/audio_renderer_host.h" 12 #include "content/browser/renderer_host/media/audio_renderer_host.h"
13 #include "content/browser/renderer_host/media/mock_media_observer.h" 13 #include "content/browser/renderer_host/media/mock_media_observer.h"
14 #include "content/common/media/audio_messages.h" 14 #include "content/common/media/audio_messages.h"
15 #include "content/test/test_browser_thread.h" 15 #include "content/test/test_browser_thread.h"
16 #include "ipc/ipc_message_utils.h" 16 #include "ipc/ipc_message_utils.h"
17 #include "media/audio/audio_manager.h" 17 #include "media/audio/audio_manager.h"
18 #include "media/audio/fake_audio_output_stream.h" 18 #include "media/audio/fake_audio_output_stream.h"
19 #include "testing/gmock/include/gmock/gmock.h" 19 #include "testing/gmock/include/gmock/gmock.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
21 21
22 using ::testing::_; 22 using ::testing::_;
23 using ::testing::AtLeast; 23 using ::testing::AtLeast;
24 using ::testing::DoAll; 24 using ::testing::DoAll;
25 using ::testing::InSequence; 25 using ::testing::InSequence;
26 using ::testing::InvokeWithoutArgs; 26 using ::testing::InvokeWithoutArgs;
27 using ::testing::Return; 27 using ::testing::Return;
28 using ::testing::SaveArg; 28 using ::testing::SaveArg;
29 using ::testing::SetArgumentPointee; 29 using ::testing::SetArgumentPointee;
30 using content::BrowserThread;
30 31
31 static const int kStreamId = 50; 32 static const int kStreamId = 50;
32 33
33 static bool IsRunningHeadless() { 34 static bool IsRunningHeadless() {
34 scoped_ptr<base::Environment> env(base::Environment::Create()); 35 scoped_ptr<base::Environment> env(base::Environment::Create());
35 if (env->HasVar("CHROME_HEADLESS")) 36 if (env->HasVar("CHROME_HEADLESS"))
36 return true; 37 return true;
37 return false; 38 return false;
38 } 39 }
39 40
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 495
495 // Simulate the case where a stream is not properly closed. 496 // Simulate the case where a stream is not properly closed.
496 TEST_F(AudioRendererHostTest, CreateLowLatencyAndShutdown) { 497 TEST_F(AudioRendererHostTest, CreateLowLatencyAndShutdown) {
497 if (!IsRunningHeadless()) 498 if (!IsRunningHeadless())
498 EnableRealDevice(); 499 EnableRealDevice();
499 500
500 CreateLowLatency(); 501 CreateLowLatency();
501 } 502 }
502 503
503 // TODO(hclam): Add tests for data conversation in low latency mode. 504 // TODO(hclam): Add tests for data conversation in low latency mode.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698