tructor() {
      super();
      this.upgraded = true;
    }
  });

  assert(!element.upgraded);
  assert.deepEqual(calls, ['callbackB']);

  flushB();

  assert(!element.upgraded);
  assert.deepEqual(calls, ['callbackB', 'callbackA']);

  flushA();

  assert(element.upgraded);
  assert.deepEqual(calls, ['callbackB', 'callbackA']);
});
</script>
</head>
<body>
  <custom-element></custom-element>
</body>
</html>
