Add API test to validate setting of service worker and cache storage directories
Created attachment 333194 [details] Patch
<rdar://problem/37281698>
Attachment 333194 [details] did not pass style-queue: ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:842: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:851: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:853: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:862: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:947: Consider using EXPECT_EQ instead of EXPECT_TRUE(a == b) [readability/check] [2] Total errors found: 5 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 333194 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=333194&action=review > Source/WebCore/testing/Internals.idl:575 > + [Conditional=SERVICE_WORKER] Promise<DOMString> serviceWorkerRegistrationDirectory(); Since this is only used in an API test, I don't think we need this internals API and all this piping through to the SW process. The API test can just check that the path on disk got created. There are existing API tests doing this I believe, I'll point you to one.
Comment on attachment 333194 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=333194&action=review >> Source/WebCore/testing/Internals.idl:575 >> + [Conditional=SERVICE_WORKER] Promise<DOMString> serviceWorkerRegistrationDirectory(); > > Since this is only used in an API test, I don't think we need this internals API and all this piping through to the SW process. The API test can just check that the path on disk got created. > There are existing API tests doing this I believe, I'll point you to one. LocalStorageClear is an example of such API test, although it is for the opposite. Also ResourceLoadStatistics.GrandfatherCallback which is closer to what you want I think.
Created attachment 334778 [details] Patch
Attachment 334778 [details] did not pass style-queue: ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:1036: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:1045: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] Total errors found: 2 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 334786 [details] Patch
Attachment 334786 [details] did not pass style-queue: ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:983: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:992: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] Total errors found: 2 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 334786 [details] Patch Clearing flags on attachment: 334786 Committed r229150: <https://trac.webkit.org/changeset/229150>
All reviewed patches have been landed. Closing bug.