Test that the methods throw INVALID_STATE_ERR when the media element has not loaded. canPlayType() never throws. EXPECTED (video.networkState == '0') OK EXPECTED (video.currentSrc == '') OK No 'src'. Verify that all methods except canPlayType() throw INVALID_STATE_ERR. TEST(video.webkitGenerateKeyRequest('webkit-org.w3.clearkey')) THROWS(DOMException.INVALID_STATE_ERR) FAIL TEST(video.webkitAddKey('webkit-org.w3.clearkey', key)) THROWS(DOMException.INVALID_STATE_ERR) FAIL TEST(video.webkitCancelKeyRequest('webkit-org.w3.clearkey')) THROWS(DOMException.INVALID_STATE_ERR) FAIL RUN(video.canPlayType('audio/wav', 'webkit-org.w3.clearkey')) 'src' has been set, but loading has not yet started. Verify that all methods except canPlayType() throw INVALID_STATE_ERR. EXPECTED (video.networkState == '3') OK EXPECTED (video.currentSrc == '') OK TEST(video.webkitGenerateKeyRequest('webkit-org.w3.clearkey')) THROWS(DOMException.INVALID_STATE_ERR) FAIL TEST(video.webkitAddKey('webkit-org.w3.clearkey', key)) THROWS(DOMException.INVALID_STATE_ERR) FAIL TEST(video.webkitCancelKeyRequest('webkit-org.w3.clearkey')) THROWS(DOMException.INVALID_STATE_ERR) FAIL RUN(video.canPlayType('audio/wav', 'webkit-org.w3.clearkey')) EVENT(loadstart) TEST(video.networkState == video.NETWORK_LOADING || video.networkState == video.NETWORK_IDLE) OK EXPECTED (video.currentSrc != '') OK Verify that none of the methods throw when load has started. RUN(video.webkitGenerateKeyRequest('webkit-org.w3.clearkey')) TypeError: video.webkitGenerateKeyRequest is not a function. (In 'video.webkitGenerateKeyRequest('webkit-org.w3.clearkey')', 'video.webkitGenerateKeyRequest' is undefined) RUN(video.webkitAddKey('webkit-org.w3.clearkey', key)) TypeError: video.webkitAddKey is not a function. (In 'video.webkitAddKey('webkit-org.w3.clearkey', key)', 'video.webkitAddKey' is undefined) RUN(video.webkitCancelKeyRequest('webkit-org.w3.clearkey')) TypeError: video.webkitCancelKeyRequest is not a function. (In 'video.webkitCancelKeyRequest('webkit-org.w3.clearkey')', 'video.webkitCancelKeyRequest' is undefined) RUN(video.canPlayType('audio/wav', 'webkit-org.w3.clearkey')) END OF TEST