blob: 6a34c077b5380cce811d2db4720710cdfe5ec2bd [file] [log] [blame]
Test to ensure that a media file blocked by a beforeload handler generates an error and does not block the document's 'load' event.
*** Test initial state ***
EXPECTED (video.networkState == '0') OK
EXPECTED (video.error == 'null') OK
*** Test blocking the 'src' attribute ***
EVENT('beforeload')
EXPECTED (event.target.tagName == 'VIDEO') OK
blocking load of 'src'
EVENT('error')
EXPECTED (event.target.tagName == 'VIDEO') OK
EXPECTED (video.error != 'null') OK
EXPECTED (video.error.code == '4') OK
EXPECTED (video.networkState == '3') OK
*** Test using the <source> element ***
EVENT('beforeload')
EXPECTED (event.target.tagName == 'VIDEO') OK
blocking load of first <source> element
EVENT('beforeload')
EXPECTED (event.target.tagName == 'VIDEO') OK
allowing load of second <source> element
EVENT('error')
EXPECTED (event.target.tagName == 'SOURCE') OK
EXPECTED (video.error == 'null') OK
END OF TEST