Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/media/video-preload-override-cellular.html |
| diff --git a/third_party/WebKit/LayoutTests/media/video-preload-override-cellular.html b/third_party/WebKit/LayoutTests/media/video-preload-override-cellular.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7a7fd108e53b17040e91234797746f72df412906 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/media/video-preload-override-cellular.html |
| @@ -0,0 +1,31 @@ |
| +<!DOCTYPE html> |
| +<title>Tests that preload is overridden to none for cellular connections.</title> |
|
philipj_slow
2015/10/01 09:24:07
Since this test is almost identical, what you coul
DaleCurtis
2015/10/20 21:56:51
Kind of done; refactored to a shared js, but async
|
| +<style> |
| +/* Use a black background to see failures; the video clip is a white square. */ |
| +body { background-color: black; } |
| +</style> |
| +<script> |
| +if (window.testRunner) |
| + testRunner.waitUntilDone(); |
| + |
| +function startTest() { |
| + if (window.internals) { |
| + internals.setNetworkStateNotifierTestOnly(true); |
| + internals.setNetworkConnectionInfo('cellular', 2.0); |
| + } |
| + |
| + var video = document.querySelector('video'); |
| + video.addEventListener("suspend", function () { |
| + if (window.internals) |
| + internals.setNetworkStateNotifierTestOnly(false); |
| + |
| + if (window.testRunner) |
| + testRunner.notifyDone(); |
| + }); |
| + |
| + video.src = "resources/test-positive-start-time.webm" |
| +} |
| + |
| +window.addEventListener('load', startTest, false); |
| +</script> |
| +<video preload="metadata"></video> |