Bug 199923 - Add and test _WKWebsiteDataStoreConfiguration.deviceIdHashSaltsStorageDirectory SPI
Summary: Add and test _WKWebsiteDataStoreConfiguration.deviceIdHashSaltsStorageDirecto...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-18 16:25 PDT by Alex Christensen
Modified: 2019-07-18 16:47 PDT (History)
2 users (show)

See Also:


Attachments
Patch (7.45 KB, patch)
2019-07-18 16:27 PDT, Alex Christensen
youennf: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2019-07-18 16:25:37 PDT
Add and test _WKWebsiteDataStoreConfiguration.deviceIdHashSaltsStorageDirectory SPI
Comment 1 Alex Christensen 2019-07-18 16:27:05 PDT
Created attachment 374425 [details]
Patch
Comment 2 youenn fablet 2019-07-18 16:38:51 PDT
Comment on attachment 374425 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=374425&action=review

> Tools/TestWebKitAPI/Tests/WebKit/GetUserMediaNavigation.mm:106
> +    NSURL *tempDir = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:@"CustomPathsTest"] isDirectory:YES];

Maybe add EXPECT_FALSE([fileManager fileExistsAtPath:[tempDir URLByAppendingPathComponent:@"1"].path])

> Tools/TestWebKitAPI/Tests/WebKit/GetUserMediaNavigation.mm:120
> +    webView.UIDelegate = delegate.get();

Shouldn't we load a page like [webView loadTestPageNamed:@"enumerateMediaDevices"]?
Comment 3 Alex Christensen 2019-07-18 16:44:23 PDT
(In reply to youenn fablet from comment #2)
> Comment on attachment 374425 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=374425&action=review
> 
> > Tools/TestWebKitAPI/Tests/WebKit/GetUserMediaNavigation.mm:106
> > +    NSURL *tempDir = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:@"CustomPathsTest"] isDirectory:YES];
> 
> Maybe add EXPECT_FALSE([fileManager fileExistsAtPath:[tempDir
> URLByAppendingPathComponent:@"1"].path])
Will do.

> > Tools/TestWebKitAPI/Tests/WebKit/GetUserMediaNavigation.mm:120
> > +    webView.UIDelegate = delegate.get();
> 
> Shouldn't we load a page like [webView
> loadTestPageNamed:@"enumerateMediaDevices"]?
Strange.  I will, but it wasn't necessary to write the "1" directory.  We should probably fix that.
Comment 4 Alex Christensen 2019-07-18 16:46:50 PDT
Comment on attachment 374425 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=374425&action=review

> Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:113
> +        [NSException raise:NSInvalidArgumentException format:@"Cannot set networkCacheDirectory on a non-persistent _WKWebsiteDataStoreConfiguration."];

I also fixed this string to say deviceIdHashSaltsStorageDirectory.

http://trac.webkit.org/r247625