Commit 42c3eed3 authored by Xinghui Lu's avatar Xinghui Lu Committed by Commit Bot

Replace the hairline button with the window icon in the extension row.

See the discussion thread linked in https://crbug.com/1103015#c15.
before: http://screen/5TxkBPCY3kXKtCa
after: http://screen/9kcGmdc3ptJp4q7

Bug: 1103015
Change-Id: I0a074e8023be0fd1455d566ff508d128994ecdb6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2422713Reviewed-by: default avatarRainhard Findling <rainhard@chromium.org>
Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
Commit-Queue: Xinghui Lu <xinghuilu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809943}
parent 210b00c5
......@@ -5,7 +5,7 @@
sub-label="[[displayString_]]"
button-label="[[getButtonLabel_(status_)]]"
button-aria-label="$i18n{safetyCheckExtensionsButtonAriaLabel}"
button-class="[[getButtonClass_(status_)]]"
button-class="action-button"
on-button-click="onButtonClick_"
on-click="onRowClick_"
row-clickable="[[isRowClickable_(status_)]]"
......
......@@ -63,6 +63,7 @@ Polymer({
value: () => new Set([
SafetyCheckExtensionsStatus.NO_BLOCKLISTED_EXTENSIONS,
SafetyCheckExtensionsStatus.ERROR,
SafetyCheckExtensionsStatus.BLOCKLISTED_ALL_DISABLED,
]),
},
},
......@@ -117,7 +118,6 @@ Polymer({
*/
getButtonLabel_: function() {
switch (this.status_) {
case SafetyCheckExtensionsStatus.BLOCKLISTED_ALL_DISABLED:
case SafetyCheckExtensionsStatus.BLOCKLISTED_REENABLED_ALL_BY_USER:
case SafetyCheckExtensionsStatus.BLOCKLISTED_REENABLED_SOME_BY_USER:
return this.i18n('safetyCheckReview');
......@@ -126,20 +126,6 @@ Polymer({
}
},
/**
* @private
* @return {string}
*/
getButtonClass_: function() {
switch (this.status_) {
case SafetyCheckExtensionsStatus.BLOCKLISTED_REENABLED_ALL_BY_USER:
case SafetyCheckExtensionsStatus.BLOCKLISTED_REENABLED_SOME_BY_USER:
return 'action-button';
default:
return '';
}
},
/** @private */
onButtonClick_: function() {
// Log click both in action and histogram.
......
......@@ -853,7 +853,7 @@ suite('SafetyCheckExtensionsChildUiTests', function() {
assertEquals('chrome://extensions', url);
});
test('extensionsBlocklistedOffUiTest', function() {
test('extensionsBlocklistedOffUiTest', async function() {
fireSafetyCheckExtensionsEvent(
SafetyCheckExtensionsStatus.BLOCKLISTED_ALL_DISABLED);
flush();
......@@ -861,10 +861,14 @@ suite('SafetyCheckExtensionsChildUiTests', function() {
page: page,
iconStatus: SafetyCheckIconStatus.SAFE,
label: 'Extensions',
buttonLabel: 'Review',
buttonAriaLabel: 'Review extensions',
rowClickable: true,
});
return expectExtensionsButtonClickActions();
// User clicks the row.
page.$$('#safetyCheckChild').click();
// Ensure the browser proxy call is done.
const url = await openWindowProxy.whenCalled('openURL');
assertEquals('chrome://extensions', url);
});
test('extensionsBlocklistedOnAllUserUiTest', function() {
......
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