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

Side by Side Diff: chrome/browser/cocoa/applescript/bookmark_applescript_utils_unittest.mm

Issue 3046042: Added AppleScript support (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years, 4 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 #import "chrome/browser/cocoa/applescript/bookmark_applescript_utils_unittest.h"
6
7 @implementation FakeAppDelegate
8
9 @synthesize helper = helper_;
10
11 - (Profile*)defaultProfile {
12 if (!helper_)
13 return NULL;
14 return helper_->profile();
15 }
16 @end
17
18 // Represents the current fake command that is executing.
19 static FakeScriptCommand* kFakeCurrentCommand;
20
21 @implementation FakeScriptCommand
22
23 - (id)init {
24 if ((self = [super init])) {
25 originalMethod_ = class_getClassMethod([NSScriptCommand class],
26 @selector(currentCommand));
27 alternateMethod_ = class_getClassMethod([self class],
28 @selector(currentCommand));
29 method_exchangeImplementations(originalMethod_, alternateMethod_);
30 kFakeCurrentCommand = self;
31 }
32 return self;
33 }
34
35 + (NSScriptCommand*)currentCommand {
36 return kFakeCurrentCommand;
37 }
38
39 - (void)dealloc {
40 method_exchangeImplementations(originalMethod_, alternateMethod_);
41 kFakeCurrentCommand = nil;
42 [super dealloc];
43 }
44
45 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698