a test for stringify "whitelist" which WebKit fails

Oliver Hunt oliver at apple.com
Fri Aug 28 00:16:49 PDT 2009


Hi Hallvord,
I was looking at webkit's failure of test 004 and 005 -- clamping of  
gap to 10 characters -- and it actually looks like you've missed out  
step 8.b.iii "if gap is not the empty string" -- your regexp for  
testing the result should have a space character following the colon.

--Oliver

On Aug 27, 2009, at 4:44 AM, Hallvord R. M. Steen wrote:

> Hi Oliver,
> I'm curious about this TC - it appears to be WebKit against the rest  
> of us, but it will take me some assistance from somebody with  
> Superior Spec-Reading Skills to figure out who does the right thing..
>
> http://testsuites.opera.com/JSON/correctness/046.html
>
> (test code is at http://testsuites.opera.com/JSON/correctness/scripts/046.js 
>  )
>
> Issue: if an object has properties whose name is a number inside a  
> string ({'1':'foo'}) and you pass in a white-list array to stringify 
> (), WebKit requires the elements in the array to be numbers inside  
> strings too, while other implementations allow either plain numbers  
> or numbers inside strings.
>
> The latter makes more sense to me given that JS generally doesn't  
> distinguish obj[1] and obj['1']. Do you think this is a WebKit bug?
>
> -- 
> Hallvord R. M. Steen, Core Tester, Opera Software
> http://www.opera.com http://my.opera.com/hallvors/



More information about the es-discuss mailing list