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

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

Issue 10053004: Use TimeDelta for Chrome Frame test's TimedMsgLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
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/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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 SECURITY_SQOS_PRESENT; 44 SECURITY_SQOS_PRESENT;
45 const int kCrashServiceStartupTimeoutMs = 500; 45 const int kCrashServiceStartupTimeoutMs = 500;
46 46
47 const wchar_t kIEImageName[] = L"iexplore.exe"; 47 const wchar_t kIEImageName[] = L"iexplore.exe";
48 const wchar_t kIEBrokerImageName[] = L"ieuser.exe"; 48 const wchar_t kIEBrokerImageName[] = L"ieuser.exe";
49 const char kChromeImageName[] = "chrome.exe"; 49 const char kChromeImageName[] = "chrome.exe";
50 const wchar_t kIEProfileName[] = L"iexplore"; 50 const wchar_t kIEProfileName[] = L"iexplore";
51 const wchar_t kChromeLauncher[] = L"chrome_launcher.exe"; 51 const wchar_t kChromeLauncher[] = L"chrome_launcher.exe";
52 52
53 #ifndef NDEBUG 53 #ifndef NDEBUG
54 const int kChromeFrameLongNavigationTimeoutInSeconds = 30; 54 const base::TimeDelta kChromeFrameLongNavigationTimeout =
55 const int kChromeFrameVeryLongNavigationTimeoutInSeconds = 90; 55 base::TimeDelta::FromSeconds(30);
56 const base::TimeDelta kChromeFrameVeryLongNavigationTimeout =
57 base::TimeDelta::FromSeconds(90);
56 #else 58 #else
57 const int kChromeFrameLongNavigationTimeoutInSeconds = 15; 59 const base::TimeDelta kChromeFrameLongNavigationTimeout =
58 const int kChromeFrameVeryLongNavigationTimeoutInSeconds = 45; 60 base::TimeDelta::FromSeconds(15);
61 const base::TimeDelta kChromeFrameVeryLongNavigationTimeout =
62 base::TimeDelta::FromSeconds(45);
59 #endif 63 #endif
60 64
61 // Callback function for EnumThreadWindows. 65 // Callback function for EnumThreadWindows.
62 BOOL CALLBACK CloseWindowsThreadCallback(HWND hwnd, LPARAM param) { 66 BOOL CALLBACK CloseWindowsThreadCallback(HWND hwnd, LPARAM param) {
63 int& count = *reinterpret_cast<int*>(param); 67 int& count = *reinterpret_cast<int*>(param);
64 if (IsWindowVisible(hwnd)) { 68 if (IsWindowVisible(hwnd)) {
65 if (IsWindowEnabled(hwnd)) { 69 if (IsWindowEnabled(hwnd)) {
66 DWORD results = 0; 70 DWORD results = 0;
67 if (!::SendMessageTimeout(hwnd, WM_SYSCOMMAND, SC_CLOSE, 0, SMTO_BLOCK, 71 if (!::SendMessageTimeout(hwnd, WM_SYSCOMMAND, SC_CLOSE, 0, SMTO_BLOCK,
68 10000, &results)) { 72 10000, &results)) {
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 if (!PathService::Get(base::DIR_LOCAL_APP_DATA, &session_history_path)) 671 if (!PathService::Get(base::DIR_LOCAL_APP_DATA, &session_history_path))
668 return; 672 return;
669 673
670 session_history_path = session_history_path.AppendASCII("Microsoft"); 674 session_history_path = session_history_path.AppendASCII("Microsoft");
671 session_history_path = session_history_path.AppendASCII("Internet Explorer"); 675 session_history_path = session_history_path.AppendASCII("Internet Explorer");
672 session_history_path = session_history_path.AppendASCII("Recovery"); 676 session_history_path = session_history_path.AppendASCII("Recovery");
673 file_util::Delete(session_history_path, true); 677 file_util::Delete(session_history_path, true);
674 } 678 }
675 679
676 } // namespace chrome_frame_test 680 } // namespace chrome_frame_test
OLDNEW
« no previous file with comments | « chrome_frame/test/chrome_frame_test_utils.h ('k') | chrome_frame/test/delete_chrome_history_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698