summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-candidate-remove-no-listener.html
blob: f384eb31215dc27a26a81539055739ed77584d37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!doctype html>
<title>removing the candidate source, no listener</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<script>
var v;
function createSource(src) {
  var source = document.createElement('source');
  source.src = src;
  return source;
}
var t = async_test(function(t) {
  v = document.createElement('video');
  v.appendChild(createSource('resources/delayed-broken-video.py')); // invokes resource selection
});
</script>
<!-- now resource selection algorithm will continue its sync section (the </script> tag below provides a stable state) -->
<!-- the <source> is candidate -->
<!-- pointer is between the <source> and the end of the list -->
<script>
t.step(function() {
  v.removeChild(v.firstChild); // just tests that we don't crash
  onload = t.step_func(function() { t.done(); });
});
</script>