File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,26 @@ - (void)testDecidePolicyForNavigationAction_whenExternalDecidePolicyForBrowserAc
235235 XCTAssertTrue (result);
236236}
237237
238+ - (void )testDecidePolicyForNavigationAction_whenExternalDecidePolicyForBrowserActionLegacyFlowNonHttps_shouldCancelActionAndReturnNoAndCallExternalMethod
239+ {
240+ [MSIDWebAuthNUtil setAmIRunningInExtension: NO ];
241+
242+ MSIDAADOAuthEmbeddedWebviewController *webVC = [[MSIDAADOAuthEmbeddedWebviewController alloc ]
243+ initWithStartURL: [NSURL URLWithString: @" https://contoso.com/oauth/authorize" ]
244+ endURL: [NSURL URLWithString: @" endurl://host" ]
245+ webview: nil
246+ customHeaders: nil
247+ platfromParams: nil
248+ context: nil ];
249+
250+ NSURLRequest *request = [[NSURLRequest alloc ] initWithURL: [[NSURL alloc ] initWithString: @" http://www.web-cp.com/check" ]];
251+ MSIDWKNavigationActionMock *action = [[MSIDWKNavigationActionMock alloc ] initWithRequest: request];
252+
253+ BOOL result = [webVC decidePolicyAADForNavigationAction: action decisionHandler: ^(WKNavigationActionPolicy decision) { }];
254+
255+ XCTAssertFalse (result);
256+ }
257+
238258@end
239259
240260#endif
You can’t perform that action at this time.
0 commit comments