testPropagationStoppedDuringCapture() {
    const captureHandler = recordFunction((e) => {
      e.stopPropagation();
    });
    const bubbleHandler = recordFunction();

    const body = document.body;
    const div = dom.createElement(TagName.DIV);
    body.appendChild(div);
    try {
      events.listen(body, 'click', captureHandler, true);
      events.listen(div, 'click', bubbleHandler, false);
      events.listen(body, 'click', bubbleHandler, false);

      dispatchClick(div);
      assertEquals(1, captureHandler.getCallCount());
      assertEquals(0, bubbleHandler.getCallCount());

      events.unlisten(body, 'click', captureHandler, true);

      dispatchClick(div);
      assertEquals(2, bubbleHandler.getCallCount());
    } finally {
      dom.removeNode(div);
      events.removeAll(body);
      events.removeAll(div);
    }
  }
@suppress {checkTypes} suppression added to enable
                            type checking