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 #include <windows.h> | 4 #include <windows.h> |
5 #include <stdarg.h> | 5 #include <stdarg.h> |
6 | 6 |
7 // IShellWindows includes. Unfortunately we can't keep these in | 7 // IShellWindows includes. Unfortunately we can't keep these in |
8 // alphabetic order since exdisp will bark if some interfaces aren't fully | 8 // alphabetic order since exdisp will bark if some interfaces aren't fully |
9 // defined. | 9 // defined. |
10 #include <mshtml.h> | 10 #include <mshtml.h> |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 } else { | 188 } else { |
189 ASSERT_TRUE(WaitForTestToComplete(kLongWaitTimeout)); | 189 ASSERT_TRUE(WaitForTestToComplete(kLongWaitTimeout)); |
190 ASSERT_TRUE(CheckResultFile(result_file_to_check, "OK")); | 190 ASSERT_TRUE(CheckResultFile(result_file_to_check, "OK")); |
191 } | 191 } |
192 } | 192 } |
193 | 193 |
194 void ChromeFrameTestWithWebServer::VersionTest(BrowserKind browser, | 194 void ChromeFrameTestWithWebServer::VersionTest(BrowserKind browser, |
195 const wchar_t* page, const wchar_t* result_file_to_check) { | 195 const wchar_t* page, const wchar_t* result_file_to_check) { |
196 std::wstring plugin_path; | 196 std::wstring plugin_path; |
197 PathService::Get(base::DIR_MODULE, &plugin_path); | 197 PathService::Get(base::DIR_MODULE, &plugin_path); |
198 file_util::AppendToPath(&plugin_path, L"servers/npchrome_tab.dll"); | 198 file_util::AppendToPath(&plugin_path, L"servers"); |
| 199 file_util::AppendToPath(&plugin_path, kChromeFrameDllName); |
199 | 200 |
200 static FileVersionInfo* version_info = | 201 static FileVersionInfo* version_info = |
201 FileVersionInfo::CreateFileVersionInfo(plugin_path); | 202 FileVersionInfo::CreateFileVersionInfo(plugin_path); |
202 | 203 |
203 std::wstring version; | 204 std::wstring version; |
204 if (version_info) | 205 if (version_info) |
205 version = version_info->product_version(); | 206 version = version_info->product_version(); |
206 | 207 |
207 // If we can't find the npchrome_tab.dll in the src tree, we turn to | 208 // If we can't find the Chrome Frame DLL in the src tree, we turn to |
208 // the directory where chrome is installed. | 209 // the directory where chrome is installed. |
209 if (!version_info) { | 210 if (!version_info) { |
210 installer::Version* ver_system = InstallUtil::GetChromeVersion(true); | 211 installer::Version* ver_system = InstallUtil::GetChromeVersion(true); |
211 installer::Version* ver_user = InstallUtil::GetChromeVersion(false); | 212 installer::Version* ver_user = InstallUtil::GetChromeVersion(false); |
212 ASSERT_TRUE(ver_system || ver_user); | 213 ASSERT_TRUE(ver_system || ver_user); |
213 | 214 |
214 bool system_install = ver_system ? true : false; | 215 bool system_install = ver_system ? true : false; |
215 std::wstring npchrome_path(installer::GetChromeInstallPath(system_install)); | 216 std::wstring cf_dll_path(installer::GetChromeInstallPath(system_install)); |
216 file_util::AppendToPath(&npchrome_path, | 217 file_util::AppendToPath(&cf_dll_path, |
217 ver_system ? ver_system->GetString() : ver_user->GetString()); | 218 ver_system ? ver_system->GetString() : ver_user->GetString()); |
218 file_util::AppendToPath(&npchrome_path, L"npchrome_tab.dll"); | 219 file_util::AppendToPath(&cf_dll_path, kChromeFrameDllName); |
219 version_info = FileVersionInfo::CreateFileVersionInfo(npchrome_path); | 220 version_info = FileVersionInfo::CreateFileVersionInfo(cf_dll_path); |
220 if (version_info) | 221 if (version_info) |
221 version = version_info->product_version(); | 222 version = version_info->product_version(); |
222 } | 223 } |
223 | 224 |
224 EXPECT_TRUE(version_info); | 225 EXPECT_TRUE(version_info); |
225 EXPECT_FALSE(version.empty()); | 226 EXPECT_FALSE(version.empty()); |
226 EXPECT_TRUE(LaunchBrowser(browser, page)); | 227 EXPECT_TRUE(LaunchBrowser(browser, page)); |
227 ASSERT_TRUE(WaitForTestToComplete(kLongWaitTimeout)); | 228 ASSERT_TRUE(WaitForTestToComplete(kLongWaitTimeout)); |
228 ASSERT_TRUE(CheckResultFile(result_file_to_check, WideToUTF8(version))); | 229 ASSERT_TRUE(CheckResultFile(result_file_to_check, WideToUTF8(version))); |
229 } | 230 } |
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1745 ASSERT_TRUE( | 1746 ASSERT_TRUE( |
1746 LaunchBrowser(IE, | 1747 LaunchBrowser(IE, |
1747 kChromeFrameFullTabModeXMLHttpRequestAuthHeaderTestUrl)); | 1748 kChromeFrameFullTabModeXMLHttpRequestAuthHeaderTestUrl)); |
1748 | 1749 |
1749 loop.RunFor(kChromeFrameLongNavigationTimeoutInSeconds); | 1750 loop.RunFor(kChromeFrameLongNavigationTimeoutInSeconds); |
1750 | 1751 |
1751 chrome_frame_test::CloseAllIEWindows(); | 1752 chrome_frame_test::CloseAllIEWindows(); |
1752 ASSERT_TRUE( | 1753 ASSERT_TRUE( |
1753 CheckResultFile(L"FullTab_XMLHttpRequestAuthorizationHeaderTest", "OK")); | 1754 CheckResultFile(L"FullTab_XMLHttpRequestAuthorizationHeaderTest", "OK")); |
1754 } | 1755 } |
OLD | NEW |