| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome_frame/test/perf/chrome_frame_perftest.h" | 4 #include "chrome_frame/test/perf/chrome_frame_perftest.h" |
| 5 | 5 |
| 6 #include <atlwin.h> | 6 #include <atlwin.h> |
| 7 #include <atlhost.h> | 7 #include <atlhost.h> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1293 | 1293 |
| 1294 bool RunSingleTestOutOfProc(const std::string& test_name) { | 1294 bool RunSingleTestOutOfProc(const std::string& test_name) { |
| 1295 FilePath path; | 1295 FilePath path; |
| 1296 PathService::Get(base::DIR_EXE, &path); | 1296 PathService::Get(base::DIR_EXE, &path); |
| 1297 path = path.Append(L"chrome_frame_tests.exe"); | 1297 path = path.Append(L"chrome_frame_tests.exe"); |
| 1298 | 1298 |
| 1299 CommandLine cmd_line(path); | 1299 CommandLine cmd_line(path); |
| 1300 // Always enable disabled tests. This method is not called with disabled | 1300 // Always enable disabled tests. This method is not called with disabled |
| 1301 // tests unless this flag was specified to the browser test executable. | 1301 // tests unless this flag was specified to the browser test executable. |
| 1302 cmd_line.AppendSwitch("gtest_also_run_disabled_tests"); | 1302 cmd_line.AppendSwitch("gtest_also_run_disabled_tests"); |
| 1303 cmd_line.AppendSwitchWithValue("gtest_filter", test_name); | 1303 cmd_line.AppendSwitchASCII("gtest_filter", test_name); |
| 1304 | 1304 |
| 1305 base::ProcessHandle process_handle; | 1305 base::ProcessHandle process_handle; |
| 1306 if (!base::LaunchApp(cmd_line, false, false, &process_handle)) | 1306 if (!base::LaunchApp(cmd_line, false, false, &process_handle)) |
| 1307 return false; | 1307 return false; |
| 1308 | 1308 |
| 1309 int test_terminate_timeout_ms = 30 * 1000; | 1309 int test_terminate_timeout_ms = 30 * 1000; |
| 1310 int exit_code = 0; | 1310 int exit_code = 0; |
| 1311 if (!base::WaitForExitCodeWithTimeout(process_handle, &exit_code, | 1311 if (!base::WaitForExitCodeWithTimeout(process_handle, &exit_code, |
| 1312 test_terminate_timeout_ms)) { | 1312 test_terminate_timeout_ms)) { |
| 1313 LOG(ERROR) << "Test timeout (" << test_terminate_timeout_ms | 1313 LOG(ERROR) << "Test timeout (" << test_terminate_timeout_ms |
| (...skipping 26 matching lines...) Expand all Loading... |
| 1340 // Print results | 1340 // Print results |
| 1341 std::string times; | 1341 std::string times; |
| 1342 for (int i = 0; i < kNumCycles; ++i) { | 1342 for (int i = 0; i < kNumCycles; ++i) { |
| 1343 ASSERT_TRUE(monitor[i].is_valid()); | 1343 ASSERT_TRUE(monitor[i].is_valid()); |
| 1344 StringAppendF(×, "%.2f,", monitor[i].duration().InMillisecondsF()); | 1344 StringAppendF(×, "%.2f,", monitor[i].duration().InMillisecondsF()); |
| 1345 } | 1345 } |
| 1346 | 1346 |
| 1347 bool important = false; | 1347 bool important = false; |
| 1348 PrintResultList("createproxy", "", "t", times, "ms", important); | 1348 PrintResultList("createproxy", "", "t", times, "ms", important); |
| 1349 } | 1349 } |
| OLD | NEW |