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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-srcobject-mediastream-src-file.html

Issue 1815033003: Add srcObject attribute of type MediaStream to HTMLMediaElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android and tests Created 4 years, 8 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
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <title>Test that setting the srcObject attribute overrides the src attribute and if the srcObject is set to null, media is reloaded from the src attribute.</tit le>
3 <video autoplay></video>
4 <script src="../resources/testharness.js"></script>
5 <script src="../resources/testharnessreport.js"></script>
6 <script src="./w3c-media-utils.js"></script>
7 <script>
8 var video = document.querySelector("video")
9
10 var test = async_test(test => {
philipj_slow 2016/04/07 15:38:11 I'd suggest the same kinds of changes here, to con
Guido Urdaneta 2016/04/08 10:58:47 Done.
11 assert_idl_attribute(video, "srcObject");
12 assert_equals(video.srcObject, null);
13 video.src = getVideoURI("test");
14 navigator.webkitGetUserMedia(
15 {video:true},
16 test.step_func(stream => {
17 video.onplaying = test.step_func(playingSrcObject);
18 video.srcObject = stream;
19 }),
20 test.unreached_func("Did not get mediastream"));
21 });
22
23 function playingSrcObject()
24 {
25 assert_not_equals(video.srcObject, null);
26 assert_class_string(video.srcObject, "MediaStream");
27 assert_equals(video.currentSrc, "");
28 video.onplaying = test.step_func_done(playingFileAfterSrcObjectRemoved);
29 video.srcObject = null;
30 }
31
32 function playingFileAfterSrcObjectRemoved()
33 {
34 assert_equals(video.srcObject, null);
35 assert_equals(video.currentSrc, video.src);
36 }
37 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698