OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "content/browser/renderer_host/media/media_stream_ui_proxy.h" | 5 #include "content/browser/renderer_host/media/media_stream_ui_proxy.h" |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "content/browser/frame_host/render_frame_host_delegate.h" | 8 #include "content/browser/frame_host/render_frame_host_delegate.h" |
9 #include "content/public/common/renderer_preferences.h" | 9 #include "content/public/common/renderer_preferences.h" |
10 #include "content/public/test/test_browser_thread.h" | 10 #include "content/public/test/test_browser_thread.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 } // namespace | 52 } // namespace |
53 | 53 |
54 class MediaStreamUIProxyTest : public testing::Test { | 54 class MediaStreamUIProxyTest : public testing::Test { |
55 public: | 55 public: |
56 MediaStreamUIProxyTest() | 56 MediaStreamUIProxyTest() |
57 : ui_thread_(BrowserThread::UI, &message_loop_), | 57 : ui_thread_(BrowserThread::UI, &message_loop_), |
58 io_thread_(BrowserThread::IO, &message_loop_) { | 58 io_thread_(BrowserThread::IO, &message_loop_) { |
59 proxy_ = MediaStreamUIProxy::CreateForTests(&delegate_); | 59 proxy_ = MediaStreamUIProxy::CreateForTests(&delegate_); |
60 } | 60 } |
61 | 61 |
62 virtual ~MediaStreamUIProxyTest() { | 62 ~MediaStreamUIProxyTest() override { |
63 proxy_.reset(); | 63 proxy_.reset(); |
64 message_loop_.RunUntilIdle(); | 64 message_loop_.RunUntilIdle(); |
65 } | 65 } |
66 | 66 |
67 protected: | 67 protected: |
68 base::MessageLoop message_loop_; | 68 base::MessageLoop message_loop_; |
69 TestBrowserThread ui_thread_; | 69 TestBrowserThread ui_thread_; |
70 TestBrowserThread io_thread_; | 70 TestBrowserThread io_thread_; |
71 | 71 |
72 MockRenderFrameHostDelegate delegate_; | 72 MockRenderFrameHostDelegate delegate_; |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 0, | 256 0, |
257 0, | 257 0, |
258 base::Bind(&MockResponseCallback::OnCheckResponse, | 258 base::Bind(&MockResponseCallback::OnCheckResponse, |
259 base::Unretained(&response_callback_))); | 259 base::Unretained(&response_callback_))); |
260 EXPECT_CALL(delegate_, CheckMediaAccessPermission(_, _)); | 260 EXPECT_CALL(delegate_, CheckMediaAccessPermission(_, _)); |
261 EXPECT_CALL(response_callback_, OnCheckResponse(_)); | 261 EXPECT_CALL(response_callback_, OnCheckResponse(_)); |
262 message_loop_.RunUntilIdle(); | 262 message_loop_.RunUntilIdle(); |
263 } | 263 } |
264 | 264 |
265 } // content | 265 } // content |
OLD | NEW |