| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/message_loop.h" | 5 #include "base/message_loop.h" |
| 6 #include "base/process.h" | 6 #include "base/process.h" |
| 7 #include "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
| 8 #include "chrome/browser/renderer_host/audio_renderer_host.h" | 8 #include "chrome/browser/renderer_host/audio_renderer_host.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| 11 class AudioRendererHostTest : public testing::Test { | 11 class AudioRendererHostTest : public testing::Test { |
| 12 protected: | 12 protected: |
| 13 virtual void SetUp() { | 13 virtual void SetUp() { |
| 14 host_.reset(new AudioRendererHost(MessageLoop::current())); | 14 // Create a message loop so AudioRendererHost can use it. |
| 15 message_loop_.reset(new MessageLoop(MessageLoop::TYPE_IO)); |
| 16 host_ = new AudioRendererHost(MessageLoop::current()); |
| 15 } | 17 } |
| 16 | 18 |
| 17 scoped_ptr<AudioRendererHost> host_; | 19 virtual void TearDown() { |
| 20 host_->Destroy(); |
| 21 } |
| 22 |
| 23 scoped_refptr<AudioRendererHost> host_; |
| 24 scoped_ptr<MessageLoop> message_loop_; |
| 18 }; | 25 }; |
| 19 | 26 |
| 20 TEST_F(AudioRendererHostTest, NoTest) { | 27 TEST_F(AudioRendererHostTest, NoTest) { |
| 21 // TODO(hclam): come up with useful tests. | 28 // TODO(hclam): come up with useful tests. |
| 22 } | 29 } |
| OLD | NEW |