Commit 0fffd2c0 authored by Alexander Nohe's avatar Alexander Nohe Committed by Commit Bot

Remove the pointer cursor and focus state

Removed the pointer cursor and focus state when the checkbox is
disabled.  This should prevent the checkbox from maintaining any
unnecessary focus as well as preventing any confusion when hovering
over the overwrite changes checkbox.

Bug: 888464
Change-Id: I14547deb878f2948e5606f3bf0bbc01b9ba75886
Reviewed-on: https://chromium-review.googlesource.com/c/1318062Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606674}
parent 84b1f37c
...@@ -531,8 +531,8 @@ html[dir='rtl'] .gallery .toolbar .bubble { ...@@ -531,8 +531,8 @@ html[dir='rtl'] .gallery .toolbar .bubble {
width: 100%; width: 100%;
} }
.gallery .edit-mode-toolbar .options > *, .gallery .edit-mode-toolbar .options > :not([disabled]),
.gallery .edit-mode-toolbar .exit-button-spacer > * { .gallery .edit-mode-toolbar .exit-button-spacer > :not([disabled]) {
pointer-events: auto; pointer-events: auto;
} }
......
...@@ -275,55 +275,76 @@ function resizeImage(testVolumeName, volumeType) { ...@@ -275,55 +275,76 @@ function resizeImage(testVolumeName, volumeType) {
function enableDisableOverwriteOriginalCheckbox(testVolumeName, volumeType) { function enableDisableOverwriteOriginalCheckbox(testVolumeName, volumeType) {
var appId; var appId;
var launchedPromise = setupPhotoEditor(testVolumeName, volumeType); var launchedPromise = setupPhotoEditor(testVolumeName, volumeType);
return launchedPromise.then(function(result) { return launchedPromise
appId = result.appId; .then(function(result) {
appId = result.appId;
// Confirm overwrite original checkbox is enabled and checked. // Confirm overwrite original checkbox is enabled and checked.
return gallery.waitForElement(appId, return gallery.waitForElementStyles(
'.overwrite-original[checked]:not([disabled])'); appId, '.overwrite-original[checked]:not([disabled])', ['cursor']);
}).then(function() { })
// Uncheck overwrite original. .then(function(result) {
return gallery.waitAndClickElement(appId, '.overwrite-original'); // Ensure that checkbox cursor style takes pointer state when enabled.
}).then(function() { // https://crbug.com/888464
// Rotate image. chrome.test.assertEq('pointer', result.styles.cursor);
return gallery.waitAndClickElement(appId, '.rotate_right'); // Uncheck overwrite original.
}).then(function() { return gallery.waitAndClickElement(appId, '.overwrite-original');
// Confirm that edited image has been saved. })
return gallery.waitForAFile(volumeType, .then(function() {
'My Desktop Background - Edited.png'); // Rotate image.
}).then(function() { return gallery.waitAndClickElement(appId, '.rotate_right');
// Confirm overwrite original checkbox is disabled and not checked. })
return gallery.waitForElement(appId, .then(function() {
'.overwrite-original[disabled]:not([checked])'); // Confirm that edited image has been saved.
}).then(function() { return gallery.waitForAFile(
// Go back to the slide mode. volumeType, 'My Desktop Background - Edited.png');
return gallery.waitAndClickElement(appId, 'button.edit'); })
}).then(function() { .then(function() {
// Confirm current image is My Desktop Background - Edited.png. // Confirm overwrite original checkbox is disabled and not checked.
return gallery.waitForSlideImage(appId, 600, 800, return gallery.waitForElementStyles(
'My Desktop Background - Edited'); appId, '.overwrite-original[disabled]:not([checked])', ['cursor']);
}).then(function() { })
// Move to My Desktop Background.png. Switching to other image is required .then(function(result) {
// to end edit session of the edited image. // Ensure that checkbox cursor style takes auto state when disabled.
return gallery.waitAndClickElement(appId, '.arrow.right'); // https://crbug.com/888464
}).then(function() { chrome.test.assertEq('auto', result.styles.cursor);
// Confirm current image has changed to another image. // Go back to the slide mode.
return gallery.waitForSlideImage(appId, 800, 600, 'My Desktop Background'); return gallery.waitAndClickElement(appId, 'button.edit');
}).then(function() { })
// Back to the edited image. .then(function() {
return gallery.waitAndClickElement(appId, '.arrow.left'); // Confirm current image is My Desktop Background - Edited.png.
}).then(function() { return gallery.waitForSlideImage(
// Confirm current image is switched to My Desktop Background - Edited.png. appId, 600, 800, 'My Desktop Background - Edited');
return gallery.waitForSlideImage(appId, 600, 800, })
'My Desktop Background - Edited'); .then(function() {
}).then(function() { // Move to My Desktop Background.png. Switching to other image is
// Click edit button again. // required to end edit session of the edited image.
return gallery.waitAndClickElement(appId, 'button.edit'); return gallery.waitAndClickElement(appId, '.arrow.right');
}).then(function() { })
// Confirm overwrite original checkbox is enabled and not checked. .then(function() {
return gallery.waitForElement(appId, // Confirm current image has changed to another image.
'.overwrite-original:not([checked]):not([disabled])'); return gallery.waitForSlideImage(
}); appId, 800, 600, 'My Desktop Background');
})
.then(function() {
// Back to the edited image.
return gallery.waitAndClickElement(appId, '.arrow.left');
})
.then(function() {
// Confirm current image is switched to My Desktop Background -
// Edited.png.
return gallery.waitForSlideImage(
appId, 600, 800, 'My Desktop Background - Edited');
})
.then(function() {
// Click edit button again.
return gallery.waitAndClickElement(appId, 'button.edit');
})
.then(function() {
// Confirm overwrite original checkbox is enabled and not checked.
return gallery.waitForElement(
appId, '.overwrite-original:not([checked]):not([disabled])');
});
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment