Skip to content

Commit

Permalink
[TIMOB-25619] Update test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Gary Mathews committed Feb 26, 2018
1 parent 9a0c53c commit eb52b97
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions tests/Resources/ti.media.addontest.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,28 @@
'use strict';
var should = require('./utilities/assertions');

describe('Example', function () {
it('Should pass', function () {
should(true).equal(true);
describe('Titanium.Media', function () {

it.android('previewImage of non-file blob', function (finish) {
var win = Ti.UI.createWindow({ backgroundColor: 'green' });

win.addEventListener('postlayout', function () {
win.toImage(function (blob) {
if (!blob) {
finish(new Error('failed to preview blob'));
}
Ti.Media.previewImage({
image: blob,
success: function (e) {
finish();
},
error: function (e) {
finish(e);
},
});
});
});

win.open();
});
});

0 comments on commit eb52b97

Please sign in to comment.