ServiceWorker tests should use TCPServer instead of WKURLSchemeHandler
Created attachment 381273 [details] Patch
Comment on attachment 381273 [details] Patch This isn't done yet, but the end patch will be more of the same. Feel free to give feedback.
Created attachment 381367 [details] Patch
Created attachment 381368 [details] Patch
Comment on attachment 381368 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=381368&action=review > Source/WebCore/ChangeLog:10 > + which is preventing us from moving logic to the NetworkProcess. See bug 203055. I did a quick hack for this one to work. But it is simpler if we do not support interception for custom schemes. I'll remove it in a follow-up. > Source/WebCore/workers/service/server/SWServer.cpp:988 > + return false; Might early return with false in equalLettersIgnoringASCIICase(scheme.substring(0, 4), "http"). > Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:1422 > + [webView loadRequest:server.request()]; How do we get that request URL is regularPageGrabbingCacheStorageDirectory.html and not main.html which would go to mainBytes? > Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:1990 > + ServiceWorkerTCPServer server2({ How do we get host vs. host2 with server1 and server2? > Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerTCPServer.h:36 > + ServiceWorkerTCPServer(Vector<ResourceInfo>&& vector) explicit. > Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerTCPServer.h:69 > + size_t userAgentsChecked() { return m_userAgentsChecked; } const
Comment on attachment 381368 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=381368&action=review >> Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:1422 >> + [webView loadRequest:server.request()]; > > How do we get that request URL is regularPageGrabbingCacheStorageDirectory.html and not main.html which would go to mainBytes? The server is set to respond to the second main resource request with the contents of regularPageGrabbingCacheStorageDirectory regardless of the request. So the server does see two requests to /main.html but this test behaves as it did.
Created attachment 381424 [details] Patch
Comment on attachment 381368 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=381368&action=review >> Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:1990 >> + ServiceWorkerTCPServer server2({ > > How do we get host vs. host2 with server1 and server2? The two servers had different ports, but I changed one to use localhost to be more explicit.
EWS is green. r?
http://trac.webkit.org/r251384 (In reply to youenn fablet from comment #5) > I did a quick hack for this one to work. Where is this hack?
<rdar://problem/56476957>
(In reply to Alex Christensen from comment #10) > Where is this hack? I found it. Bug 202309, r251124