Changeset 150386 in webkit
- Timestamp:
- May 20, 2013, 4:28:07 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r150385 r150386 1 2013-05-20 Alex Christensen <achristensen@apple.com> 2 3 WTR::pathSuitableForTestResult should behave the same as _drt_descriptionSuitableForTestResult so we can unskip tests. 4 https://bugs.webkit.org/show_bug.cgi?id=116125 5 6 Reviewed by Tim Horton. 7 8 * platform/wk2/TestExpectations: 9 Unskipped working tests. 10 1 11 2013-05-20 Ryosuke Niwa <rniwa@webkit.org> 2 12 -
trunk/LayoutTests/platform/wk2/TestExpectations
r150058 r150386 465 465 # Unexpected redirection happens. 466 466 http/tests/loading/redirect-methods.html 467 468 # Should pass now but need to be checked first.469 platform/mac/fast/loader/file-url-mimetypes-2.html470 platform/mac/fast/loader/file-url-mimetypes-3.html471 platform/mac/fast/loader/file-url-mimetypes.html472 webarchive/loading/cache-expired-subresource.html473 webarchive/loading/test-loading-archive.html474 webarchive/loading/test-loading-archive-subresource-null-mimetype.html475 467 476 468 # Should pass now on ports other than EFL and GTK. -
trunk/Tools/ChangeLog
r150380 r150386 1 2013-05-20 Alex Christensen <achristensen@apple.com> 2 3 WTR::pathSuitableForTestResult should behave the same as _drt_descriptionSuitableForTestResult so we can unskip tests. 4 https://bugs.webkit.org/show_bug.cgi?id=116125 5 6 Reviewed by Tim Horton. 7 8 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: 9 (WTR::pathSuitableForTestResult): 10 Changed string operations to match _drt_descriptionSuitableForTestResult. 11 (WTR::dumpRequestDescriptionSuitableForTestResult): 12 (WTR::dumpResponseDescriptionSuitableForTestResult): 13 (WTR::InjectedBundlePage::willPerformClientRedirectForFrame): 14 (WTR::InjectedBundlePage::didInitiateLoadForResource): 15 (WTR::InjectedBundlePage::willSendRequestForFrame): 16 (WTR::InjectedBundlePage::didReceiveResponseForResource): 17 Pass the main frame's URL to pathSuitableForTestResult. 18 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: 19 Added WKBundlePageRef to willPerformClientRedirectForFrame. 20 1 21 2013-05-20 Dirk Pranke <dpranke@chromium.org> 2 22 -
trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
r150242 r150386 236 236 static const char divider = '/'; 237 237 238 static inline WTF::String pathSuitableForTestResult(WKURLRef fileUrl )238 static inline WTF::String pathSuitableForTestResult(WKURLRef fileUrl, WKURLRef mainFrameURL) 239 239 { 240 240 if (!fileUrl) … … 246 246 247 247 String pathString = toWTFString(adoptWK(WKURLCopyPath(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(); 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))); 264 254 } 265 255 … … 494 484 } 495 485 496 static inline void dumpRequestDescriptionSuitableForTestResult(WKURLRequestRef request, StringBuilder& stringBuilder )486 static inline void dumpRequestDescriptionSuitableForTestResult(WKURLRequestRef request, StringBuilder& stringBuilder, WKURLRef mainFrameURL) 497 487 { 498 488 WKRetainPtr<WKURLRef> url = adoptWK(WKURLRequestCopyURL(request)); … … 501 491 502 492 stringBuilder.appendLiteral("<NSURLRequest URL "); 503 stringBuilder.append(pathSuitableForTestResult(url.get() ));493 stringBuilder.append(pathSuitableForTestResult(url.get(), mainFrameURL)); 504 494 stringBuilder.appendLiteral(", main document URL "); 505 495 stringBuilder.append(urlSuitableForTestResult(firstParty.get())); … … 514 504 } 515 505 516 static inline void dumpResponseDescriptionSuitableForTestResult(WKURLResponseRef response, StringBuilder& stringBuilder )506 static inline void dumpResponseDescriptionSuitableForTestResult(WKURLResponseRef response, StringBuilder& stringBuilder, WKURLRef mainFrameURL) 517 507 { 518 508 WKRetainPtr<WKURLRef> url = adoptWK(WKURLResponseCopyURL(response)); … … 522 512 } 523 513 stringBuilder.appendLiteral("<NSURLResponse "); 524 stringBuilder.append(pathSuitableForTestResult(url.get() ));514 stringBuilder.append(pathSuitableForTestResult(url.get(), mainFrameURL)); 525 515 stringBuilder.appendLiteral(", http status code "); 526 516 stringBuilder.appendNumber(WKURLResponseHTTPStatusCode(response)); … … 615 605 void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKURLRef url, double delay, double date, const void* clientInfo) 616 606 { 617 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willPerformClientRedirectForFrame( frame, url, delay, date);607 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willPerformClientRedirectForFrame(page, frame, url, delay, date); 618 608 } 619 609 … … 1000 990 } 1001 991 1002 void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundle FrameRef frame, WKURLRef url, double delay, double date)992 void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKURLRef url, double delay, double date) 1003 993 { 1004 994 if (!InjectedBundle::shared().isTestRunning()) … … 1009 999 1010 1000 StringBuilder stringBuilder; 1001 WKRetainPtr<WKURLRef> mainFrameURL = adoptWK(WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page))); 1011 1002 dumpFrameDescriptionSuitableForTestResult(frame, stringBuilder); 1012 1003 stringBuilder.appendLiteral(" - willPerformClientRedirectToURL: "); 1013 stringBuilder.append(pathSuitableForTestResult(url ));1004 stringBuilder.append(pathSuitableForTestResult(url, mainFrameURL.get())); 1014 1005 stringBuilder.appendLiteral(" \n"); 1015 1006 InjectedBundle::shared().outputText(stringBuilder.toString()); … … 1066 1057 } 1067 1058 1068 void InjectedBundlePage::didInitiateLoadForResource(WKBundlePageRef , WKBundleFrameRef, uint64_t identifier, WKURLRequestRef request, bool)1059 void InjectedBundlePage::didInitiateLoadForResource(WKBundlePageRef page, WKBundleFrameRef, uint64_t identifier, WKURLRequestRef request, bool) 1069 1060 { 1070 1061 if (!InjectedBundle::shared().isTestRunning()) … … 1075 1066 1076 1067 WKRetainPtr<WKURLRef> url = adoptWK(WKURLRequestCopyURL(request)); 1077 assignedUrlsCache.add(identifier, pathSuitableForTestResult(url.get())); 1068 WKRetainPtr<WKURLRef> mainFrameURL = adoptWK(WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page))); 1069 assignedUrlsCache.add(identifier, pathSuitableForTestResult(url.get(), mainFrameURL.get())); 1078 1070 } 1079 1071 … … 1090 1082 } 1091 1083 1092 WKURLRequestRef InjectedBundlePage::willSendRequestForFrame(WKBundlePageRef , WKBundleFrameRef frame, uint64_t identifier, WKURLRequestRef request, WKURLResponseRef response)1084 WKURLRequestRef InjectedBundlePage::willSendRequestForFrame(WKBundlePageRef page, WKBundleFrameRef frame, uint64_t identifier, WKURLRequestRef request, WKURLResponseRef response) 1093 1085 { 1094 1086 if (InjectedBundle::shared().isTestRunning() … … 1097 1089 dumpResourceURL(identifier, stringBuilder); 1098 1090 stringBuilder.appendLiteral(" - willSendRequest "); 1099 dumpRequestDescriptionSuitableForTestResult(request, stringBuilder); 1091 WKRetainPtr<WKURLRef> mainFrameURL = adoptWK(WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page))); 1092 dumpRequestDescriptionSuitableForTestResult(request, stringBuilder, mainFrameURL.get()); 1100 1093 stringBuilder.appendLiteral(" redirectResponse "); 1101 dumpResponseDescriptionSuitableForTestResult(response, stringBuilder );1094 dumpResponseDescriptionSuitableForTestResult(response, stringBuilder, mainFrameURL.get()); 1102 1095 stringBuilder.append('\n'); 1103 1096 InjectedBundle::shared().outputText(stringBuilder.toString()); … … 1146 1139 } 1147 1140 1148 void InjectedBundlePage::didReceiveResponseForResource(WKBundlePageRef , WKBundleFrameRef, uint64_t identifier, WKURLResponseRef response)1141 void InjectedBundlePage::didReceiveResponseForResource(WKBundlePageRef page, WKBundleFrameRef, uint64_t identifier, WKURLResponseRef response) 1149 1142 { 1150 1143 if (!InjectedBundle::shared().isTestRunning()) … … 1155 1148 dumpResourceURL(identifier, stringBuilder); 1156 1149 stringBuilder.appendLiteral(" - didReceiveResponse "); 1157 dumpResponseDescriptionSuitableForTestResult(response, stringBuilder); 1150 WKRetainPtr<WKURLRef> mainFrameURL = adoptWK(WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page))); 1151 dumpResponseDescriptionSuitableForTestResult(response, stringBuilder, mainFrameURL.get()); 1158 1152 stringBuilder.append('\n'); 1159 1153 InjectedBundle::shared().outputText(stringBuilder.toString()); -
trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
r149692 r150386 87 87 void didClearWindowForFrame(WKBundleFrameRef, WKBundleScriptWorldRef); 88 88 void didCancelClientRedirectForFrame(WKBundleFrameRef); 89 void willPerformClientRedirectForFrame(WKBundle FrameRef, WKURLRef url, double delay, double date);89 void willPerformClientRedirectForFrame(WKBundlePageRef, WKBundleFrameRef, WKURLRef, double delay, double date); 90 90 void didSameDocumentNavigationForFrame(WKBundleFrameRef, WKSameDocumentNavigationType); 91 91 void didFinishDocumentLoadForFrame(WKBundleFrameRef);
Note:
See TracChangeset
for help on using the changeset viewer.