WKHTTPCookieStore observing only works on the default cookie store Whoops. <rdar://problem/33330724>
Created attachment 315660 [details] Patch
Comment on attachment 315660 [details] Patch Attachment 315660 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4135622 New failing tests: security/contentSecurityPolicy/video-with-data-url-allowed-by-media-src-star.html
Created attachment 315663 [details] Archive of layout-test-results from ews112 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-elcapitan Platform: Mac OS X 10.11.6
(In reply to Build Bot from comment #3) > Created attachment 315663 [details] > Archive of layout-test-results from ews112 for mac-elcapitan > > The attached test failures were seen while running run-webkit-tests on the > mac-debug-ews. > Bot: ews112 Port: mac-elcapitan Platform: Mac OS X 10.11.6 Not caused by this patch.
Comment on attachment 315660 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=315660&action=review r=me but please consider the changes proposed. > Source/WebCore/platform/network/NetworkStorageSession.h:153 > + > +#if PLATFORM(COCOA) > +public: > + CookieStorageObserver& cookieStorageObserver() const; > + > +private: > + mutable RefPtr<CookieStorageObserver> m_cookieStorageObserver; > +#endif It makes me sad how this ostensibly cross-platform file, NetworkStorageSession, has so much that is platform dependent. Something like CookieStorageObserver seems like it could be a cross-platform abstraction that everyone would want (see cookiesDidChange in the SOUP section above). Can we make it that way, and just stub things out for SOUP for now? > Source/WebCore/platform/network/cocoa/CookieStorageObserver.h:25 > + */ > +#pragma once Missing newline above pragma. > Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:203 > + NSURL *cookieStorageFile = [NSURL fileURLWithPath:[@"~/Library/WebKit/TestWebKitAPI/CustomWebsiteData/CookieStorage/Cookie.File" stringByExpandingTildeInPath] isDirectory:NO]; > + NSURL *idbPath = [NSURL fileURLWithPath:[@"~/Library/WebKit/TestWebKitAPI/CustomWebsiteData/IndexedDB/" stringByExpandingTildeInPath] isDirectory:YES]; Do we really need to use ~/Library/ for this stuff? Can we make it point to something in the temp directory (_CS_DARWIN_USER_TEMP_DIR and all that jazz)?
(In reply to Sam Weinig from comment #5) > Comment on attachment 315660 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=315660&action=review > > r=me but please consider the changes proposed. > > > Source/WebCore/platform/network/NetworkStorageSession.h:153 > > + > > +#if PLATFORM(COCOA) > > +public: > > + CookieStorageObserver& cookieStorageObserver() const; > > + > > +private: > > + mutable RefPtr<CookieStorageObserver> m_cookieStorageObserver; > > +#endif > > It makes me sad how this ostensibly cross-platform file, > NetworkStorageSession, has so much that is platform dependent. Something > like CookieStorageObserver seems like it could be a cross-platform > abstraction that everyone would want (see cookiesDidChange in the SOUP > section above). Can we make it that way, and just stub things out for SOUP > for now? I agree this class could be cross platform, but I'm not sure the value of splitting it up now with no commitment to adopt from another port. > > Source/WebCore/platform/network/cocoa/CookieStorageObserver.h:25 > > + */ > > +#pragma once > > Missing newline above pragma. Whoops! > > Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:203 > > + NSURL *cookieStorageFile = [NSURL fileURLWithPath:[@"~/Library/WebKit/TestWebKitAPI/CustomWebsiteData/CookieStorage/Cookie.File" stringByExpandingTildeInPath] isDirectory:NO]; > > + NSURL *idbPath = [NSURL fileURLWithPath:[@"~/Library/WebKit/TestWebKitAPI/CustomWebsiteData/IndexedDB/" stringByExpandingTildeInPath] isDirectory:YES]; > > Do we really need to use ~/Library/ for this stuff? Can we make it point to > something in the temp directory (_CS_DARWIN_USER_TEMP_DIR and all that jazz)? The default paths for the default WebsiteDataStore are already in ~/Library/WebKit/TestWebKitAPI
Created attachment 315683 [details] Patch
Comment on attachment 315683 [details] Patch Clearing flags on attachment: 315683 Committed r219567: <http://trac.webkit.org/changeset/219567>
All reviewed patches have been landed. Closing bug.
(In reply to Brady Eidson from comment #6) > (In reply to Sam Weinig from comment #5) > > Comment on attachment 315660 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=315660&action=review > > > > r=me but please consider the changes proposed. > > > > > Source/WebCore/platform/network/NetworkStorageSession.h:153 > > > + > > > +#if PLATFORM(COCOA) > > > +public: > > > + CookieStorageObserver& cookieStorageObserver() const; > > > + > > > +private: > > > + mutable RefPtr<CookieStorageObserver> m_cookieStorageObserver; > > > +#endif > > > > It makes me sad how this ostensibly cross-platform file, > > NetworkStorageSession, has so much that is platform dependent. Something > > like CookieStorageObserver seems like it could be a cross-platform > > abstraction that everyone would want (see cookiesDidChange in the SOUP > > section above). Can we make it that way, and just stub things out for SOUP > > for now? > > I agree this class could be cross platform, but I'm not sure the value of > splitting it up now with no commitment to adopt from another port. There is inherent value in providing proper abstractions. Our model has historically been to build the abstraction, add stubs, and others tend to follow.