Backed out changeset 0b84a9bee07a (bug 937429) for Android test_videocontrols_standalone.html failures.

CLOSED TREE
This commit is contained in:
Ryan VanderMeulen 2013-11-22 12:33:19 -05:00
parent 92dc8a10f4
commit 372ab72eb3
3 changed files with 4 additions and 82 deletions

View File

@ -5,13 +5,12 @@
MOCHITEST_FILES = \
tree_shared.js \
test_audiocontrols_dimensions.html \
test_mousecapture_area.html \
test_videocontrols.html \
test_videocontrols_audio.html \
test_videocontrols_audio_direction.html \
test_videocontrols_standalone.html \
test_videocontrols_video_direction.html \
test_videocontrols_audio_direction.html \
test_audiocontrols_dimensions.html \
videocontrols_direction-1-ref.html \
videocontrols_direction-1a.html \
videocontrols_direction-1b.html \

View File

@ -1,72 +0,0 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Video controls test</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="text/javascript">
const videoWidth = 320;
const videoHeight = 240;
function getMediaElement(aWindow) {
return aWindow.document.getElementsByTagName("video")[0];
}
var popup = window.open("seek_with_sound.ogg");
popup.addEventListener("load", function onLoad() {
popup.removeEventListener("load", onLoad);
var video = getMediaElement(popup);
if (video.readyState >= video.HAVE_METADATA)
runTestVideo(video);
else {
video.addEventListener("loadedmetadata", function onPlay() {
video.removeEventListener("loadedmetadata", onPlay);
runTestVideo(video);
});
}
});
function runTestVideo(aVideo) {
var boundingRect = aVideo.getBoundingClientRect();
is(boundingRect.width, videoWidth, "Width of the video should match expectation");
is(boundingRect.height, videoHeight, "Height of video should match expectation");
popup.close();
runTestAudioPre();
}
function runTestAudioPre() {
popup = window.open("audio.ogg");
popup.addEventListener("load", function onLoad() {
popup.removeEventListener("load", onLoad);
var audio = getMediaElement(popup);
if (audio.readyState >= audio.HAVE_METADATA)
runTestAudio(audio);
else {
audio.addEventListener("loadedmetadata", function onPlay() {
audio.removeEventListener("loadedmetadata", onPlay);
runTestAudio(audio);
})
}
})
}
function runTestAudio(aAudio) {
var boundingRect = aAudio.getBoundingClientRect();
is(boundingRect.height, 28, "Height of audio element should be 28, which is equal to the controls bar.");
popup.close();
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
</script>
</pre>
</body>
</html>

View File

@ -344,13 +344,8 @@
this._isAudioOnly = val;
if (!this.isTopLevelSyntheticDocument)
return;
if (this._isAudioOnly) {
this.video.style.height = this._controlBarHeight + "px";
this.video.style.width = "66%";
} else {
this.video.style.removeProperty("height");
this.video.style.removeProperty("width");
}
this.video.style.height = this._controlBarHeight + "px";
this.video.style.width = "66%";
},
suppressError : false,