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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-preload-override-cellular.html

Issue 1276143002: Defer media loading while on cellular networks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Cleanup. Created 5 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>Tests that preload is overridden to none for cellular connections.</title >
3 <style>
4 /* Use a black background to see failures; the video clip is a white square. */
5 body { background-color: black; }
6 </style>
7 <script>
8 if (window.testRunner)
9 testRunner.waitUntilDone();
10
11 function startTest() {
12 if (window.internals) {
13 internals.setNetworkStateNotifierTestOnly(true);
14 internals.setNetworkConnectionInfo('cellular', 2.0);
15 }
16
17 var video = document.querySelector('video');
18 video.addEventListener("suspend", function () {
19 if (window.internals)
20 internals.setNetworkStateNotifierTestOnly(false);
21
22 if (window.testRunner)
23 testRunner.notifyDone();
24 });
25
26 video.src = "resources/test-positive-start-time.webm"
27 }
28
29 window.addEventListener('load', startTest, false);
30 </script>
31 <video preload="metadata"></video>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698