- From: Keith Wells <wellsk@us.ibm.com>
- Date: Thu, 8 Jan 2009 09:50:44 -0500
- To: Ulrich Nicolas Lissé <unl@dreamlab.net>, Forms WG <public-forms@w3.org>
- Message-ID: <OFF910B907.D994DD22-ON87257538.004A6A15-85257538.00518CE8@us.ibm.com>
Uli, Thanks for posting these! FYI, the Firefox XForms TS implementation results were posted based on previous builds of the Firefox Browser and Firefox XForms extensions and since these change over time -- the implementation report will be out-of-date over time too! * Test Case 10.3.d I reran this test case on FF3 Mozilla XForms Plugin 0.8.6ff3 and it fails on trigger "Test F: 1 2 3 4 5 5" Can you retry this test case again and let me know if it still succeeds for you? * Test Case 10.17.d Changed the statement in the test case to say "When you activate a Delete Row trigger the trigger and the output control on that row must disappear from the page and the focus must move to the Insert Row trigger when the last Delete Row trigger is activated." * Test Case 10.18.a, 10.18.b, and 10.18.c Removed trailing ')', changed 'number' to number, and changed 11 to 10 . * Test Case 10.18.d Completed per suggestions! * Test Case 10.18.e Completed per suggestions! Uli thanks for the suggestions, I have modified the test cases and updated them in the W3C cvs tree. Keith Ulrich Nicolas Lissé <unl@dreamlab.net To > Forms WG <public-forms@w3.org> Sent by: cc public-forms-requ est@w3.org Subject Bugs in XForms 1.1 Test Suite Section "10. XForms Actions" 01/07/2009 04:33 PM Dear Group, when the Firefox Plugin Implementation Report [1] was published I started to play around with the Mozilla XForms Plugin [2]. I encountered some errors in the Actions Section of the XForms 1.1 Test Suite [3]. The following applies to Firefox 3.0.5 with Mozilla XForms Plugin 0.8.6ff3 under Mac OS X (10.5.6). * Test Case 10.3.d This is not buggy, but the Implementation Report marks it as Failed for FF3. However, it works completely fine for me. Please double-check. * Test Case 10.17.d There is an logical error in this test case. It states "When you activate a Delete Row trigger the trigger and the output control on that row must disappear from the page and the focus must move to the Insert Row trigger." However, this is not true for all of the rows but only for the last one. The crucial part is the conditional setindex action: <xforms:setfocus control="InsertControl" if="last()=1"/> The if attribute evaluates to true() if and only if the nodeset has 1 element. So the index is set to the Insert Row trigger when you delete the last row. Which is exactly what happens with the Mozilla Plugin. Again, this test case is mistakenly marked as Failed for FF3. To fix this test case it would be enough to make clear that the focus is only set to the Insert Row trigger after the last row has been deleted. In contrast, setting focus to the Insert Row trigger when deleting a row from the nodeset having a size greater than 1 would clearly be an error. * Test Case 10.18.a This test case contains the following insert action: <xforms:insert ev:event="xforms-ready" nodeset="number" at="1" position="after" while="count('number') < 11)"/> The while expression is broken in multiple ways: 1. It is not syntactically correct (trailing ')'). 2. The argument to the count function should be the /nodeset/ called number instead of the string "number". 3. In order to create a nodeset of size 10, the exit condition must be "< 10". So the fixed action should read: <xforms:insert ev:event="xforms-ready" nodeset="number" at="1" position="after" while="count(number) < 10"/> With the while expression being fixed FF3 passes the test. * Test Cases 10.18.b and 10.18.c The same applies as for 10.18.a. * Test Case 10.18.d The same applies as for 10.18.a. Additionally, there is a broken if expression, which repeats the wrong count() function call and a wrong exit condition. Consequently, it should read if="count(number) < 5" * Test Case 10.18.e This test case has many wrong XPath expressions in its actions. There are several attributes where expressions start with "/some/nodes". Given the test instance these expressions evaluate to the empty nodeset. They must be rewritten either as "/root/some/nodes" or as "instance('temps')/some/nodes". Also, the counter must be initially set to 0 to satisfy the condition expressed in the test case. A fixed action block would read: <xforms:action ev:event="DOMActivate"> <xforms:setvalue ref="instance('temps')/counter" value="0"/> <xforms:setvalue ref="instance('temps')/accumulator" value="0"/> <xforms:action while="instance('temps')/counter <= count(instance('temps')/some/nodes)"> <xforms:setvalue ref="instance('temps')/accumulator" value=". + instance('temps')/some/ nodes[instance('temps')/counter]" if="boolean-from-string(instance('temps')/some/ nodes[instance('temps')/counter]/@selected)"/> <xforms:setvalue ref="instance('temps')/counter" value=". + 1"/> </xforms:action> </xforms:action> Furthermore there are no "selected" attributes on the elements of nodeset "instance('temps')/some/nodes". In order to provide a valid test case the instance should read: <xforms:instance id="temps"> <root> <counter/> <accumulator/> <some> <nodes selected="true">1</nodes> <nodes selected="true">2</nodes> <nodes selected="true">3</nodes> </some> </root> </xforms:instance> FF3 still doesn't pass the now valid test case. It needs an extra number() conversion for the counter to work as a positional predicate: <xforms:action ev:event="DOMActivate"> <xforms:setvalue ref="instance('temps')/counter" value="0"/> <xforms:setvalue ref="instance('temps')/accumulator" value="0"/> <xforms:action while="instance('temps')/counter <= count(instance('temps')/some/nodes)"> <xforms:setvalue ref="instance('temps')/accumulator" value=". + instance('temps')/some/ nodes[number(instance('temps')/counter)]" if="boolean-from-string(instance('temps')/some/ nodes[number(instance('temps')/counter)]/@selected)"/> <xforms:setvalue ref="instance('temps')/counter" value=". + 1"/> </xforms:action> </xforms:action> This is clearly a FF3 bug, but it is not related to this test case. @Keith: Could you please fix the test cases mentioned? The implementation reports would have to be regenerated as well. I wonder if any implementation passed those... Regards, Uli. [1] http://www.w3.org/MarkUp/Forms/2008/XForms11ImplReports/FFplugins/ResultsTable.html [2] https://addons.mozilla.org/firefox/addons/versions/824 [3] http://www.w3.org/MarkUp/Forms/Test/XForms1.1/Edition1/driverPages/html/ -- Ulrich Nicolas Lissé
Attachments
- image/gif attachment: graycol.gif
- image/gif attachment: pic06169.gif
- image/gif attachment: ecblank.gif
Received on Thursday, 8 January 2009 14:51:40 UTC