' +
+ 'Options not specified should be the default value' +
+ ' Status box should update with image and info whenever an image is taken or selected from library' +
+ '
' +
+ '
All default options. Should be able to edit once picture is taken and will be saved to library.
' +
+ '
sourceType=PHOTOLIBRARY Should be able to see picture that was just taken in previous test and edit when selected
' +
+ '
sourceType=Camera allowEdit=false saveToPhotoAlbum=false Should not be able to edit when taken and will not save to library
' +
+ '
encodingType=PNG allowEdit=true saveToPhotoAlbum=true cameraDirection=FRONT Should bring up front camera. Verify in status box info URL that image is encoded as PNG.
' +
+ '
sourceType=SAVEDPHOTOALBUM mediaType=VIDEO Should only be able to select a video
' +
+ '
sourceType=SAVEDPHOTOALBUM mediaType=PICTURE allowEdit=false Should only be able to select a picture and not edit
' +
+ '
sourceType=PHOTOLIBRARY mediaType=ALLMEDIA allowEdit=true Should be able to select pics and videos and edit picture if selected
' +
+ '
sourceType=CAMERA targetWidth & targetHeight=50 allowEdit=false Do Get File Metadata test below and take note of size Repeat test but with width and height=800. Size should be significantly larger.
' +
+ '
quality=0 targetWidth & targetHeight=default allowEdit=false Do Get File Metadata test below and take note of size Repeat test but with quality=80. Size should be significantly larger.
' +
+ '
',
inputs_div = '
Native File Inputs
' +
- '
input type=file
' +
+ 'For the following tests, status box should update with file selected' +
+ '
input type=file
' +
'
capture=camera
' +
'
capture=camcorder
' +
'
capture=microphone
',
actions_div = '
Actions
' +
- '';
+ 'For the following tests, ensure that an image is set in status box' +
+ '' +
+ 'Expected result: Get metadata about file selected. Status box will show, along with the metadata, "Call to FileEntry.getMetadata success, Call to FileEntry.setMetadata success, Call to FileEntry.getParent success"' +
+ '' +
+ 'Expected result: Read contents of file. Status box will show "Got file: {some metadata}, FileReader.readAsDataURL() - length = someNumber"' +
+ '' +
+ 'Expected result: Copy image to new location and move file to different location. Status box will show "Call to FileEntry.copyTo success:{some metadata}, Call to FileEntry.moveTo success:{some metadata}"' +
+ '' +
+ 'Expected result: Write image to library. Status box will show "Call to FileWriter.write success:{some metadata}, Call to FileWriter.truncate success:{some metadata}"' +
+ '' +
+ 'Expected result: Upload image to server. Status box may print out progress. Once finished will show "upload complete"' +
+ '' +
+ 'Expected result: Display image using canvas. Image will be displayed in status box under "canvas:"' +
+ '' +
+ 'Expected result: Remove image from library. Status box will show "FileEntry.remove success:["OK"]';
- contentEl.innerHTML = info_div + options_div + getpicture_div + inputs_div + actions_div;
+ contentEl.innerHTML = info_div + options_div + getpicture_div + test_procedure + inputs_div + actions_div;
var elements = document.getElementsByClassName("testInputTag");
var listener = function (e) {
testInputTag(e.target);
@@ -420,29 +449,29 @@ exports.defineManualTests = function (contentEl, createActionButton) {
createActionButton('Get File Metadata', function () {
getFileInfo();
- }, 'actions');
+ }, 'metadata');
createActionButton('Read with FileReader', function () {
readFile();
- }, 'actions');
+ }, 'reader');
createActionButton('Copy Image', function () {
copyImage();
- }, 'actions');
+ }, 'copy');
createActionButton('Write Image', function () {
writeImage();
- }, 'actions');
+ }, 'write');
createActionButton('Upload Image', function () {
uploadImage();
- }, 'actions');
+ }, 'upload');
createActionButton('Draw Using Canvas', function () {
displayImageUsingCanvas();
- }, 'actions');
+ }, 'draw_canvas');
createActionButton('Remove Image', function () {
removeImage();
- }, 'actions');
+ }, 'remove');
};