| 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 // 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 25 matching lines...) Expand all Loading... |
| 36 public: | 36 public: |
| 37 TestShellTestSuite(int argc, char** argv) | 37 TestShellTestSuite(int argc, char** argv) |
| 38 : base::TestSuite(argc, argv), | 38 : base::TestSuite(argc, argv), |
| 39 platform_delegate_(*CommandLine::ForCurrentProcess()), | 39 platform_delegate_(*CommandLine::ForCurrentProcess()), |
| 40 test_shell_webkit_init_(true) { | 40 test_shell_webkit_init_(true) { |
| 41 } | 41 } |
| 42 | 42 |
| 43 virtual void Initialize() { | 43 virtual void Initialize() { |
| 44 // Override DIR_EXE early in case anything in base::TestSuite uses it. | 44 // Override DIR_EXE early in case anything in base::TestSuite uses it. |
| 45 #if defined(OS_MACOSX) | 45 #if defined(OS_MACOSX) |
| 46 FilePath path; | 46 base::FilePath path; |
| 47 PathService::Get(base::DIR_EXE, &path); | 47 PathService::Get(base::DIR_EXE, &path); |
| 48 path = path.AppendASCII("TestShell.app"); | 48 path = path.AppendASCII("TestShell.app"); |
| 49 base::mac::SetOverrideFrameworkBundlePath(path); | 49 base::mac::SetOverrideFrameworkBundlePath(path); |
| 50 #endif | 50 #endif |
| 51 | 51 |
| 52 base::TestSuite::Initialize(); | 52 base::TestSuite::Initialize(); |
| 53 | 53 |
| 54 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); | 54 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); |
| 55 | 55 |
| 56 // Allow tests to analyze GC information from V8 log, and expose GC | 56 // Allow tests to analyze GC information from V8 log, and expose GC |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 int main(int argc, char** argv) { | 100 int main(int argc, char** argv) { |
| 101 #if defined(OS_MACOSX) | 101 #if defined(OS_MACOSX) |
| 102 base::mac::ScopedNSAutoreleasePool scoped_pool; | 102 base::mac::ScopedNSAutoreleasePool scoped_pool; |
| 103 #endif | 103 #endif |
| 104 | 104 |
| 105 TestShellPlatformDelegate::PreflightArgs(&argc, &argv); | 105 TestShellPlatformDelegate::PreflightArgs(&argc, &argv); |
| 106 return TestShellTestSuite(argc, argv).Run(); | 106 return TestShellTestSuite(argc, argv).Run(); |
| 107 } | 107 } |
| OLD | NEW |