Bug 213881

Summary: [GTK][WPE] Enable storageAccess tests
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aperez, bugs-noreply, mcatanzaro
Priority: P2 Keywords: Gtk
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=213502
Bug Depends on: 212017    
Bug Blocks:    
Attachments:
Description Flags
Patch aperez: review+

Description Carlos Garcia Campos 2020-07-02 07:17:57 PDT
They are currently skipped by the main TestExpectations file, but we should run them now that we support ITP.

The current status is:

68 tests ran as expected, 13 didn't:

Regressions: Unexpected text-only failures (13)
  http/tests/storageAccess/deny-due-to-no-interaction-under-general-third-party-cookie-blocking-ephemeral.html [ Failure ]
  http/tests/storageAccess/deny-storage-access-under-opener-ephemeral.html [ Failure ]
  http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-ephemeral.html [ Failure ]
  http/tests/storageAccess/deny-with-prompt-does-not-preserve-gesture-database.html [ Failure ]
  http/tests/storageAccess/deny-with-prompt-does-not-preserve-gesture.html [ Failure ]
  http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-ephemeral.html [ Failure ]
  http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-with-cookie-ephemeral.html [ Failure ]
  http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access-database.html [ Failure ]
  http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html [ Failure ]
  http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access-database.html [ Failure ]
  http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access.html [ Failure ]
  http/tests/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access-database.html [ Failure ]
  http/tests/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access.html [ Failure ]

Some of those failures are also skipped in mac-wk2, but we need to investigate the others.
Comment 1 Carlos Garcia Campos 2020-07-03 07:41:39 PDT
Most of the *-ephemeral.html tests that were failing are passing now after r263895.

http/tests/storageAccess/deny-with-prompt-does-not-preserve-gesture.html
http/tests/storageAccess/deny-with-prompt-does-not-preserve-gesture-database.html

These are skipped in mac, but without a bug number, so I don't know why.

http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies-ephemeral-database.html
http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies-ephemeral.html

These are bug #208400.

With those skipped and patch from bug #213502 applied the situation is:

252 tests ran as expected, 4 didn't:

Regressions: Unexpected text-only failures (4)
  http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access-database.html [ Failure ]
  http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access.html [ Failure ]
  http/tests/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access-database.html [ Failure ]
  http/tests/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access.html [ Failure ]

These are failing because tests are using OnlyAccordingToPerDomainPolicy as ThirdPartyCookieBlockingMode, so the cookie accept policy is kept as no-third-party. Cookies granted by storage access are still rejected by the cookie accept policy. This should only happen in tests, because we always use All as ThirdPartyCookieBlockingMode.
Comment 2 Carlos Garcia Campos 2020-07-06 01:54:36 PDT
Created attachment 403582 [details]
Patch
Comment 3 Carlos Garcia Campos 2020-07-06 02:48:06 PDT
Committed r263965: <https://trac.webkit.org/changeset/263965>