Re: Test 10.8.e needs work

HI Charlie,

In response to the new test for 10.8.f, I mentioned there would be problems
with this test, 10.8.e.

In DOM2 the term "cancelable" refers only to whether or not the default
action of the event is cancelable.  The ability, or lack thereof, to stop
the propagation of the event is never in question. One can say whether or
not the event bubbles when it is dispatch, and one can *always* stop the
propagation.

It is possible to test the ability to stop the propagation, which is what I
incorrectly asked for.  It seems to be the only thing, though, that we
could reliably write  a cross-implementation test for.

A custom event does not have a default action whose behavior we know about
beforehand, so how can we write a standard test to detect whether or not
its default action was cancelled?

There are a few possibilities:
1) Throw out the test
2) Relabel the test to say that it is testing the ability to stop the
propagation of a custom event
3) Add a feature to query the state of an event, then use it

Clearly, #3 is out for 1.1.  #1 is a bit of a headache, and #2 is at least
doable (as you've shown).

Of course, none of this even covers the perceived holes in the testing
framework, such as whether bubbles=false or cancelable=false work?

Thoughts?

John M. Boyer, Ph.D.
STSM, Lotus Forms
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer
Blog RSS feed:
http://www.ibm.com/developerworks/blogs/rss/JohnBoyer?flavor=rssdw




                                                                                                                     
  From:       Charles F Wiecha/Watson/IBM@IBMUS                                                                      
                                                                                                                     
  To:         John Boyer <boyerj@ca.ibm.com>                                                                         
                                                                                                                     
  Cc:         public-forms@w3.org                                                                                    
                                                                                                                     
  Date:       02/12/2010 11:46 AM                                                                                    
                                                                                                                     
  Subject:    Re: Test 10.8.e needs work                                                                             
                                                                                                                     




As in 10.8.f I can't test this on Ubiquity and with the FF extension given
bugs in XML events and xf:dispatch respectively...but anybody with another
implementation is welcome/asked to provide feedback.  Thanks, Charlie:

[attachment "W3C-10.8.e.xhtml" deleted by John Boyer/CanWest/IBM]

Charles Wiecha
Multichannel Web Interaction
IBM T.J. Watson Research Center
P.O. Box 704
Yorktown Heights, N.Y.  10598
Phone: (914) 784-6180, T/L 863-6180, Cell: (914) 282-3483
wiecha@us.ibm.com




                                                                                                                     
  From:       John Boyer <boyerj@ca.ibm.com>                                                                         
                                                                                                                     
  To:         public-forms@w3.org                                                                                    
                                                                                                                     
  Date:       02/04/2010 11:09 AM                                                                                    
                                                                                                                     
  Subject:    Test 10.8.e needs work                                                                                 
                                                                                                                     
  Sent by:    public-forms-request@w3.org                                                                            
                                                                                                                     






Test  10.8.e purports to test the dispatch of a cancelled event.

The ev:event attribute was placed on the model element, not on the action
element that shows the message proving that the event was dispatched.  So,
the test requires that one should *not* see a message for the custom-event,
but the reason you don't see it is that the event attributes are incorrect.


The ev:event attribute needs to be attached to the action element within
the model.

The model also has no instance, which is required, so I would not expect
this form to work.

However, we already have a test 10.8.d that tests dispatching a custom
event.  This test purports to test a cancelled event, i.e. one with a and
ev:defaultAction of cancel.  However, the test assumes that cancelling the
default action would cause the event bubble phase not to happen. The test
needs to use stopPropagation instead.  Then, another action handler needs
to be added to observe the parent of the event target instead.

So, I think this test should change by
1) adding an instance with an ID
2) targeting the custom event at the instance, not the model
3) attaching the ev:event and stopPropagation on the xforms action in the
model.

Then, we can claim that you shouldn't see the message.

Thanks,
John M. Boyer, Ph.D.
STSM, Lotus Forms
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer
Blog RSS feed:
http://www.ibm.com/developerworks/blogs/rss/JohnBoyer?flavor=rssdw

Received on Friday, 12 February 2010 22:02:19 UTC