| OLD | NEW |
| 1 <body> | 1 <body> |
| 2 <p> | 2 <p> |
| 3 This tests that audio controls do not fade out when the audio is playing. | 3 This tests that audio controls do not fade out when the audio is playing. |
| 4 </p> | 4 </p> |
| 5 <p id="result"> | 5 <p id="result"> |
| 6 FAIL: Test did not run. | 6 FAIL: Test did not run. |
| 7 </p> | 7 </p> |
| 8 <audio id="audio" controls autoplay onplaying="playing()" src="content/silence.w
av"></audio><br> | 8 <audio id="audio" controls autoplay onplaying="playing()" src="content/silence.w
av"></audio><br> |
| 9 <script> | 9 <script> |
| 10 if (window.layoutTestController) { | 10 if (window.layoutTestController) { |
| 11 layoutTestController.waitUntilDone(); | 11 layoutTestController.waitUntilDone(); |
| 12 layoutTestController.dumpAsText(); | 12 layoutTestController.dumpAsText(); |
| 13 } | 13 } |
| 14 | 14 |
| 15 function playing() { | 15 function playing() { |
| 16 setTimeout(function() { | 16 setTimeout(function() { |
| 17 var controls = layoutTestController.shadowRoot(document.getElementBy
Id("audio")).firstChild.firstChild; | 17 var controls = layoutTestController.shadowRoot(document.getElementBy
Id("audio")).firstChild.firstChild; |
| 18 var opacity = getComputedStyle(controls).opacity; | 18 var opacity = getComputedStyle(controls).opacity; |
| 19 document.getElementById("result").innerText = opacity < 1 ? "FAIL" :
"PASS"; | 19 document.getElementById("result").innerText = opacity < 1 ? "FAIL" :
"PASS"; |
| 20 layoutTestController.notifyDone(); | 20 layoutTestController.notifyDone(); |
| 21 }, 250) | 21 }, 250) |
| 22 } | 22 } |
| 23 </script> | 23 </script> |
| 24 </body> | 24 </body> |
| OLD | NEW |