philn@webkit.org | d49aaab | 2010-01-20 17:22:49 +0000 | [diff] [blame] | 1 | <html> |
| 2 | <body> |
antti@apple.com | 4e4658c | 2007-11-29 02:02:11 +0000 | [diff] [blame] | 3 | <video controls></video> |
eric.carlson@apple.com | 72a6d93 | 2009-03-23 15:02:34 +0000 | [diff] [blame] | 4 | |
| 5 | <p>Video has no src. Test that the playing event is not dispatched.</p> |
| 6 | |
mihaip@chromium.org | 9d9ccc1 | 2011-02-24 23:10:46 +0000 | [diff] [blame] | 7 | <script src=video-test.js></script> |
antti | 2e25dae | 2007-11-12 01:54:55 +0000 | [diff] [blame] | 8 | <script> |
eric.carlson@apple.com | 72a6d93 | 2009-03-23 15:02:34 +0000 | [diff] [blame] | 9 | waitForEventAndFail('playing'); |
| 10 | |
| 11 | waitForEvent("loadstart"); |
| 12 | waitForEvent("timeupdate"); |
eric.carlson@apple.com | 72a6d93 | 2009-03-23 15:02:34 +0000 | [diff] [blame] | 13 | waitForEvent("waiting"); |
| 14 | |
philn@webkit.org | d49aaab | 2010-01-20 17:22:49 +0000 | [diff] [blame] | 15 | function onpause() |
eric.carlson@apple.com | 72a6d93 | 2009-03-23 15:02:34 +0000 | [diff] [blame] | 16 | { |
jer.noble@apple.com | 2dfda40 | 2014-11-12 23:22:36 +0000 | [diff] [blame] | 17 | // 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.org | cbc6c3c | 2009-10-16 22:03:40 +0000 | [diff] [blame] | 22 | testExpected("video.networkState", HTMLMediaElement.NETWORK_EMPTY); |
eric.carlson@apple.com | 72a6d93 | 2009-03-23 15:02:34 +0000 | [diff] [blame] | 23 | endTest(); |
| 24 | consoleWrite(""); |
| 25 | } |
philn@webkit.org | d49aaab | 2010-01-20 17:22:49 +0000 | [diff] [blame] | 26 | |
| 27 | waitForEvent("pause", onpause); |
| 28 | |
joepeck@webkit.org | a6dfe9c | 2017-04-28 03:33:57 +0000 | [diff] [blame] | 29 | run("handlePromise(video.play())"); |
philn@webkit.org | d49aaab | 2010-01-20 17:22:49 +0000 | [diff] [blame] | 30 | run("video.pause()"); |
antti | 2e25dae | 2007-11-12 01:54:55 +0000 | [diff] [blame] | 31 | </script> |
philn@webkit.org | d49aaab | 2010-01-20 17:22:49 +0000 | [diff] [blame] | 32 | </body> |
| 33 | </html> |