*/
function setupPhotoEditor(testVolumeName, volumeType) {
// Lauch the gallery.
+ observeWindowError(window);
var launchedPromise = launchWithTestEntries(
testVolumeName,
volumeType,
[ENTRIES.desktop]);
return launchedPromise.then(function(args) {
var appWindow = args.appWindow;
+ observeWindowError(appWindow.contentWindow);
// Show the slide image.
var slideImagePromise = waitForSlideImage(
}
/**
- * Tests to crop an image.
+ * Tests to crop an image and undoes it.
*
* @param {string} testVolumeName Test volume name passed to the addEntries
* function. Either 'drive' or 'local'.
then(function() {
return waitForSlideImage(
appWindow.contentWindow.document,
- 534,
+ 533,
400,
'My Desktop Background');
+ }).
+ then(function() {
+ return waitAndClickElement(
+ appWindow, '.gallery:not([locked]) button.undo');
+ }).
+ then(function() {
+ return waitForSlideImage(
+ appWindow.contentWindow.document,
+ 800,
+ 600,
+ 'My Desktop Background');
});
});
}