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

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

Issue 3432005: As a best effort terminate IE at the end of each chrome frame test run on an ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 3 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/chrome_frame_test_utils.cc ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/ie_event_sink.h" 5 #include "chrome_frame/test/ie_event_sink.h"
6 6
7 #include "base/scoped_bstr_win.h" 7 #include "base/scoped_bstr_win.h"
8 #include "base/scoped_handle.h" 8 #include "base/scoped_handle.h"
9 #include "base/scoped_variant_win.h" 9 #include "base/scoped_variant_win.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 MSG msg; 157 MSG msg;
158 while (PeekMessage(&msg, NULL, 0, 0, TRUE) > 0) { 158 while (PeekMessage(&msg, NULL, 0, 0, TRUE) > 0) {
159 TranslateMessage(&msg); 159 TranslateMessage(&msg);
160 DispatchMessage(&msg); 160 DispatchMessage(&msg);
161 } 161 }
162 } else if (wait == WAIT_OBJECT_0) { 162 } else if (wait == WAIT_OBJECT_0) {
163 break; 163 break;
164 } else { 164 } else {
165 DCHECK(wait == WAIT_TIMEOUT); 165 DCHECK(wait == WAIT_TIMEOUT);
166 DLOG(ERROR) << "Wait for IE timed out"; 166 DLOG(ERROR) << "Wait for IE timed out";
167 if (!TerminateProcess(process, 0)) {
168 DLOG(ERROR) << "Failed to terminate IE. Error:"
169 << ::GetLastError();
170 }
167 break; 171 break;
168 } 172 }
169 base::TimeDelta elapsed = base::Time::Now() - start; 173 base::TimeDelta elapsed = base::Time::Now() - start;
170 ULARGE_INTEGER ms; 174 ULARGE_INTEGER ms;
171 ms.QuadPart = elapsed.InMilliseconds(); 175 ms.QuadPart = elapsed.InMilliseconds();
172 DCHECK_EQ(ms.HighPart, 0U); 176 DCHECK_EQ(ms.HighPart, 0U);
173 if (ms.LowPart > max_wait) { 177 if (ms.LowPart > max_wait) {
174 DLOG(ERROR) << "Wait for IE timed out (2)"; 178 DLOG(ERROR) << "Wait for IE timed out (2)";
175 break; 179 break;
176 } else { 180 } else {
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 source.Receive(), NULL, NULL)); 588 source.Receive(), NULL, NULL));
585 } 589 }
586 } 590 }
587 591
588 if (listener_) 592 if (listener_)
589 listener_->OnMessage(V_BSTR(&data), V_BSTR(&origin), V_BSTR(&source)); 593 listener_->OnMessage(V_BSTR(&data), V_BSTR(&origin), V_BSTR(&source));
590 return S_OK; 594 return S_OK;
591 } 595 }
592 596
593 } // namespace chrome_frame_test 597 } // namespace chrome_frame_test
OLDNEW
« no previous file with comments | « chrome_frame/test/chrome_frame_test_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698