Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Side by Side Diff: chrome_frame/test/test_with_web_server.cc

Issue 10683005: Remove two deprecated methods from base::Version (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome_frame/test/dll_redirector_test.cc ('k') | content/browser/plugin_data_remover_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 FileVersionInfo::CreateFileVersionInfo(plugin_path); 285 FileVersionInfo::CreateFileVersionInfo(plugin_path);
286 286
287 std::wstring version; 287 std::wstring version;
288 if (version_info) 288 if (version_info)
289 version = version_info->product_version(); 289 version = version_info->product_version();
290 290
291 // If we can't find the Chrome Frame DLL in the src tree, we turn to 291 // If we can't find the Chrome Frame DLL in the src tree, we turn to
292 // the directory where chrome is installed. 292 // the directory where chrome is installed.
293 if (!version_info) { 293 if (!version_info) {
294 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); 294 BrowserDistribution* dist = BrowserDistribution::GetDistribution();
295 scoped_ptr<Version> ver_system(InstallUtil::GetChromeVersion(dist, true)); 295 Version ver_system;
296 scoped_ptr<Version> ver_user(InstallUtil::GetChromeVersion(dist, false)); 296 InstallUtil::GetChromeVersion(dist, true, &ver_system);
297 ASSERT_TRUE(ver_system.get() || ver_user.get()); 297 Version ver_user;
298 InstallUtil::GetChromeVersion(dist, false, &ver_system);
299 ASSERT_TRUE(ver_system.IsValid() || ver_user.IsValid());
298 300
299 bool system_install = ver_system != NULL; 301 bool system_install = ver_system.IsValid();
300 FilePath cf_dll_path(installer::GetChromeInstallPath(system_install, dist)); 302 FilePath cf_dll_path(installer::GetChromeInstallPath(system_install, dist));
301 cf_dll_path = cf_dll_path.Append(UTF8ToWide( 303 cf_dll_path = cf_dll_path.Append(UTF8ToWide(
302 ver_system.get() ? ver_system->GetString() : ver_user->GetString())); 304 ver_system.IsValid() ? ver_system.GetString() : ver_user.GetString()));
303 cf_dll_path = cf_dll_path.Append(kChromeFrameDllName); 305 cf_dll_path = cf_dll_path.Append(kChromeFrameDllName);
304 version_info = FileVersionInfo::CreateFileVersionInfo(cf_dll_path); 306 version_info = FileVersionInfo::CreateFileVersionInfo(cf_dll_path);
305 if (version_info) 307 if (version_info)
306 version = version_info->product_version(); 308 version = version_info->product_version();
307 } 309 }
308 310
309 server_mock().set_expected_result(WideToUTF8(version)); 311 server_mock().set_expected_result(WideToUTF8(version));
310 312
311 EXPECT_TRUE(version_info); 313 EXPECT_TRUE(version_info);
312 EXPECT_FALSE(version.empty()); 314 EXPECT_FALSE(version.empty());
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 server.web_server()->AddResponse(response); 1052 server.web_server()->AddResponse(response);
1051 1053
1052 std::wstring url(server.FormatHttpPath(L"form.html")); 1054 std::wstring url(server.FormatHttpPath(L"form.html"));
1053 1055
1054 ASSERT_TRUE(LaunchBrowser(IE, url.c_str())); 1056 ASSERT_TRUE(LaunchBrowser(IE, url.c_str()));
1055 loop().RunFor(kChromeFrameLongNavigationTimeout); 1057 loop().RunFor(kChromeFrameLongNavigationTimeout);
1056 1058
1057 EXPECT_EQ(1, response->get_request_count()); 1059 EXPECT_EQ(1, response->get_request_count());
1058 EXPECT_EQ(1, response->post_request_count()); 1060 EXPECT_EQ(1, response->post_request_count());
1059 } 1061 }
OLDNEW
« no previous file with comments | « chrome_frame/test/dll_redirector_test.cc ('k') | content/browser/plugin_data_remover_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698