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

Side by Side Diff: chrome/browser/mac/keystone_glue_unittest.mm

Issue 141193002: Update KeystoneRegistration.framework to 1.2.0.6782 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/mac/keystone_glue.mm ('k') | chrome/browser/mac/keystone_registration.h » ('j') | 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 #import <Foundation/Foundation.h> 5 #import <Foundation/Foundation.h>
6 #import <objc/objc-class.h> 6 #import <objc/objc-class.h>
7 7
8 #import "chrome/browser/mac/keystone_glue.h" 8 #import "chrome/browser/mac/keystone_glue.h"
9 #import "chrome/browser/mac/keystone_registration.h" 9 #import "chrome/browser/mac/keystone_registration.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 32
33 - (BOOL)promoteWithParameters:(NSDictionary*)args 33 - (BOOL)promoteWithParameters:(NSDictionary*)args
34 authorization:(AuthorizationRef)authorization { 34 authorization:(AuthorizationRef)authorization {
35 return NO; 35 return NO;
36 } 36 }
37 37
38 - (void)setActive { 38 - (void)setActive {
39 } 39 }
40 40
41 - (void)checkForUpdate { 41 - (void)checkForUpdateWasUserInitiated:(BOOL)userInitiated {
42 } 42 }
43 43
44 - (void)startUpdate { 44 - (void)startUpdate {
45 } 45 }
46 46
47 - (ksr::KSRegistrationTicketType)ticketType { 47 - (ksr::KSRegistrationTicketType)ticketType {
48 return ksr::kKSRegistrationDontKnowWhatKindOfTicket; 48 return ksr::kKSRegistrationDontKnowWhatKindOfTicket;
49 } 49 }
50 50
51 @end 51 @end
52 52
53 53
54 @implementation FakeKeystoneRegistration 54 @implementation FakeKeystoneRegistration
55 55
56 // Send the notifications that a real KeystoneGlue object would send. 56 // Send the notifications that a real KeystoneGlue object would send.
57 57
58 - (void)checkForUpdate { 58 - (void)checkForUpdateWasUserInitiated:(BOOL)userInitiated {
59 NSNumber* yesNumber = [NSNumber numberWithBool:YES]; 59 NSNumber* yesNumber = [NSNumber numberWithBool:YES];
60 NSString* statusKey = @"Status"; 60 NSString* statusKey = @"Status";
61 NSDictionary* dictionary = [NSDictionary dictionaryWithObject:yesNumber 61 NSDictionary* dictionary = [NSDictionary dictionaryWithObject:yesNumber
62 forKey:statusKey]; 62 forKey:statusKey];
63 NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; 63 NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
64 [center postNotificationName:ksr::KSRegistrationCheckForUpdateNotification 64 [center postNotificationName:ksr::KSRegistrationCheckForUpdateNotification
65 object:nil 65 object:nil
66 userInfo:dictionary]; 66 userInfo:dictionary];
67 } 67 }
68 68
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 [glue stopTimer]; 213 [glue stopTimer];
214 214
215 // Brief exercise of callbacks 215 // Brief exercise of callbacks
216 [glue addFakeRegistration]; 216 [glue addFakeRegistration];
217 [glue checkForUpdate]; 217 [glue checkForUpdate];
218 [glue installUpdate]; 218 [glue installUpdate];
219 ASSERT_TRUE([glue confirmCallbacks]); 219 ASSERT_TRUE([glue confirmCallbacks]);
220 } 220 }
221 221
222 } // namespace 222 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/mac/keystone_glue.mm ('k') | chrome/browser/mac/keystone_registration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698