WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
164064
testharnessreport.js should sanitize the results before printing them
https://bugs.webkit.org/show_bug.cgi?id=164064
Summary
testharnessreport.js should sanitize the results before printing them
Chris Dumez
Reported
2016-10-27 09:48:55 PDT
testharnessreport.js should sanitize the results before printing them. We currently have 3 copies of this script and only 1 does the sanitization. Short term, let do the sanitization in all of them. Longer term, we should merge these and have a way to keep them in sync.
Attachments
Patch
(154.08 KB, patch)
2016-10-27 10:53 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2016-10-27 10:53:23 PDT
Created
attachment 293038
[details]
Patch
youenn fablet
Comment 2
2016-10-27 11:18:35 PDT
If it proves to be difficult to remove the testharness report.js copies, we could add checks. We do that for testharness.js when running rwt. In the case of test harness report.js, style checker could do it.
Darin Adler
Comment 3
2016-10-27 11:40:49 PDT
Comment on
attachment 293038
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=293038&action=review
Thanks so much for fixing this!
> LayoutTests/http/tests/w3c/resources/testharnessreport.js:56 > + // Escape null characters, otherwise diff will think the file is binary.
This comment is not the reason this matters to us. Seems like a comment written by whoever made this change in Blink and so only mentions the reason that affects them.
> LayoutTests/http/tests/w3c/resources/testharnessreport.js:58 > + // Escape carriage returns as they break rietveld's difftools.
This comment is even more Blink-specific. I don’t even know what “rietveld” is.
WebKit Commit Bot
Comment 4
2016-10-27 11:51:06 PDT
Comment on
attachment 293038
[details]
Patch Clearing flags on attachment: 293038 Committed
r207995
: <
http://trac.webkit.org/changeset/207995
>
WebKit Commit Bot
Comment 5
2016-10-27 11:51:11 PDT
All reviewed patches have been landed. Closing bug.
Chris Dumez
Comment 6
2016-10-27 12:00:55 PDT
(In reply to
comment #3
)
> Comment on
attachment 293038
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=293038&action=review
> > Thanks so much for fixing this! > > > LayoutTests/http/tests/w3c/resources/testharnessreport.js:56 > > + // Escape null characters, otherwise diff will think the file is binary. > > This comment is not the reason this matters to us. Seems like a comment > written by whoever made this change in Blink and so only mentions the reason > that affects them. > > > LayoutTests/http/tests/w3c/resources/testharnessreport.js:58 > > + // Escape carriage returns as they break rietveld's difftools. > > This comment is even more Blink-specific. I don’t even know what “rietveld” > is.
Sorry about this. I went quick and dirty. I am planning to sync-up all 3 scripts so they are identical in a follow-up when I have a little bit more time. I'll clean up the comments as well.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug