blob: afab079be9d5c53388479a12b36a0c2b6ded2ea8 [file] [log] [blame]
philn@webkit.orgd49aaab2010-01-20 17:22:49 +00001<html>
2<body>
antti@apple.com4e4658c2007-11-29 02:02:11 +00003<video controls></video>
eric.carlson@apple.com72a6d932009-03-23 15:02:34 +00004
5<p>Video has no src. Test that the playing event is not dispatched.</p>
6
mihaip@chromium.org9d9ccc12011-02-24 23:10:46 +00007<script src=video-test.js></script>
antti2e25dae2007-11-12 01:54:55 +00008<script>
eric.carlson@apple.com72a6d932009-03-23 15:02:34 +00009 waitForEventAndFail('playing');
10
11 waitForEvent("loadstart");
12 waitForEvent("timeupdate");
eric.carlson@apple.com72a6d932009-03-23 15:02:34 +000013 waitForEvent("waiting");
14
philn@webkit.orgd49aaab2010-01-20 17:22:49 +000015 function onpause()
eric.carlson@apple.com72a6d932009-03-23 15:02:34 +000016 {
jer.noble@apple.com2dfda402014-11-12 23:22:36 +000017 // FIXME(138669): remove this hack once networkState changes in the synchronous section of the resource selection algorithm.
18 if (video.networkState == 3) {
19 setTimeout(onpause, 0);
20 return;
21 }
eric@webkit.orgcbc6c3c2009-10-16 22:03:40 +000022 testExpected("video.networkState", HTMLMediaElement.NETWORK_EMPTY);
eric.carlson@apple.com72a6d932009-03-23 15:02:34 +000023 endTest();
24 consoleWrite("");
25 }
philn@webkit.orgd49aaab2010-01-20 17:22:49 +000026
27 waitForEvent("pause", onpause);
28
joepeck@webkit.orga6dfe9c2017-04-28 03:33:57 +000029 run("handlePromise(video.play())");
philn@webkit.orgd49aaab2010-01-20 17:22:49 +000030 run("video.pause()");
antti2e25dae2007-11-12 01:54:55 +000031</script>
philn@webkit.orgd49aaab2010-01-20 17:22:49 +000032</body>
33</html>