OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 | |
5 #include "base/platform_thread.h" | 4 #include "base/platform_thread.h" |
6 #include "base/test/perf_test_suite.h" | 5 #include "base/test/perf_test_suite.h" |
7 #include "base/scoped_ptr.h" | 6 #include "base/scoped_ptr.h" |
8 #include "chrome/common/chrome_paths.h" | 7 #include "chrome/common/chrome_paths.h" |
9 #include "chrome_frame/test/chrome_frame_test_utils.h" | 8 #include "chrome_frame/test/chrome_frame_test_utils.h" |
10 #include "chrome_frame/test_utils.h" | 9 #include "chrome_frame/test_utils.h" |
11 #include "chrome_frame/utils.h" | 10 #include "chrome_frame/utils.h" |
12 | 11 |
13 int main(int argc, char **argv) { | 12 int main(int argc, char **argv) { |
14 base::PerfTestSuite perf_suite(argc, argv); | 13 PerfTestSuite perf_suite(argc, argv); |
15 chrome::RegisterPathProvider(); | 14 chrome::RegisterPathProvider(); |
16 PlatformThread::SetName("ChromeFrame perf tests"); | 15 PlatformThread::SetName("ChromeFrame perf tests"); |
17 | 16 |
18 SetConfigBool(kChromeFrameHeadlessMode, true); | 17 SetConfigBool(kChromeFrameHeadlessMode, true); |
19 SetConfigBool(kChromeFrameUnpinnedMode, true); | 18 SetConfigBool(kChromeFrameUnpinnedMode, true); |
20 | 19 |
21 base::ProcessHandle crash_service = chrome_frame_test::StartCrashService(); | 20 base::ProcessHandle crash_service = chrome_frame_test::StartCrashService(); |
22 | 21 |
23 // Use ctor/raii to register the local Chrome Frame dll. | 22 // Use ctor/raii to register the local Chrome Frame dll. |
24 scoped_ptr<ScopedChromeFrameRegistrar> registrar( | 23 scoped_ptr<ScopedChromeFrameRegistrar> registrar( |
25 new ScopedChromeFrameRegistrar); | 24 new ScopedChromeFrameRegistrar); |
26 int ret = perf_suite.Run(); | 25 int ret = perf_suite.Run(); |
27 | 26 |
28 DeleteConfigValue(kChromeFrameHeadlessMode); | 27 DeleteConfigValue(kChromeFrameHeadlessMode); |
29 DeleteConfigValue(kChromeFrameUnpinnedMode); | 28 DeleteConfigValue(kChromeFrameUnpinnedMode); |
30 | 29 |
31 if (crash_service) | 30 if (crash_service) |
32 base::KillProcess(crash_service, 0, false); | 31 base::KillProcess(crash_service, 0, false); |
33 return ret; | 32 return ret; |
34 } | 33 } |
OLD | NEW |