Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit c5ac270

Browse files
[webview_flutter_wkwebview] Update variable names for changes coming in #5700 (#5829)
1 parent b26da98 commit c5ac270

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1076
-1102
lines changed

packages/webview_flutter/webview_flutter_wkwebview/example/ios/RunnerTests/FWFHTTPCookieStoreHostApiTests.m

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ @interface FWFHTTPCookieStoreHostApiTests : XCTestCase
1414
@implementation FWFHTTPCookieStoreHostApiTests
1515
- (void)testCreateFromWebsiteDataStoreWithIdentifier API_AVAILABLE(ios(11.0)) {
1616
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
17-
FWFHTTPCookieStoreHostApiImpl *hostApi =
17+
FWFHTTPCookieStoreHostApiImpl *hostAPI =
1818
[[FWFHTTPCookieStoreHostApiImpl alloc] initWithInstanceManager:instanceManager];
1919

2020
WKWebsiteDataStore *mockDataStore = OCMClassMock([WKWebsiteDataStore class]);
2121
OCMStub([mockDataStore httpCookieStore]).andReturn(OCMClassMock([WKHTTPCookieStore class]));
22-
[instanceManager addInstance:mockDataStore withIdentifier:0];
22+
[instanceManager addDartCreatedInstance:mockDataStore withIdentifier:0];
2323

2424
FlutterError *error;
25-
[hostApi createFromWebsiteDataStoreWithIdentifier:@1 dataStoreIdentifier:@0 error:&error];
25+
[hostAPI createFromWebsiteDataStoreWithIdentifier:@1 dataStoreIdentifier:@0 error:&error];
2626
WKHTTPCookieStore *cookieStore = (WKHTTPCookieStore *)[instanceManager instanceForIdentifier:1];
2727
XCTAssertTrue([cookieStore isKindOfClass:[WKHTTPCookieStore class]]);
2828
XCTAssertNil(error);
@@ -32,17 +32,17 @@ - (void)testSetCookie API_AVAILABLE(ios(11.0)) {
3232
WKHTTPCookieStore *mockHttpCookieStore = OCMClassMock([WKHTTPCookieStore class]);
3333

3434
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
35-
[instanceManager addInstance:mockHttpCookieStore withIdentifier:0];
35+
[instanceManager addDartCreatedInstance:mockHttpCookieStore withIdentifier:0];
3636

37-
FWFHTTPCookieStoreHostApiImpl *hostApi =
37+
FWFHTTPCookieStoreHostApiImpl *hostAPI =
3838
[[FWFHTTPCookieStoreHostApiImpl alloc] initWithInstanceManager:instanceManager];
3939

4040
FWFNSHttpCookieData *cookieData = [FWFNSHttpCookieData
4141
makeWithPropertyKeys:@[ [FWFNSHttpCookiePropertyKeyEnumData
4242
makeWithValue:FWFNSHttpCookiePropertyKeyEnumName] ]
4343
propertyValues:@[ @"hello" ]];
4444
FlutterError *__block blockError;
45-
[hostApi setCookieForStoreWithIdentifier:@0
45+
[hostAPI setCookieForStoreWithIdentifier:@0
4646
cookie:cookieData
4747
completion:^(FlutterError *error) {
4848
blockError = error;

packages/webview_flutter/webview_flutter_wkwebview/example/ios/RunnerTests/FWFInstanceManagerTests.m

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ @interface FWFInstanceManagerTests : XCTestCase
99
@end
1010

1111
@implementation FWFInstanceManagerTests
12-
- (void)testAddInstance {
12+
- (void)testAddInstanceCreatedFromDart {
1313
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
1414
NSObject *object = [[NSObject alloc] init];
1515

16-
[instanceManager addInstance:object withIdentifier:5];
16+
[instanceManager addDartCreatedInstance:object withIdentifier:5];
1717
XCTAssertEqualObjects([instanceManager instanceForIdentifier:5], object);
1818
XCTAssertEqual([instanceManager identifierForInstance:object], 5);
1919
}
2020

2121
- (void)testRemoveInstance {
2222
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
2323
NSObject *object = [[NSObject alloc] init];
24-
[instanceManager addInstance:object withIdentifier:5];
24+
[instanceManager addDartCreatedInstance:object withIdentifier:5];
2525

2626
[instanceManager removeInstance:object];
2727
XCTAssertNil([instanceManager instanceForIdentifier:5]);
@@ -31,7 +31,7 @@ - (void)testRemoveInstance {
3131
- (void)testRemoveInstanceWithIdentifier {
3232
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
3333
NSObject *object = [[NSObject alloc] init];
34-
[instanceManager addInstance:object withIdentifier:5];
34+
[instanceManager addDartCreatedInstance:object withIdentifier:5];
3535

3636
[instanceManager removeInstanceWithIdentifier:5];
3737
XCTAssertNil([instanceManager instanceForIdentifier:5]);

packages/webview_flutter/webview_flutter_wkwebview/example/ios/RunnerTests/FWFNavigationDelegateHostApiTests.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ @interface FWFNavigationDelegateHostApiTests : XCTestCase
1414
@implementation FWFNavigationDelegateHostApiTests
1515
- (void)testCreateWithIdentifier {
1616
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
17-
FWFNavigationDelegateHostApiImpl *hostApi =
17+
FWFNavigationDelegateHostApiImpl *hostAPI =
1818
[[FWFNavigationDelegateHostApiImpl alloc] initWithInstanceManager:instanceManager];
1919

2020
FlutterError *error;
21-
[hostApi createWithIdentifier:@0 error:&error];
21+
[hostAPI createWithIdentifier:@0 error:&error];
2222
FWFNavigationDelegate *navigationDelegate =
2323
(FWFNavigationDelegate *)[instanceManager instanceForIdentifier:0];
2424

packages/webview_flutter/webview_flutter_wkwebview/example/ios/RunnerTests/FWFObjectHostApiTests.m

+11-11
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ - (void)testAddObserver {
1616
NSObject *mockObject = OCMClassMock([NSObject class]);
1717

1818
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
19-
[instanceManager addInstance:mockObject withIdentifier:0];
19+
[instanceManager addDartCreatedInstance:mockObject withIdentifier:0];
2020

21-
FWFObjectHostApiImpl *hostApi =
21+
FWFObjectHostApiImpl *hostAPI =
2222
[[FWFObjectHostApiImpl alloc] initWithInstanceManager:instanceManager];
2323

2424
NSObject *observerObject = [[NSObject alloc] init];
25-
[instanceManager addInstance:observerObject withIdentifier:1];
25+
[instanceManager addDartCreatedInstance:observerObject withIdentifier:1];
2626

2727
FlutterError *error;
28-
[hostApi
28+
[hostAPI
2929
addObserverForObjectWithIdentifier:@0
3030
observerIdentifier:@1
3131
keyPath:@"myKey"
@@ -48,16 +48,16 @@ - (void)testRemoveObserver {
4848
NSObject *mockObject = OCMClassMock([NSObject class]);
4949

5050
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
51-
[instanceManager addInstance:mockObject withIdentifier:0];
51+
[instanceManager addDartCreatedInstance:mockObject withIdentifier:0];
5252

53-
FWFObjectHostApiImpl *hostApi =
53+
FWFObjectHostApiImpl *hostAPI =
5454
[[FWFObjectHostApiImpl alloc] initWithInstanceManager:instanceManager];
5555

5656
NSObject *observerObject = [[NSObject alloc] init];
57-
[instanceManager addInstance:observerObject withIdentifier:1];
57+
[instanceManager addDartCreatedInstance:observerObject withIdentifier:1];
5858

5959
FlutterError *error;
60-
[hostApi removeObserverForObjectWithIdentifier:@0
60+
[hostAPI removeObserverForObjectWithIdentifier:@0
6161
observerIdentifier:@1
6262
keyPath:@"myKey"
6363
error:&error];
@@ -69,13 +69,13 @@ - (void)testDispose {
6969
NSObject *object = [[NSObject alloc] init];
7070

7171
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
72-
[instanceManager addInstance:object withIdentifier:0];
72+
[instanceManager addDartCreatedInstance:object withIdentifier:0];
7373

74-
FWFObjectHostApiImpl *hostApi =
74+
FWFObjectHostApiImpl *hostAPI =
7575
[[FWFObjectHostApiImpl alloc] initWithInstanceManager:instanceManager];
7676

7777
FlutterError *error;
78-
[hostApi disposeObjectWithIdentifier:@0 error:&error];
78+
[hostAPI disposeObjectWithIdentifier:@0 error:&error];
7979
XCTAssertEqual([instanceManager identifierForInstance:object], NSNotFound);
8080
XCTAssertNil(error);
8181
}

packages/webview_flutter/webview_flutter_wkwebview/example/ios/RunnerTests/FWFPreferencesHostApiTests.m

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ @interface FWFPreferencesHostApiTests : XCTestCase
1414
@implementation FWFPreferencesHostApiTests
1515
- (void)testCreateFromWebViewConfigurationWithIdentifier {
1616
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
17-
FWFPreferencesHostApiImpl *hostApi =
17+
FWFPreferencesHostApiImpl *hostAPI =
1818
[[FWFPreferencesHostApiImpl alloc] initWithInstanceManager:instanceManager];
1919

20-
[instanceManager addInstance:[[WKWebViewConfiguration alloc] init] withIdentifier:0];
20+
[instanceManager addDartCreatedInstance:[[WKWebViewConfiguration alloc] init] withIdentifier:0];
2121

2222
FlutterError *error;
23-
[hostApi createFromWebViewConfigurationWithIdentifier:@1 configurationIdentifier:@0 error:&error];
23+
[hostAPI createFromWebViewConfigurationWithIdentifier:@1 configurationIdentifier:@0 error:&error];
2424
WKPreferences *preferences = (WKPreferences *)[instanceManager instanceForIdentifier:1];
2525
XCTAssertTrue([preferences isKindOfClass:[WKPreferences class]]);
2626
XCTAssertNil(error);
@@ -30,13 +30,13 @@ - (void)testSetJavaScriptEnabled {
3030
WKPreferences *mockPreferences = OCMClassMock([WKPreferences class]);
3131

3232
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
33-
[instanceManager addInstance:mockPreferences withIdentifier:0];
33+
[instanceManager addDartCreatedInstance:mockPreferences withIdentifier:0];
3434

35-
FWFPreferencesHostApiImpl *hostApi =
35+
FWFPreferencesHostApiImpl *hostAPI =
3636
[[FWFPreferencesHostApiImpl alloc] initWithInstanceManager:instanceManager];
3737

3838
FlutterError *error;
39-
[hostApi setJavaScriptEnabledForPreferencesWithIdentifier:@0 isEnabled:@YES error:&error];
39+
[hostAPI setJavaScriptEnabledForPreferencesWithIdentifier:@0 isEnabled:@YES error:&error];
4040
OCMVerify([mockPreferences setJavaScriptEnabled:YES]);
4141
XCTAssertNil(error);
4242
}

packages/webview_flutter/webview_flutter_wkwebview/example/ios/RunnerTests/FWFScriptMessageHandlerHostApiTests.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ @interface FWFScriptMessageHandlerHostApiTests : XCTestCase
1414
@implementation FWFScriptMessageHandlerHostApiTests
1515
- (void)testCreateWithIdentifier {
1616
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
17-
FWFScriptMessageHandlerHostApiImpl *hostApi =
17+
FWFScriptMessageHandlerHostApiImpl *hostAPI =
1818
[[FWFScriptMessageHandlerHostApiImpl alloc] initWithInstanceManager:instanceManager];
1919

2020
FlutterError *error;
21-
[hostApi createWithIdentifier:@0 error:&error];
21+
[hostAPI createWithIdentifier:@0 error:&error];
2222

2323
FWFScriptMessageHandler *scriptMessageHandler =
2424
(FWFScriptMessageHandler *)[instanceManager instanceForIdentifier:0];

packages/webview_flutter/webview_flutter_wkwebview/example/ios/RunnerTests/FWFScrollViewHostApiTests.m

+9-9
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ - (void)testGetContentOffset {
1717
OCMStub([mockScrollView contentOffset]).andReturn(CGPointMake(1.0, 2.0));
1818

1919
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
20-
[instanceManager addInstance:mockScrollView withIdentifier:0];
20+
[instanceManager addDartCreatedInstance:mockScrollView withIdentifier:0];
2121

22-
FWFScrollViewHostApiImpl *hostApi =
22+
FWFScrollViewHostApiImpl *hostAPI =
2323
[[FWFScrollViewHostApiImpl alloc] initWithInstanceManager:instanceManager];
2424

2525
FlutterError *error;
2626
NSArray<NSNumber *> *expectedValue = @[ @1.0, @2.0 ];
27-
XCTAssertEqualObjects([hostApi contentOffsetForScrollViewWithIdentifier:@0 error:&error],
27+
XCTAssertEqualObjects([hostAPI contentOffsetForScrollViewWithIdentifier:@0 error:&error],
2828
expectedValue);
2929
XCTAssertNil(error);
3030
}
@@ -34,13 +34,13 @@ - (void)testScrollBy {
3434
scrollView.contentOffset = CGPointMake(1, 2);
3535

3636
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
37-
[instanceManager addInstance:scrollView withIdentifier:0];
37+
[instanceManager addDartCreatedInstance:scrollView withIdentifier:0];
3838

39-
FWFScrollViewHostApiImpl *hostApi =
39+
FWFScrollViewHostApiImpl *hostAPI =
4040
[[FWFScrollViewHostApiImpl alloc] initWithInstanceManager:instanceManager];
4141

4242
FlutterError *error;
43-
[hostApi scrollByForScrollViewWithIdentifier:@0 x:@1 y:@2 error:&error];
43+
[hostAPI scrollByForScrollViewWithIdentifier:@0 x:@1 y:@2 error:&error];
4444
XCTAssertEqual(scrollView.contentOffset.x, 2);
4545
XCTAssertEqual(scrollView.contentOffset.y, 4);
4646
XCTAssertNil(error);
@@ -50,13 +50,13 @@ - (void)testSetContentOffset {
5050
UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 500, 500)];
5151

5252
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
53-
[instanceManager addInstance:scrollView withIdentifier:0];
53+
[instanceManager addDartCreatedInstance:scrollView withIdentifier:0];
5454

55-
FWFScrollViewHostApiImpl *hostApi =
55+
FWFScrollViewHostApiImpl *hostAPI =
5656
[[FWFScrollViewHostApiImpl alloc] initWithInstanceManager:instanceManager];
5757

5858
FlutterError *error;
59-
[hostApi setContentOffsetForScrollViewWithIdentifier:@0 toX:@1 y:@2 error:&error];
59+
[hostAPI setContentOffsetForScrollViewWithIdentifier:@0 toX:@1 y:@2 error:&error];
6060
XCTAssertEqual(scrollView.contentOffset.x, 1);
6161
XCTAssertEqual(scrollView.contentOffset.y, 2);
6262
XCTAssertNil(error);

packages/webview_flutter/webview_flutter_wkwebview/example/ios/RunnerTests/FWFUIDelegateHostApiTests.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ @interface FWFUIDelegateHostApiTests : XCTestCase
1414
@implementation FWFUIDelegateHostApiTests
1515
- (void)testCreateWithIdentifier {
1616
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
17-
FWFUIDelegateHostApiImpl *hostApi =
17+
FWFUIDelegateHostApiImpl *hostAPI =
1818
[[FWFUIDelegateHostApiImpl alloc] initWithInstanceManager:instanceManager];
1919

2020
FlutterError *error;
21-
[hostApi createWithIdentifier:@0 error:&error];
21+
[hostAPI createWithIdentifier:@0 error:&error];
2222
FWFUIDelegate *delegate = (FWFUIDelegate *)[instanceManager instanceForIdentifier:0];
2323

2424
XCTAssertTrue([delegate conformsToProtocol:@protocol(WKUIDelegate)]);

packages/webview_flutter/webview_flutter_wkwebview/example/ios/RunnerTests/FWFUIViewHostApiTests.m

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ - (void)testSetBackgroundColor {
1616
UIView *mockUIView = OCMClassMock([UIView class]);
1717

1818
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
19-
[instanceManager addInstance:mockUIView withIdentifier:0];
19+
[instanceManager addDartCreatedInstance:mockUIView withIdentifier:0];
2020

21-
FWFUIViewHostApiImpl *hostApi =
21+
FWFUIViewHostApiImpl *hostAPI =
2222
[[FWFUIViewHostApiImpl alloc] initWithInstanceManager:instanceManager];
2323

2424
FlutterError *error;
25-
[hostApi setBackgroundColorForViewWithIdentifier:@0 toValue:@123 error:&error];
25+
[hostAPI setBackgroundColorForViewWithIdentifier:@0 toValue:@123 error:&error];
2626

2727
OCMVerify([mockUIView setBackgroundColor:[UIColor colorWithRed:(123 >> 16 & 0xff) / 255.0
2828
green:(123 >> 8 & 0xff) / 255.0
@@ -35,13 +35,13 @@ - (void)testSetOpaque {
3535
UIView *mockUIView = OCMClassMock([UIView class]);
3636

3737
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
38-
[instanceManager addInstance:mockUIView withIdentifier:0];
38+
[instanceManager addDartCreatedInstance:mockUIView withIdentifier:0];
3939

40-
FWFUIViewHostApiImpl *hostApi =
40+
FWFUIViewHostApiImpl *hostAPI =
4141
[[FWFUIViewHostApiImpl alloc] initWithInstanceManager:instanceManager];
4242

4343
FlutterError *error;
44-
[hostApi setOpaqueForViewWithIdentifier:@0 isOpaque:@YES error:&error];
44+
[hostAPI setOpaqueForViewWithIdentifier:@0 isOpaque:@YES error:&error];
4545
OCMVerify([mockUIView setOpaque:YES]);
4646
XCTAssertNil(error);
4747
}

packages/webview_flutter/webview_flutter_wkwebview/example/ios/RunnerTests/FWFUserContentControllerHostApiTests.m

+19-19
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ @interface FWFUserContentControllerHostApiTests : XCTestCase
1414
@implementation FWFUserContentControllerHostApiTests
1515
- (void)testCreateFromWebViewConfigurationWithIdentifier {
1616
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
17-
FWFUserContentControllerHostApiImpl *hostApi =
17+
FWFUserContentControllerHostApiImpl *hostAPI =
1818
[[FWFUserContentControllerHostApiImpl alloc] initWithInstanceManager:instanceManager];
1919

20-
[instanceManager addInstance:[[WKWebViewConfiguration alloc] init] withIdentifier:0];
20+
[instanceManager addDartCreatedInstance:[[WKWebViewConfiguration alloc] init] withIdentifier:0];
2121

2222
FlutterError *error;
23-
[hostApi createFromWebViewConfigurationWithIdentifier:@1 configurationIdentifier:@0 error:&error];
23+
[hostAPI createFromWebViewConfigurationWithIdentifier:@1 configurationIdentifier:@0 error:&error];
2424
WKUserContentController *userContentController =
2525
(WKUserContentController *)[instanceManager instanceForIdentifier:1];
2626
XCTAssertTrue([userContentController isKindOfClass:[WKUserContentController class]]);
@@ -32,17 +32,17 @@ - (void)testAddScriptMessageHandler {
3232
OCMClassMock([WKUserContentController class]);
3333

3434
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
35-
[instanceManager addInstance:mockUserContentController withIdentifier:0];
35+
[instanceManager addDartCreatedInstance:mockUserContentController withIdentifier:0];
3636

37-
FWFUserContentControllerHostApiImpl *hostApi =
37+
FWFUserContentControllerHostApiImpl *hostAPI =
3838
[[FWFUserContentControllerHostApiImpl alloc] initWithInstanceManager:instanceManager];
3939

4040
id<WKScriptMessageHandler> mockMessageHandler =
4141
OCMProtocolMock(@protocol(WKScriptMessageHandler));
42-
[instanceManager addInstance:mockMessageHandler withIdentifier:1];
42+
[instanceManager addDartCreatedInstance:mockMessageHandler withIdentifier:1];
4343

4444
FlutterError *error;
45-
[hostApi addScriptMessageHandlerForControllerWithIdentifier:@0
45+
[hostAPI addScriptMessageHandlerForControllerWithIdentifier:@0
4646
handlerIdentifier:@1
4747
ofName:@"apple"
4848
error:&error];
@@ -55,13 +55,13 @@ - (void)testRemoveScriptMessageHandler {
5555
OCMClassMock([WKUserContentController class]);
5656

5757
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
58-
[instanceManager addInstance:mockUserContentController withIdentifier:0];
58+
[instanceManager addDartCreatedInstance:mockUserContentController withIdentifier:0];
5959

60-
FWFUserContentControllerHostApiImpl *hostApi =
60+
FWFUserContentControllerHostApiImpl *hostAPI =
6161
[[FWFUserContentControllerHostApiImpl alloc] initWithInstanceManager:instanceManager];
6262

6363
FlutterError *error;
64-
[hostApi removeScriptMessageHandlerForControllerWithIdentifier:@0 name:@"apple" error:&error];
64+
[hostAPI removeScriptMessageHandlerForControllerWithIdentifier:@0 name:@"apple" error:&error];
6565
OCMVerify([mockUserContentController removeScriptMessageHandlerForName:@"apple"]);
6666
XCTAssertNil(error);
6767
}
@@ -71,13 +71,13 @@ - (void)testRemoveAllScriptMessageHandlers API_AVAILABLE(ios(14.0)) {
7171
OCMClassMock([WKUserContentController class]);
7272

7373
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
74-
[instanceManager addInstance:mockUserContentController withIdentifier:0];
74+
[instanceManager addDartCreatedInstance:mockUserContentController withIdentifier:0];
7575

76-
FWFUserContentControllerHostApiImpl *hostApi =
76+
FWFUserContentControllerHostApiImpl *hostAPI =
7777
[[FWFUserContentControllerHostApiImpl alloc] initWithInstanceManager:instanceManager];
7878

7979
FlutterError *error;
80-
[hostApi removeAllScriptMessageHandlersForControllerWithIdentifier:@0 error:&error];
80+
[hostAPI removeAllScriptMessageHandlersForControllerWithIdentifier:@0 error:&error];
8181
OCMVerify([mockUserContentController removeAllScriptMessageHandlers]);
8282
XCTAssertNil(error);
8383
}
@@ -87,13 +87,13 @@ - (void)testAddUserScript {
8787
OCMClassMock([WKUserContentController class]);
8888

8989
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
90-
[instanceManager addInstance:mockUserContentController withIdentifier:0];
90+
[instanceManager addDartCreatedInstance:mockUserContentController withIdentifier:0];
9191

92-
FWFUserContentControllerHostApiImpl *hostApi =
92+
FWFUserContentControllerHostApiImpl *hostAPI =
9393
[[FWFUserContentControllerHostApiImpl alloc] initWithInstanceManager:instanceManager];
9494

9595
FlutterError *error;
96-
[hostApi
96+
[hostAPI
9797
addUserScriptForControllerWithIdentifier:@0
9898
userScript:
9999
[FWFWKUserScriptData
@@ -114,13 +114,13 @@ - (void)testRemoveAllUserScripts {
114114
OCMClassMock([WKUserContentController class]);
115115

116116
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
117-
[instanceManager addInstance:mockUserContentController withIdentifier:0];
117+
[instanceManager addDartCreatedInstance:mockUserContentController withIdentifier:0];
118118

119-
FWFUserContentControllerHostApiImpl *hostApi =
119+
FWFUserContentControllerHostApiImpl *hostAPI =
120120
[[FWFUserContentControllerHostApiImpl alloc] initWithInstanceManager:instanceManager];
121121

122122
FlutterError *error;
123-
[hostApi removeAllUserScriptsForControllerWithIdentifier:@0 error:&error];
123+
[hostAPI removeAllUserScriptsForControllerWithIdentifier:@0 error:&error];
124124
OCMVerify([mockUserContentController removeAllUserScripts]);
125125
XCTAssertNil(error);
126126
}

0 commit comments

Comments
 (0)