Commit 0fec7152 authored by antti's avatar antti
Browse files

Reviewed by Maciej.

        
        Media tests from feature branch.

        * fast/dom/Window/window-properties-expected.txt: Replaced.
        * fast/dom/Window/window-properties.html: Replaced.
        * media: Added.
        * media/audio-constructor-expected.txt: Added.
        * media/audio-constructor-src-expected.txt: Added.
        * media/audio-constructor-src.html: Added.
        * media/audio-constructor.html: Added.
        * media/content: Added.
        * media/content/test.mp4: Added.
        * media/content/test.wav: Added.
        * media/progress-event-expected.txt: Added.
        * media/progress-event.html: Added.
        * media/video-append-source-expected.txt: Added.
        * media/video-append-source.html: Added.
        * media/video-autoplay-expected.txt: Added.
        * media/video-autoplay.html: Added.
        * media/video-buffered-expected.txt: Added.
        * media/video-buffered.html: Added.
        * media/video-cuepoint-add-expected.txt: Added.
        * media/video-cuepoint-add.html: Added.
        * media/video-cuepoint-multiple-expected.txt: Added.
        * media/video-cuepoint-multiple.html: Added.
        * media/video-cuepoint-pause-expected.txt: Added.
        * media/video-cuepoint-pause.html: Added.
        * media/video-cuepoint-remove-expected.txt: Added.
        * media/video-cuepoint-remove-multiple-expected.txt: Added.
        * media/video-cuepoint-remove-multiple.html: Added.
        * media/video-cuepoint-remove.html: Added.
        * media/video-currentTime-expected.txt: Added.
        * media/video-currentTime-set-expected.txt: Added.
        * media/video-currentTime-set.html: Added.
        * media/video-currentTime-set2-expected.txt: Added.
        * media/video-currentTime-set2.html: Added.
        * media/video-currentTime.html: Added.
        * media/video-dom-autoplay-expected.txt: Added.
        * media/video-dom-autoplay.html: Added.
        * media/video-dom-end-expected.txt: Added.
        * media/video-dom-end.html: Added.
        * media/video-dom-loopcount-expected.txt: Added.
        * media/video-dom-loopcount.html: Added.
        * media/video-dom-loopend-expected.txt: Added.
        * media/video-dom-loopend.html: Added.
        * media/video-dom-loopstart-expected.txt: Added.
        * media/video-dom-loopstart.html: Added.
        * media/video-dom-src-expected.txt: Added.
        * media/video-dom-src.html: Added.
        * media/video-dom-start-expected.txt: Added.
        * media/video-dom-start.html: Added.
        * media/video-end-expected.txt: Added.
        * media/video-end.html: Added.
        * media/video-error-abort-expected.txt: Added.
        * media/video-error-abort.html: Added.
        * media/video-error-does-not-exist-expected.txt: Added.
        * media/video-error-does-not-exist.html: Added.
        * media/video-load-networkState-expected.txt: Added.
        * media/video-load-networkState.html: Added.
        * media/video-load-readyState-expected.txt: Added.
        * media/video-load-readyState.html: Added.
        * media/video-loopcount-expected.txt: Added.
        * media/video-loopcount.html: Added.
        * media/video-loopend-expected.txt: Added.
        * media/video-loopend.html: Added.
        * media/video-loopstart-expected.txt: Added.
        * media/video-loopstart.html: Added.
        * media/video-muted-expected.txt: Added.
        * media/video-muted.html: Added.
        * media/video-no-autoplay-expected.txt: Added.
        * media/video-no-autoplay.html: Added.
        * media/video-seekable-expected.txt: Added.
        * media/video-seekable.html: Added.
        * media/video-size-expected.txt: Added.
        * media/video-size.html: Added.
        * media/video-source-expected.txt: Added.
        * media/video-source-media-expected.txt: Added.
        * media/video-source-media.html: Added.
        * media/video-source-type-expected.txt: Added.
        * media/video-source-type.html: Added.
        * media/video-source.html: Added.
        * media/video-src-expected.txt: Added.
        * media/video-src-source-expected.txt: Added.
        * media/video-src-source.html: Added.
        * media/video-src.html: Added.
        * media/video-start-expected.txt: Added.
        * media/video-start.html: Added.
        * media/video-test.js: Added.
        * media/video-volume-expected.txt: Added.
        * media/video-volume.html: Added.
        * platform/qt/Skipped:
        * platform/win/Skipped:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e2fccdbf
