<!DOCTYPE html>
<meta charset="utf-8">
<title>Test setting EventHandler attributes</title>
<link rel="help" href="https://w3c.github.io/encrypted-media/#attributes-3">

<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<body>
<audio id="testElement"
       onencrypted="window.onencryptedHandlerSetFromParserWasFired()"
       onwaitingforkey="window.onwaitingforkeyHandlerSetFromParserWasFired()">
</audio>
<script>
  ["encrypted", "waitingforkey"].forEa