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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-move-to-new-document.html

Issue 1481913002: Remove userCancelledLoad and refactor the code at the call sites (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address nits Created 5 years 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>Verify that moving a video element to a new document, still loads it norm ally</title>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script src="media-file.js"></script>
6 <video></video>
7 <iframe></iframe>
8 <script>
9 async_test(function(t) {
10 var video = document.querySelector('video');
11 video.src = findMediaFile("video", "content/test");
12 video.onloadeddata = this.step_func(function() {
13 video.onloadeddata = null;
14 assert_true(video.networkState == video.NETWORK_IDLE || video.networ kState == video.NETWORK_LOADING);
15 assert_greater_than(video.readyState, video.HAVE_METADATA);
16 // Move the video element to iframe document from
17 // main document and verify that it loads properly
18 document.querySelector('iframe').contentDocument.body.appendChild(vi deo);
19 assert_equals(video.networkState, video.NETWORK_NO_SOURCE);
20 assert_equals(video.readyState, video.HAVE_NOTHING);
21 var actual_events = [];
22 var expected_events = ['emptied', 'loadstart', 'loadeddata'];
23 expected_events.forEach(function(type) {
24 video.addEventListener(type, t.step_func(function() {
25 actual_events.push(type);
26 if (type == 'loadeddata') {
27 assert_array_equals(actual_events, expected_events);
28 t.done();
29 }
30 }));
31 });
32 });
33 });
34 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698