Update WPT tests for embedded content
[WebKit-https.git] / LayoutTests / imported / w3c / web-platform-tests / html / semantics / embedded-content / media-elements / loading-the-media-resource / resource-selection-invoke-remove-src.html
1 <!doctype html>
2 <title>NOT invoking media load or resource selection when removing the src attribute</title>
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <div id=log></div>
6 <script>
7 var v;
8 var t = async_test(function(t) {
9   v = document.createElement('video');
10   v.setAttribute('src', ''); // invokes media load
11   assert_equals(v.networkState, v.NETWORK_NO_SOURCE, 'networkState after setting src');
12   var s = document.createElement('source');
13   s.onerror = this.step_func(function() { assert_unreached(); });
14   v.appendChild(s); // src is present so nothing happens here
15   onload = this.step_func(function() { t.done(); });
16 });
17 </script>
18 <script>
19 t.step(function() {
20   v.removeAttribute('src'); // nothing should happen
21 });
22 </script>