Commit 1c328e75 authored by Gavin Williams's avatar Gavin Williams Committed by Commit Bot

Change add printer from plus icon to save button

Originally the Printers mock specified to display a plus icon for
adding automatic printers. This was updated to instead display a
button with "Save".

Bug: 993817
Change-Id: Id3ec447661f97eed3bea53a299642a1ca9a1632d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1758935
Commit-Queue: Gavin Williams <gavinwill@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Reviewed-by: default avatarBailey Berro <baileyberro@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689287}
parent 38ec53b4
......@@ -1490,6 +1490,9 @@
<message name="IDS_SETTINGS_PRINTING_CUPS_PRINTER_SETUP_BUTTON" desc="Text for the button which allows the user to manually setup a CUPS printer.">
Set up
</message>
<message name="IDS_SETTINGS_PRINTING_CUPS_PRINTER_SAVE_BUTTON" desc="Text for the button which allows the user to add an automatically discovered printer to the user's saved printer list.">
Save
</message>
<message name="IDS_SETTINGS_PRINTING_CUPS_SEARCH_LABEL" desc="The placeholder text in the printer search field.">
Search printers
</message>
......
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html">
<link rel="import" href="chrome://resources/cr_elements/cr_icon_button/cr_icon_button.html">
<link rel="import" href="cups_printer_types.html">
<link rel="import" href="cups_printers_browser_proxy.html">
<link rel="import" href="../settings_shared_css.html">
......@@ -36,10 +35,10 @@
</template>
<template is="dom-if"
if="[[isAutomaticPrinter_(printerEntry.printerType)]]">
<cr-icon-button class="icon-add-circle"
on-click="onAddAutomaticPrinterTap_"
title="$i18n{moreActions}">
</cr-icon-button>
<cr-button id="savePrinterButton" class="action-button"
on-click="onAddAutomaticPrinterTap_">
$i18n{savePrinter}
</cr-button>
</template>
</div>
</template>
......
......@@ -2288,6 +2288,7 @@ void AddPrintingStrings(content::WebUIDataSource* html_source) {
{"editPrinter", IDS_SETTINGS_PRINTING_CUPS_PRINTERS_EDIT},
{"removePrinter", IDS_SETTINGS_PRINTING_CUPS_PRINTERS_REMOVE},
{"setupPrinter", IDS_SETTINGS_PRINTING_CUPS_PRINTER_SETUP_BUTTON},
{"savePrinter", IDS_SETTINGS_PRINTING_CUPS_PRINTER_SAVE_BUTTON},
{"searchLabel", IDS_SETTINGS_PRINTING_CUPS_SEARCH_LABEL},
{"noSearchResults", IDS_SEARCH_NO_RESULTS},
{"printerDetailsTitle", IDS_SETTINGS_PRINTING_CUPS_PRINTER_DETAILS_TITLE},
......
......@@ -20,7 +20,7 @@ function clickThreeDotMenu(printerEntry) {
*/
function clickAddAutomaticButton(printerEntry) {
// Click on add button on an item entry.
const addButton = printerEntry.$$('.icon-add-circle');
const addButton = printerEntry.$$('#savePrinterButton');
assertTrue(!!addButton);
addButton.click();
Polymer.dom.flush();
......@@ -530,10 +530,10 @@ suite('CupsNearbyPrintersTests', function() {
Polymer.dom.flush();
// Requery and assert that the newly detected printer automatic
// printer has the correct icon button.
// printer has the correct button.
nearbyPrinterEntries = getPrinterEntries(nearbyPrintersElement);
assertEquals(1, nearbyPrinterEntries.length);
assertTrue(!!nearbyPrinterEntries[0].$$('.icon-add-circle'));
assertTrue(!!nearbyPrinterEntries[0].$$('#savePrinterButton'));
// Add an automatic printer and assert that that the toast
// notification is shown.
......
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