OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #ifndef IOS_CHROME_BROWSER_WEB_FAKE_MAILTO_HANLDERS_H_ | 5 #ifndef IOS_CHROME_BROWSER_WEB_FAKE_MAILTO_HANLDERS_H_ |
6 #define IOS_CHROME_BROWSER_WEB_FAKE_MAILTO_HANLDERS_H_ | 6 #define IOS_CHROME_BROWSER_WEB_FAKE_MAILTO_HANLDERS_H_ |
7 | 7 |
8 #import "ios/chrome/browser/web/mailto_handler.h" | 8 #import "ios/chrome/browser/web/mailto_handler.h" |
9 #import "ios/chrome/browser/web/mailto_handler_gmail.h" | 9 #import "ios/chrome/browser/web/mailto_handler_gmail.h" |
10 #import "ios/chrome/browser/web/mailto_url_rewriter.h" | 10 #import "ios/chrome/browser/web/mailto_url_rewriter.h" |
11 | 11 |
12 // Test fixtures for faking MailtoHandlerGmail objects that reports whether | 12 // Test fixtures for faking MailtoHandlerGmail objects that reports whether |
13 // Gmail app as installed or not. | 13 // Gmail app as installed or not. |
14 | 14 |
15 // Fakes Gmail handler where Gmail app is not installed. | 15 // Fakes Gmail handler where Gmail app is not installed. |
16 @interface FakeMailtoHandlerGmailNotInstalled : MailtoHandlerGmail | 16 @interface FakeMailtoHandlerGmailNotInstalled : MailtoHandlerGmail |
17 @end | 17 @end |
18 | 18 |
19 // Fakes Gmail handler where Gmail app is installed. | 19 // Fakes Gmail handler where Gmail app is installed. |
20 @interface FakeMailtoHandlerGmailInstalled : MailtoHandlerGmail | 20 @interface FakeMailtoHandlerGmailInstalled : MailtoHandlerGmail |
21 @end | 21 @end |
22 | 22 |
| 23 // Fake mailto: handler |
| 24 @interface FakeMailtoHandlerForTesting : MailtoHandler |
| 25 @end |
| 26 |
23 // An observer object that counts and reports the number of times it has been | 27 // An observer object that counts and reports the number of times it has been |
24 // called by the MailtoURLRewriter object. | 28 // called by the MailtoURLRewriter object. |
25 @interface CountingMailtoURLRewriterObserver | 29 @interface CountingMailtoURLRewriterObserver |
26 : NSObject<MailtoURLRewriterObserver> | 30 : NSObject<MailtoURLRewriterObserver> |
27 // Returns the number of times that observer has been called. | 31 // Returns the number of times that observer has been called. |
28 @property(nonatomic, readonly) int changeCount; | 32 @property(nonatomic, readonly) int changeCount; |
29 @end | 33 @end |
30 | 34 |
31 #endif // IOS_CHROME_BROWSER_WEB_FAKE_MAILTO_HANLDERS_H_ | 35 #endif // IOS_CHROME_BROWSER_WEB_FAKE_MAILTO_HANLDERS_H_ |
OLD | NEW |