After the bundle identifier is cleared in a testing override call, subsequent calls to applicationBundleIdentifier() should check the NSBundle mainBundle object. This only happens if the testing bundle identifier is null (currently it is set to the empty string between calls).
<rdar://problem/62651110>
Created attachment 398091 [details] Patch
An empty bundle identifier is causing flaky tests. I was able to reproduce before using: run-webkit-tests LayoutTests/http/tests/in-app-browser-privacy/ LayoutTests/userscripts/mixed-case-stylesheet.html LayoutTests/userscripts/simple-stylesheet.html LayoutTests/userscripts/user-style* -f --iphone-simulator --no-build --no-retry-failures --debug-rwt-logging --exit-after-n-failures 1 --force But not able to reproduce with this patch.
Comment on attachment 398091 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=398091&action=review r=me. Please address the comment. > Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm:72 > + applicationBundleIdentifierOverride() = String(); The bug title indicates that this should be nullptr. Either the title or this assignment should be changed.
(In reply to John Wilander from comment #4) > Comment on attachment 398091 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=398091&action=review > > r=me. Please address the comment. > > > Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm:72 > > + applicationBundleIdentifierOverride() = String(); > > The bug title indicates that this should be nullptr. Either the title or > this assignment should be changed. You're right. It should be "null string" not just null.
Created attachment 398093 [details] Patch for landing
Committed r260969: <https://trac.webkit.org/changeset/260969> All reviewed patches have been landed. Closing bug and clearing flags on attachment 398093 [details].