pectedError;
      });
}, 'failing promise test without cleanup #2');

promise_test(function() {
  assert_true(sameTask);

  return Promise.resolve();
}, 'sub-test with 0 cleanup functions executes in the same task as a failing sub-test');

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

  return Promise.resolve()
    .then(function() {
        sameTask = true;
        t.step_timeout(() => sameTask = false, 0);
      });
}, 'promise test with cleanup #2');

promise_test(function() {
  assert_tru