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 #include "base/compiler_specific.h" | 5 #include "base/compiler_specific.h" |
6 #include "base/synchronization/waitable_event.h" | 6 #include "base/synchronization/waitable_event.h" |
7 #include "chrome/common/chrome_paths_internal.h" | 7 #include "chrome/common/chrome_paths_internal.h" |
8 #include "chrome_frame/crash_reporting/crash_metrics.h" | 8 #include "chrome_frame/crash_reporting/crash_metrics.h" |
9 #include "chrome_frame/test/chrome_frame_test_utils.h" | 9 #include "chrome_frame/test/chrome_frame_test_utils.h" |
10 #include "chrome_frame/test/proxy_factory_mock.h" | 10 #include "chrome_frame/test/proxy_factory_mock.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 LaunchDelegateMock launch_delegate_mock_; | 27 LaunchDelegateMock launch_delegate_mock_; |
28 }; | 28 }; |
29 | 29 |
30 void ProxyFactoryTest::SetUp() { | 30 void ProxyFactoryTest::SetUp() { |
31 CrashMetricsReporter::GetInstance()->set_active(true); | 31 CrashMetricsReporter::GetInstance()->set_active(true); |
32 } | 32 } |
33 | 33 |
34 ChromeFrameLaunchParams* ProxyFactoryTest::MakeLaunchParams( | 34 ChromeFrameLaunchParams* ProxyFactoryTest::MakeLaunchParams( |
35 const wchar_t* profile_name) { | 35 const wchar_t* profile_name) { |
36 GURL empty; | 36 GURL empty; |
37 FilePath profile_path; | 37 base::FilePath profile_path; |
38 GetChromeFrameProfilePath(profile_name, &profile_path); | 38 GetChromeFrameProfilePath(profile_name, &profile_path); |
39 chrome_frame_test::OverrideDataDirectoryForThisTest(profile_path.value()); | 39 chrome_frame_test::OverrideDataDirectoryForThisTest(profile_path.value()); |
40 ChromeFrameLaunchParams* params = | 40 ChromeFrameLaunchParams* params = |
41 new ChromeFrameLaunchParams(empty, empty, profile_path, | 41 new ChromeFrameLaunchParams(empty, empty, profile_path, |
42 profile_path.BaseName().value(), L"", false, | 42 profile_path.BaseName().value(), L"", false, |
43 false, false, false); | 43 false, false, false); |
44 params->set_launch_timeout(0); | 44 params->set_launch_timeout(0); |
45 params->set_version_check(false); | 45 params->set_version_check(false); |
46 return params; | 46 return params; |
47 } | 47 } |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 ::SetThreadPriority(::GetCurrentThread(), THREAD_PRIORITY_HIGHEST); | 129 ::SetThreadPriority(::GetCurrentThread(), THREAD_PRIORITY_HIGHEST); |
130 void* i2 = NULL; | 130 void* i2 = NULL; |
131 proxy_factory_.GetAutomationServer(d2, params, &i2); | 131 proxy_factory_.GetAutomationServer(d2, params, &i2); |
132 EXPECT_EQ(i1, i2); | 132 EXPECT_EQ(i1, i2); |
133 proxy_factory_.ReleaseAutomationServer(i2, d2); | 133 proxy_factory_.ReleaseAutomationServer(i2, d2); |
134 delete d2; | 134 delete d2; |
135 | 135 |
136 ::SetThreadPriority(::GetCurrentThread(), THREAD_PRIORITY_NORMAL); | 136 ::SetThreadPriority(::GetCurrentThread(), THREAD_PRIORITY_NORMAL); |
137 proxy_factory_.ReleaseAutomationServer(i1, d1); | 137 proxy_factory_.ReleaseAutomationServer(i1, d1); |
138 } | 138 } |
OLD | NEW |