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

Side by Side Diff: chrome/test/test_launcher/run_all_unittests.cc

Issue 1310003: [GTTF] Remove the in-process test launcher, which is no longer used.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 9 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/test/test_launcher/in_proc_test_runner.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
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/string_util.h"
6 #include "chrome/test/unit/chrome_test_suite.h"
7
8 #if defined(OS_WIN)
9 #define DLLEXPORT __declspec(dllexport)
10 #else
11 #define DLLEXPORT
12 #define CDECL
13 #endif
14
15 // We use extern C for the prototype DLLEXPORT to avoid C++ name mangling.
16 extern "C" {
17 DLLEXPORT int CDECL RunTests(int argc, char **argv) {
18 return ChromeTestSuite(argc, argv).Run();
19 }
20
21 #if defined(OS_WIN)
22 DLLEXPORT int CDECL UninitializeTest() {
23 // The CRichEditCtrl (used by the omnibox) calls OleInitialize, but somehow
24 // does not always calls OleUninitialize, causing an unbalanced Ole
25 // initialization that triggers a DCHECK in ScopedOleInitializer the next
26 // time we run a test.
27 // This behavior has been seen on some Vista boxes, but not all of them.
28 // There is a flag to prevent Ole initialization in CRichEditCtrl (see
29 // http://support.microsoft.com/kb/238989), but it is set to 0 in recent
30 // Windows versions.
31 // This is a dirty hack to make sure the OleCount is back to 0 in all cases,
32 // so the next test will have Ole unitialized, as expected.
33
34 if (OleInitialize(NULL) == S_FALSE) {
35 // We were already initialized, balance that extra-initialization.
36 OleUninitialize();
37 }
38 // Balance the OleInitialize from the above test.
39 OleUninitialize();
40
41 return 0; // 0 means uninitialization OK.
42 }
43 #endif
44
45 }
OLDNEW
« no previous file with comments | « chrome/test/test_launcher/in_proc_test_runner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698