Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: webrtc/video/overuse_frame_detector_unittest.cc

Issue 3005433002: Fix places that trigger no-unused-lambda-capture (Closed)
Patch Set: Rebased Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 event.Wait(rtc::Event::kForever); 350 event.Wait(rtc::Event::kForever);
351 351
352 // Expect NormalUsage(). When called, stop the |overuse_detector_| and then 352 // Expect NormalUsage(). When called, stop the |overuse_detector_| and then
353 // set |event| to end the test. 353 // set |event| to end the test.
354 EXPECT_CALL(*(observer_.get()), AdaptUp(reason_)) 354 EXPECT_CALL(*(observer_.get()), AdaptUp(reason_))
355 .WillOnce(InvokeWithoutArgs([this, &event] { 355 .WillOnce(InvokeWithoutArgs([this, &event] {
356 overuse_detector_->StopCheckForOveruse(); 356 overuse_detector_->StopCheckForOveruse();
357 event.Set(); 357 event.Set();
358 })); 358 }));
359 359
360 queue.PostTask([this, &event] { 360 queue.PostTask([this] {
361 const int kDelayUs1 = 5 * rtc::kNumMicrosecsPerMillisec; 361 const int kDelayUs1 = 5 * rtc::kNumMicrosecsPerMillisec;
362 const int kDelayUs2 = 6 * rtc::kNumMicrosecsPerMillisec; 362 const int kDelayUs2 = 6 * rtc::kNumMicrosecsPerMillisec;
363 InsertAndSendFramesWithInterval(1300, kFrameIntervalUs, kWidth, kHeight, 363 InsertAndSendFramesWithInterval(1300, kFrameIntervalUs, kWidth, kHeight,
364 kDelayUs1); 364 kDelayUs1);
365 InsertAndSendFramesWithInterval(1, kFrameIntervalUs, kWidth, kHeight, 365 InsertAndSendFramesWithInterval(1, kFrameIntervalUs, kWidth, kHeight,
366 kDelayUs2); 366 kDelayUs2);
367 }); 367 });
368 368
369 EXPECT_TRUE(event.Wait(10000)); 369 EXPECT_TRUE(event.Wait(10000));
370 } 370 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 max_frame_interval_us *= 2; 474 max_frame_interval_us *= 2;
475 EXPECT_CALL(*(observer_.get()), AdaptDown(reason_)).Times(1); 475 EXPECT_CALL(*(observer_.get()), AdaptDown(reason_)).Times(1);
476 for (int i = 0; i < options_.high_threshold_consecutive_count; ++i) { 476 for (int i = 0; i < options_.high_threshold_consecutive_count; ++i) {
477 InsertAndSendFramesWithInterval(1200, max_frame_interval_us, kWidth, 477 InsertAndSendFramesWithInterval(1200, max_frame_interval_us, kWidth,
478 kHeight, processing_time_us); 478 kHeight, processing_time_us);
479 overuse_detector_->CheckForOveruse(); 479 overuse_detector_->CheckForOveruse();
480 } 480 }
481 } 481 }
482 482
483 } // namespace webrtc 483 } // namespace webrtc
OLDNEW
« webrtc/video/end_to_end_tests.cc ('K') | « webrtc/video/end_to_end_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698