Bug 47867

Summary: new-run-webkit-tests produces corrupt PNG baselines on Windows
Product: WebKit Reporter: Kenneth Russell <kbr>
Component: Tools / TestsAssignee: Kenneth Russell <kbr>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dglazkov, dpranke, eric, jamesr, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch eric: review+, kbr: commit-queue-

Description Kenneth Russell 2010-10-18 18:49:00 PDT
new-run-webkit-tests produces corrupt PNG baselines on Windows, at least with the Python from http://www.python.org/, because the output file is opened with mode "w" rather than mode "wb" in WebKitTools/Scripts/webkitpy/layout_tests/port/base.py, update_baseline. Like _expected_file_contents in the same file, the encoding should be tested and "b" used if the encoding is None.
Comment 1 Kenneth Russell 2010-10-18 18:52:45 PDT
Created attachment 71111 [details]
Patch
Comment 2 Eric Seidel (no email) 2010-10-18 18:54:44 PDT
Comment on attachment 71111 [details]
Patch

I would have written "if not encoding:", but this is fine.
Comment 3 Kenneth Russell 2010-10-18 19:32:47 PDT
Committed r70017: <http://trac.webkit.org/changeset/70017>
Comment 4 Eric Seidel (no email) 2010-10-18 19:38:10 PDT
Committed r70019: <http://trac.webkit.org/changeset/70019>
Comment 5 WebKit Review Bot 2010-10-18 20:00:19 PDT
http://trac.webkit.org/changeset/70017 might have broken SnowLeopard Intel Release (Tests)