Update WPT tests for embedded content
[WebKit-https.git] / LayoutTests / imported / w3c / web-platform-tests / html / semantics / embedded-content / media-elements / seeking / seek-to-negative-time.htm
1 <!doctype html>
2 <title>seek to negative time</title>
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <script src="/common/media.js"></script>
6 <div id=log></div>
7 <script>
8 async_test(function(t) {
9   var v = document.createElement('video');
10   v.src = getVideoURI('/media/movie_5');
11   v.onloadedmetadata = t.step_func(function() {
12     assert_equals(v.seekable.start(0), 0, 'earliest seekable time');
13     v.currentTime = -1;
14     assert_true(v.seeking, 'seeking after setting');
15     assert_equals(v.currentTime, 0, 'currentTime after setting');
16     v.onseeked = t.step_func(function(e) {
17       assert_false(v.seeking, 'seeking in seeked event');
18       assert_equals(v.currentTime, 0, 'currentTime in seeked event');
19       t.done();
20     });
21   });
22 });
23 </script>