hosea commented on code in PR #1581:
URL: https://github.com/apache/wicket/pull/1581#discussion_r3961467800


##########
wicket-core-tests/src/test/java/org/apache/wicket/csp/CSPHeaderWriterTest.java:
##########
@@ -115,6 +123,53 @@ void addCspDirectiveToStatelessPageAfterNoRedirect()
                        STYLE_SRC.getValue());
        }
 
+       @Test
+       void 
addCspDirectiveToStatelessPageEvenIfWrappedInMultipleIRequestHandlerDelegates()
+       {
+               tester.getApplication().mount(new 
MountedMapper("withdelegate/page", NoopMockPage.class)
+               {
+                       @Override
+                       public IRequestHandler mapRequest(final Request request)
+                       {
+                               final IRequestHandler requestHandler = 
super.mapRequest(request);
+                               final IRequestHandler result;
+                               if (requestHandler instanceof 
RenderPageRequestHandler renderPageRequestHandler && 
NoopMockPage.class.equals(renderPageRequestHandler.getPageClass()))

Review Comment:
   @pedrosans: Thank you for review. You are right. I simplified the test.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to