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

Side by Side Diff: chrome/installer/gcapi/gcapi_test.cc

Issue 9302029: Revert 119841 - Implementation of GCAPI reactivation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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/installer/gcapi/gcapi_reactivation_test.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) 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 <stdio.h> 5 #include <stdio.h>
6 6
7 #include "base/command_line.h"
8 #include "chrome/installer/gcapi/gcapi.h" 7 #include "chrome/installer/gcapi/gcapi.h"
9 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
10 9
11 void call_statically() { 10 void call_statically() {
12 DWORD reason = 0; 11 DWORD reason = 0;
13 BOOL result_flag_on = FALSE; 12 BOOL result_flag_on = FALSE;
14 BOOL result_flag_off = FALSE; 13 BOOL result_flag_off = FALSE;
15 14
16 // running this twice verifies that the first call does not set 15 // running this twice verifies that the first call does not set
17 // a flag that would make the second fail. Thus, the results 16 // a flag that would make the second fail. Thus, the results
(...skipping 30 matching lines...) Expand all
48 printf("Registry key flag is not being set properly."); 47 printf("Registry key flag is not being set properly.");
49 48
50 printf("Dynamic call returned result as %d and reason as %d.\n", 49 printf("Dynamic call returned result as %d and reason as %d.\n",
51 result_flag_on, reason); 50 result_flag_on, reason);
52 } else { 51 } else {
53 printf("Couldn't find GoogleChromeCompatibilityCheck() in gcapi_dll.\n"); 52 printf("Couldn't find GoogleChromeCompatibilityCheck() in gcapi_dll.\n");
54 } 53 }
55 FreeLibrary(module); 54 FreeLibrary(module);
56 } 55 }
57 56
58 const char kManualLaunchTests[] = "launch-chrome";
59
60 int main(int argc, char* argv[]) { 57 int main(int argc, char* argv[]) {
61 CommandLine::Init(argc, argv);
62
63 testing::InitGoogleTest(&argc, argv); 58 testing::InitGoogleTest(&argc, argv);
64 RUN_ALL_TESTS(); 59 RUN_ALL_TESTS();
65 60
66 if (CommandLine::ForCurrentProcess()->HasSwitch(kManualLaunchTests)) { 61 call_dynamically();
67 call_dynamically(); 62 call_statically();
68 call_statically(); 63 printf("LaunchChrome returned %d.\n", LaunchGoogleChrome());
69 printf("LaunchChrome returned %d.\n", LaunchGoogleChrome());
70 }
71 } 64 }
OLDNEW
« no previous file with comments | « chrome/installer/gcapi/gcapi_reactivation_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698