[Win][WebKitTestRunner] Can't get test header options in webkit-test-runner magic comments Some test cases are failing due to failing to get test options. For example, legacy-animation-engine/animations/generic-from-to.html It has the following magic comment: > <!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=false ] -->
Created attachment 360564 [details] Patch
From https://blogs.msdn.microsoft.com/ie/2006/12/06/file-uris-in-windows/ > For the local Windows file path > C:\Documents and Settings\davris\FileSchemeURIs.doc > > The corresponding valid file URI in Windows is: > file:///C:/Documents%20and%20Settings/davris/FileSchemeURIs.doc So three forward slashes seem fine its just we're not handling it correctly. Isn't there anything that converts a File URI into a path rather than having special parsing here?
Comment on attachment 360564 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=360564&action=review > Tools/WebKitTestRunner/TestController.cpp:1095 > + // Remove the first '/' if it starts with like "/C:/". starts with something like
Comment on attachment 360564 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=360564&action=review > Tools/ChangeLog:3 > + [Win][WebKitTestRunner] Can't get test header options in webkit-test-runner magic comments I think this needs a better title. Something like "Fix WebKitTestRunner's testPath with Windows full paths"
(In reply to Don Olmstead from comment #2) > From https://blogs.msdn.microsoft.com/ie/2006/12/06/file-uris-in-windows/ > > > For the local Windows file path > > C:\Documents and Settings\davris\FileSchemeURIs.doc > > > > The corresponding valid file URI in Windows is: > > file:///C:/Documents%20and%20Settings/davris/FileSchemeURIs.doc > > So three forward slashes seem fine its just we're not handling it correctly. > > Isn't there anything that converts a File URI into a path rather than having > special parsing here? Certainly not in the URL class. This is how URLs behave: <script> alert(new URL("file:///C:/Documents%20and%20Settings/davris/FileSchemeURIs.doc").pathname); </script> It's strange, but all browsers agree and it's in the specification.
(In reply to Don Olmstead from comment #2) > From https://blogs.msdn.microsoft.com/ie/2006/12/06/file-uris-in-windows/ Interesting. Should I use PathCreateFromUrl and UrlCreateFromPath API?
Created attachment 360712 [details] Patch
Committed r240775: <https://trac.webkit.org/changeset/240775>
<rdar://problem/47697394>