chromium/third_party/blink/web_tests/webaudio/internals/mediaelementaudiosourcenode-wrapper.html

<!DOCTYPE html>
<html>
  <head>
    <title>
      mediaelementaudiosourcenode-wrapper.html
    </title>
    <script src="../../resources/gc.js"></script>
    <script src="../../resources/js-test.js"></script>
    <script src="../resources/audit-util.js"></script>
  </head>
  <body>
    <script id="layout-test-code">
      description(
          'Verifies that for .mediaElement getters, a wrapper that ' +
          'corresponds to the actual element is created.');

      let source;
      async function testMediaWrapper(kind) {
        let element = document.createElement(kind);
        let context = new AudioContext();

        source = context.createMediaElementSource(element);
        element = context = null;
        await asyncGC();
        shouldBeUndefined('source.mediaElement.nonExistentProperty');
        source = null;
      }

      testMediaWrapper('audio');
      testMediaWrapper('video');
    </script>
  </body>
</html>