mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
b9843e0358
- Bug 1167459 - Skip rendering function name nodes if there's no name available (e.g. for C++ pseudoframes), r=jsantell (4a69ed224)
- missing bits Bug 1102219 - Part 4: Replace String.prototype.contains with `String.prototype.includes` in chrome code. r=till (73cd2d2b1)
- Bug 1165045 - Don't create nodes with empty text in the call tree, r=jsantell (b013aa82d)
- Bug 1166122 - Fix regression in the call tree caused by bug 1165045, r=jsantell (ee3f16901)
- Bug 1167975 - CallView._displaySelf sets this.document just because other functions use it; it should pass it as an argument instead, r=jsantell (5ef560c4f)
- Bug 1122662 - Resize graphs when window resizes;r=vporof (25c108e4e)
- Bug 1164784 - Eliminate CSS duplication with perf tool record button r=jsantell (43c9bb999)
- Bug 1150761 - Rename the performance tool's details view names to better describe the data visualizations. r=vp (04ceb6a37)
- Bug 1144424 - Rename '{self,total} allocations' to '{self,total} sampled allocations' in the performance tool. r=jsantell (ae79ad54f)
- Bug 1069910 - Add tooltips explaining what each column in the profiler's tree view represents; r=jsantell (8756f88b6)
- Bug 1107849 - Define a min/max width for the performance panel sidebar. r=vporof (e1769e831)
- Bug 11663354 - A locked recording button should appear disabled in the performance tool. r=vp (4a359d39e)
- Bug 1023546 - DevTools - Support HDPI resolutions for Windows. r=bgrins (ef1a3ecb8)
- Bug 1168125 - Cleanup performance xul and css, r=jsantell (8ec794e46)
- Bug 1168125 - Replace the waterfall view with a tree, r=jsantell (ea76514fe)
- Bug 1168125 - Add marker folding logic, r=jsantell (1d3748d2a)
- Bug 862341 Part 1: Move the network request storage from the console frontend to the console client so the netmonitor can reuse it. r=vporof (d29fb2b73)
- remove gre from resource path (126b00df1)
- Bug 943306 - Allow persisting console input history between sessions;r=past (146ebb486)
- Bug 1134845 - Add clearHistory jsterm helper to remove persisted console input history. r=past (22237e95b)
- Bug 1143497 - Offer a way to extend WebConsole commands. r=bgrins (84e2d2957)
- Bug 1125205 - Display console API messages from shared or service workers to the web console, r=past (b4b701a2c)
- Bug 1169342 - Remove nsIDOMDeviceStorage. Cleanup nsDOMDeviceStorage event wrappers. r=dhylands (41338e16f)
- Bug 1151610 - Manage the case where two extensions fight over the same command. r=bgrins (63f9d2064)
- Bug 862341 Part 2: Display cached network requests in the web console. r=vporof (83c0e7263)
- Bug 1144211 - Improve code coverage of camera mochitests. r=mikeh (ba9f3de89)
- Bug 1152500 - Fix how stop recording may be handled out-of-order. r=dhylands (d8bdd379c)
- Bug 862341 Part 3: Display cached network requests in the network panel. r=vporof (a1a6f151d)
- Bug 862341 Part 4: Start recording network requests when the toolbox opens. r=vporof (7a2bdf847)
- Bug 1151499 - Correct the FM playable state. r=baku (8af26fff2)
- Bug 1180347 - Split media.useAudioChannelService to support turning the service on without turning the Firefox OS specific APIs on; r=baku (3fa29291a)
- Bug 862341 Part 5: Tests. r=vporof (82fb944c6)
244 lines
6.8 KiB
HTML
244 lines
6.8 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Test for bug 975472</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 suite = new CameraTestSuite();
|
|
|
|
function cameraRelease(p) {
|
|
return suite.camera.release();
|
|
}
|
|
|
|
suite.test('release-close-event', function() {
|
|
// bug 1099390
|
|
function release(p) {
|
|
return new Promise(function(resolve, reject) {
|
|
var gotCloseEvent = false;
|
|
var gotReleasePromise = false;
|
|
|
|
var onClosed = function(e) {
|
|
suite.camera.removeEventListener('close', onClosed);
|
|
ok(!gotCloseEvent, "gotCloseEvent was " + gotCloseEvent);
|
|
ok(e.reason === "HardwareReleased", "'close' event reason is: " + e.reason);
|
|
gotCloseEvent = true;
|
|
if (gotReleasePromise) {
|
|
resolve();
|
|
}
|
|
};
|
|
|
|
suite.camera.addEventListener('close', onClosed);
|
|
|
|
suite.camera.release().then(function(p) {
|
|
ok(true, "released camera");
|
|
gotReleasePromise = true;
|
|
if (gotCloseEvent) {
|
|
resolve();
|
|
}
|
|
}).catch(reject);
|
|
});
|
|
}
|
|
|
|
return suite.getCamera()
|
|
.then(release, suite.rejectGetCamera);
|
|
});
|
|
|
|
suite.test('release-after-release', function() {
|
|
return suite.getCamera()
|
|
.then(cameraRelease, suite.rejectGetCamera)
|
|
.then(cameraRelease, suite.rejectRelease)
|
|
.catch(suite.rejectRelease);
|
|
});
|
|
|
|
suite.test('set-picture-size-after-release', function() {
|
|
function setPictureSize(p) {
|
|
try {
|
|
suite.camera.setPictureSize({ width: 0, height: 0 });
|
|
ok(false, "SetPictureSize() should have failed");
|
|
} catch(e) {
|
|
ok(e.result === SpecialPowers.Cr.NS_ERROR_NOT_AVAILABLE,
|
|
"setPictureSize() failed with: " + e.name);
|
|
}
|
|
}
|
|
|
|
return suite.getCamera()
|
|
.then(cameraRelease, suite.rejectGetCamera)
|
|
.then(setPictureSize, suite.rejectRelease);
|
|
});
|
|
|
|
suite.test('set-thumbnail-size-after-release', function() {
|
|
function setThumbnailSize(p) {
|
|
try {
|
|
suite.camera.setThumbnailSize({ width: 0, height: 0 });
|
|
ok(false, "SetThumbnailSize() should have failed");
|
|
} catch(e) {
|
|
ok(e.result === SpecialPowers.Cr.NS_ERROR_NOT_AVAILABLE,
|
|
"setThumbnailSize() failed with: " + e.name);
|
|
}
|
|
}
|
|
|
|
return suite.getCamera()
|
|
.then(cameraRelease, suite.rejectGetCamera)
|
|
.then(setThumbnailSize, suite.rejectRelease);
|
|
});
|
|
|
|
suite.test('get-sensor-angle-after-release', function() {
|
|
function getSensorAngle(p) {
|
|
ok(suite.camera.sensorAngle == 0, "camera.sensorAngle = " + suite.camera.sensorAngle);
|
|
}
|
|
|
|
return suite.getCamera()
|
|
.then(cameraRelease, suite.rejectGetCamera)
|
|
.then(getSensorAngle, suite.rejectRelease);
|
|
});
|
|
|
|
suite.test('resume-preview-after-release', function() {
|
|
function resumePreview(p) {
|
|
try {
|
|
suite.camera.resumePreview();
|
|
ok(false, "resumePreview() should have failed");
|
|
} catch(e) {
|
|
ok(e.result === SpecialPowers.Cr.NS_ERROR_NOT_AVAILABLE,
|
|
"resumePreview() failed with: " + e.name);
|
|
}
|
|
}
|
|
|
|
return suite.getCamera()
|
|
.then(cameraRelease, suite.rejectGetCamera)
|
|
.then(resumePreview, suite.rejectRelease);
|
|
});
|
|
|
|
suite.test('auto-focus-after-release', function() {
|
|
function autoFocus(p) {
|
|
return suite.camera.autoFocus();
|
|
}
|
|
|
|
function rejectAutoFocus(error) {
|
|
ok(error.name === "NS_ERROR_NOT_AVAILABLE",
|
|
"autoFocus() failed with: " + error.name);
|
|
return Promise.resolve();
|
|
}
|
|
|
|
return suite.getCamera()
|
|
.then(cameraRelease, suite.rejectGetCamera)
|
|
.then(autoFocus, suite.rejectRelease)
|
|
.then(suite.expectedRejectAutoFocus, rejectAutoFocus);
|
|
});
|
|
|
|
suite.test('take-picture-after-release', function() {
|
|
function takePicture(p) {
|
|
return suite.camera.takePicture(null);
|
|
}
|
|
|
|
function rejectTakePicture(error) {
|
|
ok(error.name === "NS_ERROR_NOT_AVAILABLE",
|
|
"takePicture() failed with: " + error.name);
|
|
return Promise.resolve();
|
|
}
|
|
|
|
return suite.getCamera()
|
|
.then(cameraRelease, suite.rejectGetCamera)
|
|
.then(takePicture, suite.rejectRelease)
|
|
.then(suite.expectedRejectTakePicture, rejectTakePicture);
|
|
});
|
|
|
|
suite.test('start-recording-after-release', function() {
|
|
function startRecording(p) {
|
|
return suite.camera.startRecording(
|
|
{
|
|
profile: 'high',
|
|
rotation: 0
|
|
},
|
|
navigator.getDeviceStorage('videos'),
|
|
'bug975472.mp4'
|
|
);
|
|
}
|
|
|
|
function rejectStartRecording(error) {
|
|
ok(error.name === "NS_ERROR_NOT_AVAILABLE",
|
|
"takePicture() failed with: " + error.name);
|
|
return Promise.resolve();
|
|
}
|
|
|
|
return suite.getCamera()
|
|
.then(cameraRelease, suite.rejectGetCamera)
|
|
.then(startRecording, suite.rejectRelease)
|
|
.then(suite.expectedRejectStartRecording, rejectStartRecording);
|
|
});
|
|
|
|
suite.test('stop-recording-after-release', function() {
|
|
function stopRecording(p) {
|
|
try {
|
|
suite.camera.stopRecording();
|
|
ok(false, "stopRecording() should have failed");
|
|
} catch(e) {
|
|
ok(e.result === SpecialPowers.Cr.NS_ERROR_NOT_AVAILABLE,
|
|
"stopRecording() failed with: " + e.name);
|
|
}
|
|
}
|
|
|
|
return suite.getCamera()
|
|
.then(cameraRelease, suite.rejectGetCamera)
|
|
.then(stopRecording, suite.rejectRelease);
|
|
});
|
|
|
|
suite.test('face-detection-after-release', function() {
|
|
function startFaceDetection(p) {
|
|
try {
|
|
suite.camera.startFaceDetection();
|
|
ok(false, "startFaceDetection() should have failed");
|
|
} catch(e) {
|
|
ok(e.result === SpecialPowers.Cr.NS_ERROR_NOT_AVAILABLE,
|
|
"startFaceDetection() failed with: " + e.name);
|
|
}
|
|
}
|
|
|
|
function stopFaceDetection(p) {
|
|
try {
|
|
suite.camera.stopFaceDetection();
|
|
ok(false, "stopFaceDetection() should have failed");
|
|
} catch(e) {
|
|
ok(e.result === SpecialPowers.Cr.NS_ERROR_NOT_AVAILABLE,
|
|
"stopFaceDetection() failed with: " + e.name);
|
|
}
|
|
}
|
|
|
|
return suite.getCamera()
|
|
.then(cameraRelease, suite.rejectGetCamera)
|
|
.then(startFaceDetection, suite.rejectRelease)
|
|
.then(stopFaceDetection);
|
|
});
|
|
|
|
suite.test('set-configuration-after-release', function() {
|
|
function configure(p) {
|
|
return suite.camera.setConfiguration(null);
|
|
}
|
|
|
|
function rejectConfigure(error) {
|
|
ok(error.name === "NS_ERROR_NOT_AVAILABLE",
|
|
"takePicture() failed with: " + error.name);
|
|
return Promise.resolve();
|
|
}
|
|
|
|
return suite.getCamera()
|
|
.then(cameraRelease, suite.rejectGetCamera)
|
|
.then(configure, suite.rejectRelease)
|
|
.then(suite.expectedRejectConfigure, rejectConfigure);
|
|
});
|
|
|
|
suite.setup()
|
|
.then(suite.run);
|
|
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|