OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // The bulk of this file is support code; sorry about that. Here's an overview | 5 // The bulk of this file is support code; sorry about that. Here's an overview |
6 // to hopefully help readers of this code: | 6 // to hopefully help readers of this code: |
7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or | 7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or |
8 // Win/EGL. | 8 // Win/EGL. |
9 // - ClientState is an enum for the state of the decode client used by the test. | 9 // - ClientState is an enum for the state of the decode client used by the test. |
10 // - ClientStateNotification is a barrier abstraction that allows the test code | 10 // - ClientStateNotification is a barrier abstraction that allows the test code |
(...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1534 } // namespace | 1534 } // namespace |
1535 } // namespace content | 1535 } // namespace content |
1536 | 1536 |
1537 int main(int argc, char **argv) { | 1537 int main(int argc, char **argv) { |
1538 testing::InitGoogleTest(&argc, argv); // Removes gtest-specific args. | 1538 testing::InitGoogleTest(&argc, argv); // Removes gtest-specific args. |
1539 CommandLine::Init(argc, argv); | 1539 CommandLine::Init(argc, argv); |
1540 | 1540 |
1541 // Needed to enable DVLOG through --vmodule. | 1541 // Needed to enable DVLOG through --vmodule. |
1542 logging::LoggingSettings settings; | 1542 logging::LoggingSettings settings; |
1543 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; | 1543 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
1544 settings.dcheck_state = | |
1545 logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS; | |
1546 CHECK(logging::InitLogging(settings)); | 1544 CHECK(logging::InitLogging(settings)); |
1547 | 1545 |
1548 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 1546 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
1549 DCHECK(cmd_line); | 1547 DCHECK(cmd_line); |
1550 | 1548 |
1551 CommandLine::SwitchMap switches = cmd_line->GetSwitches(); | 1549 CommandLine::SwitchMap switches = cmd_line->GetSwitches(); |
1552 for (CommandLine::SwitchMap::const_iterator it = switches.begin(); | 1550 for (CommandLine::SwitchMap::const_iterator it = switches.begin(); |
1553 it != switches.end(); ++it) { | 1551 it != switches.end(); ++it) { |
1554 if (it->first == "test_video_data") { | 1552 if (it->first == "test_video_data") { |
1555 content::g_test_video_data = it->second.c_str(); | 1553 content::g_test_video_data = it->second.c_str(); |
(...skipping 18 matching lines...) Expand all Loading... |
1574 } | 1572 } |
1575 if (it->first == "v" || it->first == "vmodule") | 1573 if (it->first == "v" || it->first == "vmodule") |
1576 continue; | 1574 continue; |
1577 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 1575 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
1578 } | 1576 } |
1579 | 1577 |
1580 base::ShadowingAtExitManager at_exit_manager; | 1578 base::ShadowingAtExitManager at_exit_manager; |
1581 | 1579 |
1582 return RUN_ALL_TESTS(); | 1580 return RUN_ALL_TESTS(); |
1583 } | 1581 } |
OLD | NEW |