Bug 1455078: Make ServiceWorker test check interface availability with lowered privileges r=asuth

The test as it is currently written checks whether navigator.serviceWorker
exists with system privileges. By using eval(), this commit makes it
perform the check with the content's privileges.

Differential Revision: https://phabricator.services.mozilla.com/D3596

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Yaron Tausky 2018-08-22 13:12:52 +00:00
Родитель 814ab6a3e3
Коммит c97b9eb29f
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -45,7 +45,7 @@ var wP;
function testPrivateWindow() {
testOnWindow(true, function(aWin) {
wP = aWin;
ok(!("serviceWorker" in wP.content.navigator), "ServiceWorkers are not available for private windows");
ok(!wP.content.eval('"serviceWorker" in navigator'), "ServiceWorkers are not available for private windows");
runTest();
});
}