Commit 56509b00 authored by Kurt Horimoto's avatar Kurt Horimoto Committed by Commit Bot

[iOS] Add FakeAlertConsumer.

This allows for testing of mediators that set up AlertViewControllers.

Bug: 941745
Change-Id: I103f40000d3a9714ba782c41fbf2976263122728
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1636397
Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org>
Reviewed-by: default avatarMike Dougherty <michaeldo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664797}
parent b514f983
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
source_set("test") {
testonly = true
sources = [
"fake_alert_consumer.h",
"fake_alert_consumer.mm",
]
configs += [ "//build/config/compiler:enable_arc" ]
deps = [
"//base",
"//ios/chrome/browser/ui/alert_view_controller",
"//testing/gtest",
]
}
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_UI_ALERT_VIEW_CONTROLLER_TEST_FAKE_ALERT_CONSUMER_H_
#define IOS_CHROME_BROWSER_UI_ALERT_VIEW_CONTROLLER_TEST_FAKE_ALERT_CONSUMER_H_
#import "ios/chrome/browser/ui/alert_view_controller/alert_consumer.h"
// Fake version of AlertConsumer that allows read access to consumed values.
@interface FakeAlertConsumer : NSObject <AlertConsumer>
@property(nonatomic, copy) NSString* title;
@property(nonatomic, copy) NSString* message;
@property(nonatomic, copy)
NSArray<TextFieldConfiguration*>* textFieldConfigurations;
@property(nonatomic, copy) NSArray<AlertAction*>* actions;
@end
#endif // IOS_CHROME_BROWSER_UI_ALERT_VIEW_CONTROLLER_TEST_FAKE_ALERT_CONSUMER_H_
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "ios/chrome/browser/ui/alert_view_controller/test/fake_alert_consumer.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
@implementation FakeAlertConsumer
@end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment