Bug 1193583 - Fix misc XPConnect and devtools tests. (r=jorendorff)

This commit is contained in:
Shu-yu Guo 2015-08-30 15:08:19 -07:00
Родитель d228db207e
Коммит 74dcccdc3f
7 изменённых файлов: 11 добавлений и 11 удалений

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

@ -18,7 +18,7 @@ function test() {
is(workers.length, 0);
executeSoon(() => {
evalInTab(tab, "let worker1 = new Worker('" + WORKER1_URL + "');");
evalInTab(tab, "var worker1 = new Worker('" + WORKER1_URL + "');");
});
yield waitForWorkerListChanged(tabClient);
@ -27,7 +27,7 @@ function test() {
is(workers[0].url, WORKER1_URL);
executeSoon(() => {
evalInTab(tab, "let worker2 = new Worker('" + WORKER2_URL + "');");
evalInTab(tab, "var worker2 = new Worker('" + WORKER2_URL + "');");
});
yield waitForWorkerListChanged(tabClient);

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

@ -85,7 +85,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=937317
// The incumbent script override doesn't take effect if the callback is scripted.
let d = Promise.defer();
iwin.wrappedJSObject.timeoutFun2 = Cu.getIncumbentGlobal.bind(Cu, makeCallback(iwin, d, "cross-global setTimeout of scripted function"));
iwin.eval('let timeoutFun2Wrapper = function() { timeoutFun2(); }');
iwin.eval('var timeoutFun2Wrapper = function() { timeoutFun2(); }');
setTimeout(iwin.wrappedJSObject.timeoutFun2Wrapper, 0);
return d.promise;
}).then(function() {

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

@ -31,8 +31,8 @@ function run_test() {
debuggeree.eval(
`
const dbg = new Debugger(this.debuggee);
let fired = 0;
var dbg = new Debugger(this.debuggee);
var fired = 0;
dbg.memory.onGarbageCollection = _ => {
fired++;
gc(this);

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

@ -975,7 +975,7 @@ function run_float_tests(library, t, name, size) {
function test_roundtrip(t, val)
{
let f1 = t(val);
eval("let f2 = " + f1.toSource());
eval("var f2 = " + f1.toSource());
do_check_eq(f1.value, f2.value);
}
vals = [Infinity, -Infinity, -0, 0, 1, -1, 1/3, -1/3, 1/4, -1/4,
@ -1582,7 +1582,7 @@ function run_StructType_tests() {
do_check_eq(s.toSource(), "s_t(4, {\"a\": 7, \"b\": 2}, 10)");
do_check_eq(s.toSource(), s.toString());
eval("let s2 = " + s.toSource());
eval("var s2 = " + s.toSource());
do_check_true(s2.constructor === s_t);
do_check_eq(s.b.b, s2.b.b);
@ -2060,7 +2060,7 @@ function run_ArrayType_tests() {
c.value = [1, 2, 3, 4, 5, 6];
do_check_eq(c.toSource(), "ctypes.int32_t.array(6)([1, 2, 3, 4, 5, 6])");
do_check_eq(c.toSource(), c.toString());
eval("let c2 = " + c.toSource());
eval("var c2 = " + c.toSource());
do_check_eq(c2.constructor.name, "int32_t[6]");
do_check_eq(c2.length, 6);
do_check_eq(c2[3], c[3]);

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

@ -12,7 +12,7 @@ function run_test() {
let sizeOfAM = byteSize(allocationMarker());
// Allocate a single allocation marker, and check that we can find it.
g.eval('let hold = allocationMarker();');
g.eval('var hold = allocationMarker();');
let census = saveHeapSnapshotAndTakeCensus(dbg, { breakdown: { by: 'objectClass' } });
equal(census.AllocationMarker.count, 1);
equal(census.AllocationMarker.bytes, sizeOfAM);

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

@ -36,7 +36,7 @@ function test_pause_frame()
do_check_eq(vars.stopMe.value.class, "Function");
do_check_true(!!vars.stopMe.value.actor);
parentEnv = parentEnv.parent;
parentEnv = parentEnv.parent.parent;
do_check_neq(parentEnv, undefined);
let objClient = gThreadClient.pauseGrip(parentEnv.object);
objClient.getPrototypeAndProperties(function(aResponse) {

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

@ -36,7 +36,7 @@ function test_pause_frame()
do_check_eq(aResponse.ownProperties.cos.value.class, "Function");
do_check_true(!!aResponse.ownProperties.cos.value.actor);
let parentEnv = env.parent;
let parentEnv = env.parent.parent;
do_check_neq(parentEnv, undefined);
let parentClient = gThreadClient.pauseGrip(parentEnv.object);