ectedCallback() {
    this.numDisconnectedCallback++;
  }

  static observedAttributes = ['foo'];
  attributeChangedCallback(name, oldValue, newValue) {
    this.attributeChangedCalls.push({name, oldValue, newValue});
  }
}
customElements.define('my-element', MyElement);

['Element', 'ShadowRoot'].forEach(containerType => {
  test(() => {
    let container = null;
    if (containerType === 'Element') {
      container = document.createElement('div');
      document.body.appendChild(container);
    } else if