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 <gtest/gtest.h> | 5 #include <gtest/gtest.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 net::IPEndPoint(), | 63 net::IPEndPoint(), |
64 base::Bind(&UpdateCastTransportStatus), | 64 base::Bind(&UpdateCastTransportStatus), |
65 base::Bind(&CastTransportSenderImplTest::LogRawEvents, | 65 base::Bind(&CastTransportSenderImplTest::LogRawEvents, |
66 base::Unretained(this)), | 66 base::Unretained(this)), |
67 base::TimeDelta::FromMilliseconds(10), | 67 base::TimeDelta::FromMilliseconds(10), |
68 task_runner_, | 68 task_runner_, |
69 &transport_)); | 69 &transport_)); |
70 task_runner_->RunTasks(); | 70 task_runner_->RunTasks(); |
71 } | 71 } |
72 | 72 |
73 void LogRawEvents(const std::vector<PacketEvent>& packet_events) { | 73 void LogRawEvents(const std::vector<PacketEvent>& packet_events, |
| 74 const std::vector<FrameEvent>& frame_events) { |
74 num_times_callback_called_++; | 75 num_times_callback_called_++; |
75 if (num_times_callback_called_ == 3) { | 76 if (num_times_callback_called_ == 3) { |
76 run_loop_.Quit(); | 77 run_loop_.Quit(); |
77 } | 78 } |
78 } | 79 } |
79 | 80 |
80 static void UpdateCastTransportStatus(CastTransportStatus status) { | 81 static void UpdateCastTransportStatus(CastTransportStatus status) { |
81 } | 82 } |
82 | 83 |
83 base::SimpleTestTickClock testing_clock_; | 84 base::SimpleTestTickClock testing_clock_; |
(...skipping 18 matching lines...) Expand all Loading... |
102 InitWithLogging(); | 103 InitWithLogging(); |
103 message_loop_.PostDelayedTask(FROM_HERE, | 104 message_loop_.PostDelayedTask(FROM_HERE, |
104 run_loop_.QuitClosure(), | 105 run_loop_.QuitClosure(), |
105 base::TimeDelta::FromMilliseconds(50)); | 106 base::TimeDelta::FromMilliseconds(50)); |
106 run_loop_.Run(); | 107 run_loop_.Run(); |
107 EXPECT_GT(num_times_callback_called_, 1); | 108 EXPECT_GT(num_times_callback_called_, 1); |
108 } | 109 } |
109 | 110 |
110 } // namespace cast | 111 } // namespace cast |
111 } // namespace media | 112 } // namespace media |
OLD | NEW |