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('loadstart')

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('loadstart')

EVENT('error')
EXPECTED (event.target.tagName == 'SOURCE') OK
EXPECTED (video.error == 'null') OK

EVENT('loadedmetadata')

END OF TEST

