Bug 77487

Summary: Make js-test-pre.js more worker friendly
Product: WebKit Reporter: David Grogan <dgrogan>
Component: Tools / TestsAssignee: David Grogan <dgrogan>
Status: RESOLVED FIXED    
Severity: Normal CC: jsbell, ojan, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description David Grogan 2012-01-31 16:02:58 PST
Make js-test-pre.js more worker friendly
Comment 1 David Grogan 2012-01-31 16:06:34 PST
Created attachment 124840 [details]
Patch
Comment 2 David Grogan 2012-01-31 16:19:47 PST
Ojan, could you review this?
Comment 3 Ojan Vafai 2012-01-31 16:31:55 PST
Comment on attachment 124840 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=124840&action=review

> LayoutTests/fast/js/resources/js-test-pre.js:3
> +if (!isWorker() && window.layoutTestController)
>      layoutTestController.dumpAsText(window.enablePixelTesting);

Why not just use self.layoutTestController and self.enablePixelTesting? Then you don't need to check or move isWorker. Similarly, can you change all uses of window in this file to self for consistency?
Comment 4 David Grogan 2012-02-02 15:38:43 PST
Created attachment 125200 [details]
Patch
Comment 5 David Grogan 2012-02-02 15:42:18 PST
(In reply to comment #3)
> (From update of attachment 124840 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=124840&action=review
> 
> > LayoutTests/fast/js/resources/js-test-pre.js:3
> > +if (!isWorker() && window.layoutTestController)
> >      layoutTestController.dumpAsText(window.enablePixelTesting);
> 
> Why not just use self.layoutTestController and self.enablePixelTesting? Then you don't need to check or move isWorker. Similarly, can you change all uses of window in this file to self for consistency?

I was thinking that 'window' is clearer than 'self' so wanted to leave 'window' if possible.  But you're right, the consistency of 'self' everywhere is better.
Comment 6 WebKit Review Bot 2012-02-03 12:46:53 PST
Comment on attachment 125200 [details]
Patch

Clearing flags on attachment: 125200

Committed r106684: <http://trac.webkit.org/changeset/106684>
Comment 7 WebKit Review Bot 2012-02-03 12:46:58 PST
All reviewed patches have been landed.  Closing bug.