| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>Tests that preload defaults 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></video> |
| OLD | NEW |