OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/media/webrtc_rtp_dump_handler.h" | 5 #include "chrome/browser/media/webrtc_rtp_dump_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
15 #include "base/files/scoped_temp_dir.h" | 15 #include "base/files/scoped_temp_dir.h" |
16 #include "base/location.h" | 16 #include "base/location.h" |
17 #include "base/macros.h" | 17 #include "base/macros.h" |
18 #include "base/run_loop.h" | 18 #include "base/run_loop.h" |
19 #include "base/single_thread_task_runner.h" | 19 #include "base/single_thread_task_runner.h" |
20 #include "base/thread_task_runner_handle.h" | 20 #include "base/threading/thread_task_runner_handle.h" |
21 #include "chrome/browser/media/webrtc_rtp_dump_writer.h" | 21 #include "chrome/browser/media/webrtc_rtp_dump_writer.h" |
22 #include "content/public/test/test_browser_thread_bundle.h" | 22 #include "content/public/test/test_browser_thread_bundle.h" |
23 #include "testing/gmock/include/gmock/gmock.h" | 23 #include "testing/gmock/include/gmock/gmock.h" |
24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
25 | 25 |
26 class FakeDumpWriter : public WebRtcRtpDumpWriter { | 26 class FakeDumpWriter : public WebRtcRtpDumpWriter { |
27 public: | 27 public: |
28 FakeDumpWriter(size_t max_dump_size, | 28 FakeDumpWriter(size_t max_dump_size, |
29 const base::Closure& max_size_reached_callback, | 29 const base::Closure& max_size_reached_callback, |
30 bool end_dump_success) | 30 bool end_dump_success) |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 this, &WebRtcRtpDumpHandlerTest::DeleteDumpHandler)); | 410 this, &WebRtcRtpDumpHandlerTest::DeleteDumpHandler)); |
411 | 411 |
412 EXPECT_TRUE(handler_->StartDump(RTP_DUMP_BOTH, &error)); | 412 EXPECT_TRUE(handler_->StartDump(RTP_DUMP_BOTH, &error)); |
413 | 413 |
414 handler_->StopOngoingDumps( | 414 handler_->StopOngoingDumps( |
415 base::Bind(&WebRtcRtpDumpHandlerTest::OnStopOngoingDumpsFinished, | 415 base::Bind(&WebRtcRtpDumpHandlerTest::OnStopOngoingDumpsFinished, |
416 base::Unretained(this))); | 416 base::Unretained(this))); |
417 | 417 |
418 base::RunLoop().RunUntilIdle(); | 418 base::RunLoop().RunUntilIdle(); |
419 } | 419 } |
OLD | NEW |