Changeset 153852 in webkit
- Timestamp:
- Aug 8, 2013 3:38:04 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r153851 r153852 1 2013-08-08 Alexey Proskuryakov <ap@apple.com> 2 3 [WK2] loader/go-back-cached-main-resource.html fails 4 https://bugs.webkit.org/show_bug.cgi?id=116491 5 6 Reviewed by Tim Horton. 7 8 * platform/wk2/TestExpectations: 9 * webarchive/loading/test-loading-archive-subresource-null-mimetype-expected.txt: 10 Updated to not have file:// in results. This may not be desirable for a webarchive 11 test, but shouldn't be too bad either. 12 * platform/mac-wk2/loader/go-back-cached-main-resource-expected.txt: Deleted. 13 Cross-platform results now work. 14 1 15 2013-08-08 Jer Noble <jer.noble@apple.com> 2 16 -
trunk/LayoutTests/platform/wk2/TestExpectations
r153830 r153852 271 271 272 272 webkit.org/b/105952 fast/loader/submit-form-while-parsing-2.html [ Pass Failure ] 273 274 webkit.org/b/116491 loader/go-back-cached-main-resource.html [ Failure ]275 273 276 274 ### END OF (1) Classified failures with bug reports -
trunk/LayoutTests/webarchive/loading/test-loading-archive-subresource-null-mimetype-expected.txt
r100311 r153852 7 7 resources/subresource-null-mimetype.webarchive - didReceiveResponse <NSURLResponse resources/subresource-null-mimetype.webarchive, http status code 0> 8 8 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame 9 file:///test.png - willSendRequest <NSURLRequest URL file:///test.png, main document URL test-loading-archive-subresource-null-mimetype.html, http method GET> redirectResponse (null)9 test.png - willSendRequest <NSURLRequest URL test.png, main document URL test-loading-archive-subresource-null-mimetype.html, http method GET> redirectResponse (null) 10 10 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame 11 11 resources/subresource-null-mimetype.webarchive - didFinishLoading 12 file:///test.png - didReceiveResponse <NSURLResponse file:///Users/pecoraro/Desktop/test.png, http status code 0>13 file:///test.png - didFinishLoading12 test.png - didReceiveResponse <NSURLResponse test.png, http status code 0> 13 test.png - didFinishLoading 14 14 frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame 15 15 main frame - didHandleOnloadEventsForFrame -
trunk/Tools/ChangeLog
r153830 r153852 1 2013-08-08 Alexey Proskuryakov <ap@apple.com> 2 3 [WK2] loader/go-back-cached-main-resource.html fails 4 https://bugs.webkit.org/show_bug.cgi?id=116491 5 6 Reviewed by Tim Horton. 7 8 * DumpRenderTree/efl/DumpRenderTreeChrome.cpp: 9 * DumpRenderTree/gtk/DumpRenderTree.cpp: 10 * DumpRenderTree/qt/DumpRenderTreeQt.cpp: 11 * DumpRenderTree/win/DumpRenderTree.cpp: 12 Added FIXMEs about making path printing normalization more compatible. 13 14 * DumpRenderTree/mac/ResourceLoadDelegate.mm: (-[NSURL _drt_descriptionSuitableForTestResult]): 15 Return last path component in cases where we used to return a full path, which is 16 never desirable. Added a null check to basePath to prevent potentially getting 17 an Objective C exception. 18 19 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: 20 (WTR::pathSuitableForTestResult): Changed to use path for main test window, not 21 for a currently loading one (which is different for tests that use multiple windows). 22 Changed to return "(null)" for empty URLs to match WK1 output. Changed to return 23 last path component as last fallback. 24 (WTR::dumpRequestDescriptionSuitableForTestResult): We no longer need to pass main 25 frame URL here, and it was potentially a wrong frame. 26 (WTR::dumpResponseDescriptionSuitableForTestResult): Ditto. 27 (WTR::InjectedBundlePage::willPerformClientRedirectForFrame): Ditto. 28 (WTR::InjectedBundlePage::didInitiateLoadForResource): Ditto. 29 (WTR::InjectedBundlePage::willSendRequestForFrame): Ditto. 30 (WTR::InjectedBundlePage::didReceiveResponseForResource): Ditto. 31 1 32 2013-08-08 Alex Christensen <achristensen@apple.com> 2 33 -
trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp
r151832 r153852 337 337 } 338 338 339 // FIXME (119585): Make this match other platforms better. 339 340 static CString pathSuitableForTestResult(const char* uriString) 340 341 { -
trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
r152897 r153852 1141 1141 } 1142 1142 1143 1143 // FIXME (119584): Make this match other platforms better. 1144 1144 static CString pathFromSoupURI(SoupURI* uri) 1145 1145 { -
trunk/Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm
r125516 r153852 85 85 basePath = [basePath stringByAppendingString:@"/"]; 86 86 87 if ( [[self path] hasPrefix:basePath])87 if (basePath && [[self path] hasPrefix:basePath]) 88 88 return [[self path] substringFromIndex:[basePath length]]; 89 return [self absoluteString];89 return [self lastPathComponent]; // We lose some information here, but it's better than exposing a full path, which is always machine specific. 90 90 } 91 91 -
trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
r149087 r153852 276 276 } 277 277 278 // FIXME (119591): Make this match other platforms better. 278 279 static QString urlSuitableForTestResult(const QString& url) 279 280 { -
trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp
r152205 r153852 142 142 } 143 143 144 // FIXME (119583): Make this match other platforms better. 144 145 wstring urlSuitableForTestResult(const wstring& urlString) 145 146 { -
trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
r153830 r153852 236 236 static const char divider = '/'; 237 237 238 static inline WTF::String pathSuitableForTestResult(WKURLRef fileUrl , WKURLRef mainFrameURL)238 static inline WTF::String pathSuitableForTestResult(WKURLRef fileUrl) 239 239 { 240 240 if (!fileUrl) 241 return String();241 return "(null)"; 242 242 243 243 WKRetainPtr<WKStringRef> schemeString = adoptWK(WKURLCopyScheme(fileUrl)); … … 245 245 return toWTFString(adoptWK(WKURLCopyString(fileUrl))); 246 246 247 WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page()); 248 WKRetainPtr<WKURLRef> mainFrameURL = adoptWK(WKBundleFrameCopyURL(mainFrame)); 249 if (!mainFrameURL) 250 mainFrameURL = adoptWK(WKBundleFrameCopyProvisionalURL(mainFrame)); 251 247 252 String pathString = toWTFString(adoptWK(WKURLCopyPath(fileUrl))); 248 String mainFrameURLPathString = toWTFString(adoptWK(WKURLCopyPath(mainFrameURL )));253 String mainFrameURLPathString = toWTFString(adoptWK(WKURLCopyPath(mainFrameURL.get()))); 249 254 String basePath = mainFrameURLPathString.substring(0, mainFrameURLPathString.reverseFind(divider) + 1); 250 255 251 if ( pathString.startsWith(basePath))256 if (!basePath.isEmpty() && pathString.startsWith(basePath)) 252 257 return pathString.substring(basePath.length()); 253 return toWTFString(adoptWK(WKURLCopy String(fileUrl)));258 return toWTFString(adoptWK(WKURLCopyLastPathComponent(fileUrl))); // We lose some information here, but it's better than exposing a full path, which is always machine specific. 254 259 } 255 260 … … 469 474 } 470 475 471 static inline void dumpRequestDescriptionSuitableForTestResult(WKURLRequestRef request, StringBuilder& stringBuilder , WKURLRef mainFrameURL)476 static inline void dumpRequestDescriptionSuitableForTestResult(WKURLRequestRef request, StringBuilder& stringBuilder) 472 477 { 473 478 WKRetainPtr<WKURLRef> url = adoptWK(WKURLRequestCopyURL(request)); … … 476 481 477 482 stringBuilder.appendLiteral("<NSURLRequest URL "); 478 stringBuilder.append(pathSuitableForTestResult(url.get() , mainFrameURL));483 stringBuilder.append(pathSuitableForTestResult(url.get())); 479 484 stringBuilder.appendLiteral(", main document URL "); 480 stringBuilder.append(pathSuitableForTestResult(firstParty.get() , mainFrameURL));485 stringBuilder.append(pathSuitableForTestResult(firstParty.get())); 481 486 stringBuilder.appendLiteral(", http method "); 482 487 … … 489 494 } 490 495 491 static inline void dumpResponseDescriptionSuitableForTestResult(WKURLResponseRef response, StringBuilder& stringBuilder , WKURLRef mainFrameURL)496 static inline void dumpResponseDescriptionSuitableForTestResult(WKURLResponseRef response, StringBuilder& stringBuilder) 492 497 { 493 498 WKRetainPtr<WKURLRef> url = adoptWK(WKURLResponseCopyURL(response)); … … 497 502 } 498 503 stringBuilder.appendLiteral("<NSURLResponse "); 499 stringBuilder.append(pathSuitableForTestResult(url.get() , mainFrameURL));504 stringBuilder.append(pathSuitableForTestResult(url.get())); 500 505 stringBuilder.appendLiteral(", http status code "); 501 506 stringBuilder.appendNumber(WKURLResponseHTTPStatusCode(response)); … … 975 980 } 976 981 977 void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKURLRef url, double delay, double date)982 void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundlePageRef, WKBundleFrameRef frame, WKURLRef url, double delay, double date) 978 983 { 979 984 if (!InjectedBundle::shared().isTestRunning()) … … 984 989 985 990 StringBuilder stringBuilder; 986 WKRetainPtr<WKURLRef> mainFrameURL = adoptWK(WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page)));987 991 dumpFrameDescriptionSuitableForTestResult(frame, stringBuilder); 988 992 stringBuilder.appendLiteral(" - willPerformClientRedirectToURL: "); 989 stringBuilder.append(pathSuitableForTestResult(url , mainFrameURL.get()));993 stringBuilder.append(pathSuitableForTestResult(url)); 990 994 stringBuilder.appendLiteral(" \n"); 991 995 InjectedBundle::shared().outputText(stringBuilder.toString()); … … 1051 1055 1052 1056 WKRetainPtr<WKURLRef> url = adoptWK(WKURLRequestCopyURL(request)); 1053 WKRetainPtr<WKURLRef> mainFrameURL = adoptWK(WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page))); 1054 assignedUrlsCache.add(identifier, pathSuitableForTestResult(url.get(), mainFrameURL.get())); 1057 assignedUrlsCache.add(identifier, pathSuitableForTestResult(url.get())); 1055 1058 } 1056 1059 … … 1074 1077 dumpResourceURL(identifier, stringBuilder); 1075 1078 stringBuilder.appendLiteral(" - willSendRequest "); 1076 WKRetainPtr<WKURLRef> mainFrameURL = adoptWK(WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page))); 1077 dumpRequestDescriptionSuitableForTestResult(request, stringBuilder, mainFrameURL.get()); 1079 dumpRequestDescriptionSuitableForTestResult(request, stringBuilder); 1078 1080 stringBuilder.appendLiteral(" redirectResponse "); 1079 dumpResponseDescriptionSuitableForTestResult(response, stringBuilder , mainFrameURL.get());1081 dumpResponseDescriptionSuitableForTestResult(response, stringBuilder); 1080 1082 stringBuilder.append('\n'); 1081 1083 InjectedBundle::shared().outputText(stringBuilder.toString()); … … 1133 1135 dumpResourceURL(identifier, stringBuilder); 1134 1136 stringBuilder.appendLiteral(" - didReceiveResponse "); 1135 WKRetainPtr<WKURLRef> mainFrameURL = adoptWK(WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page))); 1136 dumpResponseDescriptionSuitableForTestResult(response, stringBuilder, mainFrameURL.get()); 1137 dumpResponseDescriptionSuitableForTestResult(response, stringBuilder); 1137 1138 stringBuilder.append('\n'); 1138 1139 InjectedBundle::shared().outputText(stringBuilder.toString());
Note: See TracChangeset
for help on using the changeset viewer.