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-insert-into-iframe.html
1 <!doctype html>
2 <title>NOT invoking resource selection by inserting into other document with src set</title>
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <div id=log></div>
6 <iframe hidden></iframe>
7 <script>
8 async_test(function(t) {
9   var v = document.createElement('video');
10   v.src = 'data:,';
11   v.onerror = t.step_func(function() {
12     assert_equals(v.readyState, v.HAVE_NOTHING);
13     assert_equals(v.networkState, v.NETWORK_NO_SOURCE);
14     var iframe = document.querySelector('iframe');
15     iframe.contentDocument.body.appendChild(v);
16     v.onloadstart = t.step_func(function() { assert_unreached(); });
17     // wait for an event after the above
18     var v2 = document.createElement('video');
19     v2.src = 'data:,';
20     v2.onloadstart = t.step_func(function() { t.done(); });
21   });
22 });
23 </script>