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

Unified Diff: ios/chrome/browser/web/mailto_url_rewriter_unittest.mm

Issue 2870783002: Adds Compose Email Settings UI for deprecating Native App Launcher (Closed)
Patch Set: replied to comments from rohitrao Created 3 years, 7 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 | « ios/chrome/browser/web/mailto_url_rewriter.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/web/mailto_url_rewriter_unittest.mm
diff --git a/ios/chrome/browser/web/mailto_url_rewriter_unittest.mm b/ios/chrome/browser/web/mailto_url_rewriter_unittest.mm
index 796f53c47b6f35cf8673b313871e18cf0b5739a1..7df96bb89e6e745f6ff58106697b2b555c32c063 100644
--- a/ios/chrome/browser/web/mailto_url_rewriter_unittest.mm
+++ b/ios/chrome/browser/web/mailto_url_rewriter_unittest.mm
@@ -4,8 +4,7 @@
#import "ios/chrome/browser/web/mailto_url_rewriter.h"
-#import "ios/chrome/browser/web/mailto_handler.h"
-#import "ios/chrome/browser/web/mailto_handler_gmail.h"
+#import "ios/chrome/browser/web/fake_mailto_handler_helpers.h"
#import "ios/chrome/browser/web/mailto_handler_system_mail.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/gtest_mac.h"
@@ -28,41 +27,6 @@ NSString* const kGmailAppStoreID = @"422689480";
} // namespace
-#pragma mark - Gmail not installed
-
-@interface FakeMailtoHandlerGmailNotInstalled : MailtoHandlerGmail
-@end
-
-@implementation FakeMailtoHandlerGmailNotInstalled
-- (BOOL)isAvailable {
- return NO;
-}
-@end
-
-#pragma mark - Gmail is installed
-
-@interface FakeMailtoHandlerGmailInstalled : MailtoHandlerGmail
-@end
-
-@implementation FakeMailtoHandlerGmailInstalled
-- (BOOL)isAvailable {
- return YES;
-}
-@end
-
-#pragma mark - Test Observer object
-
-@interface RewriterObserver : NSObject<MailtoURLRewriterObserver>
-@property(nonatomic, readonly) int changeCount;
-@end
-
-@implementation RewriterObserver
-@synthesize changeCount = _changeCount;
-- (void)rewriterDidChange:(MailtoURLRewriter*)rewriter {
- ++_changeCount;
-}
-@end
-
#pragma mark - MailtoURLRewriter private interfaces for testing.
@interface MailtoURLRewriter ()
@@ -130,7 +94,8 @@ TEST_F(MailtoURLRewriterTest, TestUserPreferencePersistence) {
}
TEST_F(MailtoURLRewriterTest, TestChangeObserver) {
- RewriterObserver* observer = [[RewriterObserver alloc] init];
+ CountingMailtoURLRewriterObserver* observer =
+ [[CountingMailtoURLRewriterObserver alloc] init];
ASSERT_EQ(0, [observer changeCount]);
// Sets up a MailtoURLRewriter object. The default handler is Gmail app
« no previous file with comments | « ios/chrome/browser/web/mailto_url_rewriter.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698