Changeset 167007 in webkit


Ignore:
Timestamp:
Apr 9, 2014 12:37:42 AM (10 years ago)
Author:
ap@apple.com
Message:

[WK2] HTTP authentication regression tests fail
https://bugs.webkit.org/show_bug.cgi?id=81627
<rdar://problem/11079296>

Reviewed by Anders Carlsson.

Tools:

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::createWebViewWithOptions): Added canAuthenticateAgainstProtectionSpaceInFrame
to pageLoaderClient structure.
(WTR::TestController::canAuthenticateAgainstProtectionSpaceInFrame): Return true
for password based authentication (we do get server trust challenges on some tests,
which WKTR can't handle).
When this client call is not implemented or returns false, didReceiveAuthenticationChallengeInFrame
calls won't be made, at least on CFNetwork based platforms.
(WTR::TestController::didReceiveAuthenticationChallengeInFrame): Changed the output
to omit <unknown>. The resource is always unknown with WK2, and it doesn't really
make sense to associate auth requests with individual resources - there can be
multiple resources loading at once from the same protection space, so WebKit1 API
that had a resource identifier was inherently racy.

LayoutTests:

  • platform/mac-wk2/TestExpectations: Unskipped tests that now pass. Marked three

tests as failing, because enabling auth uncovered that they are failing
(in browser as well).

  • platform/wk2/http: Added.
  • platform/wk2/http/tests: Added.
  • platform/wk2/http/tests/loading: Added.
  • platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials: Added.
  • platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt: Copied from LayoutTests/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt.
  • platform/wk2/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt: Copied from LayoutTests/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt.
  • platform/wk2/http/tests/loading/basic-credentials-sent-automatically-expected.txt: Copied from LayoutTests/http/tests/loading/basic-credentials-sent-automatically-expected.txt.
  • platform/wk2/http/tests/misc: Added.
  • platform/wk2/http/tests/misc/401-alternative-content-expected.txt: Copied from LayoutTests/http/tests/misc/401-alternative-content-expected.txt.
  • platform/wk2/http/tests/misc/authentication-redirect-1: Added.
  • platform/wk2/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt: Copied from LayoutTests/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt.
  • platform/wk2/http/tests/misc/authentication-redirect-2: Added.
  • platform/wk2/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt: Copied from LayoutTests/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt.
  • platform/wk2/http/tests/misc/authentication-redirect-4: Added.
  • platform/wk2/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt: Copied from LayoutTests/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt.
  • platform/wk2/http/tests/security: Added.
  • platform/wk2/http/tests/security/401-logout: Added.
  • platform/wk2/http/tests/security/401-logout/401-logout-expected.txt: Copied from LayoutTests/http/tests/security/401-logout/401-logout-expected.txt.
  • platform/wk2/http/tests/xmlhttprequest: Added.
  • platform/wk2/http/tests/xmlhttprequest/failed-auth-expected.txt: Copied from LayoutTests/http/tests/xmlhttprequest/failed-auth-expected.txt.
  • platform/wk2/http/tests/xmlhttprequest/remember-bad-password-expected.txt: Copied from LayoutTests/http/tests/xmlhttprequest/remember-bad-password-expected.txt.

WebKit2 results are the same as WebKit1, except that they lack resource URL. That
is expected with WebKit2 API.

Location:
trunk
Files:
21 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r167001 r167007  
     12014-04-09  Alexey Proskuryakov  <ap@apple.com>
     2
     3        [WK2] HTTP authentication regression tests fail
     4        https://bugs.webkit.org/show_bug.cgi?id=81627
     5        <rdar://problem/11079296>
     6
     7        Reviewed by Anders Carlsson.
     8
     9        * platform/mac-wk2/TestExpectations: Unskipped tests that now pass. Marked three
     10        tests as failing, because enabling auth uncovered that they are failing
     11        (in browser as well).
     12
     13        * platform/wk2/http: Added.
     14        * platform/wk2/http/tests: Added.
     15        * platform/wk2/http/tests/loading: Added.
     16        * platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials: Added.
     17        * platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt: Copied from LayoutTests/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt.
     18        * platform/wk2/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt: Copied from LayoutTests/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt.
     19        * platform/wk2/http/tests/loading/basic-credentials-sent-automatically-expected.txt: Copied from LayoutTests/http/tests/loading/basic-credentials-sent-automatically-expected.txt.
     20        * platform/wk2/http/tests/misc: Added.
     21        * platform/wk2/http/tests/misc/401-alternative-content-expected.txt: Copied from LayoutTests/http/tests/misc/401-alternative-content-expected.txt.
     22        * platform/wk2/http/tests/misc/authentication-redirect-1: Added.
     23        * platform/wk2/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt: Copied from LayoutTests/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt.
     24        * platform/wk2/http/tests/misc/authentication-redirect-2: Added.
     25        * platform/wk2/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt: Copied from LayoutTests/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt.
     26        * platform/wk2/http/tests/misc/authentication-redirect-4: Added.
     27        * platform/wk2/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt: Copied from LayoutTests/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt.
     28        * platform/wk2/http/tests/security: Added.
     29        * platform/wk2/http/tests/security/401-logout: Added.
     30        * platform/wk2/http/tests/security/401-logout/401-logout-expected.txt: Copied from LayoutTests/http/tests/security/401-logout/401-logout-expected.txt.
     31        * platform/wk2/http/tests/xmlhttprequest: Added.
     32        * platform/wk2/http/tests/xmlhttprequest/failed-auth-expected.txt: Copied from LayoutTests/http/tests/xmlhttprequest/failed-auth-expected.txt.
     33        * platform/wk2/http/tests/xmlhttprequest/remember-bad-password-expected.txt: Copied from LayoutTests/http/tests/xmlhttprequest/remember-bad-password-expected.txt.
     34        WebKit2 results are the same as WebKit1, except that they lack resource URL. That
     35        is expected with WebKit2 API.
     36
    1372014-04-08  Mihnea Ovidenie  <mihnea@adobe.com>
    238
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r166829 r167007  
    170170fast/events/pageshow-pagehide.html
    171171
    172 # [WK2] Four http/tests/xmlhttprequest tests fail on mac-wk2
    173 # https://bugs.webkit.org/show_bug.cgi?id=81627
    174 http/tests/xmlhttprequest/basic-auth-default.html
    175 http/tests/xmlhttprequest/basic-auth.html
    176 http/tests/xmlhttprequest/re-login-async.html
    177 http/tests/xmlhttprequest/workers/abort-exception-assert.html
    178 
    179172# fast/events/drag-link.html is failing in Mac WebKit2
    180173# https://bugs.webkit.org/show_bug.cgi?id=81833
     
    234227webkit.org/b/105998 [ MountainLion Debug ] fast/css/sticky/inline-sticky.html [ ImageOnlyFailure Pass ]
    235228webkit.org/b/105998 [ MountainLion Debug ] fast/css/sticky/sticky-both-sides.html [ ImageOnlyFailure Pass ]
    236 
    237 webkit.org/b/106405 http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials.html [ Failure ]
    238 webkit.org/b/106405 http/tests/loading/basic-auth-resend-wrong-credentials.html [ Failure ]
    239 webkit.org/b/106405 http/tests/loading/basic-credentials-sent-automatically.html [ Failure ]
    240 webkit.org/b/106405 http/tests/misc/401-alternative-content.php [ Failure ]
    241 webkit.org/b/106405 http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin.html [ Failure ]
    242 webkit.org/b/106405 http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin.html [ Failure ]
    243 webkit.org/b/106405 http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html [ Failure ]
    244 webkit.org/b/106405 http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url.html [ Failure ]
    245 webkit.org/b/106405 http/tests/security/401-logout/401-logout.php [ Failure ]
    246 webkit.org/b/106405 http/tests/xmlhttprequest/basic-auth-nouser.html [ Failure ]
    247 webkit.org/b/106405 http/tests/xmlhttprequest/failed-auth.html [ Failure ]
    248 webkit.org/b/106405 http/tests/xmlhttprequest/remember-bad-password.html [ Failure ]
    249229
    250230webkit.org/b/108507 printing/quirks-percentage-height-body.html [ Skip ]
     
    364344webkit.org/b/127960 [ MountainLion ] http/tests/security/cross-origin-plugin-private-browsing-toggled.html [ Pass Failure ]
    365345
     346webkit.org/b/131349 http/tests/xmlhttprequest/access-control-preflight-credential-async.html [ Failure ]
     347webkit.org/b/131349 http/tests/xmlhttprequest/cross-origin-no-authorization.html [ Failure ]
     348webkit.org/b/131349 http/tests/xmlhttprequest/cross-origin-no-credential-prompt.html [ Failure ]
     349
    366350### END OF (1) Classified failures with bug reports
    367351########################################
     
    394378# All tests that failed on the Lion WebKit2 Release bot in r111739
    395379fast/forms/range/slider-delete-while-dragging-thumb.html
    396 http/tests/security/credentials-in-referer.html
    397380svg/W3C-SVG-1.1/fonts-elem-04-b.svg
    398381
  • trunk/Tools/ChangeLog

    r167004 r167007  
     12014-04-09  Alexey Proskuryakov  <ap@apple.com>
     2
     3        [WK2] HTTP authentication regression tests fail
     4        https://bugs.webkit.org/show_bug.cgi?id=81627
     5        <rdar://problem/11079296>
     6
     7        Reviewed by Anders Carlsson.
     8
     9        * WebKitTestRunner/TestController.h:
     10        * WebKitTestRunner/TestController.cpp:
     11        (WTR::TestController::createWebViewWithOptions): Added canAuthenticateAgainstProtectionSpaceInFrame
     12        to pageLoaderClient structure.
     13        (WTR::TestController::canAuthenticateAgainstProtectionSpaceInFrame): Return true
     14        for password based authentication (we do get server trust challenges on some tests,
     15        which WKTR can't handle).
     16        When this client call is not implemented or returns false, didReceiveAuthenticationChallengeInFrame
     17        calls won't be made, at least on CFNetwork based platforms.
     18        (WTR::TestController::didReceiveAuthenticationChallengeInFrame): Changed the output
     19        to omit <unknown>. The resource is always unknown with WK2, and it doesn't really
     20        make sense to associate auth requests with individual resources - there can be
     21        multiple resources loading at once from the same protection space, so WebKit1 API
     22        that had a resource identifier was inherently racy.
     23
    1242014-04-09  Ryuan Choi  <ryuan.choi@samsung.com>
    225
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r166396 r167007  
    4444#include <WebKit2/WKPagePrivate.h>
    4545#include <WebKit2/WKPreferencesRefPrivate.h>
     46#include <WebKit2/WKProtectionSpace.h>
    4647#include <WebKit2/WKRetainPtr.h>
    4748#include <algorithm>
     
    475476        0, // didFailToInitializePlugin
    476477        0, // didDisplayInsecureContentForFrame
    477         0, // canAuthenticateAgainstProtectionSpaceInFrame
    478         didReceiveAuthenticationChallengeInFrame, // didReceiveAuthenticationChallengeInFrame
     478        canAuthenticateAgainstProtectionSpaceInFrame,
     479        didReceiveAuthenticationChallengeInFrame,
    479480        0, // didStartProgress
    480481        0, // didChangeProgress
     
    11251126}
    11261127
     1128bool TestController::canAuthenticateAgainstProtectionSpaceInFrame(WKPageRef, WKFrameRef, WKProtectionSpaceRef protectionSpace, const void*)
     1129{
     1130    return WKProtectionSpaceGetAuthenticationScheme(protectionSpace) <= kWKProtectionSpaceAuthenticationSchemeHTTPDigest;
     1131}
     1132
    11271133void TestController::didReceiveAuthenticationChallengeInFrame(WKPageRef page, WKFrameRef frame, WKAuthenticationChallengeRef authenticationChallenge, const void *clientInfo)
    11281134{
     
    11751181    String message;
    11761182    if (!m_handlesAuthenticationChallenges)
    1177         message = "<unknown> - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet\n";
     1183        message = "didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet\n";
    11781184    else
    1179         message = String::format("<unknown> - didReceiveAuthenticationChallenge - Responding with %s:%s\n", m_authenticationUsername.utf8().data(), m_authenticationPassword.utf8().data());
     1185        message = String::format("didReceiveAuthenticationChallenge - Responding with %s:%s\n", m_authenticationUsername.utf8().data(), m_authenticationPassword.utf8().data());
    11801186    m_currentInvocation->outputText(message);
    11811187
  • trunk/Tools/WebKitTestRunner/TestController.h

    r166396 r167007  
    152152    static void unavailablePluginButtonClicked(WKPageRef, WKPluginUnavailabilityReason, WKDictionaryRef, const void*);
    153153
     154    static bool canAuthenticateAgainstProtectionSpaceInFrame(WKPageRef, WKFrameRef, WKProtectionSpaceRef, const void *clientInfo);
     155
    154156    static void didReceiveAuthenticationChallengeInFrame(WKPageRef, WKFrameRef, WKAuthenticationChallengeRef, const void *clientInfo);
    155157    void didReceiveAuthenticationChallengeInFrame(WKPageRef, WKFrameRef, WKAuthenticationChallengeRef);
Note: See TracChangeset for help on using the changeset viewer.