@@ -499,6 +499,7 @@ private void setupHttpSecurityMocksFor(HttpSecurity httpSecurity) throws Excepti
499499 ExpressionUrlAuthorizationConfigurer <HttpSecurity >.ExpressionInterceptUrlRegistry mockAuthRequests = mock (ExpressionUrlAuthorizationConfigurer .ExpressionInterceptUrlRegistry .class );
500500 ExpressionUrlAuthorizationConfigurer <HttpSecurity >.AuthorizedUrl mockAuthorizedUrl = mock (ExpressionUrlAuthorizationConfigurer .AuthorizedUrl .class );
501501 HeadersConfigurer <HttpSecurity > mockHeadersConfigurer = mock (HeadersConfigurer .class );
502+ HeadersConfigurer <HttpSecurity >.XXssConfig mockXssConfigurer = mock (HeadersConfigurer .XXssConfig .class );
502503 ServletApiConfigurer <HttpSecurity > mockServletApiConfigurer = mock (ServletApiConfigurer .class );
503504 CsrfConfigurer <HttpSecurity > mockCsrfConfigurer = mock (CsrfConfigurer .class );
504505 SessionManagementConfigurer <HttpSecurity > mockSessionConfigurer = mock (SessionManagementConfigurer .class );
@@ -514,6 +515,8 @@ private void setupHttpSecurityMocksFor(HttpSecurity httpSecurity) throws Excepti
514515 when (mockAuthRequests .and ()).thenReturn (httpSecurity );
515516
516517 when (httpSecurity .headers ()).thenReturn (mockHeadersConfigurer );
518+ when (mockHeadersConfigurer .xssProtection ()).thenReturn (mockXssConfigurer );
519+ when (mockXssConfigurer .disable ()).thenReturn (mockHeadersConfigurer );
517520 when (mockHeadersConfigurer .addHeaderWriter (any (StaticHeadersWriter .class ))).thenReturn (mockHeadersConfigurer );
518521 when (mockHeadersConfigurer .and ()).thenReturn (httpSecurity );
519522
@@ -857,6 +860,7 @@ private void setupHttpSecurityMocks() throws Exception {
857860 ExpressionUrlAuthorizationConfigurer <HttpSecurity >.ExpressionInterceptUrlRegistry mockAuthRequests = mock (ExpressionUrlAuthorizationConfigurer .ExpressionInterceptUrlRegistry .class );
858861 ExpressionUrlAuthorizationConfigurer <HttpSecurity >.AuthorizedUrl mockAuthorizedUrl = mock (ExpressionUrlAuthorizationConfigurer .AuthorizedUrl .class );
859862 HeadersConfigurer <HttpSecurity > mockHeadersConfigurer = mock (HeadersConfigurer .class );
863+ HeadersConfigurer <HttpSecurity >.XXssConfig mockXssConfigurer = mock (HeadersConfigurer .XXssConfig .class );
860864 ServletApiConfigurer <HttpSecurity > mockServletApiConfigurer = mock (ServletApiConfigurer .class );
861865 CsrfConfigurer <HttpSecurity > mockCsrfConfigurer = mock (CsrfConfigurer .class );
862866 SessionManagementConfigurer <HttpSecurity > mockSessionConfigurer = mock (SessionManagementConfigurer .class );
@@ -872,6 +876,8 @@ private void setupHttpSecurityMocks() throws Exception {
872876 when (mockAuthRequests .and ()).thenReturn (mockHttpSecurity );
873877
874878 when (mockHttpSecurity .headers ()).thenReturn (mockHeadersConfigurer );
879+ when (mockHeadersConfigurer .xssProtection ()).thenReturn (mockXssConfigurer );
880+ when (mockXssConfigurer .disable ()).thenReturn (mockHeadersConfigurer );
875881 when (mockHeadersConfigurer .addHeaderWriter (any (StaticHeadersWriter .class ))).thenReturn (mockHeadersConfigurer );
876882 when (mockHeadersConfigurer .and ()).thenReturn (mockHttpSecurity );
877883
0 commit comments