Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/media/video-preload-default-cellular.html |
| diff --git a/third_party/WebKit/LayoutTests/media/video-preload-default-cellular.html b/third_party/WebKit/LayoutTests/media/video-preload-default-cellular.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2545645966402e24dd84a138b9d71a88f0f2aaca |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/media/video-preload-default-cellular.html |
| @@ -0,0 +1,31 @@ |
| +<!DOCTYPE html> |
| +<title>Tests that preload defaults to none for cellular connections.</title> |
| +<style> |
| +/* Use a black background to see failures; the video clip is a white square. */ |
|
philipj_slow
2015/10/01 09:24:07
I ought not be necessary to use a reftest for this
DaleCurtis
2015/10/01 19:25:54
Good idea, though I think suspend might tick befor
DaleCurtis
2015/10/20 21:56:50
This worked perfectly, thanks!
|
| +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></video> |