2007-10-29 Antti Koivisto <antti@apple.com>
Reviewed by Maciej.
Media tests from feature branch.
* fast/dom/Window/window-properties-expected.txt: Replaced.
* fast/dom/Window/window-properties.html: Replaced.
* media: Added.
* media/audio-constructor-expected.txt: Added.
* media/audio-constructor-src-expected.txt: Added.
* media/audio-constructor-src.html: Added.
* media/audio-constructor.html: Added.
* media/content: Added.
* media/content/test.mp4: Added.
* media/content/test.wav: Added.
* media/progress-event-expected.txt: Added.
* media/progress-event.html: Added.
* media/video-append-source-expected.txt: Added.
* media/video-append-source.html: Added.
* media/video-autoplay-expected.txt: Added.
* media/video-autoplay.html: Added.
* media/video-buffered-expected.txt: Added.
* media/video-buffered.html: Added.
* media/video-cuepoint-add-expected.txt: Added.
* media/video-cuepoint-add.html: Added.
* media/video-cuepoint-multiple-expected.txt: Added.
* media/video-cuepoint-multiple.html: Added.
* media/video-cuepoint-pause-expected.txt: Added.
* media/video-cuepoint-pause.html: Added.
* media/video-cuepoint-remove-expected.txt: Added.
* media/video-cuepoint-remove-multiple-expected.txt: Added.
* media/video-cuepoint-remove-multiple.html: Added.
* media/video-cuepoint-remove.html: Added.
* media/video-currentTime-expected.txt: Added.
* media/video-currentTime-set-expected.txt: Added.
* media/video-currentTime-set.html: Added.
* media/video-currentTime-set2-expected.txt: Added.
* media/video-currentTime-set2.html: Added.
* media/video-currentTime.html: Added.
* media/video-dom-autoplay-expected.txt: Added.
* media/video-dom-autoplay.html: Added.
* media/video-dom-end-expected.txt: Added.
* media/video-dom-end.html: Added.
* media/video-dom-loopcount-expected.txt: Added.
* media/video-dom-loopcount.html: Added.
* media/video-dom-loopend-expected.txt: Added.
* media/video-dom-loopend.html: Added.
* media/video-dom-loopstart-expected.txt: Added.
* media/video-dom-loopstart.html: Added.
* media/video-dom-src-expected.txt: Added.
* media/video-dom-src.html: Added.
* media/video-dom-start-expected.txt: Added.
* media/video-dom-start.html: Added.
* media/video-end-expected.txt: Added.
* media/video-end.html: Added.
* media/video-error-abort-expected.txt: Added.
* media/video-error-abort.html: Added.
* media/video-error-does-not-exist-expected.txt: Added.
* media/video-error-does-not-exist.html: Added.
* media/video-load-networkState-expected.txt: Added.
* media/video-load-networkState.html: Added.
* media/video-load-readyState-expected.txt: Added.
* media/video-load-readyState.html: Added.
* media/video-loopcount-expected.txt: Added.
* media/video-loopcount.html: Added.
* media/video-loopend-expected.txt: Added.
* media/video-loopend.html: Added.
* media/video-loopstart-expected.txt: Added.
* media/video-loopstart.html: Added.
* media/video-muted-expected.txt: Added.
* media/video-muted.html: Added.
* media/video-no-autoplay-expected.txt: Added.
* media/video-no-autoplay.html: Added.
* media/video-seekable-expected.txt: Added.
* media/video-seekable.html: Added.
* media/video-size-expected.txt: Added.
* media/video-size.html: Added.
* media/video-source-expected.txt: Added.
* media/video-source-media-expected.txt: Added.
* media/video-source-media.html: Added.
* media/video-source-type-expected.txt: Added.
* media/video-source-type.html: Added.
* media/video-source.html: Added.
* media/video-src-expected.txt: Added.
* media/video-src-source-expected.txt: Added.
* media/video-src-source.html: Added.
* media/video-src.html: Added.
* media/video-start-expected.txt: Added.
* media/video-start.html: Added.
* media/video-test.js: Added.
* media/video-volume-expected.txt: Added.
* media/video-volume.html: Added.
* platform/qt/Skipped:
* platform/win/Skipped:
2007-10-30 Justin Garcia <set EMAIL_ADDRESS environment variable>
Reviewed by Darin Adler.
......
......@@ -32,6 +32,7 @@ window.Attr.prototype.normalize [function]
window.Attr.prototype.removeChild [function]
window.Attr.prototype.removeEventListener [function]
window.Attr.prototype.replaceChild [function]
window.Audio [object Object]
window.CDATASection [object CDATASectionConstructor]
window.CDATASection.prototype [object CDATASectionPrototype]
window.CDATASection.prototype.ATTRIBUTE_NODE [number]
......@@ -558,6 +559,17 @@ window.HTMLAppletElement [object HTMLAppletElementConstructor]
window.HTMLAppletElement.prototype [printed above as window.Element.prototype]
window.HTMLAreaElement [object HTMLAreaElementConstructor]
window.HTMLAreaElement.prototype [printed above as window.Element.prototype]
window.HTMLAudioElement [object HTMLMediaElementConstructor]
window.HTMLAudioElement.CAN_PLAY [number]
window.HTMLAudioElement.CAN_PLAY_THROUGH [number]
window.HTMLAudioElement.CAN_SHOW_CURRENT_FRAME [number]
window.HTMLAudioElement.DATA_UNAVAILABLE [number]
window.HTMLAudioElement.EMPTY [number]
window.HTMLAudioElement.LOADED [number]
window.HTMLAudioElement.LOADED_FIRST_FRAME [number]
window.HTMLAudioElement.LOADED_METADATA [number]
window.HTMLAudioElement.LOADING [number]
window.HTMLAudioElement.prototype [printed above as window.Element.prototype]
window.HTMLBRElement [object HTMLBRElementConstructor]
window.HTMLBRElement.prototype [printed above as window.Element.prototype]
window.HTMLBaseElement [object HTMLBaseElementConstructor]
......@@ -622,6 +634,7 @@ window.HTMLMapElement [object HTMLMapElementConstructor]
window.HTMLMapElement.prototype [printed above as window.Element.prototype]
window.HTMLMarqueeElement [object HTMLMarqueeElementConstructor]
window.HTMLMarqueeElement.prototype [printed above as window.Element.prototype]
window.HTMLMediaElement [printed above as window.HTMLAudioElement]
window.HTMLMenuElement [object HTMLMenuElementConstructor]
window.HTMLMenuElement.prototype [printed above as window.Element.prototype]
window.HTMLMetaElement [object HTMLMetaElementConstructor]
......@@ -667,7 +680,17 @@ window.HTMLTitleElement [object HTMLTitleElementConstructor]
window.HTMLTitleElement.prototype [printed above as window.Element.prototype]
window.HTMLUListElement [object HTMLUListElementConstructor]
window.HTMLUListElement.prototype [printed above as window.Element.prototype]
window.HTMLVideoElement [object HTMLVideoElementConstructor]
window.HTMLVideoElement.prototype [printed above as window.Element.prototype]
window.Image [object Object]
window.MediaError [object MediaErrorConstructor]
window.MediaError.MEDIA_ERR_ABORTED [number]
window.MediaError.MEDIA_ERR_DECODE [number]
window.MediaError.MEDIA_ERR_NETWORK [number]
window.MediaError.prototype [object MediaErrorPrototype]
window.MediaError.prototype.MEDIA_ERR_ABORTED [number]
window.MediaError.prototype.MEDIA_ERR_DECODE [number]
window.MediaError.prototype.MEDIA_ERR_NETWORK [number]
window.MediaList [object MediaListConstructor]
window.MediaList.prototype [object MediaListPrototype]
window.MediaList.prototype.appendMedium [function]
......
TEST(audio instanceof HTMLAudioElement) OK
EVENT(load) TEST(relativeURL(audio.currentSrc)=='content/test.wav') OK
EVENT(play)
END OF TEST
TEST(audio instanceof HTMLAudioElement) OK
EVENT(load) TEST(relativeURL(audio.currentSrc)=='content/test.wav') OK
EVENT(play)
END OF TEST
<body>
<script src=video-test.js></script>
<script>
var audio = new Audio("content/test.wav");
media = audio;
test("audio instanceof HTMLAudioElement");
waitForEventAndTest("load", "relativeURL(audio.currentSrc)=='content/test.wav'");
waitForEventAndEnd("play");
audio.play();
</script>
<body>
<script src=video-test.js></script>
<script>
var audio = new Audio();
media = audio;
test("audio instanceof HTMLAudioElement");
waitForEventAndTest("load", "relativeURL(audio.currentSrc)=='content/test.wav'");
waitForEventAndEnd("play");
audio.src = "content/test.wav";
audio.play();
</script>
EVENT(begin) TEST(!event.lengthComputable && event.loaded==0 && event.total==0) OK
EVENT(load) TEST(event.lengthComputable && event.loaded>0 && event.total>0) OK
END OF TEST
<video src="content/test.mp4"></video>
<script src=video-test.js></script>
<script>
waitForEventAndTest("begin", "!event.lengthComputable && event.loaded==0 && event.total==0");
waitForEventTestAndEnd("load", "event.lengthComputable && event.loaded>0 && event.total>0");
</script>
TEST(video.currentSrc=='') OK
TEST(video.currentSrc=='') OK
EVENT(load) TEST(relativeURL(video.currentSrc)=='content/test.mp4') OK
END OF TEST
<video></video>
<script src=video-test.js></script>
<script>
test("video.currentSrc==''");
var source = document.createElement("source");
source.setAttribute("src", "content/test.mp4");
video.appendChild(source);
test("video.currentSrc==''");
waitForEventTestAndEnd("load", "relativeURL(video.currentSrc)=='content/test.mp4'");
</script>
TEST(video.autoplay) OK
TEST(video.getAttribute('autoplay') != null) OK
EVENT(play) TEST(!video.paused) OK
END OF TEST
<video src=content/test.mp4 autoplay></video>
<script src=video-test.js></script>
<script>
test("video.autoplay");
test("video.getAttribute('autoplay') != null");
waitForEventTestAndEnd('play', "!video.paused");
</script>
TEST(video.buffered.length == 0) OK
TEST(video.buffered.start(-1)) THROWS(DOMException.INDEX_SIZE_ERR) OK
TEST(video.buffered.end(-1)) THROWS(DOMException.INDEX_SIZE_ERR) OK
TEST(video.buffered.start(0)) THROWS(DOMException.INDEX_SIZE_ERR) OK
TEST(video.buffered.end(0)) THROWS(DOMException.INDEX_SIZE_ERR) OK
EVENT(load)
TEST(video.buffered.length == 1) OK
TEST(video.buffered.start(0) == 0) OK
TEST(video.buffered.end(0) > 0) OK
TEST(video.buffered.start(-1)) THROWS(DOMException.INDEX_SIZE_ERR) OK
TEST(video.buffered.end(-1)) THROWS(DOMException.INDEX_SIZE_ERR) OK
TEST(video.buffered.start(1)) THROWS(DOMException.INDEX_SIZE_ERR) OK
TEST(video.buffered.end(1)) THROWS(DOMException.INDEX_SIZE_ERR) OK
END OF TEST
<video src=content/test.mp4></video>
<script src=video-test.js></script>
<script>
test("video.buffered.length == 0");
testException("video.buffered.start(-1)", "DOMException.INDEX_SIZE_ERR");
testException("video.buffered.end(-1)", "DOMException.INDEX_SIZE_ERR");
testException("video.buffered.start(0)", "DOMException.INDEX_SIZE_ERR");
testException("video.buffered.end(0)", "DOMException.INDEX_SIZE_ERR");
waitForEvent('load',
function ()
{
test("video.buffered.length == 1");
test("video.buffered.start(0) == 0");
test("video.buffered.end(0) > 0");
testException("video.buffered.start(-1)", "DOMException.INDEX_SIZE_ERR");
testException("video.buffered.end(-1)", "DOMException.INDEX_SIZE_ERR");
testException("video.buffered.start(1)", "DOMException.INDEX_SIZE_ERR");
testException("video.buffered.end(1)", "DOMException.INDEX_SIZE_ERR");
endTest();
}
);
</script>
TEST(video.currentTime.toFixed(1) == 0.2) OK
TEST(!video.paused) OK
TEST(video.currentTime.toFixed(1) == 0.4) OK
TEST(!video.paused) OK
TEST(video.currentTime.toFixed(1) == 0) OK
TEST(!video.paused) OK
END OF TEST
<video src=content/test.mp4></video>
<script src=video-test.js></script>
<script>
function cueHit1() {
test("video.currentTime.toFixed(1) == 0.2");
test("!video.paused");
}
function cueHit2() {
test("video.currentTime.toFixed(1) == 0.4");
test("!video.paused");
video.currentTime = 0;
}
function cueHit0() {
test("video.currentTime.toFixed(1) == 0");
test("!video.paused");
endTest();
}
video.addCuePoint(0.2, cueHit1);
video.addCuePoint(0.4, cueHit2);
video.addCuePoint(0, cueHit0);
video.play();
</script>
TEST(video.currentTime.toFixed(1) == 0.1) OK
TEST(!video.paused) OK
TEST(video.currentTime.toFixed(1) == 0.1) OK
TEST(!video.paused) OK
END OF TEST
<video src=content/test.mp4></video>
<script src=video-test.js></script>
<script>
function cueHit() {
test("video.currentTime.toFixed(1) == 0.1");
test("!video.paused");
}
function cueHit2() {
test("video.currentTime.toFixed(1) == 0.1");
test("!video.paused");
endTest();
}
video.addCuePoint(0.1, cueHit);
video.addCuePoint(0.1, cueHit2);
video.play();
</script>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment