mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 57e490053263 (bug 1018928) for causing the intermittent test failures in bug 1032991
This commit is contained in:
parent
e90b632475
commit
d3f825585d
@ -40,8 +40,6 @@ skip-if = android_version == "10"
|
||||
skip-if = processor == "x86"
|
||||
[testFormHistory]
|
||||
[testGetUserMedia]
|
||||
# disabled on 2.3; see bug 981881]
|
||||
skip-if = android_version == "10"
|
||||
# [testHistory] # see bug 915350
|
||||
[testHomeBanner]
|
||||
# disabled on x86 only; bug 957185
|
||||
|
@ -4,7 +4,6 @@
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" charset="utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<div id="content"></div>
|
||||
<script type="application/javascript">
|
||||
var video_status = false;
|
||||
var video = document.createElement("video");
|
||||
@ -15,9 +14,6 @@
|
||||
var audio = document.createElement("audio");
|
||||
audio.setAttribute("controls", true);
|
||||
|
||||
var content = document.getElementById("content");
|
||||
document.title = "gUM Test Page";
|
||||
|
||||
startAudioVideo();
|
||||
|
||||
function startAudioVideo() {
|
||||
@ -45,6 +41,7 @@
|
||||
function startMedia(param) {
|
||||
try {
|
||||
window.navigator.mozGetUserMedia(param, function(stream) {
|
||||
message.innerHTML = "<p>Success!</p>";
|
||||
if (video_status) {
|
||||
content.appendChild(video);
|
||||
video.mozSrcObject = stream;
|
||||
@ -55,18 +52,7 @@
|
||||
audio.mozSrcObject = stream;
|
||||
audio.play();
|
||||
}
|
||||
var audioTracks = stream.getAudioTracks();
|
||||
var videoTracks = stream.getVideoTracks();
|
||||
document.title = "";
|
||||
if (audioTracks.length > 0) {
|
||||
document.title += "audio";
|
||||
}
|
||||
if (videoTracks.length > 0) {
|
||||
document.title += "video";
|
||||
}
|
||||
document.title += " gumtest";
|
||||
}, function(err) {
|
||||
document.title = "failed gumtest";
|
||||
stopMedia();
|
||||
});
|
||||
} catch(e) {
|
||||
@ -74,4 +60,4 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body></html>
|
||||
</body></html>
|
@ -8,13 +8,8 @@ public class testGetUserMedia extends BaseTest {
|
||||
String GUM_URL = getAbsoluteUrl("/robocop/robocop_getusermedia.html");
|
||||
|
||||
String GUM_MESSAGE = "Would you like to share your camera and microphone with";
|
||||
String GUM_ALLOW = "^Share$";
|
||||
String GUM_DENY = "^Don't Share$";
|
||||
|
||||
String GUM_PAGE_FAILED = "failed gumtest";
|
||||
String GUM_PAGE_AUDIO = "audio gumtest";
|
||||
String GUM_PAGE_VIDEO = "video gumtest";
|
||||
String GUM_PAGE_AUDIOVIDEO = "audiovideo gumtest";
|
||||
String GUM_ALLOW = "Share";
|
||||
String GUM_DENY = "Don't share";
|
||||
|
||||
blockForGeckoReady();
|
||||
|
||||
@ -23,45 +18,13 @@ public class testGetUserMedia extends BaseTest {
|
||||
// getNumberOfCameras is Gingerbread/9+
|
||||
// We could avoid that requirement by trying to open a Camera but we
|
||||
// already know our 2.2/Tegra test devices don't have them.
|
||||
if (Build.VERSION.SDK_INT < 9) {
|
||||
return;
|
||||
if (Build.VERSION.SDK_INT >= 9) {
|
||||
if (Camera.getNumberOfCameras() > 0) {
|
||||
// Test GUM notification
|
||||
inputAndLoadUrl(GUM_URL);
|
||||
waitForText(GUM_MESSAGE);
|
||||
mAsserter.is(mSolo.searchText(GUM_MESSAGE), true, "GetUserMedia doorhanger has been displayed");
|
||||
}
|
||||
}
|
||||
|
||||
if (Camera.getNumberOfCameras() <= 0) {
|
||||
return;
|
||||
}
|
||||
// Test GUM notification showing
|
||||
inputAndLoadUrl(GUM_URL);
|
||||
waitForText(GUM_MESSAGE);
|
||||
mAsserter.is(mSolo.searchText(GUM_MESSAGE), true, "GetUserMedia doorhanger has been displayed");
|
||||
mSolo.clickOnButton(GUM_DENY);
|
||||
verifyPageTitle(GUM_PAGE_FAILED);
|
||||
|
||||
inputAndLoadUrl(GUM_URL);
|
||||
waitForText(GUM_MESSAGE);
|
||||
// Cameras don't work on the testing hardware, so stream a tab
|
||||
mSolo.clickOnText("Back facing camera");
|
||||
mSolo.clickOnText("Choose a tab to stream");
|
||||
mSolo.clickOnButton(GUM_ALLOW);
|
||||
mSolo.clickOnText("gUM Test Page");
|
||||
verifyPageTitle(GUM_PAGE_AUDIOVIDEO);
|
||||
|
||||
inputAndLoadUrl(GUM_URL);
|
||||
waitForText(GUM_MESSAGE);
|
||||
mSolo.clickOnText("Back facing camera");
|
||||
mSolo.clickOnText("No Video");
|
||||
mSolo.clickOnButton(GUM_ALLOW);
|
||||
verifyPageTitle(GUM_PAGE_AUDIO);
|
||||
|
||||
inputAndLoadUrl(GUM_URL);
|
||||
waitForText(GUM_MESSAGE);
|
||||
// Cameras don't work on the testing hardware, so stream a tab
|
||||
mSolo.clickOnText("Back facing camera");
|
||||
mSolo.clickOnText("Choose a tab to stream");
|
||||
mSolo.clickOnText("Microphone 1");
|
||||
mSolo.clickOnText("No Audio");
|
||||
mSolo.clickOnButton(GUM_ALLOW);
|
||||
mSolo.clickOnText("gUM Test Page");
|
||||
verifyPageTitle(GUM_PAGE_VIDEO);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user