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

Unified Diff: third_party/WebKit/LayoutTests/media/video-force-preload-none.html

Issue 2344353003: Force preload=none and disable autoplay on lowend Android devices. (Closed)
Patch Set: Fix enum namespace. Created 4 years, 3 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.html
diff --git a/third_party/WebKit/LayoutTests/media/video-force-preload-none.html b/third_party/WebKit/LayoutTests/media/video-force-preload-none.html
new file mode 100644
index 0000000000000000000000000000000000000000..4a9958b67e85e6ffd966d55d138b1fbcfd04f4b2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/video-force-preload-none.html
@@ -0,0 +1,20 @@
+<!doctype html>
+<title>Tests that the document setting for forcing preload none works.</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<video preload="metadata"></video>
+<script>
+async_test(function(t) {
+ internals.settings.setForcePreloadNoneForMediaElements(true);
+
+ var video = document.querySelector('video');
+ assert_equals(video.preload, 'none');
+ video.src = 'resources/test-positive-start-time.webm';
+
+ video.onsuspend = t.step_func_done();
+ video.onprogress = t.unreached_func();
+ t.add_cleanup(function() {
+ internals.settings.setForcePreloadNoneForMediaElements(false);
+ });
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698