blob: 60d96af4e9b3b60a8d614182391c4b0e998a8fa3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
QUnit.test('methods#getCanvasData', function (assert) {
var done = assert.async();
var util = window.Util;
var image = util.createImage();
assert.expect(6);
return new Cropper(image, {
ready: function () {
var cropper = this.cropper;
var canvasData = cropper.getCanvasData();
assert.ok(util.isNumber(canvasData.left));
assert.ok(util.isNumber(canvasData.top));
assert.ok(util.isNumber(canvasData.width));
assert.ok(util.isNumber(canvasData.height));
assert.ok(util.isNumber(canvasData.naturalWidth));
assert.ok(util.isNumber(canvasData.naturalHeight));
done();
}
});
});
|