| OLD | NEW |
| 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 "content/browser/media/webrtc/webrtc_internals.h" | 5 #include "content/browser/media/webrtc/webrtc_internals.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 std::string command_; | 45 std::string command_; |
| 46 std::unique_ptr<base::Value> value_; | 46 std::unique_ptr<base::Value> value_; |
| 47 base::RunLoop* loop_; | 47 base::RunLoop* loop_; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 // Derived class for testing only. Allows the tests to have their own instance | 50 // Derived class for testing only. Allows the tests to have their own instance |
| 51 // for testing and control the period for which WebRTCInternals will bulk up | 51 // for testing and control the period for which WebRTCInternals will bulk up |
| 52 // updates (changes down from 500ms to 1ms). | 52 // updates (changes down from 500ms to 1ms). |
| 53 class WebRTCInternalsForTest : public NON_EXPORTED_BASE(WebRTCInternals) { | 53 class WebRTCInternalsForTest : public NON_EXPORTED_BASE(WebRTCInternals) { |
| 54 public: | 54 public: |
| 55 WebRTCInternalsForTest() : WebRTCInternals(1) {} | 55 WebRTCInternalsForTest() : WebRTCInternals(1, true) {} |
| 56 ~WebRTCInternalsForTest() override {} | 56 ~WebRTCInternalsForTest() override {} |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 } // namespace | 59 } // namespace |
| 60 | 60 |
| 61 class WebRtcInternalsTest : public testing::Test { | 61 class WebRtcInternalsTest : public testing::Test { |
| 62 public: | 62 public: |
| 63 WebRtcInternalsTest() : io_thread_(BrowserThread::UI, &io_loop_) {} | 63 WebRtcInternalsTest() : io_thread_(BrowserThread::UI, &io_loop_) {} |
| 64 | 64 |
| 65 protected: | 65 protected: |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 webrtc_internals.AddObserver(&observer); | 335 webrtc_internals.AddObserver(&observer); |
| 336 webrtc_internals.FileSelectionCanceled(nullptr); | 336 webrtc_internals.FileSelectionCanceled(nullptr); |
| 337 | 337 |
| 338 loop.Run(); | 338 loop.Run(); |
| 339 | 339 |
| 340 EXPECT_EQ("audioDebugRecordingsFileSelectionCancelled", observer.command()); | 340 EXPECT_EQ("audioDebugRecordingsFileSelectionCancelled", observer.command()); |
| 341 EXPECT_EQ(nullptr, observer.value()); | 341 EXPECT_EQ(nullptr, observer.value()); |
| 342 } | 342 } |
| 343 | 343 |
| 344 } // namespace content | 344 } // namespace content |
| OLD | NEW |