ub-test');

promise_test(function(t) {
  t.add_cleanup(function() {});

  return Promise.resolve()
    .then(function() {
        sameMirotask = true;
        Promise.resolve().then(() => sameMicrotask = false);
        throw expectedError;
      });
}, 'failing promise test with cleanup #1');

promise_test(function() {
  assert_false(sameMicrotask);

  return Promise.resolve();
}, 'sub-test with some cleanup functions executes in distinct microtask from a failing sub-test');

promise_test(function(t) {
  r