diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-remove-src.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-remove-src.html | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-remove-src.html b/testing/web-platform/tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-remove-src.html new file mode 100644 index 000000000..6302ffeac --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-remove-src.html @@ -0,0 +1,22 @@ +<!doctype html> +<title>NOT invoking media load or resource selection when removing the src attribute</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id=log></div> +<script> +var v; +var t = async_test(function(t) { + v = document.createElement('video'); + v.setAttribute('src', ''); // invokes media load + assert_equals(v.networkState, v.NETWORK_NO_SOURCE, 'networkState after setting src'); + var s = document.createElement('source'); + s.onerror = this.step_func(function() { assert_unreached(); }); + v.appendChild(s); // src is present so nothing happens here + onload = this.step_func(function() { t.done(); }); +}); +</script> +<script> +t.step(function() { + v.removeAttribute('src'); // nothing should happen +}); +</script> |