NEW280873
Allow using shared test expectations for site-isolation and normal tests
https://bugs.webkit.org/show_bug.cgi?id=280873
Summary Allow using shared test expectations for site-isolation and normal tests
Matt Woodrow
Reported 2024-10-03 23:07:19 PDT
Site isolation is going to need a lot of similar tests as to what already exists, except with frames switched to be cross origin. It would be nice to be able to create a duplicate copy of a test, change the iframe URL, and share the existing expectations file. This both reduces complexity in terms of expectation files, but also confirms that using site-isolation doesn't change behaviour.
Attachments
WIP (1.36 KB, patch)
2024-10-07 13:58 PDT, Matt Woodrow
no flags
Radar WebKit Bug Importer
Comment 1 2024-10-03 23:31:11 PDT
Matt Woodrow
Comment 2 2024-10-07 13:58:50 PDT
Created attachment 472845 [details] WIP This sort of works, but hits an assertion sometimes. Would definitely need unit tests, and documentation too.
Jonathan Bedard
Comment 3 2024-10-07 16:10:16 PDT
I'm a little skeptical that this sort of technical debt will be cheaper than just duplicating the test files. How many tests are we talking about?
Matt Woodrow
Comment 4 2024-10-07 16:53:28 PDT
That might depend on the outcome of this bug :) Thus far, I've been looking for existing tests with <iframes> and checking to see if they still pass when the iframe is made cross-origin/process. If that finds bugs, fix them, and then I'm just duplicating a single test that proves it. The two fixes I've done so far would also fix a bunch of other tests converted in the same way, but I'm only porting one. I think a truly ideal outcome would be a way to easily specify a set of existing tests that should just be run a second time with forced-cross-origin iframes. That might be fairly complicated though. In the short term, I thought duplicating the test (and manually editing the <iframe> href to access `localhost`), with shared expectations would be a good step forward. Sharing the expectations isn't just to reduce the number of files, but more to prove that both configurations result in the same output. Duplicating the files will make it more likely that they'll diverge in the future, and somewhat defeat the purpose of the test.
Note You need to log in before you can comment on or make changes to this bug.