Bug 27935 - new prototype-inheritance* tests have invalid expectations for primitive types
Summary: new prototype-inheritance* tests have invalid expectations for primitive types
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-02 22:34 PDT by Eric Seidel (no email)
Modified: 2010-11-19 09:51 PST (History)
5 users (show)

See Also:


Attachments
use JSVALUE64 for X86_64 LINUX, except Qt (1.05 KB, text/plain)
2009-08-03 04:25 PDT, Fumitoshi Ukai
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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!