Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / applescript / bookmark_applescript_utils_unittest.h
blobd5e8fb3f244fb7f795162db1f3d56926f9bf499d
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_COCOA_APPLESCRIPT_BOOKMARK_APPLESCRIPT_UTILS_UNITTEST_H_
6 #define CHROME_BROWSER_UI_COCOA_APPLESCRIPT_BOOKMARK_APPLESCRIPT_UTILS_UNITTEST_H_
8 #import <Cocoa/Cocoa.h>
9 #import <objc/objc-runtime.h>
11 #include "base/mac/scoped_nsobject.h"
12 #import "chrome/browser/app_controller_mac.h"
13 #import "chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript.h"
14 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
15 #include "testing/platform_test.h"
17 // The fake object that acts as our app's delegate, useful for testing purposes.
18 @interface FakeAppDelegate : AppController {
19 @public
20 CocoaProfileTest* test_; // weak.
22 @property(nonatomic) CocoaProfileTest* test;
23 // Return the |TestingProfile*| which is used for testing.
24 - (Profile*)lastProfile;
25 @end
28 // Used to emulate an active running script, useful for testing purposes.
29 @interface FakeScriptCommand : NSScriptCommand {
30 Method originalMethod_;
31 Method alternateMethod_;
33 @end
36 // The base class for all our bookmark releated unit tests.
37 class BookmarkAppleScriptTest : public CocoaProfileTest {
38 public:
39 BookmarkAppleScriptTest();
40 ~BookmarkAppleScriptTest() override;
41 void SetUp() override;
43 private:
44 base::scoped_nsobject<FakeAppDelegate> appDelegate_;
46 protected:
47 base::scoped_nsobject<BookmarkFolderAppleScript> bookmarkBar_;
50 #endif // CHROME_BROWSER_UI_COCOA_APPLESCRIPT_BOOKMARK_APPLESCRIPT_UTILS_UNITTEST_H_