Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/media/video-load-metadata-decode-error.html

Issue 2180713002: Convert video-load* http tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test failures Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/media/video-load-metadata-decode-error-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <!DOCTYPE html>
2 <head> 2 <title>This test case simulates a decode error after loading meta data of a vide o.</title>
3 <title>Loading corrupted video with proper metadata</title> 3 <script src="../resources/testharness.js"></script>
4 <script src=../../../media-resources/media-file.js></script> 4 <script src="../resources/testharnessreport.js"></script>
5 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 5 <script src="../../media-resources/media-file.js"></script>
6 (Please avoid writing new tests using video-test.js) --> 6 <video></video>
7 <script src=../../../media-resources/video-test.js></script> 7 <script>
8 <script> 8 async_test(function(t) {
9 function loadedmetadata(e) 9 var video = document.querySelector("video");
10 {
11 consoleWrite("loaded metadata of media file");
12 }
13 10
14 function error(e) 11 var watcher = new EventWatcher(t, video, ["loadedmetadata", "error"]);
15 { 12 watcher.wait_for(["loadedmetadata", "error"]).then(t.step_func_done(function () {
16 consoleWrite("failed to load media file"); 13 assert_equals(video.networkState, HTMLMediaElement.NETWORK_IDLE);
17 testExpected("video.networkState", HTMLMediaElement.NETWORK_IDLE); 14 }));
18 endTest(); 15 var movie = findMediaFile("video", "resources/test");
19 } 16 var type = mimeTypeForExtension(movie.split(".").pop());
20 17 video.src = "video-load-metadata-decode-error.cgi?name=" + movie + "&type=" + type;
21 function start() 18 video.play();
22 { 19 });
23 findMediaElement(); 20 </script>
24
25 waitForEvent('loadedmetadata', loadedmetadata);
26 waitForEvent("error", error);
27
28 var movie = findMediaFile("video", "resources/test");
29 var type = mimeTypeForExtension(movie.split('.').pop());
30 video.src = "video-load-metadata-decode-error.cgi?name=" + movie + " &type=" + type;
31 video.play();
32 }
33 </script>
34 </head>
35 <body onload="start()">
36 <video id="video"></video>
37 <p>
38 This test case simulates a decode error after loading meta data of a video.<br/> <br/>
39 </p>
40 </body>
41 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/media/video-load-metadata-decode-error-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698