<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 1, 2014 at 12:45 PM, Qian Hong <span dir="ltr"><<a href="mailto:qhong@codeweavers.com" target="_blank">qhong@codeweavers.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
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:<br>
<br>
Testcase:<br>
  1 <html><br>
  2 <body><br>
  3 </body><br>
  4 <script type="text/javascript"><br>
  5     var iframeEl = document.createElement('iframe');<br>
  6     document.body.appendChild(iframeEl);<br>
  7     document.write(window["0"]); //buggy in Wine builtin iexplore<br>
  8 </script><br>
  9 </html><br>
<br>
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:<br>
<a href="http://kangax.github.io/sputniktests-webrunner/" target="_blank">http://kangax.github.io/sputniktests-webrunner/</a><br>
<br>
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:<br>


<br>
    Current test: 15_Native_ECMA_Script_Objects/15.11_Error_Objects/15.11.4_Properties_of_the_Error_Prototype_Object/S15.11.4_A4<br>
    Tests completed: 5228<br>
    Total errors: 0<br>
    Total failures: 0<br>
    Elapsed time: 7:40<br>
    Status: Completed. Final score (errors + failures; less is better): 0<br>
<br>
<br>
This is definitely a great step of our Wine buitin iexplore, now our version beats Microsoft IE7 a lot.<br>
<br>
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?<br>

</blockquote><div><br></div><div>Hi Qian,<br><br></div><div>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.<br>

<br>Cheers,<br>Austin
</div></div></div></div>