Bug 42586

Summary: Log all canceled authentication attempts in DumpRenderTree
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: Tools / TestsAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
proposed patch darin: review+

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