Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / media / video-throttled-load-metadata.html
blob8f4f2bb1ae2d4beeccd3167767a32dc94a2d97ed
1 <html>
2 <head>
3 <title>throttled loading metadata</title>
4 <script src="../../media-resources/media-file.js"></script>
5 <script src="../../media-resources/video-test.js"></script>
6 <script>
7 function loadedmetadata(e)
9 logResult(true, "loaded metadata of media file");
10 endTest();
13 function error(e)
15 logResult(false, "failed to load media file");
16 endTest();
19 function start()
21 findMediaElement();
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";
37 video.load();
39 </script>
40 </head>
41 <body onload="start()">
42 <video id="video"></video>
43 <p>
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>
47 </p>
48 </body>
49 </html>