blob: ad461a053f956feea997e6090bb42d60ccf0fb00 [file] [log] [blame]
<!doctype html>
<html>
<head>
<title>audio.networkState - NETWORK_LOADING</title>
<script src="../../w3cwrapper.js"></script>
<script src="../../../Microsoft/common/media.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-media-networkstate">spec reference</a></p>
<audio id="a" autoplay controls>
</audio>
<div id="log"></div>
<script>
var t = async_test("audioElement.networkState should be NETWORK_LOADING during loadstart event", {timeout:30000});
var a = document.getElementById("a");
a.addEventListener("loadstart", function() {
t.step(function() {
assert_true(a.networkState == a.NETWORK_LOADING || a.networkState == a.NETWORK_IDLE);
});
t.done();
a.pause();
});
a.src = getAudioURI("http://media.w3.org/2010/05/sound/sound_5") + "?" + new Date() + Math.random();
</script>
</body>
</html>