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

Side by Side Diff: chrome/test/data/prerender/prerender_html5_video_script.html

Issue 8095007: Defer loading of audio/video tags while prerendering. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Syncing with depot. Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698