зеркало из https://github.com/mozilla/gecko-dev.git
merge m-c to inbound
This commit is contained in:
Коммит
77db65e9db
|
@ -19,7 +19,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="90777363ed0a4e6d32612074a12fb2c73c353a25"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5b4b4fc17a8e4a513a977f7062ea3e65d26ce268"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="27b2c2ef9a50d5dc79b6a771b3a3c775a888d13b"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="90777363ed0a4e6d32612074a12fb2c73c353a25"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="5b4b4fc17a8e4a513a977f7062ea3e65d26ce268"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="27b2c2ef9a50d5dc79b6a771b3a3c775a888d13b"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="08b7f6a625f23e48a9cb0c8f63ee131009754f7c"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="cabebb87fcd32f8596af08e6b5e80764ee0157dd"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="276ce45e78b09c4a4ee643646f691d22804754c1">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="90777363ed0a4e6d32612074a12fb2c73c353a25"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="5b4b4fc17a8e4a513a977f7062ea3e65d26ce268"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="27b2c2ef9a50d5dc79b6a771b3a3c775a888d13b"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="90777363ed0a4e6d32612074a12fb2c73c353a25"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5b4b4fc17a8e4a513a977f7062ea3e65d26ce268"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="27b2c2ef9a50d5dc79b6a771b3a3c775a888d13b"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</project>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="90777363ed0a4e6d32612074a12fb2c73c353a25"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="5b4b4fc17a8e4a513a977f7062ea3e65d26ce268"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="27b2c2ef9a50d5dc79b6a771b3a3c775a888d13b"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="08b7f6a625f23e48a9cb0c8f63ee131009754f7c"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="cabebb87fcd32f8596af08e6b5e80764ee0157dd"/>
|
||||
|
@ -119,7 +119,7 @@
|
|||
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="e8a318f7690092e639ba88891606f4183e846d3f"/>
|
||||
<project name="device/qcom/common" path="device/qcom/common" revision="34ed8345250bb97262d70a052217a92e83444ede"/>
|
||||
<project name="device-flame" path="device/t2m/flame" remote="b2g" revision="b8ff7901a20aab3041aaca4eb73abd6d57f4bb8a"/>
|
||||
<project name="codeaurora_kernel_msm" path="kernel" remote="b2g" revision="6d29b672b039612c08c40e92d8051a4cfbd38162"/>
|
||||
<project name="codeaurora_kernel_msm" path="kernel" remote="b2g" revision="bfd01320fba192812c0ffef18d06d5af2b9d9a54"/>
|
||||
<project name="kernel_lk" path="bootable/bootloader/lk" remote="b2g" revision="2b1d8b5b7a760230f4c94c02e733e3929f44253a"/>
|
||||
<project name="platform/bootable/recovery" path="bootable/recovery" revision="f2914eacee9120680a41463708bb6ee8291749fc"/>
|
||||
<project name="platform/external/bluetooth/bluedroid" path="external/bluetooth/bluedroid" revision="81c4a859d75d413ad688067829d21b7ba9205f81"/>
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"remote": "",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "0908aa88a00873fd06fa903b1be3b258872eb49c",
|
||||
"revision": "f75265896a0f15be8e125f749804be1b3be7002c",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="90777363ed0a4e6d32612074a12fb2c73c353a25"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5b4b4fc17a8e4a513a977f7062ea3e65d26ce268"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="27b2c2ef9a50d5dc79b6a771b3a3c775a888d13b"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="90777363ed0a4e6d32612074a12fb2c73c353a25"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5b4b4fc17a8e4a513a977f7062ea3e65d26ce268"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="27b2c2ef9a50d5dc79b6a771b3a3c775a888d13b"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="90777363ed0a4e6d32612074a12fb2c73c353a25"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="5b4b4fc17a8e4a513a977f7062ea3e65d26ce268"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="27b2c2ef9a50d5dc79b6a771b3a3c775a888d13b"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="08b7f6a625f23e48a9cb0c8f63ee131009754f7c"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="cabebb87fcd32f8596af08e6b5e80764ee0157dd"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="90777363ed0a4e6d32612074a12fb2c73c353a25"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5b4b4fc17a8e4a513a977f7062ea3e65d26ce268"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="27b2c2ef9a50d5dc79b6a771b3a3c775a888d13b"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
|
|
@ -788,18 +788,12 @@ nsDOMCameraControl::AutoFocus(CameraAutoFocusCallback& aOnSuccess,
|
|||
{
|
||||
MOZ_ASSERT(mCameraControl);
|
||||
|
||||
nsRefPtr<CameraAutoFocusCallback> cb = mAutoFocusOnSuccessCb;
|
||||
if (cb) {
|
||||
if (aOnError.WasPassed()) {
|
||||
// There is already a call to AutoFocus() in progress, abort this new one
|
||||
// and invoke the error callback (if one was passed in).
|
||||
NS_DispatchToMainThread(new ImmediateErrorCallback(&aOnError.Value(),
|
||||
NS_LITERAL_STRING("AutoFocusAlreadyInProgress")));
|
||||
} else {
|
||||
// Only throw if no error callback was passed in.
|
||||
aRv = NS_ERROR_FAILURE;
|
||||
}
|
||||
return;
|
||||
nsRefPtr<CameraErrorCallback> ecb = mAutoFocusOnErrorCb.forget();
|
||||
if (ecb) {
|
||||
// There is already a call to AutoFocus() in progress, cancel it and
|
||||
// invoke the error callback (if one was passed in).
|
||||
NS_DispatchToMainThread(new ImmediateErrorCallback(ecb,
|
||||
NS_LITERAL_STRING("AutoFocusInterrupted")));
|
||||
}
|
||||
|
||||
mAutoFocusOnSuccessCb = &aOnSuccess;
|
||||
|
|
|
@ -10,3 +10,4 @@ support-files = camera_common.js
|
|||
[test_camera_fake_parameters.html]
|
||||
[test_camera_hardware_face_detection.html]
|
||||
[test_camera_hardware_auto_focus_moving_cb.html]
|
||||
[test_bug1022766.html]
|
||||
|
|
|
@ -0,0 +1,97 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test for bug 1022766</title>
|
||||
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="camera_common.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<video id="viewfinder" width="200" height="200" autoplay></video>
|
||||
<img src="#" alt="This image is going to load" id="testimage"/>
|
||||
<script class="testbody" type="text/javascript;version=1.7">
|
||||
|
||||
var whichCamera = navigator.mozCameras.getListOfCameras()[0];
|
||||
var config = {
|
||||
mode: 'picture',
|
||||
recorderProfile: 'cif',
|
||||
previewSize: {
|
||||
width: 352,
|
||||
height: 288
|
||||
}
|
||||
};
|
||||
|
||||
function onError(e) {
|
||||
ok(false, "Error" + JSON.stringify(e));
|
||||
}
|
||||
|
||||
var Camera = {
|
||||
cameraObj: null,
|
||||
_otherPictureSize: null,
|
||||
get viewfinder() {
|
||||
return document.getElementById('viewfinder');
|
||||
},
|
||||
|
||||
firstCallFailed: false,
|
||||
secondCallSucceeded: false,
|
||||
checkForDone: function test_checkForDone() {
|
||||
if (Camera.firstCallFailed && Camera.secondCallSucceeded) {
|
||||
Camera.cameraObj.release();
|
||||
Camera.cameraObj = null;
|
||||
CameraTest.end();
|
||||
}
|
||||
},
|
||||
|
||||
successOne: function test_successOne(focused) {
|
||||
ok(false, "First call to autoFocus() succeeded unexpectedly");
|
||||
},
|
||||
failureOne: function test_failureOne(error) {
|
||||
ok(error == "AutoFocusInterrupted", "First call to autoFocus() failed with: "
|
||||
+ error);
|
||||
Camera.firstCallFailed = true;
|
||||
Camera.checkForDone();
|
||||
},
|
||||
successTwo: function test_successTwo(focused) {
|
||||
ok(true, "Second call to autoFocus() succeeded");
|
||||
Camera.secondCallSucceeded = true;
|
||||
Camera.checkForDone();
|
||||
},
|
||||
failureTwo: function test_failureTwo(error) {
|
||||
ok(false, "Second call to autoFocus() failed unexpectedly with: " + error);
|
||||
},
|
||||
|
||||
start: function test_start() {
|
||||
function onSuccess(camera, config) {
|
||||
Camera.cameraObj = camera;
|
||||
Camera.viewfinder.mozSrcObject = camera;
|
||||
Camera.viewfinder.play();
|
||||
|
||||
// It doesn't matter if the emulator supports focus or not;
|
||||
// this is just testing the sequencing.
|
||||
camera.autoFocus(Camera.successOne, Camera.failureOne);
|
||||
camera.autoFocus(Camera.successTwo, Camera.failureTwo);
|
||||
};
|
||||
|
||||
navigator.mozCameras.getCamera(whichCamera, config, onSuccess, onError);
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener('beforeunload', function() {
|
||||
Camera.viewfinder.mozSrcObject = null;
|
||||
if (Camera.cameraObj) {
|
||||
Camera.cameraObj.release();
|
||||
Camera.cameraObj = null;
|
||||
}
|
||||
});
|
||||
|
||||
CameraTest.begin("hardware", function(test) {
|
||||
test.set("auto-focus-process-failure", function() {
|
||||
Camera.start();
|
||||
})
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче