⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 150472 in webkit


Ignore:
Timestamp:
May 21, 2013, 1:21:24 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r150386 and r150397.
http://trac.webkit.org/changeset/150386
http://trac.webkit.org/changeset/150397
https://bugs.webkit.org/show_bug.cgi?id=116572

Broke a test; Alex is going to try again later. (Requested by
thorton on #webkit).

Tools:

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::pathSuitableForTestResult):
(WTR::dumpRequestDescriptionSuitableForTestResult):
(WTR::dumpResponseDescriptionSuitableForTestResult):
(WTR::InjectedBundlePage::willPerformClientRedirectForFrame):
(WTR::InjectedBundlePage::didInitiateLoadForResource):
(WTR::InjectedBundlePage::willSendRequestForFrame):
(WTR::InjectedBundlePage::didReceiveResponseForResource):

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:

(InjectedBundlePage):

LayoutTests:

  • platform/wk2/TestExpectations:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r150471 r150472  
     12013-05-21  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r150386 and r150397.
     4        http://trac.webkit.org/changeset/150386
     5        http://trac.webkit.org/changeset/150397
     6        https://bugs.webkit.org/show_bug.cgi?id=116572
     7
     8        Broke a test; Alex is going to try again later. (Requested by
     9        thorton on #webkit).
     10
     11        * platform/wk2/TestExpectations:
     12
    1132013-05-20  Ryosuke Niwa  <rniwa@webkit.org>
    214
  • trunk/LayoutTests/platform/wk2/TestExpectations

    r150413 r150472  
    275275webkit.org/b/114074 fast/loader/willsendrequest-returns-null-for-memory-cache-load.html [ Failure ]
    276276
    277 webkit.org/b/116491 loader/go-back-cached-main-resource.html [ Failure ]
    278 
    279277### END OF (1) Classified failures with bug reports
    280278########################################
     
    463461# Unexpected redirection happens.
    464462http/tests/loading/redirect-methods.html
     463
     464# Should pass now but need to be checked first.
     465platform/mac/fast/loader/file-url-mimetypes-2.html
     466platform/mac/fast/loader/file-url-mimetypes-3.html
     467platform/mac/fast/loader/file-url-mimetypes.html
     468webarchive/loading/cache-expired-subresource.html
     469webarchive/loading/test-loading-archive.html
     470webarchive/loading/test-loading-archive-subresource-null-mimetype.html
    465471
    466472# Should pass now on ports other than EFL and GTK.
  • trunk/Tools/ChangeLog

    r150461 r150472  
     12013-05-21  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r150386 and r150397.
     4        http://trac.webkit.org/changeset/150386
     5        http://trac.webkit.org/changeset/150397
     6        https://bugs.webkit.org/show_bug.cgi?id=116572
     7
     8        Broke a test; Alex is going to try again later. (Requested by
     9        thorton on #webkit).
     10
     11        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
     12        (WTR::pathSuitableForTestResult):
     13        (WTR::dumpRequestDescriptionSuitableForTestResult):
     14        (WTR::dumpResponseDescriptionSuitableForTestResult):
     15        (WTR::InjectedBundlePage::willPerformClientRedirectForFrame):
     16        (WTR::InjectedBundlePage::didInitiateLoadForResource):
     17        (WTR::InjectedBundlePage::willSendRequestForFrame):
     18        (WTR::InjectedBundlePage::didReceiveResponseForResource):
     19        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
     20        (InjectedBundlePage):
     21
    1222013-05-21  Ryosuke Niwa  <rniwa@webkit.org>
    223
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp

    r150386 r150472  
    236236static const char divider = '/';
    237237
    238 static inline WTF::String pathSuitableForTestResult(WKURLRef fileUrl, WKURLRef mainFrameURL)
     238static inline WTF::String pathSuitableForTestResult(WKURLRef fileUrl)
    239239{
    240240    if (!fileUrl)
     
    246246
    247247    String pathString = toWTFString(adoptWK(WKURLCopyPath(fileUrl)));
    248     String mainFrameURLPathString = toWTFString(adoptWK(WKURLCopyPath(mainFrameURL)));
    249     String basePath = mainFrameURLPathString.substring(0, mainFrameURLPathString.reverseFind(divider)+1);
    250    
    251     if (pathString.startsWith(basePath))
    252         return pathString.substring(basePath.length());
    253     return toWTFString(adoptWK(WKURLCopyString(fileUrl)));
     248    StringBuilder stringBuilder;
     249
     250    // Remove the leading path from file urls.
     251    const size_t indexBaseName = pathString.reverseFind(divider);
     252    if (indexBaseName != notFound) {
     253        const size_t indexDirName = pathString.reverseFind(divider, indexBaseName - 1);
     254        if (indexDirName != notFound)
     255            stringBuilder.append(pathString.substring(indexDirName + 1, indexBaseName - indexDirName - 1));
     256        stringBuilder.append(divider);
     257        stringBuilder.append(pathString.substring(indexBaseName + 1)); // Filename.
     258    } else {
     259        stringBuilder.append(divider);
     260        stringBuilder.append(pathString); // Return "/pathString".
     261    }
     262
     263    return stringBuilder.toString();
    254264}
    255265
     
    484494}
    485495
    486 static inline void dumpRequestDescriptionSuitableForTestResult(WKURLRequestRef request, StringBuilder& stringBuilder, WKURLRef mainFrameURL)
     496static inline void dumpRequestDescriptionSuitableForTestResult(WKURLRequestRef request, StringBuilder& stringBuilder)
    487497{
    488498    WKRetainPtr<WKURLRef> url = adoptWK(WKURLRequestCopyURL(request));
     
    491501
    492502    stringBuilder.appendLiteral("<NSURLRequest URL ");
    493     stringBuilder.append(pathSuitableForTestResult(url.get(), mainFrameURL));
     503    stringBuilder.append(pathSuitableForTestResult(url.get()));
    494504    stringBuilder.appendLiteral(", main document URL ");
    495505    stringBuilder.append(urlSuitableForTestResult(firstParty.get()));
     
    504514}
    505515
    506 static inline void dumpResponseDescriptionSuitableForTestResult(WKURLResponseRef response, StringBuilder& stringBuilder, WKURLRef mainFrameURL)
     516static inline void dumpResponseDescriptionSuitableForTestResult(WKURLResponseRef response, StringBuilder& stringBuilder)
    507517{
    508518    WKRetainPtr<WKURLRef> url = adoptWK(WKURLResponseCopyURL(response));
     
    512522    }
    513523    stringBuilder.appendLiteral("<NSURLResponse ");
    514     stringBuilder.append(pathSuitableForTestResult(url.get(), mainFrameURL));
     524    stringBuilder.append(pathSuitableForTestResult(url.get()));
    515525    stringBuilder.appendLiteral(", http status code ");
    516526    stringBuilder.appendNumber(WKURLResponseHTTPStatusCode(response));
     
    605615void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKURLRef url, double delay, double date, const void* clientInfo)
    606616{
    607     static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willPerformClientRedirectForFrame(page, frame, url, delay, date);
     617    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willPerformClientRedirectForFrame(frame, url, delay, date);
    608618}
    609619
     
    9901000}
    9911001
    992 void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKURLRef url, double delay, double date)
     1002void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundleFrameRef frame, WKURLRef url, double delay, double date)
    9931003{
    9941004    if (!InjectedBundle::shared().isTestRunning())
     
    9991009
    10001010    StringBuilder stringBuilder;
    1001     WKRetainPtr<WKURLRef> mainFrameURL = adoptWK(WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page)));
    10021011    dumpFrameDescriptionSuitableForTestResult(frame, stringBuilder);
    10031012    stringBuilder.appendLiteral(" - willPerformClientRedirectToURL: ");
    1004     stringBuilder.append(pathSuitableForTestResult(url, mainFrameURL.get()));
     1013    stringBuilder.append(pathSuitableForTestResult(url));
    10051014    stringBuilder.appendLiteral(" \n");
    10061015    InjectedBundle::shared().outputText(stringBuilder.toString());
     
    10571066}
    10581067
    1059 void InjectedBundlePage::didInitiateLoadForResource(WKBundlePageRef page, WKBundleFrameRef, uint64_t identifier, WKURLRequestRef request, bool)
     1068void InjectedBundlePage::didInitiateLoadForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, WKURLRequestRef request, bool)
    10601069{
    10611070    if (!InjectedBundle::shared().isTestRunning())
     
    10661075
    10671076    WKRetainPtr<WKURLRef> url = adoptWK(WKURLRequestCopyURL(request));
    1068     WKRetainPtr<WKURLRef> mainFrameURL = adoptWK(WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page)));
    1069     assignedUrlsCache.add(identifier, pathSuitableForTestResult(url.get(), mainFrameURL.get()));
     1077    assignedUrlsCache.add(identifier, pathSuitableForTestResult(url.get()));
    10701078}
    10711079
     
    10821090}
    10831091
    1084 WKURLRequestRef InjectedBundlePage::willSendRequestForFrame(WKBundlePageRef page, WKBundleFrameRef frame, uint64_t identifier, WKURLRequestRef request, WKURLResponseRef response)
     1092WKURLRequestRef InjectedBundlePage::willSendRequestForFrame(WKBundlePageRef, WKBundleFrameRef frame, uint64_t identifier, WKURLRequestRef request, WKURLResponseRef response)
    10851093{
    10861094    if (InjectedBundle::shared().isTestRunning()
     
    10891097        dumpResourceURL(identifier, stringBuilder);
    10901098        stringBuilder.appendLiteral(" - willSendRequest ");
    1091         WKRetainPtr<WKURLRef> mainFrameURL = adoptWK(WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page)));
    1092         dumpRequestDescriptionSuitableForTestResult(request, stringBuilder, mainFrameURL.get());
     1099        dumpRequestDescriptionSuitableForTestResult(request, stringBuilder);
    10931100        stringBuilder.appendLiteral(" redirectResponse ");
    1094         dumpResponseDescriptionSuitableForTestResult(response, stringBuilder, mainFrameURL.get());
     1101        dumpResponseDescriptionSuitableForTestResult(response, stringBuilder);
    10951102        stringBuilder.append('\n');
    10961103        InjectedBundle::shared().outputText(stringBuilder.toString());
     
    11391146}
    11401147
    1141 void InjectedBundlePage::didReceiveResponseForResource(WKBundlePageRef page, WKBundleFrameRef, uint64_t identifier, WKURLResponseRef response)
     1148void InjectedBundlePage::didReceiveResponseForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, WKURLResponseRef response)
    11421149{
    11431150    if (!InjectedBundle::shared().isTestRunning())
     
    11481155        dumpResourceURL(identifier, stringBuilder);
    11491156        stringBuilder.appendLiteral(" - didReceiveResponse ");
    1150         WKRetainPtr<WKURLRef> mainFrameURL = adoptWK(WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page)));
    1151         dumpResponseDescriptionSuitableForTestResult(response, stringBuilder, mainFrameURL.get());
     1157        dumpResponseDescriptionSuitableForTestResult(response, stringBuilder);
    11521158        stringBuilder.append('\n');
    11531159        InjectedBundle::shared().outputText(stringBuilder.toString());
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h

    r150386 r150472  
    8787    void didClearWindowForFrame(WKBundleFrameRef, WKBundleScriptWorldRef);
    8888    void didCancelClientRedirectForFrame(WKBundleFrameRef);
    89     void willPerformClientRedirectForFrame(WKBundlePageRef, WKBundleFrameRef, WKURLRef, double delay, double date);
     89    void willPerformClientRedirectForFrame(WKBundleFrameRef, WKURLRef url, double delay, double date);
    9090    void didSameDocumentNavigationForFrame(WKBundleFrameRef, WKSameDocumentNavigationType);
    9191    void didFinishDocumentLoadForFrame(WKBundleFrameRef);
Note: See TracChangeset for help on using the changeset viewer.