Bug 21529 - Test fast/js/function-toString-parentheses.html is broken when removesExtraParentheses == false
Summary: Test fast/js/function-toString-parentheses.html is broken when removesExtraPa...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-10 13:04 PDT by Pam Greene (IRC:pamg)
Modified: 2008-10-12 18:57 PDT (History)
1 user (show)

See Also:


Attachments
Fixes test (11.71 KB, patch)
2008-10-10 13:21 PDT, Pam Greene (IRC:pamg)
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pam Greene (IRC:pamg) 2008-10-10 13:04:37 PDT
Test fast/js/function-toString-parentheses.html is broken when removesExtraParentheses == false. Since Safari uses removesExtraParentheses == true, this never showed up.
Comment 1 Pam Greene (IRC:pamg) 2008-10-10 13:21:42 PDT
Created attachment 24273 [details]
Fixes test

Fixes the test to work properly no matter what the value of removesExtraParentheses is. Simplifies it by introducing two new helper functions, testKeepParentheses and testOptionalParentheses.
Comment 2 Darin Adler 2008-10-10 14:11:10 PDT
Comment on attachment 24273 [details]
Fixes test

The change is fine.

But this test is far less useful now than when it was written because neither JavaScriptCore nor V8 really compile and serialize -- they both simply keep the original function text around. So they pass this.

r=me
Comment 3 Adam Barth 2008-10-12 13:45:19 PDT
I'll land this.
Comment 4 Adam Barth 2008-10-12 18:57:56 PDT
Fixed in r37545.