Title: [275531] trunk/Source/WebKit
Revision
275531
Author
[email protected]
Date
2021-04-06 10:28:13 -0700 (Tue, 06 Apr 2021)

Log Message

Revert part of crash fix to keep test infrastructure
https://bugs.webkit.org/show_bug.cgi?id=224196

These two tests change the bundle identifier to test what it's like to not be in a test:

http/tests/in-app-browser-privacy/app-bound-domain-gets-app-bound-session.html
http/tests/in-app-browser-privacy/non-app-bound-iframe-under-app-bound-domain-is-app-bound.html

This partial revert of r275486 allows the test to dynamically change whether it's in testing mode.

* Shared/Cocoa/DefaultWebBrowserChecks.mm:
(WebKit::doesParentProcessHaveITPEnabled):
(WebKit::isParentProcessAFullWebBrowser):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (275530 => 275531)


--- trunk/Source/WebKit/ChangeLog	2021-04-06 17:24:42 UTC (rev 275530)
+++ trunk/Source/WebKit/ChangeLog	2021-04-06 17:28:13 UTC (rev 275531)
@@ -1,3 +1,19 @@
+2021-04-06  Alex Christensen  <[email protected]>
+
+        Revert part of crash fix to keep test infrastructure
+        https://bugs.webkit.org/show_bug.cgi?id=224196
+
+        These two tests change the bundle identifier to test what it's like to not be in a test:
+
+        http/tests/in-app-browser-privacy/app-bound-domain-gets-app-bound-session.html
+        http/tests/in-app-browser-privacy/non-app-bound-iframe-under-app-bound-domain-is-app-bound.html
+
+        This partial revert of r275486 allows the test to dynamically change whether it's in testing mode.
+
+        * Shared/Cocoa/DefaultWebBrowserChecks.mm:
+        (WebKit::doesParentProcessHaveITPEnabled):
+        (WebKit::isParentProcessAFullWebBrowser):
+
 2021-04-06  Peng Liu  <[email protected]>
 
         [GPUP] Clean up two messages.in files

Modified: trunk/Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm (275530 => 275531)


--- trunk/Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm	2021-04-06 17:24:42 UTC (rev 275530)
+++ trunk/Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm	2021-04-06 17:28:13 UTC (rev 275531)
@@ -163,11 +163,12 @@
     ASSERT(isInWebKitChildProcess());
     ASSERT(RunLoop::isMain());
 
+    if (!isParentProcessAFullWebBrowser(auxiliaryProcess) && !hasRequestedCrossWebsiteTrackingPermission)
+        return true;
+
     static bool itpEnabled { true };
     static dispatch_once_t once;
     dispatch_once(&once, ^{
-        if (!isParentProcessAFullWebBrowser(auxiliaryProcess) && !hasRequestedCrossWebsiteTrackingPermission)
-            return;
 
         TCCAccessPreflightResult result = kTCCAccessPreflightDenied;
 #if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
@@ -234,11 +235,6 @@
     static bool fullWebBrowser { false };
     static dispatch_once_t once;
     dispatch_once(&once, ^{
-        if (isRunningTest(WebCore::applicationBundleIdentifier())) {
-            fullWebBrowser = true;
-            return;
-        }
-
         RefPtr<IPC::Connection> connection = auxiliaryProcess.parentProcessConnection();
         if (!connection) {
             ASSERT_NOT_REACHED();
@@ -256,7 +252,7 @@
         fullWebBrowser = WTF::hasEntitlement(*auditToken, "com.apple.developer.web-browser");
     });
 
-    return fullWebBrowser;
+    return fullWebBrowser || isRunningTest(WebCore::applicationBundleIdentifier());
 }
 
 static bool isFullWebBrowser(const String& bundleIdentifier)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to