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/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/memory_mapped_file.h" | 9 #include "base/files/memory_mapped_file.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 base::FilePath::StringType filename = fields[0]; | 76 base::FilePath::StringType filename = fields[0]; |
77 int width, height; | 77 int width, height; |
78 CHECK(base::StringToInt(fields[1], &width)); | 78 CHECK(base::StringToInt(fields[1], &width)); |
79 CHECK(base::StringToInt(fields[2], &height)); | 79 CHECK(base::StringToInt(fields[2], &height)); |
80 test_stream->size = gfx::Size(width, height); | 80 test_stream->size = gfx::Size(width, height); |
81 CHECK(!test_stream->size.IsEmpty()); | 81 CHECK(!test_stream->size.IsEmpty()); |
82 int profile; | 82 int profile; |
83 CHECK(base::StringToInt(fields[3], &profile)); | 83 CHECK(base::StringToInt(fields[3], &profile)); |
84 CHECK_GT(profile, media::VIDEO_CODEC_PROFILE_UNKNOWN); | 84 CHECK_GT(profile, media::VIDEO_CODEC_PROFILE_UNKNOWN); |
85 CHECK_LE(profile, media::VIDEO_CODEC_PROFILE_MAX); | 85 CHECK_LT(profile, media::VIDEO_CODEC_PROFILE_HISTOGRAM_MAX); |
86 test_stream->requested_profile = | 86 test_stream->requested_profile = |
87 static_cast<media::VideoCodecProfile>(profile); | 87 static_cast<media::VideoCodecProfile>(profile); |
88 if (fields.size() >= 5 && !fields[4].empty()) | 88 if (fields.size() >= 5 && !fields[4].empty()) |
89 test_stream->out_filename = fields[4]; | 89 test_stream->out_filename = fields[4]; |
90 if (fields.size() >= 6 && !fields[5].empty()) | 90 if (fields.size() >= 6 && !fields[5].empty()) |
91 CHECK(base::StringToUint(fields[5], &test_stream->requested_bitrate)); | 91 CHECK(base::StringToUint(fields[5], &test_stream->requested_bitrate)); |
92 | 92 |
93 CHECK(test_stream->input_file.Initialize(base::FilePath(filename))); | 93 CHECK(test_stream->input_file.Initialize(base::FilePath(filename))); |
94 } | 94 } |
95 | 95 |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 } | 762 } |
763 if (it->first == "v" || it->first == "vmodule") | 763 if (it->first == "v" || it->first == "vmodule") |
764 continue; | 764 continue; |
765 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 765 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
766 } | 766 } |
767 | 767 |
768 base::ShadowingAtExitManager at_exit_manager; | 768 base::ShadowingAtExitManager at_exit_manager; |
769 | 769 |
770 return RUN_ALL_TESTS(); | 770 return RUN_ALL_TESTS(); |
771 } | 771 } |
OLD | NEW |