Update WPT tests for embedded content
[WebKit-https.git] / LayoutTests / imported / w3c / web-platform-tests / html / semantics / embedded-content / media-elements / playing-the-media-resource / pause-remove-from-document-networkState.html
1 <!doctype html>
2 <title>paused state when removing from a document when networkState is NETWORK_EMPTY</title>
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <div id="log"></div>
6 <video hidden></video>
7 <script>
8 // Negative test for the specified behavior prior to HTML r8447.
9 async_test(function(t) {
10   var v = document.querySelector('video');
11   v.play();
12   t.step_timeout(function() {
13     assert_equals(v.networkState, v.NETWORK_EMPTY,
14                   'networkState after stable state');
15     assert_false(v.paused, 'paused after stable state');
16     v.parentNode.removeChild(v);
17     assert_false(v.paused, 'paused after removing');
18     v.onpause = t.step_func_done();
19   }, 0);
20 });
21 </script>