On Tue, Apr 1, 2014 at 12:45 PM, Qian Hong qhong@codeweavers.com wrote:
Hi all,
When passing a numeral like string as array index to the window object, native IE correctly parses the string into an integer value while Wine doesn't. This patch fix the problem. Here is one simply test case:
Testcase: 1 <html> 2 <body> 3 </body> 4 <script type="text/javascript"> 5 var iframeEl = document.createElement('iframe'); 6 document.body.appendChild(iframeEl); 7 document.write(window["0"]); //buggy in Wine builtin iexplore 8 </script> 9 </html>
In theory this patch need some more tests, because the above test case is far from perfect, fortunately we have the open source ECMAScript 3 Conformance Test Suite ver. 0.2: http://kangax.github.io/sputniktests-webrunner/
Before this patch, Wine builtin iexplore hangs on the first test case of the ECMAScript 3 Conformance Test Suite, after the patch, the Conformance Test Suite begin to run. Guess how far does it gone? To everyone's surprise, now Wine builtin iexplore passes all 5228 tests in the test case:
Current test:
15_Native_ECMA_Script_Objects/15.11_Error_Objects/15.11.4_Properties_of_the_Error_Prototype_Object/S15.11.4_A4 Tests completed: 5228 Total errors: 0 Total failures: 0 Elapsed time: 7:40 Status: Completed. Final score (errors + failures; less is better): 0
This is definitely a great step of our Wine buitin iexplore, now our version beats Microsoft IE7 a lot.
Since now all ECMAScript 3 conformance tests passed, it is safe to assume that this patch is absolutely correct and no extra test cases needed, so I'm not going to contribute any C test case for it into our test framework because it is just duplicate work and waste of time - What can you worry if even the whole test suite passed?
Hi Qian,
The tests are partially there to prove the implementation is correct, yes, but they are also there to prevent regressions. Someone in the future changing dlls/mshtml may not run those same tests and things will break, if there is a unit test in dlls/mshtml/tests, that is not the case.
Cheers, Austin