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

Unified Diff: remoting/host/capture_scheduler_unittest.cc

Issue 171523003: Increase framerate limit in remoting host to 30fps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/capture_scheduler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/capture_scheduler_unittest.cc
diff --git a/remoting/host/capture_scheduler_unittest.cc b/remoting/host/capture_scheduler_unittest.cc
index b6d290f55579d76b1836ba2ff1d7f169b12ca6fe..a6ca0e6d9810e88d78fe512b2abab7b9c6e733b9 100644
--- a/remoting/host/capture_scheduler_unittest.cc
+++ b/remoting/host/capture_scheduler_unittest.cc
@@ -8,6 +8,7 @@
namespace remoting {
static const int kTestInputs[] = { 100, 50, 30, 20, 10, 30, 60, 80 };
+static const int kMinumumFrameIntervalMs = 50;
TEST(CaptureSchedulerTest, SingleSampleSameTimes) {
const int kTestResults[][arraysize(kTestInputs)] = {
@@ -21,12 +22,14 @@ TEST(CaptureSchedulerTest, SingleSampleSameTimes) {
for (size_t j = 0; j < arraysize(kTestInputs); ++j) {
CaptureScheduler scheduler;
scheduler.SetNumOfProcessorsForTest(1 << i);
+ scheduler.set_minimum_interval(
+ base::TimeDelta::FromMilliseconds(kMinumumFrameIntervalMs));
scheduler.RecordCaptureTime(
base::TimeDelta::FromMilliseconds(kTestInputs[j]));
scheduler.RecordEncodeTime(
base::TimeDelta::FromMilliseconds(kTestInputs[j]));
EXPECT_EQ(kTestResults[i][j],
- scheduler.NextCaptureDelay().InMilliseconds());
+ scheduler.NextCaptureDelay().InMilliseconds()) << i << " "<< j;
}
}
}
@@ -43,6 +46,8 @@ TEST(CaptureSchedulerTest, SingleSampleDifferentTimes) {
for (size_t j = 0; j < arraysize(kTestInputs); ++j) {
CaptureScheduler scheduler;
scheduler.SetNumOfProcessorsForTest(1 << i);
+ scheduler.set_minimum_interval(
+ base::TimeDelta::FromMilliseconds(kMinumumFrameIntervalMs));
scheduler.RecordCaptureTime(
base::TimeDelta::FromMilliseconds(kTestInputs[j]));
scheduler.RecordEncodeTime(
@@ -65,6 +70,8 @@ TEST(CaptureSchedulerTest, RollingAverageDifferentTimes) {
for (size_t i = 0; i < arraysize(kTestResults); ++i) {
CaptureScheduler scheduler;
scheduler.SetNumOfProcessorsForTest(1 << i);
+ scheduler.set_minimum_interval(
+ base::TimeDelta::FromMilliseconds(kMinumumFrameIntervalMs));
for (size_t j = 0; j < arraysize(kTestInputs); ++j) {
scheduler.RecordCaptureTime(
base::TimeDelta::FromMilliseconds(kTestInputs[j]));
« no previous file with comments | « remoting/host/capture_scheduler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698