| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/environment.h" | 6 #include "base/environment.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/process/launch.h" | 9 #include "base/process/launch.h" |
| 10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // The working dir should be in the user's home folder. | 61 // The working dir should be in the user's home folder. |
| 62 static const base::FilePath::CharType kWorkingDirName[] = | 62 static const base::FilePath::CharType kWorkingDirName[] = |
| 63 FILE_PATH_LITERAL("webrtc_video_quality"); | 63 FILE_PATH_LITERAL("webrtc_video_quality"); |
| 64 static const base::FilePath::CharType kCapturedYuvFileName[] = | 64 static const base::FilePath::CharType kCapturedYuvFileName[] = |
| 65 FILE_PATH_LITERAL("captured_video.yuv"); | 65 FILE_PATH_LITERAL("captured_video.yuv"); |
| 66 static const base::FilePath::CharType kStatsFileName[] = | 66 static const base::FilePath::CharType kStatsFileName[] = |
| 67 FILE_PATH_LITERAL("stats.txt"); | 67 FILE_PATH_LITERAL("stats.txt"); |
| 68 static const char kMainWebrtcTestHtmlPage[] = | 68 static const char kMainWebrtcTestHtmlPage[] = |
| 69 "/webrtc/webrtc_jsep01_test.html"; | 69 "/webrtc/webrtc_jsep01_test.html"; |
| 70 static const char kCapturingWebrtcHtmlPage[] = | 70 static const char kCapturingWebrtcHtmlPage[] = |
| 71 "/webrtc/webrtc_video_quality_test.html"; | 71 "/webrtc/webrtc_video_quality_test.html?height=640&width=360&framerate=30"; |
| 72 static const int k360pWidth = 640; | 72 static const int k360pWidth = 640; |
| 73 static const int k360pHeight = 360; | 73 static const int k360pHeight = 360; |
| 74 | 74 |
| 75 // If you change the port number, don't forget to modify video_extraction.js | 75 // If you change the port number, don't forget to modify video_extraction.js |
| 76 // too! | 76 // too! |
| 77 static const char kPyWebSocketPortNumber[] = "12221"; | 77 static const char kPyWebSocketPortNumber[] = "12221"; |
| 78 | 78 |
| 79 // Test the video quality of the WebRTC output. | 79 // Test the video quality of the WebRTC output. |
| 80 // | 80 // |
| 81 // Prerequisites: This test case must run on a machine with a chrome playing | 81 // Prerequisites: This test case must run on a machine with a chrome playing |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 k360pWidth, k360pHeight, GetWorkingDir().Append(kCapturedYuvFileName)); | 356 k360pWidth, k360pHeight, GetWorkingDir().Append(kCapturedYuvFileName)); |
| 357 ASSERT_TRUE(CompareVideosAndPrintResult( | 357 ASSERT_TRUE(CompareVideosAndPrintResult( |
| 358 k360pWidth, | 358 k360pWidth, |
| 359 k360pHeight, | 359 k360pHeight, |
| 360 GetWorkingDir().Append(kCapturedYuvFileName), | 360 GetWorkingDir().Append(kCapturedYuvFileName), |
| 361 test::GetReferenceFilesDir() | 361 test::GetReferenceFilesDir() |
| 362 .Append(test::kReferenceFileName360p) | 362 .Append(test::kReferenceFileName360p) |
| 363 .AddExtension(test::kYuvFileExtension), | 363 .AddExtension(test::kYuvFileExtension), |
| 364 GetWorkingDir().Append(kStatsFileName))); | 364 GetWorkingDir().Append(kStatsFileName))); |
| 365 } | 365 } |
| OLD | NEW |