Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/media/video-preload-cellular-test.js |
| diff --git a/third_party/WebKit/LayoutTests/media/video-preload-cellular-test.js b/third_party/WebKit/LayoutTests/media/video-preload-cellular-test.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..08c7654ec3bf01ace95a434faa29317324450067 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/media/video-preload-cellular-test.js |
| @@ -0,0 +1,17 @@ |
| +function CellularPreloadTest(preloadType) { |
|
philipj_slow
2015/10/21 11:11:29
LayoutTests/media/video-controls-fullscreen.js sho
DaleCurtis
2015/10/21 22:34:32
lowercase_for_the_win().
|
| + return function(t) { |
| + internals.setNetworkStateNotifierTestOnly(true); |
| + internals.setNetworkConnectionInfo('cellular', 2.0); |
| + |
| + var video = document.createElement('video'); |
| + if (preloadType) |
| + video.preload = preloadType; |
|
philipj_slow
2015/10/21 11:11:29
After this line, can you also assert_equals(video.
DaleCurtis
2015/10/21 22:34:32
Done.
|
| + video.src = 'resources/test-positive-start-time.webm'; |
| + |
| + video.onsuspend = t.step_func_done(); |
| + video.onprogress = t.unreached_func(); |
| + t.add_cleanup(function() { |
| + internals.setNetworkStateNotifierTestOnly(false); |
| + }); |
| + } |
| +} |