Bug 21529

Summary: Test fast/js/function-toString-parentheses.html is broken when removesExtraParentheses == false
Product: WebKit Reporter: Pam Greene (IRC:pamg) <pam>
Component: Tools / TestsAssignee: Adam Barth <abarth>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Fixes test darin: review+

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.