Bug 1465457 - Add support for chrome reftests r=dbaron

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Brian Grinstead 2019-02-26 17:13:44 +00:00
Родитель f300d392ff
Коммит 73784db919
3 изменённых файлов: 7 добавлений и 2 удалений

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

@ -644,7 +644,6 @@ function CreateUrls(test) {
.getService(Ci.nsIScriptSecurityManager);
let manifestURL = g.ioService.newURI(test.manifest);
let principal = secMan.createCodebasePrincipal(manifestURL, {});
let testbase = manifestURL;
if (test.runHttp)
@ -656,6 +655,9 @@ function CreateUrls(test) {
return file;
var testURI = g.ioService.newURI(file, null, testbase);
let isChrome = testURI.scheme == "chrome";
let principal = isChrome ? secMan.getSystemPrincipal() :
secMan.createCodebasePrincipal(manifestURL, {});
secMan.checkLoadURIWithPrincipal(principal, testURI,
Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT);
return testURI;

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

@ -20,6 +20,9 @@ Cu.import("resource://gre/modules/Timer.jsm");
Cu.import("resource://reftest/AsyncSpellCheckTestHelper.jsm");
Cu.import("resource://gre/modules/Services.jsm");
// This will load chrome Custom Elements inside chrome documents:
ChromeUtils.import("resource://gre/modules/CustomElementsListener.jsm", null);
var gBrowserIsRemote;
var gIsWebRenderEnabled;
var gHaveCanvasSnapshot = false;

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

@ -121,7 +121,7 @@ class ReftestManifest(object):
break
for f in tests:
# We can't package about: or data: URIs.
# We can't package about:, data:, or chrome: URIs.
# Discarding data isn't correct for a parser. But retaining
# all data isn't currently a requirement.
if RE_PROTOCOL.match(f):