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,54 +275,75 @@ function resizeImage(testVolumeName, volumeType) { ...@@ -275,54 +275,75 @@ 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
.then(function(result) {
appId = result.appId; 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() { })
.then(function(result) {
// Ensure that checkbox cursor style takes pointer state when enabled.
// https://crbug.com/888464
chrome.test.assertEq('pointer', result.styles.cursor);
// Uncheck overwrite original. // Uncheck overwrite original.
return gallery.waitAndClickElement(appId, '.overwrite-original'); return gallery.waitAndClickElement(appId, '.overwrite-original');
}).then(function() { })
.then(function() {
// Rotate image. // Rotate image.
return gallery.waitAndClickElement(appId, '.rotate_right'); return gallery.waitAndClickElement(appId, '.rotate_right');
}).then(function() { })
.then(function() {
// Confirm that edited image has been saved. // Confirm that edited image has been saved.
return gallery.waitForAFile(volumeType, return gallery.waitForAFile(
'My Desktop Background - Edited.png'); volumeType, 'My Desktop Background - Edited.png');
}).then(function() { })
.then(function() {
// Confirm overwrite original checkbox is disabled and not checked. // Confirm overwrite original checkbox is disabled and not checked.
return gallery.waitForElement(appId, return gallery.waitForElementStyles(
'.overwrite-original[disabled]:not([checked])'); appId, '.overwrite-original[disabled]:not([checked])', ['cursor']);
}).then(function() { })
.then(function(result) {
// Ensure that checkbox cursor style takes auto state when disabled.
// https://crbug.com/888464
chrome.test.assertEq('auto', result.styles.cursor);
// Go back to the slide mode. // Go back to the slide mode.
return gallery.waitAndClickElement(appId, 'button.edit'); return gallery.waitAndClickElement(appId, 'button.edit');
}).then(function() { })
.then(function() {
// Confirm current image is My Desktop Background - Edited.png. // Confirm current image is My Desktop Background - Edited.png.
return gallery.waitForSlideImage(appId, 600, 800, return gallery.waitForSlideImage(
'My Desktop Background - Edited'); appId, 600, 800, 'My Desktop Background - Edited');
}).then(function() { })
// Move to My Desktop Background.png. Switching to other image is required .then(function() {
// to end edit session of the edited image. // Move to My Desktop Background.png. Switching to other image is
// required to end edit session of the edited image.
return gallery.waitAndClickElement(appId, '.arrow.right'); return gallery.waitAndClickElement(appId, '.arrow.right');
}).then(function() { })
.then(function() {
// Confirm current image has changed to another image. // Confirm current image has changed to another image.
return gallery.waitForSlideImage(appId, 800, 600, 'My Desktop Background'); return gallery.waitForSlideImage(
}).then(function() { appId, 800, 600, 'My Desktop Background');
})
.then(function() {
// Back to the edited image. // Back to the edited image.
return gallery.waitAndClickElement(appId, '.arrow.left'); return gallery.waitAndClickElement(appId, '.arrow.left');
}).then(function() { })
// Confirm current image is switched to My Desktop Background - Edited.png. .then(function() {
return gallery.waitForSlideImage(appId, 600, 800, // Confirm current image is switched to My Desktop Background -
'My Desktop Background - Edited'); // Edited.png.
}).then(function() { return gallery.waitForSlideImage(
appId, 600, 800, 'My Desktop Background - Edited');
})
.then(function() {
// Click edit button again. // Click edit button again.
return gallery.waitAndClickElement(appId, 'button.edit'); return gallery.waitAndClickElement(appId, 'button.edit');
}).then(function() { })
.then(function() {
// Confirm overwrite original checkbox is enabled and not checked. // Confirm overwrite original checkbox is enabled and not checked.
return gallery.waitForElement(appId, return gallery.waitForElement(
'.overwrite-original:not([checked]):not([disabled])'); 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