chromium/third_party/blink/web_tests/http/tests/broadcastchannel/resources/create-broadcastchannel-verify-third-party-use-counter.html

<body></body>
<script>
// |kThirdPartyBroadcastChannel| from web_feature.mojom.
const kFeature = 3033;

async function verifyUseCounter() {
  await window.internals.observeUseCounter(document, kFeature);
}

window.onload = function() {
  var bc = new BroadcastChannel('test_channel');
  verifyUseCounter();
  if (window.internals.isUseCounted(document, kFeature)) {
    window.parent.postMessage('verified_has_use_counter', '*');
  }
};

</script>