OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <string> | 5 #include <string> |
6 | 6 |
7 // This has to be included first. | 7 // This has to be included first. |
8 // See http://code.google.com/p/googletest/issues/detail?id=371 | 8 // See http://code.google.com/p/googletest/issues/detail?id=371 |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 VLOG(1) << "Actual MD5 sum: " << actual; | 343 VLOG(1) << "Actual MD5 sum: " << actual; |
344 EXPECT_EQ(md5sum, actual); | 344 EXPECT_EQ(md5sum, actual); |
345 } | 345 } |
346 } | 346 } |
347 | 347 |
348 } // namespace | 348 } // namespace |
349 } // namespace content | 349 } // namespace content |
350 | 350 |
351 int main(int argc, char** argv) { | 351 int main(int argc, char** argv) { |
352 testing::InitGoogleTest(&argc, argv); // Removes gtest-specific args. | 352 testing::InitGoogleTest(&argc, argv); // Removes gtest-specific args. |
353 CommandLine::Init(argc, argv); | 353 base::CommandLine::Init(argc, argv); |
354 | 354 |
355 // Needed to enable DVLOG through --vmodule. | 355 // Needed to enable DVLOG through --vmodule. |
356 logging::LoggingSettings settings; | 356 logging::LoggingSettings settings; |
357 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; | 357 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
358 CHECK(logging::InitLogging(settings)); | 358 CHECK(logging::InitLogging(settings)); |
359 | 359 |
360 // Process command line. | 360 // Process command line. |
361 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 361 base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
362 CHECK(cmd_line); | 362 CHECK(cmd_line); |
363 | 363 |
364 CommandLine::SwitchMap switches = cmd_line->GetSwitches(); | 364 base::CommandLine::SwitchMap switches = cmd_line->GetSwitches(); |
365 for (CommandLine::SwitchMap::const_iterator it = switches.begin(); | 365 for (base::CommandLine::SwitchMap::const_iterator it = switches.begin(); |
366 it != switches.end(); | 366 it != switches.end(); |
367 ++it) { | 367 ++it) { |
368 if (it->first == "input_file") { | 368 if (it->first == "input_file") { |
369 content::g_input_file = base::FilePath(it->second); | 369 content::g_input_file = base::FilePath(it->second); |
370 continue; | 370 continue; |
371 } | 371 } |
372 if (it->first == "output_file") { | 372 if (it->first == "output_file") { |
373 content::g_output_file = base::FilePath(it->second); | 373 content::g_output_file = base::FilePath(it->second); |
374 continue; | 374 continue; |
375 } | 375 } |
376 if (it->first == "md5sum") { | 376 if (it->first == "md5sum") { |
377 content::g_md5sum = it->second; | 377 content::g_md5sum = it->second; |
378 continue; | 378 continue; |
379 } | 379 } |
380 if (it->first == "v" || it->first == "vmodule") | 380 if (it->first == "v" || it->first == "vmodule") |
381 continue; | 381 continue; |
382 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 382 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
383 } | 383 } |
384 | 384 |
385 return RUN_ALL_TESTS(); | 385 return RUN_ALL_TESTS(); |
386 } | 386 } |
OLD | NEW |