| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // Run all of our test shell tests. This is just an entry point | 5 // Run all of our test shell tests. This is just an entry point |
| 6 // to kick off gTest's RUN_ALL_TESTS(). | 6 // to kick off gTest's RUN_ALL_TESTS(). |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 | 9 |
| 10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 base::AtExitManager at_exit_manager; | 40 base::AtExitManager at_exit_manager; |
| 41 | 41 |
| 42 #if defined(OS_LINUX) | 42 #if defined(OS_LINUX) |
| 43 gtk_init(&argc, &argv); | 43 gtk_init(&argc, &argv); |
| 44 #endif | 44 #endif |
| 45 | 45 |
| 46 #if defined(OS_POSIX) | 46 #if defined(OS_POSIX) |
| 47 CommandLine::SetArgcArgv(argc, argv); | 47 CommandLine::SetArgcArgv(argc, argv); |
| 48 #endif | 48 #endif |
| 49 | 49 |
| 50 #if defined(OS_WIN) | |
| 51 TestShell::InitLogging(true, false); // suppress error dialogs | 50 TestShell::InitLogging(true, false); // suppress error dialogs |
| 52 | 51 |
| 52 #if defined(OS_WIN) |
| 53 // Some of the individual tests wind up calling TestShell::WaitTestFinished | 53 // Some of the individual tests wind up calling TestShell::WaitTestFinished |
| 54 // which has a timeout in it. For these tests, we don't care about a timeout | 54 // which has a timeout in it. For these tests, we don't care about a timeout |
| 55 // so just set it to be a really large number. This is necessary because | 55 // so just set it to be a really large number. This is necessary because |
| 56 // when running under Purify, we were hitting those timeouts. | 56 // when running under Purify, we were hitting those timeouts. |
| 57 TestShell::SetFileTestTimeout(USER_TIMER_MAXIMUM); | 57 TestShell::SetFileTestTimeout(USER_TIMER_MAXIMUM); |
| 58 #endif | 58 #endif |
| 59 | 59 |
| 60 // Initialize test shell in non-interactive mode, which will let us load one | 60 // Initialize test shell in non-interactive mode, which will let us load one |
| 61 // request than automatically quit. | 61 // request than automatically quit. |
| 62 TestShell::InitializeTestShell(false); | 62 TestShell::InitializeTestShell(false); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 73 | 73 |
| 74 InitCtrlEx.dwSize = sizeof(INITCOMMONCONTROLSEX); | 74 InitCtrlEx.dwSize = sizeof(INITCOMMONCONTROLSEX); |
| 75 InitCtrlEx.dwICC = ICC_STANDARD_CLASSES; | 75 InitCtrlEx.dwICC = ICC_STANDARD_CLASSES; |
| 76 InitCommonControlsEx(&InitCtrlEx); | 76 InitCommonControlsEx(&InitCtrlEx); |
| 77 #endif | 77 #endif |
| 78 | 78 |
| 79 // Run the actual tests | 79 // Run the actual tests |
| 80 testing::InitGoogleTest(&argc, argv); | 80 testing::InitGoogleTest(&argc, argv); |
| 81 int result = RUN_ALL_TESTS(); | 81 int result = RUN_ALL_TESTS(); |
| 82 | 82 |
| 83 #if defined(OS_WIN) | |
| 84 TestShell::ShutdownTestShell(); | 83 TestShell::ShutdownTestShell(); |
| 85 TestShell::CleanupLogging(); | 84 TestShell::CleanupLogging(); |
| 86 #endif | |
| 87 | 85 |
| 88 return result; | 86 return result; |
| 89 } | 87 } |
| OLD | NEW |