938761ab60
assertPromiseResult caused tests to timeout when the result of the promise was unexpected, e.g. rejected instead of the expected fulfillment. This CL cleans up the implementation of assertPromiseResult, adds better stack traces, and adds tests for all the important cases I can think of. R=mathias@chromium.org CC=clemensh@chromium.org Bug: v8:7570 Change-Id: I6ecb94fd3e5151502edf73c3bcdeb518b80fc81c Reviewed-on: https://chromium-review.googlesource.com/1032786 Commit-Queue: Andreas Haas <ahaas@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Mathias Bynens <mathias@chromium.org> Cr-Commit-Position: refs/heads/master@{#52882}
17 lines
397 B
JavaScript
17 lines
397 B
JavaScript
// Copyright 2018 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// Flags: --no-stress-opt
|
|
|
|
load("test/mjsunit/mjsunit.js");
|
|
|
|
let resolve_handler;
|
|
let promise = new Promise(function(resolve, reject) {
|
|
resolve_handler = resolve;
|
|
});
|
|
|
|
assertPromiseResult(promise);
|
|
|
|
resolve_handler({f: 3463});
|