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

Unified Diff: third_party/WebKit/LayoutTests/media/video-force-preload-none-to-metadata-on-play.html

Issue 1522463003: Refactor resource load and resource selection algorithms as per spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move preloadTypeToString to anonymous namespace Created 4 years, 9 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
Index: third_party/WebKit/LayoutTests/media/video-force-preload-none-to-metadata-on-play.html
diff --git a/third_party/WebKit/LayoutTests/media/video-force-preload-none-to-metadata-on-play.html b/third_party/WebKit/LayoutTests/media/video-force-preload-none-to-metadata-on-play.html
new file mode 100644
index 0000000000000000000000000000000000000000..1b494fe018f3aedfcd17b708aea8296e13e555fc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/video-force-preload-none-to-metadata-on-play.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<title>Test that playing a video element with preload "none" changes its effective preload to "metadata"</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script src="media-file.js"></script>
+<video preload="none"></video>
+<script>
+test(function() {
+ var video = document.querySelector('video');
+ video.src = findMediaFile('video', 'content/test');
+ assert_equals(internals.effectivePreload(video), "none");
+ video.play();
+ assert_equals(internals.effectivePreload(video), "metadata");
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698