Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10274)

Unified Diff: chrome/test/data/extensions/api_test/file_manager_browsertest/gallery/photo_editor.js

Issue 448973003: Gallery: Fix undo of cropping images. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/file_manager_browsertest/gallery/test_util.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/file_manager_browsertest/gallery/photo_editor.js
diff --git a/chrome/test/data/extensions/api_test/file_manager_browsertest/gallery/photo_editor.js b/chrome/test/data/extensions/api_test/file_manager_browsertest/gallery/photo_editor.js
index 0bc1ac97c95c6a4106f0b27ee0610e18c58579d3..76a423c9e181bff4119aaee24cdf0bce309f80ba 100644
--- a/chrome/test/data/extensions/api_test/file_manager_browsertest/gallery/photo_editor.js
+++ b/chrome/test/data/extensions/api_test/file_manager_browsertest/gallery/photo_editor.js
@@ -28,12 +28,14 @@ function waitForPressEnterMessage(appWindow) {
*/
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(
@@ -90,7 +92,7 @@ function rotateImage(testVolumeName, volumeType) {
}
/**
- * 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'.
@@ -123,6 +125,17 @@ function cropImage(testVolumeName, volumeType) {
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');
});
});
}
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/file_manager_browsertest/gallery/test_util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698