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

Side by Side Diff: LayoutTests/imported/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-pointer-insert-source.html

Issue 1144143009: W3C Test: Import web-platform-tests/html/semantics (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!doctype html>
2 <title>pointer updates (adding source elements)</title>
3 <script src="../../../../../../../resources/testharness.js"></script>
4 <script src="../../../../../../../resources/testharnessreport.js"></script>
5 <div id=log></div>
6 <script>
7 var a = 0;
8 var b = 0;
9 var c = 0;
10 var x1 = 0;
11 var x2 = 0;
12 var x3 = 0;
13 var x4 = 0;
14 </script>
15 <video
16 ><source onerror=a++
17 ><source onerror=b++ src='resources/delayed-broken-video.py'
18 ><source onerror=c++
19 ></video>
20 <script>
21 async_test(function(t) {
22 var video = document.querySelector('video');
23 // add source elements
24 var source1 = document.createElement('source'); source1.onerror = function() { x1++; };
25 var source2 = document.createElement('source'); source2.onerror = function() { x2++; };
26 var source3 = document.createElement('source'); source3.onerror = function() { x3++; };
27 var source4 = document.createElement('source'); source4.onerror = function() { x4++; };
28 video.insertBefore(source1, video.querySelector('[onerror="a++"]'));
29 video.insertBefore(source2, video.querySelector('[onerror="b++"]'));
30 video.insertBefore(source3, video.querySelector('[onerror="c++"]'));
31 video.appendChild(source4);
32 window.onload = t.step_func(function() {
33 assert_equals(a, 1, 'error events on a');
34 assert_equals(b, 1, 'error events on b');
35 assert_equals(c, 1, 'error events on c');
36 assert_equals(x1, 0, 'error events on x1');
37 assert_equals(x2, 0, 'error events on x2');
38 assert_equals(x3, 1, 'error events on x3');
39 assert_equals(x4, 1, 'error events on x4');
40 t.done();
41 });
42 });
43 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698