| 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 "chrome_frame/test/test_with_web_server.h" | 5 #include "chrome_frame/test/test_with_web_server.h" |
| 6 | 6 |
| 7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/file_version_info.h" | 8 #include "base/file_version_info.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 version = version_info->product_version(); | 288 version = version_info->product_version(); |
| 289 | 289 |
| 290 // If we can't find the Chrome Frame DLL in the src tree, we turn to | 290 // If we can't find the Chrome Frame DLL in the src tree, we turn to |
| 291 // the directory where chrome is installed. | 291 // the directory where chrome is installed. |
| 292 if (!version_info) { | 292 if (!version_info) { |
| 293 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); | 293 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
| 294 scoped_ptr<Version> ver_system(InstallUtil::GetChromeVersion(dist, true)); | 294 scoped_ptr<Version> ver_system(InstallUtil::GetChromeVersion(dist, true)); |
| 295 scoped_ptr<Version> ver_user(InstallUtil::GetChromeVersion(dist, false)); | 295 scoped_ptr<Version> ver_user(InstallUtil::GetChromeVersion(dist, false)); |
| 296 ASSERT_TRUE(ver_system.get() || ver_user.get()); | 296 ASSERT_TRUE(ver_system.get() || ver_user.get()); |
| 297 | 297 |
| 298 bool system_install = ver_system.get() ? true : false; | 298 bool system_install = ver_system != NULL; |
| 299 FilePath cf_dll_path(installer::GetChromeInstallPath(system_install, dist)); | 299 FilePath cf_dll_path(installer::GetChromeInstallPath(system_install, dist)); |
| 300 cf_dll_path = cf_dll_path.Append(UTF8ToWide( | 300 cf_dll_path = cf_dll_path.Append(UTF8ToWide( |
| 301 ver_system.get() ? ver_system->GetString() : ver_user->GetString())); | 301 ver_system.get() ? ver_system->GetString() : ver_user->GetString())); |
| 302 cf_dll_path = cf_dll_path.Append(kChromeFrameDllName); | 302 cf_dll_path = cf_dll_path.Append(kChromeFrameDllName); |
| 303 version_info = FileVersionInfo::CreateFileVersionInfo(cf_dll_path); | 303 version_info = FileVersionInfo::CreateFileVersionInfo(cf_dll_path); |
| 304 if (version_info) | 304 if (version_info) |
| 305 version = version_info->product_version(); | 305 version = version_info->product_version(); |
| 306 } | 306 } |
| 307 | 307 |
| 308 server_mock().set_expected_result(WideToUTF8(version)); | 308 server_mock().set_expected_result(WideToUTF8(version)); |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1048 server.web_server()->AddResponse(response); | 1048 server.web_server()->AddResponse(response); |
| 1049 | 1049 |
| 1050 std::wstring url(server.FormatHttpPath(L"form.html")); | 1050 std::wstring url(server.FormatHttpPath(L"form.html")); |
| 1051 | 1051 |
| 1052 ASSERT_TRUE(LaunchBrowser(IE, url.c_str())); | 1052 ASSERT_TRUE(LaunchBrowser(IE, url.c_str())); |
| 1053 loop().RunFor(kChromeFrameLongNavigationTimeout); | 1053 loop().RunFor(kChromeFrameLongNavigationTimeout); |
| 1054 | 1054 |
| 1055 EXPECT_EQ(1, response->get_request_count()); | 1055 EXPECT_EQ(1, response->get_request_count()); |
| 1056 EXPECT_EQ(1, response->post_request_count()); | 1056 EXPECT_EQ(1, response->post_request_count()); |
| 1057 } | 1057 } |
| OLD | NEW |