Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1598)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/media-focus-in-standalone-media-document.html

Issue 1475863005: [Async][WIP] Call FrameLoader::checkCompleted() asynchronously to avoid sync body.onload() Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../media/media-file.js"></script> 4 <script src="../../media/media-file.js"></script>
5 <script src="../../media/video-test.js"></script> 5 <script src="../../media/video-test.js"></script>
6 <script type="text/javascript"> 6 <script type="text/javascript">
7 var videoElement; 7 var videoElement;
8 var standaloneMediaDocument; 8 var standaloneMediaDocument;
9 var skipOnFirstEmptyLoad = 0;
10 9
11 function frameLoaded() 10 function frameLoaded()
12 { 11 {
13 if (++skipOnFirstEmptyLoad == 1)
14 return;
15
16 standaloneMediaDocument = document.getElementById("videoframe"). contentDocument; 12 standaloneMediaDocument = document.getElementById("videoframe"). contentDocument;
17 videoElement = standaloneMediaDocument.querySelector("video"); 13 videoElement = standaloneMediaDocument.querySelector("video");
18 14
19 videoElement.addEventListener('click',function(){ 15 videoElement.addEventListener('click',function(){
20 consoleWrite("*** Video element clicked."); 16 consoleWrite("*** Video element clicked.");
21 },false); 17 },false);
22 18
23 testFocus(); 19 testFocus();
24 testFocusbyMouseClick(); 20 testFocusbyMouseClick();
25 consoleWrite(""); 21 consoleWrite("");
(...skipping 15 matching lines...) Expand all
41 click.initMouseEvent("click", true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, document); 37 click.initMouseEvent("click", true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, document);
42 videoElement.dispatchEvent(click); 38 videoElement.dispatchEvent(click);
43 testExpected("standaloneMediaDocument.activeElement", videoEleme nt, "!="); 39 testExpected("standaloneMediaDocument.activeElement", videoEleme nt, "!=");
44 } 40 }
45 </script> 41 </script>
46 </head> 42 </head>
47 <body> 43 <body>
48 <p> 44 <p>
49 This tests that media element in a standalone media document cannot be focused directly using focus() method or by mouse click. 45 This tests that media element in a standalone media document cannot be focused directly using focus() method or by mouse click.
50 </p> 46 </p>
51 <iframe id="videoframe" width=380 height=330 onload="frameLoaded()"></if rame> 47 <iframe id="videoframe" width=380 height=330></iframe>
52 <script type="text/javascript"> 48 <script type="text/javascript">
49 document.getElementById("videoframe").addEventListener('load', frame Loaded);
53 document.getElementById("videoframe").src = "../../media/" + findMed iaFile("video", "content/test"); 50 document.getElementById("videoframe").src = "../../media/" + findMed iaFile("video", "content/test");
54 </script> 51 </script>
55 </body> 52 </body>
56 </html> 53 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698