Run npm test to execute the Playwright test suite.
Observe the results across different browsers (Chromium, WebKit, Firefox).
Expected behavior
The tests should behave consistently across all supported browsers (Chromium, WebKit, and Firefox), ensuring correct handling of Blob URLs in scenarios like:
Creating a Web Worker from a Blob URL.
Fetching content using fetch with a Blob URL.
Opening a new tab or window with window.open using a Blob URL.
Actual behavior
In WebKit (Safari), the following behavior is observed:
When page.route is used:
Tests fail with the following error in the WebKit console:
Failed to load resource: The operation couldn't be completed. (WebKitBlobResource error 1.)
This error occurs in tests involving:
Web Workers initialized with a Blob URL.
Fetching content using a revoked Blob URL.
Opening a new tab or window with window.open using a revoked Blob URL.
Without page.route:
The tests pass successfully. Blob URLs function as expected, and no resource errors are observed in the WebKit console.
This confirms the issue is specific to the combination of page.route and strict handling of Blob URL revocation in WebKit.
This issue is not observed in Chromium or Firefox. Both browsers handle Blob URL revocation more leniently, allowing the tests to pass regardless of page.route.
Version
1.49.0
Steps to reproduce
npm install
to install dependencies.npm test
to execute the Playwright test suite.Expected behavior
The tests should behave consistently across all supported browsers (Chromium, WebKit, and Firefox), ensuring correct handling of Blob URLs in scenarios like:
fetch
with a Blob URL.window.open
using a Blob URL.Actual behavior
In WebKit (Safari), the following behavior is observed:
When
page.route
is used:window.open
using a revoked Blob URL.Without
page.route
:page.route
and strict handling of Blob URL revocation in WebKit.Notes
page.route
.Environment