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/chrome_frame_test_utils.h" | 5 #include "chrome_frame/test/chrome_frame_test_utils.h" |
6 | 6 |
7 #include <atlapp.h> | 7 #include <atlapp.h> |
8 #include <atlmisc.h> | 8 #include <atlmisc.h> |
9 #include <iepmapi.h> | 9 #include <iepmapi.h> |
10 #include <sddl.h> | 10 #include <sddl.h> |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 cocreate_flags |= CLSCTX_ENABLE_CLOAKING; | 406 cocreate_flags |= CLSCTX_ENABLE_CLOAKING; |
407 } | 407 } |
408 | 408 |
409 hr = ::CoCreateInstance(CLSID_InternetExplorer, NULL, | 409 hr = ::CoCreateInstance(CLSID_InternetExplorer, NULL, |
410 cocreate_flags, IID_IWebBrowser2, | 410 cocreate_flags, IID_IWebBrowser2, |
411 reinterpret_cast<void**>(web_browser)); | 411 reinterpret_cast<void**>(web_browser)); |
412 // ~LowIntegrityToken() will switch integrity back to medium. | 412 // ~LowIntegrityToken() will switch integrity back to medium. |
413 return hr; | 413 return hr; |
414 } | 414 } |
415 | 415 |
416 // TODO(joi@chromium.org) Could share this code with chrome_frame_plugin.h | |
417 FilePath GetProfilePath(const std::wstring& profile_name) { | |
418 FilePath profile_path; | |
419 chrome::GetChromeFrameUserDataDirectory(&profile_path); | |
420 return profile_path.Append(profile_name); | |
421 } | |
422 | |
423 std::wstring GetExeVersion(const std::wstring& exe_path) { | 416 std::wstring GetExeVersion(const std::wstring& exe_path) { |
424 scoped_ptr<FileVersionInfo> ie_version_info( | 417 scoped_ptr<FileVersionInfo> ie_version_info( |
425 FileVersionInfo::CreateFileVersionInfo(FilePath(exe_path))); | 418 FileVersionInfo::CreateFileVersionInfo(FilePath(exe_path))); |
426 return ie_version_info->product_version(); | 419 return ie_version_info->product_version(); |
427 } | 420 } |
428 | 421 |
429 IEVersion GetInstalledIEVersion() { | 422 IEVersion GetInstalledIEVersion() { |
430 std::wstring path = chrome_frame_test::GetExecutableAppPath(kIEImageName); | 423 std::wstring path = chrome_frame_test::GetExecutableAppPath(kIEImageName); |
431 std::wstring version = GetExeVersion(path); | 424 std::wstring version = GetExeVersion(path); |
432 | 425 |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 if (address.empty()) { | 700 if (address.empty()) { |
708 LOG(ERROR) << "Failed to find a non-loopback IP_V4 address. Tests will be " | 701 LOG(ERROR) << "Failed to find a non-loopback IP_V4 address. Tests will be " |
709 << "run over the loopback adapter, which may result in hangs."; | 702 << "run over the loopback adapter, which may result in hangs."; |
710 address.assign("127.0.0.1"); | 703 address.assign("127.0.0.1"); |
711 } | 704 } |
712 | 705 |
713 return address; | 706 return address; |
714 } | 707 } |
715 | 708 |
716 } // namespace chrome_frame_test | 709 } // namespace chrome_frame_test |
OLD | NEW |