3 <title>throttled loading metadata
</title>
4 <script src=
"../../media-resources/media-file.js"></script>
5 <script src=
"../../media-resources/video-test.js"></script>
7 function loadedmetadata(e
)
9 logResult(true, "loaded metadata of media file");
15 logResult(false, "failed to load media file");
23 waitForEvent('loadedmetadata', loadedmetadata
);
24 waitForEvent("error", error
);
25 testExpected("video.error", null);
27 var worker
= new Worker("video-throttled-load-metadata-worker.js");
28 worker
.onmessage = function (event
) {
29 logResult(true, event
.data
);
32 // Use a .webm to ensure metadata is near the beginning of the file.
33 var mediaFile
= "resources/media-source/webm/test.webm";
34 video
.src
= "http://127.0.0.1:8000/media/video-throttled-load.cgi?" +
35 "nph=1&name=" + mediaFile
+ "&throttle=40&type=video/webm";
41 <body onload=
"start()">
42 <video id=
"video"></video>
44 This test case simulates a slow network, and starts a web worker thread to write a log message
45 when retrieving media metadata to see if the webkit thread is blocked by media retrieving thread.
<br>
46 This test case is for
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=80978">https://bugs.webkit.org/show_bug.cgi?id=
80978</a>