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

Unified Diff: chrome/installer/gcapi/gcapi_test.cc

Issue 18490: Adds the 6-month flag functionality back into the criteria checker,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/gcapi/gcapi.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/gcapi/gcapi_test.cc
===================================================================
--- chrome/installer/gcapi/gcapi_test.cc (revision 8931)
+++ chrome/installer/gcapi/gcapi_test.cc (working copy)
@@ -8,11 +8,20 @@
void call_statically() {
DWORD reason = 0;
- BOOL result = FALSE;
+ BOOL result_flag_on = FALSE;
+ BOOL result_flag_off = FALSE;
+
+ // running this twice verifies that the first call does not set
+ // a flag that would make the second fail. Thus, the results
+ // of the two calls should be the same (no state should have changed)
+ result_flag_off = GoogleChromeCompatibilityCheck(FALSE, &reason);
+ result_flag_on = GoogleChromeCompatibilityCheck(TRUE, &reason);
- result = GoogleChromeCompatibilityCheck(&reason);
+ if (result_flag_off != result_flag_on)
+ printf("Registry key flag is not being set properly.");
+
printf("Static call returned result as %d and reason as %d.\n",
- result, reason);
+ result_flag_on, reason);
}
void call_dynamically() {
@@ -26,9 +35,18 @@
module, "GoogleChromeCompatibilityCheck");
if (gccfn != NULL) {
DWORD reason = 0;
- BOOL result = gccfn(&reason);
+
+ // running this twice verifies that the first call does not set
+ // a flag that would make the second fail. Thus, the results
+ // of the two calls should be the same (no state should have changed)
+ BOOL result_flag_off = gccfn(FALSE, &reason);
+ BOOL result_flag_on = gccfn(TRUE, &reason);
+
+ if (result_flag_off != result_flag_on)
+ printf("Registry key flag is not being set properly.");
+
printf("Dynamic call returned result as %d and reason as %d.\n",
- result, reason);
+ result_flag_on, reason);
} else {
printf("Couldn't find GoogleChromeCompatibilityCheck() in gcapi_dll.\n");
}
« no previous file with comments | « chrome/installer/gcapi/gcapi.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698