Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

  • This WPT test may be referenced by the following Test IDs:
    • /html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-move-source-in-div.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>NOT invoking resource selection by moving &lt;source> into a &lt;div> in &lt;video></title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<video><div></div></video>
<div id=holder hidden></div>
<script>
async_test(function(t) {
var v = document.querySelector('video');
var source = document.getElementById('holder').appendChild(document.createElement('source'));
v.onloadstart = t.step_func(function() { assert_unreached(); });
v.firstChild.moveBefore(source, null); // source's new parent is the <div>, not the <video>
window.onload = t.step_func(function() { t.done(); });
});
</script>