|
86 | 86 | #import "_WKInputDelegate.h"
|
87 | 87 | #import "_WKRemoteObjectRegistryInternal.h"
|
88 | 88 | #import "_WKSessionStateInternal.h"
|
| 89 | +#import "_WKTestingDelegate.h" |
89 | 90 | #import "_WKVisitedLinkStoreInternal.h"
|
90 | 91 | #import "_WKWebsitePoliciesInternal.h"
|
91 | 92 | #import <WebCore/GraphicsContextCG.h>
|
@@ -286,6 +287,8 @@ @implementation WKWebView {
|
286 | 287 | std::unique_ptr<WebKit::WebViewImpl> _impl;
|
287 | 288 | RetainPtr<WKTextFinderClient> _textFinderClient;
|
288 | 289 | #endif
|
| 290 | + |
| 291 | + id<_WKTestingDelegate> _testingDelegate; |
289 | 292 | }
|
290 | 293 |
|
291 | 294 | - (instancetype)initWithFrame:(CGRect)frame
|
@@ -4874,6 +4877,16 @@ - (NSDictionary *)_contentsOfUserInterfaceItem:(NSString *)userInterfaceItem
|
4874 | 4877 | #endif
|
4875 | 4878 | }
|
4876 | 4879 |
|
| 4880 | +- (id<_WKTestingDelegate>)_testingDelegate |
| 4881 | +{ |
| 4882 | + return _testingDelegate; |
| 4883 | +} |
| 4884 | + |
| 4885 | +- (void)_setTestingDelegate:(id<_WKTestingDelegate>)testingDelegate |
| 4886 | +{ |
| 4887 | + _testingDelegate = testingDelegate; |
| 4888 | +} |
| 4889 | + |
4877 | 4890 | #if PLATFORM(IOS)
|
4878 | 4891 |
|
4879 | 4892 | - (CGRect)_contentVisibleRect
|
@@ -5098,6 +5111,72 @@ - (void)_disableBackForwardSnapshotVolatilityForTesting
|
5098 | 5111 | WebKit::ViewSnapshotStore::singleton().setDisableSnapshotVolatilityForTesting(true);
|
5099 | 5112 | }
|
5100 | 5113 |
|
| 5114 | + |
| 5115 | +- (void)_simulateDataInteractionGestureRecognized |
| 5116 | +{ |
| 5117 | +#if ENABLE(DATA_INTERACTION) |
| 5118 | + [_contentView _simulateDataInteractionGestureRecognized:_testingDelegate.dataInteractionGestureRecognizer]; |
| 5119 | +#endif |
| 5120 | +} |
| 5121 | + |
| 5122 | +- (void)_simulateDataInteractionEntered:(id)info |
| 5123 | +{ |
| 5124 | +#if ENABLE(DATA_INTERACTION) |
| 5125 | + [_contentView _simulateDataInteractionEntered:info]; |
| 5126 | +#endif |
| 5127 | +} |
| 5128 | + |
| 5129 | +- (void)_simulateDataInteractionUpdated:(id)info |
| 5130 | +{ |
| 5131 | +#if ENABLE(DATA_INTERACTION) |
| 5132 | + [_contentView _simulateDataInteractionUpdated:info]; |
| 5133 | +#endif |
| 5134 | +} |
| 5135 | + |
| 5136 | +- (void)_simulateDataInteractionPerformOperation:(id)info |
| 5137 | +{ |
| 5138 | +#if ENABLE(DATA_INTERACTION) |
| 5139 | + [_contentView _simulateDataInteractionPerformOperation:info]; |
| 5140 | +#endif |
| 5141 | +} |
| 5142 | + |
| 5143 | +- (void)_simulateDataInteractionEnded:(id)info |
| 5144 | +{ |
| 5145 | +#if ENABLE(DATA_INTERACTION) |
| 5146 | + [_contentView _simulateDataInteractionEnded:info]; |
| 5147 | +#endif |
| 5148 | +} |
| 5149 | + |
| 5150 | +- (void)_simulateDataInteractionSessionDidEnd:(id)session withOperation:(NSUInteger)operation |
| 5151 | +{ |
| 5152 | +#if ENABLE(DATA_INTERACTION) |
| 5153 | + [_contentView _simulateDataInteractionSessionDidEnd:session withOperation:operation]; |
| 5154 | +#endif |
| 5155 | +} |
| 5156 | + |
| 5157 | +- (void)_simulateFailedDataInteractionWithIndex:(NSInteger)sourceIndex |
| 5158 | +{ |
| 5159 | +#if ENABLE(DATA_INTERACTION) |
| 5160 | + [_contentView _simulateFailedDataInteractionWithIndex:sourceIndex]; |
| 5161 | +#endif |
| 5162 | +} |
| 5163 | + |
| 5164 | +- (void)_simulateWillBeginDataInteractionWithIndex:(NSInteger)sourceIndex withSession:(id)session |
| 5165 | +{ |
| 5166 | +#if ENABLE(DATA_INTERACTION) |
| 5167 | + [_contentView _simulateWillBeginDataInteractionWithIndex:sourceIndex withSession:session]; |
| 5168 | +#endif |
| 5169 | +} |
| 5170 | + |
| 5171 | +- (NSArray *)_simulatedItemsForDataInteractionWithIndex:(NSInteger)sourceIndex |
| 5172 | +{ |
| 5173 | +#if ENABLE(DATA_INTERACTION) |
| 5174 | + return [_contentView _simulatedItemsForDataInteractionWithIndex:sourceIndex]; |
| 5175 | +#else |
| 5176 | + return @[ ]; |
| 5177 | +#endif |
| 5178 | +} |
| 5179 | + |
5101 | 5180 | @end
|
5102 | 5181 |
|
5103 | 5182 |
|
|
0 commit comments