You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Antoine van Wel <an...@gmail.com> on 2009/08/24 11:55:54 UTC

htmlvalidator / responsefilter not executed through wickettester?

Hi,

HtmlValidator [1] turns out to be a great help for those who care about
valid (x)html.
Now I'm trying to get it to work in my unit tests, it doesn't seem to be
picked up; in fact I wonder if any responsefilter is being executed at all
when running from wickettester. What do you think? The filter is added
exactly as described in the blog through
getRequestCycleSettings().addResponseFilter(htmlValidator) and I'm sure that
is being executed.

thanks
Antoine

[1] http://wicketinaction.com/2009/06/wicket-html-validator-12/

-- 

--8<--8<--
take your photos everywhere you go - http://www.memolio.com
--8<--8<--
We don't see things as they are, we see things as we are. - Anais Nin
Whether you think you can or whether you think you can't, you're right. -
Henry Ford
--8<--8<--

Re: htmlvalidator / responsefilter not executed through wickettester?

Posted by Martijn Dashorst <ma...@gmail.com>.
A quick way to do this is to let wickettester write the output to a
file, and use the htmlvalidator to parse that for validity.

Martijn

On Mon, Aug 24, 2009 at 12:11 PM, Antoine van
Wel<an...@gmail.com> wrote:
> Thanks for the quick response.
> Somehow I get the feeling a patch will take quite some effort and time is
> kind of scarce now... :-)
>
> Antoine
>
>
> On Mon, Aug 24, 2009 at 12:00 PM, Martijn Dashorst <
> martijn.dashorst@gmail.com> wrote:
>
>> HtmlValidator was not designed for use in WicketTester, see my
>> response to this question [1].
>>
>> That said, I'd like to extend HtmlValidator to be useful with
>> wickettester and will gladly accept patches :-)
>>
>> Martijn
>>
>> [1] http://osdir.com/ml/users-wicket.apache.org/2009-08/msg00260.html
>>
>> On Mon, Aug 24, 2009 at 11:55 AM, Antoine van
>> Wel<an...@gmail.com> wrote:
>> > Hi,
>> >
>> > HtmlValidator [1] turns out to be a great help for those who care about
>> > valid (x)html.
>> > Now I'm trying to get it to work in my unit tests, it doesn't seem to be
>> > picked up; in fact I wonder if any responsefilter is being executed at
>> all
>> > when running from wickettester. What do you think? The filter is added
>> > exactly as described in the blog through
>> > getRequestCycleSettings().addResponseFilter(htmlValidator) and I'm sure
>> that
>> > is being executed.
>> >
>> > thanks
>> > Antoine
>> >
>> > [1] http://wicketinaction.com/2009/06/wicket-html-validator-12/
>> >
>> > --
>> >
>> > --8<--8<--
>> > take your photos everywhere you go - http://www.memolio.com
>> > --8<--8<--
>> > We don't see things as they are, we see things as we are. - Anais Nin
>> > Whether you think you can or whether you think you can't, you're right. -
>> > Henry Ford
>> > --8<--8<--
>> >
>>
>>
>>
>> --
>> Become a Wicket expert, learn from the best: http://wicketinaction.com
>> Apache Wicket 1.4 increases type safety for web applications
>> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
> --
>
> --8<--8<--
> take your photos everywhere you go - http://www.memolio.com
> --8<--8<--
> We don't see things as they are, we see things as we are. - Anais Nin
> Whether you think you can or whether you think you can't, you're right. -
> Henry Ford
> --8<--8<--
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: htmlvalidator / responsefilter not executed through wickettester?

Posted by Antoine van Wel <an...@gmail.com>.
Thanks for the quick response.
Somehow I get the feeling a patch will take quite some effort and time is
kind of scarce now... :-)

Antoine


On Mon, Aug 24, 2009 at 12:00 PM, Martijn Dashorst <
martijn.dashorst@gmail.com> wrote:

> HtmlValidator was not designed for use in WicketTester, see my
> response to this question [1].
>
> That said, I'd like to extend HtmlValidator to be useful with
> wickettester and will gladly accept patches :-)
>
> Martijn
>
> [1] http://osdir.com/ml/users-wicket.apache.org/2009-08/msg00260.html
>
> On Mon, Aug 24, 2009 at 11:55 AM, Antoine van
> Wel<an...@gmail.com> wrote:
> > Hi,
> >
> > HtmlValidator [1] turns out to be a great help for those who care about
> > valid (x)html.
> > Now I'm trying to get it to work in my unit tests, it doesn't seem to be
> > picked up; in fact I wonder if any responsefilter is being executed at
> all
> > when running from wickettester. What do you think? The filter is added
> > exactly as described in the blog through
> > getRequestCycleSettings().addResponseFilter(htmlValidator) and I'm sure
> that
> > is being executed.
> >
> > thanks
> > Antoine
> >
> > [1] http://wicketinaction.com/2009/06/wicket-html-validator-12/
> >
> > --
> >
> > --8<--8<--
> > take your photos everywhere you go - http://www.memolio.com
> > --8<--8<--
> > We don't see things as they are, we see things as we are. - Anais Nin
> > Whether you think you can or whether you think you can't, you're right. -
> > Henry Ford
> > --8<--8<--
> >
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.4 increases type safety for web applications
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 

--8<--8<--
take your photos everywhere you go - http://www.memolio.com
--8<--8<--
We don't see things as they are, we see things as we are. - Anais Nin
Whether you think you can or whether you think you can't, you're right. -
Henry Ford
--8<--8<--

Re: htmlvalidator / responsefilter not executed through wickettester?

Posted by Antoine van Wel <an...@gmail.com>.
After some digging I ran into:


        // Don't buffer the response, as this can break ajax tests: see
WICKET-1264
        this.application.getRequestCycleSettings().setBufferResponse(false);


in MockWebApplication. So it's not a bug, it's a fix! :-)


Antoine


On Mon, Aug 24, 2009 at 2:45 PM, Martin Grigorov <mc...@e-card.bg>wrote:

> El lun, 24-08-2009 a las 12:00 +0200, Martijn Dashorst escribió:
> > HtmlValidator was not designed for use in WicketTester, see my
> > response to this question [1].
> >
> > That said, I'd like to extend HtmlValidator to be useful with
> > wickettester and will gladly accept patches :-)
> This doesn't answer why response filters are not executed.
> Maybe there is a bug.
> >
> > Martijn
> >
> > [1] http://osdir.com/ml/users-wicket.apache.org/2009-08/msg00260.html
> >
> > On Mon, Aug 24, 2009 at 11:55 AM, Antoine van
> > Wel<an...@gmail.com> wrote:
> > > Hi,
> > >
> > > HtmlValidator [1] turns out to be a great help for those who care about
> > > valid (x)html.
> > > Now I'm trying to get it to work in my unit tests, it doesn't seem to
> be
> > > picked up; in fact I wonder if any responsefilter is being executed at
> all
> > > when running from wickettester. What do you think? The filter is added
> > > exactly as described in the blog through
> > > getRequestCycleSettings().addResponseFilter(htmlValidator) and I'm sure
> that
> > > is being executed.
> > >
> > > thanks
> > > Antoine
> > >
> > > [1] http://wicketinaction.com/2009/06/wicket-html-validator-12/
> > >
> > > --
> > >
> > > --8<--8<--
> > > take your photos everywhere you go - http://www.memolio.com
> > > --8<--8<--
> > > We don't see things as they are, we see things as we are. - Anais Nin
> > > Whether you think you can or whether you think you can't, you're right.
> -
> > > Henry Ford
> > > --8<--8<--
> > >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 

--8<--8<--
take your photos everywhere you go - http://www.memolio.com
--8<--8<--
We don't see things as they are, we see things as we are. - Anais Nin
Whether you think you can or whether you think you can't, you're right. -
Henry Ford
--8<--8<--

Re: htmlvalidator / responsefilter not executed through wickettester?

Posted by Martin Grigorov <mc...@e-card.bg>.
El lun, 24-08-2009 a las 12:00 +0200, Martijn Dashorst escribió:
> HtmlValidator was not designed for use in WicketTester, see my
> response to this question [1].
> 
> That said, I'd like to extend HtmlValidator to be useful with
> wickettester and will gladly accept patches :-)
This doesn't answer why response filters are not executed.
Maybe there is a bug.
> 
> Martijn
> 
> [1] http://osdir.com/ml/users-wicket.apache.org/2009-08/msg00260.html
> 
> On Mon, Aug 24, 2009 at 11:55 AM, Antoine van
> Wel<an...@gmail.com> wrote:
> > Hi,
> >
> > HtmlValidator [1] turns out to be a great help for those who care about
> > valid (x)html.
> > Now I'm trying to get it to work in my unit tests, it doesn't seem to be
> > picked up; in fact I wonder if any responsefilter is being executed at all
> > when running from wickettester. What do you think? The filter is added
> > exactly as described in the blog through
> > getRequestCycleSettings().addResponseFilter(htmlValidator) and I'm sure that
> > is being executed.
> >
> > thanks
> > Antoine
> >
> > [1] http://wicketinaction.com/2009/06/wicket-html-validator-12/
> >
> > --
> >
> > --8<--8<--
> > take your photos everywhere you go - http://www.memolio.com
> > --8<--8<--
> > We don't see things as they are, we see things as we are. - Anais Nin
> > Whether you think you can or whether you think you can't, you're right. -
> > Henry Ford
> > --8<--8<--
> >
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: htmlvalidator / responsefilter not executed through wickettester?

Posted by Martijn Dashorst <ma...@gmail.com>.
HtmlValidator was not designed for use in WicketTester, see my
response to this question [1].

That said, I'd like to extend HtmlValidator to be useful with
wickettester and will gladly accept patches :-)

Martijn

[1] http://osdir.com/ml/users-wicket.apache.org/2009-08/msg00260.html

On Mon, Aug 24, 2009 at 11:55 AM, Antoine van
Wel<an...@gmail.com> wrote:
> Hi,
>
> HtmlValidator [1] turns out to be a great help for those who care about
> valid (x)html.
> Now I'm trying to get it to work in my unit tests, it doesn't seem to be
> picked up; in fact I wonder if any responsefilter is being executed at all
> when running from wickettester. What do you think? The filter is added
> exactly as described in the blog through
> getRequestCycleSettings().addResponseFilter(htmlValidator) and I'm sure that
> is being executed.
>
> thanks
> Antoine
>
> [1] http://wicketinaction.com/2009/06/wicket-html-validator-12/
>
> --
>
> --8<--8<--
> take your photos everywhere you go - http://www.memolio.com
> --8<--8<--
> We don't see things as they are, we see things as we are. - Anais Nin
> Whether you think you can or whether you think you can't, you're right. -
> Henry Ford
> --8<--8<--
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org