OLD | NEW |
1 <html> | 1 <html> |
2 <!-- | 2 <!-- |
3 This test checks that prerender is cancelled when an video starts playing | 3 This test checks that video tags created by javascript are are deferred |
4 through javascript. | 4 during prerendering and the autoplay is enabled during swap ins. |
5 --> | 5 --> |
6 <head> | 6 <head> |
7 <title>Prerender cancellation for HTML5 video.</title> | 7 <title>Prerender for HTML5 video.</title> |
8 </head> | 8 </head> |
9 <body> | |
10 <div id="vid"> | |
11 </div> | |
12 | 9 |
13 <script> | 10 <body> |
14 var videoTag = document.createElement("video"); | 11 <div id="vid"> |
15 videoTag.src = "nonexistant.mp4"; | 12 </div> |
16 var element = document.getElementById("vid"); | 13 |
17 element.appendChild(videoTag); | 14 <script> |
18 </script> | 15 var videoTag = document.createElement("video"); |
19 </body> | 16 videoTag.src = "bear.ogv" |
| 17 videoTag.id = "mediaEl"; |
| 18 var element = document.getElementById("vid"); |
| 19 element.appendChild(videoTag); |
| 20 |
| 21 var willPlay = true; |
| 22 </script> |
| 23 |
| 24 <script src="prerender_html5_common.js"></script> |
| 25 |
| 26 <script> |
| 27 document.getElementById("mediaEl").play(); |
| 28 </script> |
| 29 |
| 30 </body> |
20 </html> | 31 </html> |
OLD | NEW |