mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 08:48:39 +09:00
Issue #2234 - Part 3: Update tests
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1402649 and https://bugzilla.mozilla.org/show_bug.cgi?id=1382306
This commit is contained in:
parent
e52da4707d
commit
2d6c419661
7 changed files with 41 additions and 0 deletions
15
js/src/jit-test/tests/modules/bug-1402649.js
Normal file
15
js/src/jit-test/tests/modules/bug-1402649.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
if (!('oomTest' in this))
|
||||
quit();
|
||||
|
||||
loadFile(`
|
||||
function parseAndEvaluate(source) {
|
||||
let m = parseModule(source);
|
||||
m.declarationInstantiation();
|
||||
}
|
||||
parseAndEvaluate("async function a() { await 2 + 3; }")
|
||||
`);
|
||||
function loadFile(lfVarx) {
|
||||
oomTest(function() {
|
||||
eval(lfVarx);
|
||||
});
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
// |reftest| module
|
||||
|
||||
async function f() {
|
||||
return "success";
|
||||
}
|
||||
|
||||
var AsyncFunction = (async function(){}).constructor;
|
||||
|
||||
assertEq(f instanceof AsyncFunction, true);
|
||||
|
||||
f().then(v => {
|
||||
reportCompare("success", v);
|
||||
});
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
// |reftest| module skip-if(release_or_beta)
|
||||
|
||||
async function* f() {
|
||||
return "success";
|
||||
}
|
||||
|
||||
var AsyncGenerator = (async function*(){}).constructor;
|
||||
|
||||
assertEq(f instanceof AsyncGenerator, true);
|
||||
|
||||
f().next().then(v => {
|
||||
reportCompare("success", v.value);
|
||||
});
|
||||
0
js/src/tests/ecma_2018/AsyncGenerators/browser.js
Normal file
0
js/src/tests/ecma_2018/AsyncGenerators/browser.js
Normal file
0
js/src/tests/ecma_2018/AsyncGenerators/shell.js
Normal file
0
js/src/tests/ecma_2018/AsyncGenerators/shell.js
Normal file
0
js/src/tests/ecma_2018/browser.js
Normal file
0
js/src/tests/ecma_2018/browser.js
Normal file
0
js/src/tests/ecma_2018/shell.js
Normal file
0
js/src/tests/ecma_2018/shell.js
Normal file
Loading…
Add table
Add a link
Reference in a new issue