Since bug 1353814 we have used PuppetWidget on non-headless mode and it's been working. There's no reason we don't on headless mode. Rather not using PuppetWidget causes unexpected results such as bug 1782541 or bug 1776966. The browser test in this commit is replicating what a background page in an extension behaves. Differential Revision: https://phabricator.services.mozilla.com/D302174