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 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1022 // - async FeedEncoderWithOutput | 1022 // - async FeedEncoderWithOutput |
1023 // - out-of-order return of outputs to encoder | 1023 // - out-of-order return of outputs to encoder |
1024 // - multiple encoders + decoders | 1024 // - multiple encoders + decoders |
1025 // - mid-stream encoder_->Destroy() | 1025 // - mid-stream encoder_->Destroy() |
1026 | 1026 |
1027 } // namespace | 1027 } // namespace |
1028 } // namespace content | 1028 } // namespace content |
1029 | 1029 |
1030 int main(int argc, char** argv) { | 1030 int main(int argc, char** argv) { |
1031 testing::InitGoogleTest(&argc, argv); // Removes gtest-specific args. | 1031 testing::InitGoogleTest(&argc, argv); // Removes gtest-specific args. |
1032 CommandLine::Init(argc, argv); | 1032 base::CommandLine::Init(argc, argv); |
1033 | 1033 |
1034 base::ShadowingAtExitManager at_exit_manager; | 1034 base::ShadowingAtExitManager at_exit_manager; |
1035 scoped_ptr<base::FilePath::StringType> test_stream_data( | 1035 scoped_ptr<base::FilePath::StringType> test_stream_data( |
1036 new base::FilePath::StringType( | 1036 new base::FilePath::StringType( |
1037 media::GetTestDataFilePath(content::g_default_in_filename).value() + | 1037 media::GetTestDataFilePath(content::g_default_in_filename).value() + |
1038 content::g_default_in_parameters)); | 1038 content::g_default_in_parameters)); |
1039 content::g_test_stream_data = test_stream_data.get(); | 1039 content::g_test_stream_data = test_stream_data.get(); |
1040 | 1040 |
1041 // Needed to enable DVLOG through --vmodule. | 1041 // Needed to enable DVLOG through --vmodule. |
1042 logging::LoggingSettings settings; | 1042 logging::LoggingSettings settings; |
1043 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; | 1043 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
1044 CHECK(logging::InitLogging(settings)); | 1044 CHECK(logging::InitLogging(settings)); |
1045 | 1045 |
1046 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 1046 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
1047 DCHECK(cmd_line); | 1047 DCHECK(cmd_line); |
1048 | 1048 |
1049 CommandLine::SwitchMap switches = cmd_line->GetSwitches(); | 1049 base::CommandLine::SwitchMap switches = cmd_line->GetSwitches(); |
1050 for (CommandLine::SwitchMap::const_iterator it = switches.begin(); | 1050 for (base::CommandLine::SwitchMap::const_iterator it = switches.begin(); |
1051 it != switches.end(); | 1051 it != switches.end(); |
1052 ++it) { | 1052 ++it) { |
1053 if (it->first == "test_stream_data") { | 1053 if (it->first == "test_stream_data") { |
1054 test_stream_data->assign(it->second.c_str()); | 1054 test_stream_data->assign(it->second.c_str()); |
1055 continue; | 1055 continue; |
1056 } | 1056 } |
1057 if (it->first == "v" || it->first == "vmodule") | 1057 if (it->first == "v" || it->first == "vmodule") |
1058 continue; | 1058 continue; |
1059 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 1059 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
1060 } | 1060 } |
1061 | 1061 |
1062 return RUN_ALL_TESTS(); | 1062 return RUN_ALL_TESTS(); |
1063 } | 1063 } |
OLD | NEW |