Bug 27935

Summary: new prototype-inheritance* tests have invalid expectations for primitive types
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: abarth, ap, oliver, sam, ukai
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: OS X 10.5   
Attachments:
Description Flags
use JSVALUE64 for X86_64 LINUX, except Qt none

Description Eric Seidel (no email) 2009-08-02 22:34:39 PDT
new prototype-inheritance* tests have invalid expectations for primitive types
http://trac.webkit.org/browser/trunk/LayoutTests/fast/dom/resources/prototype-inheritance-2.js
http://trac.webkit.org/browser/trunk/LayoutTests/fast/dom/prototype-inheritance-2-expected.txt

These tests expect things like:

inner.pageXOffset to have the inner prototype chain.  primitive types (number, string, etc.) are wrapped using the lexical global object (according to Adam at least), so these expectations are wrong.

Will fix.
Comment 1 Fumitoshi Ukai 2009-08-03 04:25:32 PDT
Created attachment 33968 [details]
use JSVALUE64 for X86_64 LINUX, except Qt


---
 2 files changed, 12 insertions(+), 1 deletions(-)
Comment 2 Fumitoshi Ukai 2009-08-03 04:27:40 PDT
sorry, wrong bug id. please ignore the attachment.
Comment 3 Jan Alonzo 2009-08-03 04:28:23 PDT
Comment on attachment 33968 [details]
use JSVALUE64 for X86_64 LINUX, except Qt

Clearing flag. Wrong bug.
Comment 4 Eric Seidel (no email) 2009-08-03 09:02:03 PDT
I see typeof returning:
number
object
boolean
function

It seems that number and boolean should be ignored by these tests.  But "function" is not a primitive type, correct?  That should still have the inner global object's prototype chain, no?
Comment 5 Adam Barth 2009-08-03 10:38:50 PDT
> It seems that number and boolean should be ignored by these tests.  But
> "function" is not a primitive type, correct?  That should still have the inner
> global object's prototype chain, no?

Yeah, you want "object" and "function".  Keep in mind that JavaScript is tricky and typeof null === "object", so you want to filter those out as well.
Comment 6 Alexey Proskuryakov 2010-11-19 09:51:26 PST
> Will fix.

Eric, please do!