mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
Bug 1494941 - Fix browser_jsterm_await_helper_dollar_underscore.js intermittent; r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D15838 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
3da4123892
commit
9d3647c581
@ -65,18 +65,18 @@ async function performTests() {
|
||||
ok(true, "$_ wasn't re-assigned");
|
||||
|
||||
info("Check that $_ gets the value of the last resolved await expression");
|
||||
const delays = [1000, 500, 2000, 1500];
|
||||
const delays = [2000, 1000, 4000, 3000];
|
||||
const inputs = delays.map(delay => `await new Promise(
|
||||
r => setTimeout(() => r("await-concurrent-" + ${delay}), ${delay}))`);
|
||||
|
||||
// Let's wait for the message that sould be displayed last.
|
||||
const onMessage = waitForMessage(hud, "await-concurrent-2000", ".message.result");
|
||||
// Let's wait for the message that should be displayed last.
|
||||
const onMessage = waitForMessage(hud, "await-concurrent-4000", ".message.result");
|
||||
for (const input of inputs) {
|
||||
jsterm.execute(input);
|
||||
}
|
||||
await onMessage;
|
||||
|
||||
await executeAndWaitForResultMessage(`"result: " + $_`,
|
||||
`"result: await-concurrent-2000"`);
|
||||
`"result: await-concurrent-4000"`);
|
||||
ok(true, "$_ was replaced with the last resolving top-level await evaluation result");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user