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

Unified Diff: LayoutTests/media/video-preload.html

Issue 313173008: Allow load if play() is immediately called when preload == 'none' (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/media/video-preload-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/video-preload.html
diff --git a/LayoutTests/media/video-preload.html b/LayoutTests/media/video-preload.html
index e264b888f9ed8a70bca527295d19d64b3d96449c..c3600405a5f37ea49283eac7cbec1e1863993eb3 100644
--- a/LayoutTests/media/video-preload.html
+++ b/LayoutTests/media/video-preload.html
@@ -7,36 +7,56 @@
<script>
var timer = null;
- var movieInfo =
+ var movieInfo =
{
current : -1,
- movies :
- [
+ movies :
+ [
{
// should not buffer, 'preload' is 'none'
preload : "none",
shouldBuffer : false,
autoPlay : false,
- description : "until 'play()' is called",
+ playInsteadOfLoad : false,
+ description : "until 'play()' is called",
+ },
+ {
+ // should buffer, because load() is called.
+ preload : "none",
+ shouldBuffer : true,
+ autoPlay : false,
+ playInsteadOfLoad : false,
+ description : "because 'load()' is called",
+ },
+ {
+ // should buffer, because play() is called.
+ preload : "none",
+ shouldBuffer : true,
+ autoPlay : false,
+ playInsteadOfLoad : true,
+ description : "because 'play()' is called",
},
{
preload : "metadata",
shouldBuffer : true,
autoPlay : false,
- description : "",
+ playInsteadOfLoad : false,
+ description : "",
},
{
preload : "auto",
shouldBuffer : true,
autoPlay : false,
- description : "",
+ playInsteadOfLoad : false,
+ description : "",
},
{
// should buffer because 'autoplay' is set
preload : "none",
shouldBuffer : true,
autoPlay : true,
- description : " because of 'autoplay'",
+ playInsteadOfLoad : false,
+ description : " because of 'autoplay'",
},
]
};
@@ -47,7 +67,7 @@
var movie = movieInfo.movies[movieInfo.current];
logResult(true, "did not buffer automatically");
-
+
// start playback, which should force data to load
movie.shouldBuffer = true;
run("video.play()");
@@ -92,12 +112,17 @@
setupAttribute('autoplay', movie.autoPlay);
video.src = url;
- if (movieInfo.current > 0)
- video.load();
+ if (movieInfo.current > 0) {
+ if (movie.playInsteadOfLoad) {
+ run("video.play()");
+ } else {
+ run("video.load()");
+ }
+ }
if (!movie.shouldBuffer)
timer = setTimeout(checkLoad, 200);
}
-
+
function start()
{
findMediaElement();
@@ -106,7 +131,7 @@
waitForEvent("loadstart");
waitForEvent("play");
waitForEvent('loadedmetadata', loadedmetadata);
-
+
openNextMovie();
}
« no previous file with comments | « no previous file | LayoutTests/media/video-preload-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698