зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1462741 - Update tests. r=jorendorff
Depends on D14704 Differential Revision: https://phabricator.services.mozilla.com/D14705 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
008b4aef30
Коммит
be525ca8b0
|
@ -68,7 +68,6 @@ function run_test() {
|
|||
JSString: { count: Pattern.NATURAL },
|
||||
"js::Shape": { count: Pattern.NATURAL },
|
||||
JSObject: { count: Pattern.NATURAL },
|
||||
JSScript: { count: Pattern.NATURAL },
|
||||
})
|
||||
.assert(saveHeapSnapshotAndTakeCensus(dbg, { breakdown: { by: "internalType" } }));
|
||||
|
||||
|
@ -85,7 +84,6 @@ function run_test() {
|
|||
JSString: coarseTypePattern,
|
||||
"js::Shape": coarseTypePattern,
|
||||
JSObject: coarseTypePattern,
|
||||
JSScript: coarseTypePattern,
|
||||
})
|
||||
.assert(saveHeapSnapshotAndTakeCensus(dbg, {
|
||||
breakdown: { by: "internalType",
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
function checkMethods(proto) {
|
||||
var names = Object.getOwnPropertyNames(proto);
|
||||
for (var i = 0; i < names.length; i++) {
|
||||
var name = names[i];
|
||||
var prop = proto[name];
|
||||
}
|
||||
}
|
||||
checkMethods(Function.prototype);
|
|
@ -1,2 +1,2 @@
|
|||
assertEq(Function.prototype.toString(), "function () {\n}");
|
||||
assertEq(Function.prototype.toSource(), "function () {\n}");
|
||||
assertEq(Function.prototype.toString(), "function () {\n [native code]\n}");
|
||||
assertEq(Function.prototype.toSource(), "function () {\n [native code]\n}");
|
||||
|
|
|
@ -10,7 +10,7 @@ var allScripts = dbg.findScripts();
|
|||
var scripts = dbg.findScripts({
|
||||
source: o.script.source
|
||||
});
|
||||
assertEq(scripts.length < allScripts.length, true);
|
||||
assertEq(scripts.length, allScripts.length);
|
||||
assertEq(scripts.indexOf(o.script) !== -1, true);
|
||||
|
||||
scripts = dbg.findScripts({
|
||||
|
|
|
@ -59,7 +59,6 @@ Pattern({
|
|||
JSString: { count: Pattern.NATURAL },
|
||||
'js::Shape': { count: Pattern.NATURAL },
|
||||
JSObject: { count: Pattern.NATURAL },
|
||||
JSScript: { count: Pattern.NATURAL }
|
||||
})
|
||||
.assert(dbg.memory.takeCensus({ breakdown: { by: 'internalType' } }));
|
||||
|
||||
|
@ -77,7 +76,6 @@ Pattern({
|
|||
JSString: coarse_type_pattern,
|
||||
'js::Shape': coarse_type_pattern,
|
||||
JSObject: coarse_type_pattern,
|
||||
JSScript: coarse_type_pattern,
|
||||
})
|
||||
.assert(dbg.memory.takeCensus({
|
||||
breakdown: { by: 'internalType',
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
// Function.prototype's script source should be fully initialized.
|
||||
var g = newGlobal();
|
||||
var dbg = new Debugger;
|
||||
var gw = dbg.addDebuggee(g);
|
||||
|
||||
var DOfp = gw.getOwnPropertyDescriptor('Function').value.proto;
|
||||
// This should not crash.
|
||||
print(DOfp.script.source.introductionScript);
|
|
@ -1,11 +0,0 @@
|
|||
// Source.prototype.url is null for Function.prototype.
|
||||
|
||||
var g = newGlobal();
|
||||
var dbg = new Debugger;
|
||||
var gw = dbg.addDebuggee(g);
|
||||
|
||||
var Fpw = gw.getOwnPropertyDescriptor('Function').value.proto;
|
||||
assertEq(Fpw.script.source.url, null);
|
||||
|
||||
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
// In a debuggee, the Function.prototype script source has the introductionType
|
||||
// property set to "Function.prototype".
|
||||
|
||||
var g = newGlobal();
|
||||
var dbg = new Debugger(g);
|
||||
var scripts = dbg.findScripts();
|
||||
assertEq(scripts.length > 0, true);
|
||||
var fpScripts = scripts.filter(s => s.source.introductionType == "Function.prototype");
|
||||
assertEq(fpScripts.length, 1);
|
||||
var source = fpScripts[0].source;
|
||||
assertEq(source.text, "function () {\n}");
|
|
@ -0,0 +1,11 @@
|
|||
var desc = Object.getOwnPropertyDescriptor(Function.prototype, "length");
|
||||
assertDeepEq(desc,
|
||||
{value: 0, writable: false, enumerable: false, configurable: true});
|
||||
|
||||
assertEq(Function.prototype.prototype, undefined);
|
||||
assertEq(Function.prototype.callee, undefined);
|
||||
assertThrowsInstanceOf(() => Function.prototype.caller, TypeError);
|
||||
assertThrowsInstanceOf(() => Function.prototype.arguments, TypeError);
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
Загрузка…
Ссылка в новой задаче