Index: third_party/WebKit/LayoutTests/fast/events/media-focus-in-standalone-media-document.html |
diff --git a/third_party/WebKit/LayoutTests/fast/events/media-focus-in-standalone-media-document.html b/third_party/WebKit/LayoutTests/fast/events/media-focus-in-standalone-media-document.html |
index ad515fdda6789d150dbe7d3f36eafda6b462be7b..8353c6599e5caf946378098f546fb2665a144f23 100644 |
--- a/third_party/WebKit/LayoutTests/fast/events/media-focus-in-standalone-media-document.html |
+++ b/third_party/WebKit/LayoutTests/fast/events/media-focus-in-standalone-media-document.html |
@@ -6,13 +6,9 @@ |
<script type="text/javascript"> |
var videoElement; |
var standaloneMediaDocument; |
- var skipOnFirstEmptyLoad = 0; |
function frameLoaded() |
{ |
- if (++skipOnFirstEmptyLoad == 1) |
- return; |
- |
standaloneMediaDocument = document.getElementById("videoframe").contentDocument; |
videoElement = standaloneMediaDocument.querySelector("video"); |
@@ -48,8 +44,9 @@ |
<p> |
This tests that media element in a standalone media document cannot be focused directly using focus() method or by mouse click. |
</p> |
- <iframe id="videoframe" width=380 height=330 onload="frameLoaded()"></iframe> |
+ <iframe id="videoframe" width=380 height=330></iframe> |
<script type="text/javascript"> |
+ document.getElementById("videoframe").addEventListener('load', frameLoaded); |
document.getElementById("videoframe").src = "../../media/" + findMediaFile("video", "content/test"); |
</script> |
</body> |