зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1570279 - Reenable accidentally disabled checks in test_objectgrips-17.js. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com//D40022 --HG-- extra : histedit_source : 557166c573619cf669c717928acbe483f9430df8
This commit is contained in:
Родитель
518b15a876
Коммит
8e65f8c891
|
@ -925,15 +925,19 @@ async function setupTestFromUrl(url) {
|
||||||
* @param Object options
|
* @param Object options
|
||||||
* Optional arguments to tweak test environment
|
* Optional arguments to tweak test environment
|
||||||
* - JSPrincipal principal
|
* - JSPrincipal principal
|
||||||
* Principal to use for the debuggee.
|
* Principal to use for the debuggee. Defaults to systemPrincipal.
|
||||||
* - boolean doNotRunWorker
|
* - boolean doNotRunWorker
|
||||||
* If true, do not run this tests in worker debugger context.
|
* If true, do not run this tests in worker debugger context. Defaults to false.
|
||||||
|
* - bool wantXrays
|
||||||
|
* Whether the debuggee wants Xray vision with respect to same-origin objects
|
||||||
|
* outside the sandbox. Defaults to true.
|
||||||
*/
|
*/
|
||||||
function threadFrontTest(test, options = {}) {
|
function threadFrontTest(test, options = {}) {
|
||||||
let { principal, doNotRunWorker } = options;
|
const {
|
||||||
if (!principal) {
|
principal = systemPrincipal,
|
||||||
principal = systemPrincipal;
|
doNotRunWorker = false,
|
||||||
}
|
wantXrays = true,
|
||||||
|
} = options;
|
||||||
|
|
||||||
async function runThreadFrontTestWithServer(server, test) {
|
async function runThreadFrontTestWithServer(server, test) {
|
||||||
// Setup a server and connect a client to it.
|
// Setup a server and connect a client to it.
|
||||||
|
@ -942,7 +946,7 @@ function threadFrontTest(test, options = {}) {
|
||||||
// Create a custom debuggee and register it to the server.
|
// Create a custom debuggee and register it to the server.
|
||||||
// We are using a custom Sandbox as debuggee. Create a new zone because
|
// We are using a custom Sandbox as debuggee. Create a new zone because
|
||||||
// debugger and debuggee must be in different compartments.
|
// debugger and debuggee must be in different compartments.
|
||||||
const debuggee = Cu.Sandbox(principal, { freshZone: true });
|
const debuggee = Cu.Sandbox(principal, { freshZone: true, wantXrays });
|
||||||
const scriptName = "debuggee.js";
|
const scriptName = "debuggee.js";
|
||||||
debuggee.__name = scriptName;
|
debuggee.__name = scriptName;
|
||||||
server.addTestGlobal(debuggee);
|
server.addTestGlobal(debuggee);
|
||||||
|
|
|
@ -299,7 +299,7 @@ async function run_tests_in_principal(
|
||||||
// Test objects created in a cross-origin null principal new global.
|
// Test objects created in a cross-origin null principal new global.
|
||||||
await testPrincipal(options, null, debuggeeHasXrays);
|
await testPrincipal(options, null, debuggeeHasXrays);
|
||||||
|
|
||||||
if (debuggeePrincipal === null) {
|
if (debuggeePrincipal.isNullPrincipal) {
|
||||||
// Test objects created in a same-origin null principal new global.
|
// Test objects created in a same-origin null principal new global.
|
||||||
await testPrincipal(
|
await testPrincipal(
|
||||||
options,
|
options,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче