mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10:00
Top-level navigations to data:-URL will soon only be supported when triggered with the system principal, not via window.open(). This replaces window.open() in test_ext_tabs_captureTab.html with AppTestDelegate.openNewForegroundTab, and updates that method to use the system principal like desktop (otherwise it would also fail for the same reason that window.open would fail). This fix uncovered a pre-existing issue in TestRunnerActivity: when AppTestDelegate.openNewForegroundTab (or browser.tabs.create) creates a new session, it does not have a surface, which causes anything that depends on one to fail, including the `tabs.captureVisibleTab` method in this test (https://bugzilla.mozilla.org/show_bug.cgi?id=2040023#c1). That test-only issue was fixed by adding a surface as needed. Differential Revision: https://phabricator.services.mozilla.com/D300889