Bug 1557712: Fix intermittent test failure for test_frameancestors_userpass.html. r=jkt

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Christoph Kerschbaumer 2019-10-29 09:23:57 +00:00
Родитель a64dcc0c07
Коммит 8f2c346f91
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -95,7 +95,10 @@ var frameLoaded = function(testname, uri) {
var frameBlocked = function(uri, policy) {
//Check if @ symbol is there in URI or in csp policy.
if (policy.includes('@') || uri.includes('@')) {
// Bug 1557712: Intermittent failure -> not sure why the 'uri' might ever
// be non existing at this point, however if there is no uri, there can
// also be no userpass!
if (policy.includes('@') || (uri && uri.includes('@'))) {
ok(false, ' a CSP policy blocked frame from being loaded. But contains' +
' userpass. Policy is: ' + policy + ';URI is: ' + uri );
} else {