summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/media/video-preload-cellular-test.js
blob: 4c47179b54f69393ddfb8fb679400d919901ea40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function cellular_preload_test() {
  async_test(function(t) {
    internals.setNetworkStateNotifierTestOnly(true);
    internals.setNetworkConnectionInfo('cellular3g', 2.0);

    var video = document.querySelector('video');
    assert_equals(video.preload, 'none')
    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);
    });
  });
}