michael@0: function test_seek7(v, seekTime, is, ok, finish) { michael@0: michael@0: // If a NaN is passed to currentTime, make sure this is caught michael@0: // otherwise an infinite loop in the Ogg backend occurs. michael@0: var completed = false; michael@0: var thrown1 = false; michael@0: var thrown2 = false; michael@0: var thrown3 = false; michael@0: michael@0: function startTest() { michael@0: if (completed) michael@0: return; michael@0: michael@0: try { michael@0: v.currentTime = NaN; michael@0: } catch(e) { michael@0: thrown1 = true; michael@0: } michael@0: michael@0: try { michael@0: v.currentTime = Math.random; michael@0: } catch(e) { michael@0: thrown3 = true; michael@0: } michael@0: michael@0: completed = true; michael@0: ok(thrown1, "Setting currentTime to invalid value of NaN"); michael@0: ok(thrown3, "Setting currentTime to invalid value of a function"); michael@0: finish(); michael@0: } michael@0: michael@0: v.addEventListener("loadedmetadata", startTest, false); michael@0: michael@0: }