Bug 42586 - Log all canceled authentication attempts in DumpRenderTree
Summary: Log all canceled authentication attempts in DumpRenderTree
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: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-19 12:40 PDT by Alexey Proskuryakov
Modified: 2010-07-19 13:20 PDT (History)
3 users (show)

See Also:


Attachments
proposed patch (4.13 KB, patch)
2010-07-19 12:42 PDT, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2010-07-19 12:40:59 PDT
DumpRenderTree already prints a log when it responds with preset credentials, but it doesn't log anything when there are no credentials (and it thus simulates a canceled auth sheet).

It's important to know whether an auth sheet appeared.
Comment 1 Alexey Proskuryakov 2010-07-19 12:42:57 PDT
Created attachment 61980 [details]
proposed patch
Comment 2 Darin Adler 2010-07-19 12:50:16 PDT
Comment on attachment 61980 [details]
proposed patch

> +        NSString *string = [NSString stringWithFormat:@"%@ - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet", identifier];
> +        printf("%s\n", [string UTF8String]);

I would either use puts instead of printf here, or continue to use printf but use UTF8String on the identifier instead of calling stringWithFormat and have a printf format string instead.

r=me
Comment 3 Alexey Proskuryakov 2010-07-19 13:04:55 PDT
Committed <http://trac.webkit.org/changeset/63681>.

> I would either use puts instead of printf here, or continue
> to use printf but use UTF8String on the identifier instead of
> calling stringWithFormat and have a printf format string instead.

I didn't make this change, since such style matches what is done elsewhere in this file.
Comment 4 WebKit Review Bot 2010-07-19 13:20:09 PDT
http://trac.webkit.org/changeset/63681 might have broken Qt Linux Release