You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Danny Robinson <da...@gmail.com> on 2007/07/18 21:45:49 UTC

[Trinidad] What does matchesBase="true" do?

The CoreRenderKitTest scripts contain lines such as

  <attribute-test name="styleClass" value="styleClass_val"
matchesBase="true"/>

Can someone explain what 'matchesBase' does.  I'm getting errors while
testing an updated component.  Removing this attribute causes the test to
pass.

Thanks,

Danny

-- 
Chordiant Software Inc.
www.chordiant.com

Re: [Trinidad] What does matchesBase="true" do?

Posted by Adam Winer <aw...@gmail.com>.
The renderkit tests do two things:
1. Verify the output hasn't changed
2. Verify the output is legal in the first place, in some
general ways.

One of the latter tests is that setting an attribute should,
generally speaking, do *something* to the output, not just
be ignored.  matchesBase="true" is for the rare exception,
an attribute that (as far as the HTML goes) should be ignored.

In this case, some evil person in the past used matchesBase="true"
to cover up a bug in a renderer - it was ignoring the styleClass
attribute.  So, it looks like you've fixed a bug, and the fact
that the test passed when you remove matchesBase="true" is the
proof of it.

-- Adam



On 7/18/07, Danny Robinson <da...@gmail.com> wrote:
>
> The CoreRenderKitTest scripts contain lines such as
>
>   <attribute-test name="styleClass" value="styleClass_val"
> matchesBase="true"/>
>
> Can someone explain what 'matchesBase' does.  I'm getting errors while
> testing an updated component.  Removing this attribute causes the test to
> pass.
>
> Thanks,
>
> Danny
>
> --
> Chordiant Software Inc.
> www.chordiant.com