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

Side by Side Diff: chrome/test/mini_installer_test/mini_installer_test_util.cc

Issue 8037004: Adding simple Chrome install testing using multi-install and cleaning up a bit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "chrome/test/mini_installer_test/mini_installer_test_util.h" 7 #include "chrome/test/mini_installer_test/mini_installer_test_util.h"
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 key.ki.wScan = 0; 86 key.ki.wScan = 0;
87 key.ki.dwExtraInfo = 0; 87 key.ki.dwExtraInfo = 0;
88 SendInput(1, &key, sizeof(INPUT)); 88 SendInput(1, &key, sizeof(INPUT));
89 key.ki.dwExtraInfo = KEYEVENTF_KEYUP; 89 key.ki.dwExtraInfo = KEYEVENTF_KEYUP;
90 SendInput(1, &key, sizeof(INPUT)); 90 SendInput(1, &key, sizeof(INPUT));
91 } 91 }
92 92
93 93
94 void MiniInstallerTestUtil::VerifyProcessLaunch( 94 void MiniInstallerTestUtil::VerifyProcessLaunch(
95 const wchar_t* process_name, bool expected_status) { 95 const wchar_t* process_name, bool expected_status) {
96 LOG(INFO) << "Verifying process is launched: " << process_name;
96 int timer = 0, wait_time = 60000; 97 int timer = 0, wait_time = 60000;
97 if (!expected_status) 98 if (!expected_status)
98 wait_time = 8000; 99 wait_time = 8000;
99 100
100 while ((base::GetProcessCount(process_name, NULL) == 0) && 101 while ((base::GetProcessCount(process_name, NULL) == 0) &&
101 (timer < wait_time)) { 102 (timer < wait_time)) {
102 base::PlatformThread::Sleep(200); 103 base::PlatformThread::Sleep(200);
103 timer = timer + 200; 104 timer = timer + 200;
104 } 105 }
105 106
(...skipping 19 matching lines...) Expand all
125 } 126 }
126 return true; 127 return true;
127 } 128 }
128 129
129 bool MiniInstallerTestUtil::VerifyProcessHandleClosed( 130 bool MiniInstallerTestUtil::VerifyProcessHandleClosed(
130 base::ProcessHandle handle) { 131 base::ProcessHandle handle) {
131 DWORD result = WaitForSingleObject(handle, 132 DWORD result = WaitForSingleObject(handle,
132 TestTimeouts::large_test_timeout_ms()); 133 TestTimeouts::large_test_timeout_ms());
133 return result == WAIT_OBJECT_0; 134 return result == WAIT_OBJECT_0;
134 } 135 }
OLDNEW
« no previous file with comments | « chrome/test/mini_installer_test/mini_installer_test_constants.cc ('k') | chrome/test/mini_installer_test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698