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

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

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