Print Preview: Move Privet printing behind a flag
Privet printing is deprecated. Move it behind a flag that is disabled
by default. Remove warnings that refer to December 2020, as all
cloud and privet printing is now either removed or disabled by default,
and M88 will be released in 2021.
[email protected]
Bug: 1112576
Change-Id: If86cdea73382bff36ed9a425fdf65d642f4a0907
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2528935
Commit-Queue: Rebekah Potter <[email protected]>
Reviewed-by: dpapad <[email protected]>
Reviewed-by: Daniel Hosseinian <[email protected]>
Cr-Commit-Position: refs/heads/master@{#826761}
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 4bb87b1..816877e 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -9784,14 +9784,6 @@
</message>
</if>
- <!--Cloud printing deprecation messages for chrome://devices & Print Preview-->
- <message name="IDS_CLOUD_PRINTING_NOT_SUPPORTED_WARNING" desc="Warning shown to the user to inform them that cloud printing will no longer be supported.">
- Cloud printing will no longer be supported after December 31. <ph name="BEGIN_LINK_LEARN_MORE"><a href="$1<ex>https://google.com/</ex>" target="_blank"></ph>Learn more<ph name="END_LINK_LEARN_MORE"></a></ph>
- </message>
- <message name="IDS_CLOUD_PRINTING_NOT_SUPPORTED_WARNING_ENTERPRISE" desc="Warning shown to users managed by enterprise policy to inform them that cloud printing will no longer be supported.">
- Cloud printing will no longer be supported after December 31. Contact your administrator.
- </message>
-
<!--Printer registration message for local discovery and Print Preview-->
<message name="IDS_CLOUD_PRINT_REGISTER_PRINTER_INFORMATION" desc="Information about registering printers with Google Cloud Print shown to the user before they confirm registration.">
Documents are <ph name="BEGIN_LINK_HELP"><a is="action-link" href="https://support.google.com/cloudprint/answer/2541843" target="_blank"></ph>sent to Google<ph name="END_LINK_HELP"></a></ph> to prepare them for printing. View, edit and manage your printers and printer history on the <ph name="BEGIN_LINK_DASHBOARD"><a is="action-link" href="https://www.google.com/cloudprint#jobs" target="_blank"></ph>Google Cloud Print dashboard<ph name="END_LINK_DASHBOARD"></a></ph>.
diff --git a/chrome/app/generated_resources_grd/IDS_CLOUD_PRINTING_NOT_SUPPORTED_WARNING.png.sha1 b/chrome/app/generated_resources_grd/IDS_CLOUD_PRINTING_NOT_SUPPORTED_WARNING.png.sha1
deleted file mode 100644
index 042f3dde..0000000
--- a/chrome/app/generated_resources_grd/IDS_CLOUD_PRINTING_NOT_SUPPORTED_WARNING.png.sha1
+++ /dev/null
@@ -1 +0,0 @@
-87675a3014a60ca7b660e94df7edb4987ae9a8a2
\ No newline at end of file
diff --git a/chrome/app/generated_resources_grd/IDS_CLOUD_PRINTING_NOT_SUPPORTED_WARNING_ENTERPRISE.png.sha1 b/chrome/app/generated_resources_grd/IDS_CLOUD_PRINTING_NOT_SUPPORTED_WARNING_ENTERPRISE.png.sha1
deleted file mode 100644
index 1fcbf79..0000000
--- a/chrome/app/generated_resources_grd/IDS_CLOUD_PRINTING_NOT_SUPPORTED_WARNING_ENTERPRISE.png.sha1
+++ /dev/null
@@ -1 +0,0 @@
-4dba116a82714745a4d2fb26b42398dd431ab1aa
\ No newline at end of file
diff --git a/chrome/app/printing_strings.grdp b/chrome/app/printing_strings.grdp
index c394512..46057a89 100644
--- a/chrome/app/printing_strings.grdp
+++ b/chrome/app/printing_strings.grdp
@@ -416,28 +416,4 @@
The <ph name="CLOUD_PRINT_NAME">$1<ex>Google Cloud Print</ex></ph> connector process has crashed. Restart?
</message>
</if>
-
- <!-- Cloud Print deprecation strings -->
- <if expr="not is_android">
- <message name="IDS_PRINTER_NOT_SUPPORTED_WARNING" desc="Warning shown to the user to inform them that a particular printer will no longer be supported.">
- This printer won't be supported after December. <ph name="BEGIN_LINK_LEARN_MORE"><a href="$1<ex>https://google.com/</ex>" target="_blank"></ph>Learn more<ph name="END_LINK_LEARN_MORE"></a></ph>
- </message>
- <message name="IDS_PRINTER_NOT_SUPPORTED_WARNING_ENTERPRISE" desc="Warning shown to users managed by enterprise policy to inform them that a particular printer will no longer be supported.">
- This printer won't be supported after December. Contact your admin.
- </message>
- <message name="IDS_DESTINATION_NOT_SUPPORTED_WARNING" desc="Warning shown next to a destination to the user to inform them that the destination will no longer be supported.">
- Not supported after December
- </message>
- <message name="IDS_WARNING_ICON_ARIA_LABEL" desc="Accessibility text for a warning icon that is next to a string indicating cloud printing will no longer be supported.">
- Warning
- </message>
- <if expr="not chromeos">
- <message name="IDS_GOOGLE_DRIVE_OPTION_NOT_SUPPORTED_WARNING" desc="Warning shown to the user to inform them that saving to Google Drive will no longer be supported.">
- This option won't be supported after December. <ph name="BEGIN_LINK_LEARN_MORE"><a href="$1<ex>https://google.com/</ex>" target="_blank"></ph>Learn more<ph name="END_LINK_LEARN_MORE"></a></ph>
- </message>
- <message name="IDS_GOOGLE_DRIVE_OPTION_NOT_SUPPORTED_WARNING_ENTERPRISE" desc="Warning shown to users managed by enterprise policy to inform them that saving to Google Drive will no longer be supported.">
- This option won't be supported after December. Contact your admin.
- </message>
- </if>
- </if>
</grit-part>
diff --git a/chrome/app/printing_strings_grdp/IDS_DESTINATION_NOT_SUPPORTED_WARNING.png.sha1 b/chrome/app/printing_strings_grdp/IDS_DESTINATION_NOT_SUPPORTED_WARNING.png.sha1
deleted file mode 100644
index 30715a75..0000000
--- a/chrome/app/printing_strings_grdp/IDS_DESTINATION_NOT_SUPPORTED_WARNING.png.sha1
+++ /dev/null
@@ -1 +0,0 @@
-2b6810dc9bc68b0b2609ad24e9596b46e48849a7
\ No newline at end of file
diff --git a/chrome/app/printing_strings_grdp/IDS_GOOGLE_DRIVE_OPTION_NOT_SUPPORTED_WARNING.png.sha1 b/chrome/app/printing_strings_grdp/IDS_GOOGLE_DRIVE_OPTION_NOT_SUPPORTED_WARNING.png.sha1
deleted file mode 100644
index adef9581..0000000
--- a/chrome/app/printing_strings_grdp/IDS_GOOGLE_DRIVE_OPTION_NOT_SUPPORTED_WARNING.png.sha1
+++ /dev/null
@@ -1 +0,0 @@
-d98b8cce548526f85193cee9910d8f77365ce813
\ No newline at end of file
diff --git a/chrome/app/printing_strings_grdp/IDS_GOOGLE_DRIVE_OPTION_NOT_SUPPORTED_WARNING_ENTERPRISE.png.sha1 b/chrome/app/printing_strings_grdp/IDS_GOOGLE_DRIVE_OPTION_NOT_SUPPORTED_WARNING_ENTERPRISE.png.sha1
deleted file mode 100644
index f17f3db..0000000
--- a/chrome/app/printing_strings_grdp/IDS_GOOGLE_DRIVE_OPTION_NOT_SUPPORTED_WARNING_ENTERPRISE.png.sha1
+++ /dev/null
@@ -1 +0,0 @@
-a21210de7a6bdf025aaa6d0f3c0635b9bc3df1f5
\ No newline at end of file
diff --git a/chrome/app/printing_strings_grdp/IDS_PRINTER_NOT_SUPPORTED_WARNING.png.sha1 b/chrome/app/printing_strings_grdp/IDS_PRINTER_NOT_SUPPORTED_WARNING.png.sha1
deleted file mode 100644
index 42732ab..0000000
--- a/chrome/app/printing_strings_grdp/IDS_PRINTER_NOT_SUPPORTED_WARNING.png.sha1
+++ /dev/null
@@ -1 +0,0 @@
-48b67b82a72a80cc632cdad7813ff3f3b90e1cee
\ No newline at end of file
diff --git a/chrome/app/printing_strings_grdp/IDS_PRINTER_NOT_SUPPORTED_WARNING_ENTERPRISE.png.sha1 b/chrome/app/printing_strings_grdp/IDS_PRINTER_NOT_SUPPORTED_WARNING_ENTERPRISE.png.sha1
deleted file mode 100644
index 2db14c66..0000000
--- a/chrome/app/printing_strings_grdp/IDS_PRINTER_NOT_SUPPORTED_WARNING_ENTERPRISE.png.sha1
+++ /dev/null
@@ -1 +0,0 @@
-2424b7431f654869f1f21beae388afd94605983d
\ No newline at end of file
diff --git a/chrome/app/printing_strings_grdp/IDS_WARNING_ICON_ARIA_LABEL.png.sha1 b/chrome/app/printing_strings_grdp/IDS_WARNING_ICON_ARIA_LABEL.png.sha1
deleted file mode 100644
index 042f3dde..0000000
--- a/chrome/app/printing_strings_grdp/IDS_WARNING_ICON_ARIA_LABEL.png.sha1
+++ /dev/null
@@ -1 +0,0 @@
-87675a3014a60ca7b660e94df7edb4987ae9a8a2
\ No newline at end of file
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index fff9061..8dac06ee 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2940,6 +2940,10 @@
flag_descriptions::kDeviceDiscoveryNotificationsName,
flag_descriptions::kDeviceDiscoveryNotificationsDescription, kOsDesktop,
SINGLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications)},
+ {"force-enable-privet-printing",
+ flag_descriptions::kForceEnablePrivetPrintingName,
+ flag_descriptions::kForceEnablePrivetPrintingDescription, kOsDesktop,
+ FEATURE_VALUE_TYPE(features::kForceEnablePrivetPrinting)},
#endif // BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
{"enable-webgl-draft-extensions",
flag_descriptions::kWebglDraftExtensionsName,
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
index 5c9c8ab..1a6a265 100644
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -2632,9 +2632,9 @@
"expiry_milestone": 89
},
{
- "name": "force-enable-devices-page",
+ "name": "force-enable-privet-printing",
"owners": [ "thestig", "rbpotter", "dhoss" ],
- "expiry_milestone": 88
+ "expiry_milestone": 90
},
{
"name": "force-preferred-interval-for-video",
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index 7f2d942..daed4b37 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -1830,6 +1830,11 @@
"Redesign of the privacy settings card to make it more prominent and "
"and easier to use.";
+const char kForceEnablePrivetPrintingName[] = "Force enable Privet Printing";
+const char kForceEnablePrivetPrintingDescription[] =
+ "Override to force enabling printing to existing registered Privet "
+ "printers in Print Preview. Will be removed in M90.";
+
const char kSafetyCheckAndroidName[] = "Safety Check on Android";
const char kSafetyCheckAndroidDescription[] =
"A settings component for checking multiple areas of browser safety. "
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index e440fc9..3af70fe 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -1070,6 +1070,9 @@
extern const char kPrivacySettingsRedesignName[];
extern const char kPrivacySettingsRedesignDescription[];
+extern const char kForceEnablePrivetPrintingName[];
+extern const char kForceEnablePrivetPrintingDescription[];
+
extern const char kSafetyCheckAndroidName[];
extern const char kSafetyCheckAndroidDescription[];
diff --git a/chrome/browser/resources/print_preview/data/destination.js b/chrome/browser/resources/print_preview/data/destination.js
index b5cc95b..34735dc 100644
--- a/chrome/browser/resources/print_preview/data/destination.js
+++ b/chrome/browser/resources/print_preview/data/destination.js
@@ -410,13 +410,6 @@
this.certificateStatus_ = opt_params && opt_params.certificateStatus ||
DestinationCertificateStatus.NONE;
- /**
- * Whether cloud print deprecation warnings are suppressed.
- * @private {boolean}
- */
- this.cloudPrintDeprecationWarningsSuppressed_ =
- loadTimeData.getBoolean('cloudPrintDeprecationWarningsSuppressed');
-
// <if expr="chromeos">
/**
* EULA url for printer's PPD. Empty string indicates no provided EULA.
@@ -499,8 +492,7 @@
return this.origin_ === DestinationOrigin.LOCAL ||
this.origin_ === DestinationOrigin.EXTENSION ||
this.origin_ === DestinationOrigin.CROS ||
- (this.origin_ === DestinationOrigin.PRIVET &&
- this.connectionStatus_ !== DestinationConnectionStatus.UNREGISTERED);
+ this.origin_ === DestinationOrigin.PRIVET;
}
/** @return {boolean} Whether the destination is a Privet local printer */
@@ -540,9 +532,7 @@
* if it was not provided.
*/
get description() {
- return this.shouldShowSaveToDriveWarning ?
- loadTimeData.getString('destinationNotSupportedWarning') :
- this.description_;
+ return this.description_;
}
/**
@@ -689,16 +679,6 @@
}
/**
- * @return {boolean} Whether the destination's description and icon should
- * warn that it is a deprecated printer.
- */
- get shouldShowDeprecatedPrinterWarning() {
- return !this.cloudPrintDeprecationWarningsSuppressed_ &&
- this.id_ !== Destination.GooglePromotedId.DOCS &&
- (this.isPrivet || CloudOrigins.includes(this.origin_));
- }
-
- /**
* @return {boolean} Whether the destination should display an invalid
* certificate UI warning in the selection dialog and cause a UI
* warning to appear in the preview area when selected.
@@ -708,20 +688,6 @@
!loadTimeData.getBoolean('isEnterpriseManaged');
}
- /**
- * @return {boolean} Whether this destination's description and icon should
- * warn that "Save to Drive" is deprecated.
- */
- get shouldShowSaveToDriveWarning() {
- let shouldShowSaveToDriveWarning = false;
- // <if expr="not chromeos">
- shouldShowSaveToDriveWarning =
- this.id_ === Destination.GooglePromotedId.DOCS &&
- !this.cloudPrintDeprecationWarningsSuppressed_;
- // </if>
- return shouldShowSaveToDriveWarning;
- }
-
/** @return {boolean} Whether the destination is considered offline. */
get isOffline() {
return [
@@ -778,12 +744,6 @@
/** @return {string} Path to the SVG for the destination's icon. */
get icon() {
- if (this.shouldShowSaveToDriveWarning) {
- return 'print-preview:save-to-drive-not-supported';
- }
- if (this.shouldShowDeprecatedPrinterWarning) {
- return 'print-preview:printer-not-supported';
- }
// <if expr="chromeos">
if (this.id_ === Destination.GooglePromotedId.SAVE_TO_DRIVE_CROS) {
return 'print-preview:save-to-drive';
diff --git a/chrome/browser/resources/print_preview/data/destination_store.js b/chrome/browser/resources/print_preview/data/destination_store.js
index fee27dc3..74470ee 100644
--- a/chrome/browser/resources/print_preview/data/destination_store.js
+++ b/chrome/browser/resources/print_preview/data/destination_store.js
@@ -205,10 +205,18 @@
[
PrinterType.EXTENSION_PRINTER, DestinationStorePrinterSearchStatus.START
],
- [PrinterType.PRIVET_PRINTER, DestinationStorePrinterSearchStatus.START],
[PrinterType.LOCAL_PRINTER, DestinationStorePrinterSearchStatus.START],
]);
+ // TODO (rbpotter): Remove the code below once this flag and policy are no
+ // longer supported. Remove the privet flag in M90.
+ if (loadTimeData.getBoolean('forceEnablePrivetPrinting') ||
+ loadTimeData.getBoolean('cloudPrintDeprecationWarningsSuppressed')) {
+ this.destinationSearchStatus_.set(
+ PrinterType.PRIVET_PRINTER,
+ DestinationStorePrinterSearchStatus.START);
+ }
+
/** @private {!Set<string>} */
this.inFlightCloudPrintRequests_ = new Set();
@@ -883,13 +891,7 @@
this.destinationSearchStatus_.set(
type, DestinationStorePrinterSearchStatus.SEARCHING);
this.nativeLayer_.getPrinters(type).then(
- this.onDestinationSearchDone_.bind(this, type), () => {
- // Will be rejected by C++ for privet printers if privet printing
- // is disabled.
- assert(type === PrinterType.PRIVET_PRINTER);
- this.destinationSearchStatus_.set(
- type, DestinationStorePrinterSearchStatus.DONE);
- });
+ this.onDestinationSearchDone_.bind(this, type));
}
/**
diff --git a/chrome/browser/resources/print_preview/ui/destination_dialog.html b/chrome/browser/resources/print_preview/ui/destination_dialog.html
index 2885c27..01ac8b5 100644
--- a/chrome/browser/resources/print_preview/ui/destination_dialog.html
+++ b/chrome/browser/resources/print_preview/ui/destination_dialog.html
@@ -96,20 +96,6 @@
font-weight: 500;
}
- .destinations-status {
- align-items: center;
- display: flex;
- margin-bottom: 16px;
- }
-
- .destinations-status iron-icon {
- --google-orange-600: rgb(232, 113, 10); /* e8710a */
- fill: var(--google-orange-600);
- flex-shrink: 0;
- padding-inline-end: 8px;
- padding-inline-start: 4px;
- }
-
cr-button iron-icon {
--iron-icon-fill-color: currentColor;
margin-inline-start: 8px;
@@ -132,13 +118,6 @@
<option value="">$i18n{addAccountTitle}</option>
</select>
</div>
- <div class="destinations-status" hidden$="[[!showCloudPrintWarning_]]">
- <iron-icon icon="cr:warning" aria-label="$i18n{warningIconAriaLabel}">
- </iron-icon>
- <span id="warning-message">
- $i18nRaw{cloudPrintingNotSupportedWarning}
- </span>
- </div>
<print-preview-search-box id="searchBox"
label="$i18n{searchBoxPlaceholder}" search-query="{{searchQuery_}}"
autofocus>
diff --git a/chrome/browser/resources/print_preview/ui/destination_dialog.js b/chrome/browser/resources/print_preview/ui/destination_dialog.js
index 68094c70..4dd5f1c 100644
--- a/chrome/browser/resources/print_preview/ui/destination_dialog.js
+++ b/chrome/browser/resources/print_preview/ui/destination_dialog.js
@@ -82,13 +82,6 @@
value: false,
},
- /** @private {boolean} */
- showCloudPrintWarning_: {
- type: Boolean,
- computed: 'computeShowCloudPrintWarning_(destinations_.splices)',
- value: false,
- },
-
/** @private {?RegExp} */
searchQuery_: {
type: Object,
@@ -131,18 +124,6 @@
},
/**
- * @return {boolean} Whether the destinations dialog should show a Cloud Print
- * deprecation warning.
- * @private
- */
- computeShowCloudPrintWarning_() {
- return this.destinations_.some(destination => {
- return destination.shouldShowSaveToDriveWarning ||
- destination.shouldShowDeprecatedPrinterWarning;
- });
- },
-
- /**
* @param {!KeyboardEvent} e Event containing the key
* @private
*/
diff --git a/chrome/browser/resources/print_preview/ui/destination_select.js b/chrome/browser/resources/print_preview/ui/destination_select.js
index 2038919..854d6e1 100644
--- a/chrome/browser/resources/print_preview/ui/destination_select.js
+++ b/chrome/browser/resources/print_preview/ui/destination_select.js
@@ -167,19 +167,11 @@
return this.i18n('noLongerSupportedFragment');
}
- if (this.destination.shouldShowSaveToDriveWarning) {
- return this.i18nAdvanced('saveToDriveNotSupportedWarning');
- }
-
// Give preference to connection status.
if (this.destination.connectionStatusText) {
return this.destination.connectionStatusText;
}
- if (this.destination.shouldShowDeprecatedPrinterWarning) {
- return this.i18nAdvanced('printerNotSupportedWarning');
- }
-
return '';
},
diff --git a/chrome/browser/resources/print_preview/ui/destination_select_cros.js b/chrome/browser/resources/print_preview/ui/destination_select_cros.js
index d9c045f0..6751f5b 100644
--- a/chrome/browser/resources/print_preview/ui/destination_select_cros.js
+++ b/chrome/browser/resources/print_preview/ui/destination_select_cros.js
@@ -287,15 +287,10 @@
}
}
- if (this.destination.origin !== DestinationOrigin.CROS) {
- return this.destination.shouldShowDeprecatedPrinterWarning ?
- this.i18nAdvanced('printerNotSupportedWarning') :
- '';
- }
-
// Only when the flag is enabled do we need to fetch a local printer status
// error string.
- if (!this.printerStatusFlagEnabled_) {
+ if (this.destination.origin !== DestinationOrigin.CROS ||
+ !this.printerStatusFlagEnabled_) {
return '';
}
diff --git a/chrome/browser/resources/print_preview/ui/destination_settings.js b/chrome/browser/resources/print_preview/ui/destination_settings.js
index 38981ce..779b06f7 100644
--- a/chrome/browser/resources/print_preview/ui/destination_settings.js
+++ b/chrome/browser/resources/print_preview/ui/destination_settings.js
@@ -352,11 +352,18 @@
return;
}
- // Remove unsupported cloud printers from the sticky settings, to free up
- // these spots for supported printers.
+ // Remove unsupported cloud and privet printers from the sticky settings,
+ // to free up these spots for supported printers.
+ // TODO (rbpotter): Remove this logic a milestone after the policy and flag
+ // below have been removed, as it is unlikely for users to still have stale
+ // cloud and privet printers after that point.
if (!loadTimeData.getBoolean('cloudPrintDeprecationWarningsSuppressed')) {
- const filteredRecentDestinations =
- recentDestinations.filter(d => !CloudOrigins.includes(d.origin));
+ const privetEnabled =
+ loadTimeData.getBoolean('forceEnablePrivetPrinting');
+ const filteredRecentDestinations = recentDestinations.filter(d => {
+ return !CloudOrigins.includes(d.origin) &&
+ (privetEnabled || d.origin !== DestinationOrigin.PRIVET);
+ });
if (filteredRecentDestinations.length !== recentDestinations.length) {
this.setSetting('recentDestinations', filteredRecentDestinations);
recentDestinations = filteredRecentDestinations;
diff --git a/chrome/browser/resources/print_preview/ui/icons.html b/chrome/browser/resources/print_preview/ui/icons.html
index faa0f28c..58c3fdb 100644
--- a/chrome/browser/resources/print_preview/ui/icons.html
+++ b/chrome/browser/resources/print_preview/ui/icons.html
@@ -15,17 +15,6 @@
<path d="M-5-5h32v32H-5z">
</g>
- <!-- Custom SVGs (shuom) -->
- <g id="printer-not-supported" viewBox="0 0 20 18" aria-label="$i18n{destinationNotSupportedWarning}">
- <path fill-rule="evenodd" clip-rule="evenodd" d="M8 18H19.5L14 8L8 18ZM14.5453 16.6616H13.4544V15.5789H14.5453V16.6616ZM13.4544 14.4962H14.5453V12.3308H13.4544V14.4962Z" fill="#E8710A"></path>
- <path d="M3 5H17C18.66 5 20 6.34 20 8V14H18.5L14 6L11 11H6V16H8L6.8 18H4V14H0V8C0 6.34 1.34 5 3 5Z"></path>
- <path d="M16 0H4V4H16V0Z"></path>
- </g>
- <g id="save-to-drive-not-supported" viewBox="0 0 19 15">
- <path d="M6.8 0H1.7C0.765 0 0.0085 0.7875 0.0085 1.75L0 12.25C0 13.2125 0.765 14 1.7 14H6.2L13 3L17 9.5V3.5C17 2.5375 16.235 1.75 15.3 1.75H8.5L6.8 0Z"></path>
- <path fill-rule="evenodd" clip-rule="evenodd" d="M19 15L13 5L7 15H19ZM13.5453 13.6616H12.4544V12.5789H13.5453V13.6616ZM12.4544 11.4962H13.5453V9.33075H12.4544V11.4962Z" fill="#E8710A"></path>
- </g>
-
<!-- Icon from http://icons/ -->
<g id="save-to-drive">
<path fill="none" d="M0 0h24v24H0z"></path>
diff --git a/chrome/browser/ui/ui_features.cc b/chrome/browser/ui/ui_features.cc
index f1d8067..afd59a82 100644
--- a/chrome/browser/ui/ui_features.cc
+++ b/chrome/browser/ui/ui_features.cc
@@ -23,6 +23,11 @@
const base::Feature kExtensionsToolbarMenu{"ExtensionsToolbarMenu",
base::FEATURE_ENABLED_BY_DEFAULT};
+// Force enables legacy privet printers that are already registered in Print
+// Preview. To be removed in M90.
+const base::Feature kForceEnablePrivetPrinting{
+ "ForceEnablePrivetPrinting", base::FEATURE_DISABLED_BY_DEFAULT};
+
// Enables the new profile picker.
// https:://crbug.com/1063856
const base::Feature kNewProfilePicker{"NewProfilePicker",
diff --git a/chrome/browser/ui/ui_features.h b/chrome/browser/ui/ui_features.h
index 06d2436..971482b 100644
--- a/chrome/browser/ui/ui_features.h
+++ b/chrome/browser/ui/ui_features.h
@@ -27,6 +27,8 @@
extern const base::Feature kExtensionsToolbarMenu;
+extern const base::Feature kForceEnablePrivetPrinting;
+
extern const base::Feature kNewProfilePicker;
extern const base::Feature kNewTabstripAnimation;
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
index 7cce1ee..adf2433 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -41,6 +41,7 @@
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
+#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/webui/print_preview/cloud_print_signin.h"
#include "chrome/browser/ui/webui/print_preview/pdf_printer_handler.h"
#include "chrome/browser/ui/webui/print_preview/policy_settings.h"
@@ -1258,7 +1259,10 @@
return extension_printer_handler_.get();
}
#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
- if (printer_type == PrinterType::kPrivet) {
+ if (printer_type == PrinterType::kPrivet &&
+ (base::FeatureList::IsEnabled(features::kForceEnablePrivetPrinting) ||
+ GetPrefs()->GetBoolean(
+ prefs::kCloudPrintDeprecationWarningsSuppressed))) {
if (!privet_printer_handler_) {
privet_printer_handler_ =
PrinterHandler::CreateForPrivetPrinters(Profile::FromWebUI(web_ui()));
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
index f90b3975..a1ddf703 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
@@ -36,11 +36,13 @@
#include "chrome/browser/printing/printer_query.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/chrome_pages.h"
+#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/webui/metrics_handler.h"
#include "chrome/browser/ui/webui/plural_string_handler.h"
#include "chrome/browser/ui/webui/print_preview/print_preview_handler.h"
#include "chrome/browser/ui/webui/theme_source.h"
#include "chrome/browser/ui/webui/webui_util.h"
+#include "chrome/common/buildflags.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/browser_resources.h"
@@ -50,7 +52,6 @@
#include "chrome/grit/print_preview_resources.h"
#include "chrome/grit/print_preview_resources_map.h"
#include "chromeos/constants/chromeos_features.h"
-#include "components/cloud_devices/common/cloud_devices_urls.h"
#include "components/prefs/pref_service.h"
#include "components/printing/common/print_messages.h"
#include "components/strings/grit/components_strings.h"
@@ -216,7 +217,6 @@
{"customMargins", IDS_PRINT_PREVIEW_CUSTOM_MARGINS},
{"defaultMargins", IDS_PRINT_PREVIEW_DEFAULT_MARGINS},
{"destinationLabel", IDS_PRINT_PREVIEW_DESTINATION_LABEL},
- {"destinationNotSupportedWarning", IDS_DESTINATION_NOT_SUPPORTED_WARNING},
{"destinationSearchTitle", IDS_PRINT_PREVIEW_DESTINATION_SEARCH_TITLE},
{"dpiItemLabel", IDS_PRINT_PREVIEW_DPI_ITEM_LABEL},
{"dpiLabel", IDS_PRINT_PREVIEW_DPI_LABEL},
@@ -311,7 +311,6 @@
{"title", IDS_PRINT_PREVIEW_TITLE},
{"top", IDS_PRINT_PREVIEW_TOP_MARGIN_LABEL},
{"unsupportedCloudPrinter", IDS_PRINT_PREVIEW_UNSUPPORTED_CLOUD_PRINTER},
- {"warningIconAriaLabel", IDS_WARNING_ICON_ARIA_LABEL},
#if defined(OS_CHROMEOS)
{"configuringFailedText", IDS_PRINT_CONFIGURING_FAILED_TEXT},
{"configuringInProgressText", IDS_PRINT_CONFIGURING_IN_PROGRESS_TEXT},
@@ -347,39 +346,7 @@
source->AddString("gcpCertificateErrorLearnMoreURL",
chrome::kCloudPrintCertificateErrorLearnMoreURL);
- const bool is_enterprise_managed = webui::IsEnterpriseManaged();
- if (is_enterprise_managed) {
- source->AddLocalizedString(
- "cloudPrintingNotSupportedWarning",
- IDS_CLOUD_PRINTING_NOT_SUPPORTED_WARNING_ENTERPRISE);
- source->AddLocalizedString("printerNotSupportedWarning",
- IDS_PRINTER_NOT_SUPPORTED_WARNING_ENTERPRISE);
- } else {
- source->AddString(
- "cloudPrintingNotSupportedWarning",
- l10n_util::GetStringFUTF16(
- IDS_CLOUD_PRINTING_NOT_SUPPORTED_WARNING,
- base::ASCIIToUTF16(cloud_devices::kCloudPrintDeprecationHelpURL)));
- source->AddString(
- "printerNotSupportedWarning",
- l10n_util::GetStringFUTF16(
- IDS_PRINTER_NOT_SUPPORTED_WARNING,
- base::ASCIIToUTF16(cloud_devices::kCloudPrintDeprecationHelpURL)));
- }
-
#if !defined(OS_CHROMEOS)
- if (is_enterprise_managed) {
- source->AddLocalizedString(
- "saveToDriveNotSupportedWarning",
- IDS_GOOGLE_DRIVE_OPTION_NOT_SUPPORTED_WARNING_ENTERPRISE);
- } else {
- source->AddString(
- "saveToDriveNotSupportedWarning",
- l10n_util::GetStringFUTF16(
- IDS_GOOGLE_DRIVE_OPTION_NOT_SUPPORTED_WARNING,
- base::ASCIIToUTF16(cloud_devices::kCloudPrintDeprecationHelpURL)));
- }
-
const base::string16 shortcut_text(base::UTF8ToUTF16(kBasicPrintShortcut));
source->AddString("systemDialogOption",
l10n_util::GetStringFUTF16(
@@ -411,6 +378,13 @@
source->AddBoolean("cloudPrintDeprecationWarningsSuppressed",
cloud_print_deprecation_warnings_suppressed);
+#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
+ source->AddBoolean(
+ "forceEnablePrivetPrinting",
+ cloud_print_deprecation_warnings_suppressed ||
+ base::FeatureList::IsEnabled(features::kForceEnablePrivetPrinting));
+#endif
+
#if defined(OS_CHROMEOS)
source->AddBoolean(
"showPrinterStatus",
diff --git a/chrome/test/data/webui/print_preview/destination_dialog_test.js b/chrome/test/data/webui/print_preview/destination_dialog_test.js
index 49d46ac..cae49c3 100644
--- a/chrome/test/data/webui/print_preview/destination_dialog_test.js
+++ b/chrome/test/data/webui/print_preview/destination_dialog_test.js
@@ -24,15 +24,6 @@
PrinterList: 'PrinterList',
ShowProvisionalDialog: 'ShowProvisionalDialog',
UserAccounts: 'UserAccounts',
- CloudPrinterDeprecationWarnings: 'CloudPrinterDeprecationWarnings',
- CloudPrinterDeprecationWarningsSuppressed:
- 'CloudPrinterDeprecationWarningsSuppressed',
- SaveToDriveDeprecationWarnings: 'SaveToDriveDeprecationWarnings',
- SaveToDriveDeprecationWarningsSuppressed:
- 'SaveToDriveDeprecationWarningsSuppressed',
- SaveToDriveDeprecationWarningsCros: 'SaveToDriveDeprecationWarningsCros',
- SaveToDriveDeprecationWarningsSuppressedCros:
- 'SaveToDriveDeprecationWarningsSuppressedCros',
};
suite(destination_dialog_test.suiteName, function() {
@@ -308,111 +299,4 @@
// Cloud print should have been queried again for the new account.
assertEquals(3, cloudPrintInterface.getCallCount('search'));
});
-
- /**
- * @param {boolean} warningsSuppressed Whether warnings are suppressed.
- * @return{!function()} Async function that tests whether Cloud print
- * deprecation warnings show when they're supposed to.
- */
- function testCloudPrinterDeprecationWarnings(warningsSuppressed) {
- return async () => {
- loadTimeData.overrideValues(
- {cloudPrintDeprecationWarningsSuppressed: warningsSuppressed});
-
- // Set up the cloud print interface with a Cloud printer for an account.
- const user = '[email protected]';
- cloudPrintInterface.setPrinter(
- new Destination(
- 'ID', DestinationType.GOOGLE, DestinationOrigin.COOKIES,
- 'Cloud Printer', DestinationConnectionStatus.ONLINE,
- {account: user, isOwned: true}),
- );
-
- await finishSetup();
-
- // Nobody is signed in. There are no cloud printers.
- assertSignedInState('', 0);
- const statusEl = dialog.$$('.destinations-status');
- assertTrue(statusEl.hidden);
-
- // Set an active user. There is a cloud printer.
- destinationStore.setActiveUser(user);
- destinationStore.reloadUserCookieBasedDestinations(user);
- dialog.activeUser = user;
- dialog.users = [user];
- flush();
- assertSignedInState(user, 1);
-
- assertEquals(warningsSuppressed, statusEl.hidden);
- };
- }
-
- // Test that Cloud print deprecation warnings appear.
- test(
- assert(destination_dialog_test.TestNames.CloudPrinterDeprecationWarnings),
- testCloudPrinterDeprecationWarnings(false));
-
- // Test that Cloud print deprecation warnings are suppressed.
- test(
- assert(destination_dialog_test.TestNames
- .CloudPrinterDeprecationWarningsSuppressed),
- testCloudPrinterDeprecationWarnings(true));
-
- /**
- * @param {boolean} warningsSuppressed Whether warnings are suppressed.
- * @return{!function()} Async function that tests whether Cloud print
- * deprecation warnings show when they're supposed to.
- */
- function testSaveToDriveDeprecationWarnings(warningsSuppressed, isChromeOS) {
- return async () => {
- loadTimeData.overrideValues(
- {cloudPrintDeprecationWarningsSuppressed: warningsSuppressed});
-
- // Set up the cloud print interface with Google Drive printer for an
- // account.
- const user = '[email protected]';
- cloudPrintInterface.setPrinter(getGoogleDriveDestination(user));
-
- await finishSetup();
-
- // Nobody is signed in. There are no cloud printers.
- assertSignedInState('', 0);
- const statusEl = dialog.$$('.destinations-status');
- assertTrue(statusEl.hidden);
-
- // Set an active user. There is a cloud printer (Save to Drive).
- destinationStore.setActiveUser(user);
- destinationStore.reloadUserCookieBasedDestinations(user);
- dialog.activeUser = user;
- dialog.users = [user];
- flush();
- assertSignedInState(user, 1);
-
- // Warning should never appear on ChromeOS.
- assertEquals(warningsSuppressed || isChromeOS, statusEl.hidden);
- };
- }
-
- // Test that Save to Drive deprecation warnings appear.
- test(
- assert(destination_dialog_test.TestNames.SaveToDriveDeprecationWarnings),
- testSaveToDriveDeprecationWarnings(false, false));
-
- // Test that Save to Drive deprecation warnings are suppressed.
- test(
- assert(destination_dialog_test.TestNames
- .SaveToDriveDeprecationWarningsSuppressed),
- testSaveToDriveDeprecationWarnings(true, false));
-
- // Test that Save to Drive deprecation warnings never appear.
- test(
- assert(
- destination_dialog_test.TestNames.SaveToDriveDeprecationWarningsCros),
- testSaveToDriveDeprecationWarnings(false, true));
-
- // Test that Save to Drive deprecation warnings are suppressed.
- test(
- assert(destination_dialog_test.TestNames
- .SaveToDriveDeprecationWarningsSuppressedCros),
- testSaveToDriveDeprecationWarnings(true, true));
});
diff --git a/chrome/test/data/webui/print_preview/destination_select_test.js b/chrome/test/data/webui/print_preview/destination_select_test.js
index dec3e62..65e9c95 100644
--- a/chrome/test/data/webui/print_preview/destination_select_test.js
+++ b/chrome/test/data/webui/print_preview/destination_select_test.js
@@ -17,9 +17,7 @@
/** @enum {string} */
destination_select_test.TestNames = {
UpdateStatus: 'update status',
- UpdateStatusDeprecationWarnings: 'update status deprecation warnings',
ChangeIcon: 'change icon',
- ChangeIconDeprecationWarnings: 'change icon deprecation warnings',
};
suite(destination_select_test.suiteName, function() {
@@ -87,11 +85,9 @@
/**
* Test that changing different destinations results in the correct icon being
* shown.
- * @param {boolean} cloudPrintDeprecationWarningsSuppressed Whether cloud
- * print deprecation warnings should be suppressed.
* @return {!Promise} Promise that resolves when the test finishes.
*/
- function testChangeIcon(cloudPrintDeprecationWarningsSuppressed) {
+ function testChangeIcon() {
const destination = recentDestinationList[0];
destinationSelect.destination = destination;
destinationSelect.updateDestination();
@@ -102,63 +98,47 @@
return selectOption(destinationSelect, driveKey)
.then(() => {
- const saveToDriveIcon = cloudPrintDeprecationWarningsSuppressed ?
- 'save-to-drive' :
- 'save-to-drive-not-supported';
-
// Icon updates early based on the ID.
- compareIcon(selectEl, saveToDriveIcon);
+ compareIcon(selectEl, 'save-to-drive');
// Update the destination.
destinationSelect.destination = getGoogleDriveDestination(account);
// Still Save to Drive icon.
- compareIcon(selectEl, saveToDriveIcon);
+ compareIcon(selectEl, 'save-to-drive');
// Select a destination with the shared printer icon.
return selectOption(
destinationSelect, `ID2/${cookieOrigin}/${account}`);
})
.then(() => {
- const dest2Icon = cloudPrintDeprecationWarningsSuppressed ?
- 'printer-shared' :
- 'printer-not-supported';
-
// Should already be updated.
- compareIcon(selectEl, dest2Icon);
+ compareIcon(selectEl, 'printer-shared');
// Update destination.
destinationSelect.destination = recentDestinationList[1];
- compareIcon(selectEl, dest2Icon);
+ compareIcon(selectEl, 'printer-shared');
// Select a destination with a standard printer icon.
return selectOption(
destinationSelect, `ID3/${cookieOrigin}/${account}`);
})
.then(() => {
- const dest3Icon = cloudPrintDeprecationWarningsSuppressed ?
- 'print' :
- 'printer-not-supported';
-
- compareIcon(selectEl, dest3Icon);
+ compareIcon(selectEl, 'print');
// Update destination.
destinationSelect.destination = recentDestinationList[2];
- compareIcon(selectEl, dest3Icon);
+ compareIcon(selectEl, 'print');
});
}
/**
* Test that changing different destinations results in the correct status
* being shown.
- * @param {boolean} cloudPrintDeprecationWarningsSuppressed Whether cloud
- * print deprecation warnings should be suppressed.
*/
- function testUpdateStatus(cloudPrintDeprecationWarningsSuppressed) {
+ function testUpdateStatus() {
loadTimeData.overrideValues({
offline: 'offline',
- printerNotSupportedWarning: 'printerNotSupportedWarning',
- saveToDriveNotSupportedWarning: 'saveToDriveNotSupportedWarning',
});
assertFalse(destinationSelect.$$('.throbber-container').hidden);
@@ -175,12 +155,8 @@
destinationSelect.driveDestinationKey = driveKey;
destinationSelect.destination = getGoogleDriveDestination(account);
destinationSelect.updateDestination();
- const saveToDriveStatus = cloudPrintDeprecationWarningsSuppressed ?
- '' :
- 'saveToDriveNotSupportedWarning';
- assertEquals(
- cloudPrintDeprecationWarningsSuppressed, additionalInfoEl.hidden);
- assertEquals(saveToDriveStatus, statusEl.innerHTML);
+ assertTrue(additionalInfoEl.hidden);
+ assertEquals('', statusEl.innerHTML);
destinationSelect.destination = recentDestinationList[0];
destinationSelect.updateDestination();
@@ -194,12 +170,8 @@
destinationSelect.destination = recentDestinationList[2];
destinationSelect.updateDestination();
- assertEquals(
- cloudPrintDeprecationWarningsSuppressed, additionalInfoEl.hidden);
- const dest3Status = cloudPrintDeprecationWarningsSuppressed ?
- '' :
- 'printerNotSupportedWarning';
- assertEquals(dest3Status, statusEl.innerHTML);
+ assertTrue(additionalInfoEl.hidden);
+ assertEquals('', statusEl.innerHTML);
}
test(assert(destination_select_test.TestNames.UpdateStatus), function() {
@@ -210,15 +182,9 @@
// |cloudPrintDeprecationWarningsSuppressed| take effect during creation of
// new Destinations.
populateRecentDestinationList();
- return testUpdateStatus(true);
+ return testUpdateStatus();
});
- test(
- assert(destination_select_test.TestNames.UpdateStatusDeprecationWarnings),
- function() {
- return testUpdateStatus(false);
- });
-
test(assert(destination_select_test.TestNames.ChangeIcon), function() {
loadTimeData.overrideValues(
{cloudPrintDeprecationWarningsSuppressed: true});
@@ -229,12 +195,6 @@
populateRecentDestinationList();
destinationSelect.recentDestinationList = recentDestinationList;
- return testChangeIcon(true);
+ return testChangeIcon();
});
-
- test(
- assert(destination_select_test.TestNames.ChangeIconDeprecationWarnings),
- function() {
- return testChangeIcon(false);
- });
});
diff --git a/chrome/test/data/webui/print_preview/destination_select_test_cros.js b/chrome/test/data/webui/print_preview/destination_select_test_cros.js
index cb48a27b..ecf04a1 100644
--- a/chrome/test/data/webui/print_preview/destination_select_test_cros.js
+++ b/chrome/test/data/webui/print_preview/destination_select_test_cros.js
@@ -241,7 +241,7 @@
destinationSelect.recentDestinationList = [
destination1,
destination2,
- createDestination('ID3', 'Three', DestinationOrigin.PRIVET),
+ createDestination('ID3', 'Three', DestinationOrigin.EXTENSION),
createDestination('ID4', 'Four', DestinationOrigin.EXTENSION),
];
assertEquals(
@@ -349,9 +349,7 @@
/** @enum {string} */
destination_select_test_cros.TestNames = {
UpdateStatus: 'update status',
- UpdateStatusDeprecationWarnings: 'update status deprecation warnings',
ChangeIcon: 'change icon',
- ChangeIconDeprecationWarnings: 'change icon deprecation warnings',
EulaIsDisplayed: 'eula is displayed',
};
@@ -421,11 +419,9 @@
/**
* Test that changing different destinations results in the correct icon being
* shown.
- * @param {boolean} cloudPrintDeprecationWarningsSuppressed Whether cloud
- * print deprecation warnings should be suppressed.
* @return {!Promise} Promise that resolves when the test finishes.
*/
- function testChangeIcon(cloudPrintDeprecationWarningsSuppressed) {
+ function testChangeIcon() {
let selectEl;
return waitBeforeNextRender(destinationSelect)
@@ -457,41 +453,31 @@
destinationSelect, `ID2/${cookieOrigin}/${account}`);
})
.then(() => {
- const dest2Icon = cloudPrintDeprecationWarningsSuppressed ?
- 'printer-shared' :
- 'printer-not-supported';
-
// Should already be updated.
- compareIcon(selectEl, dest2Icon);
+ compareIcon(selectEl, 'printer-shared');
// Update destination.
destinationSelect.destination = recentDestinationList[1];
- compareIcon(selectEl, dest2Icon);
+ compareIcon(selectEl, 'printer-shared');
// Select a destination with a standard printer icon.
return selectOption(
destinationSelect, `ID3/${cookieOrigin}/${account}`);
})
.then(() => {
- const dest3Icon = cloudPrintDeprecationWarningsSuppressed ?
- 'print' :
- 'printer-not-supported';
-
- compareIcon(selectEl, dest3Icon);
+ compareIcon(selectEl, 'print');
// Update destination.
destinationSelect.destination = recentDestinationList[2];
- compareIcon(selectEl, dest3Icon);
+ compareIcon(selectEl, 'print');
});
}
/**
* Test that changing different destinations results in the correct status
* being shown.
- * @param {boolean} cloudPrintDeprecationWarningsSuppressed Whether cloud
- * print deprecation warnings should be suppressed.
*/
- function testUpdateStatus(cloudPrintDeprecationWarningsSuppressed) {
+ function testUpdateStatus() {
loadTimeData.overrideValues({
offline: 'offline',
printerNotSupportedWarning: 'printerNotSupportedWarning',
@@ -526,12 +512,8 @@
destinationSelect.destination = recentDestinationList[2];
destinationSelect.updateDestination();
- assertEquals(
- cloudPrintDeprecationWarningsSuppressed, additionalInfoEl.hidden);
- const dest3Status = cloudPrintDeprecationWarningsSuppressed ?
- '' :
- 'printerNotSupportedWarning';
- assertEquals(dest3Status, statusEl.innerHTML);
+ assertTrue(additionalInfoEl.hidden);
+ assertEquals('', statusEl.innerHTML);
}
test(assert(destination_select_test_cros.TestNames.UpdateStatus), function() {
@@ -545,19 +527,10 @@
destinationSelect.recentDestinationList = recentDestinationList;
return waitBeforeNextRender(destinationSelect).then(() => {
- testUpdateStatus(true);
+ testUpdateStatus();
});
});
- test(
- assert(destination_select_test_cros.TestNames
- .UpdateStatusDeprecationWarnings),
- function() {
- return waitBeforeNextRender(destinationSelect).then(() => {
- testUpdateStatus(false);
- });
- });
-
test(assert(destination_select_test_cros.TestNames.ChangeIcon), function() {
loadTimeData.overrideValues(
{cloudPrintDeprecationWarningsSuppressed: true});
@@ -568,16 +541,9 @@
populateRecentDestinationList();
destinationSelect.recentDestinationList = recentDestinationList;
- return testChangeIcon(true);
+ return testChangeIcon();
});
- test(
- assert(
- destination_select_test_cros.TestNames.ChangeIconDeprecationWarnings),
- function() {
- return testChangeIcon(false);
- });
-
/**
* Tests that destinations with a EULA will display the EULA URL.
*/
diff --git a/chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js b/chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js
index 7e92385..ac66953c 100644
--- a/chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js
+++ b/chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js
@@ -689,52 +689,6 @@
this.runMochaTest(destination_dialog_test.TestNames.UserAccounts);
});
-TEST_F(
- 'PrintPreviewDestinationDialogTest', 'CloudPrinterDeprecationWarnings',
- function() {
- this.runMochaTest(
- destination_dialog_test.TestNames.CloudPrinterDeprecationWarnings);
- });
-
-TEST_F(
- 'PrintPreviewDestinationDialogTest',
- 'CloudPrinterDeprecationWarningsSuppressed', function() {
- this.runMochaTest(destination_dialog_test.TestNames
- .CloudPrinterDeprecationWarningsSuppressed);
- });
-
-// TODO(crbug.com/1111985): Different tests are needed because |isChromeOS| from
-// cr.m.js does not match the behavior of the |OS_CHROMEOS| macro on Lacros.
-GEN('#if defined(OS_CHROMEOS)');
-TEST_F(
- 'PrintPreviewDestinationDialogTest', 'SaveToDriveDeprecationWarningsCros',
- function() {
- this.runMochaTest(
- destination_dialog_test.TestNames.SaveToDriveDeprecationWarningsCros);
- });
-
-TEST_F(
- 'PrintPreviewDestinationDialogTest',
- 'SaveToDriveDeprecationWarningsSuppressedCros', function() {
- this.runMochaTest(destination_dialog_test.TestNames
- .SaveToDriveDeprecationWarningsSuppressedCros);
- });
-GEN('#else');
-TEST_F(
- 'PrintPreviewDestinationDialogTest', 'SaveToDriveDeprecationWarnings',
- function() {
- this.runMochaTest(
- destination_dialog_test.TestNames.SaveToDriveDeprecationWarnings);
- });
-
-TEST_F(
- 'PrintPreviewDestinationDialogTest',
- 'SaveToDriveDeprecationWarningsSuppressed', function() {
- this.runMochaTest(destination_dialog_test.TestNames
- .SaveToDriveDeprecationWarningsSuppressed);
- });
-GEN('#endif');
-
// eslint-disable-next-line no-var
var PrintPreviewAdvancedDialogTest = class extends PrintPreviewTest {
/** @override */
@@ -1272,24 +1226,10 @@
this.runMochaTest(destination_select_test_cros.TestNames.UpdateStatus);
});
-TEST_F(
- 'PrintPreviewDestinationSelectTestCrOS', 'UpdateStatusDeprecationWarnings',
- function() {
- this.runMochaTest(destination_select_test_cros.TestNames
- .UpdateStatusDeprecationWarnings);
- });
-
TEST_F('PrintPreviewDestinationSelectTestCrOS', 'ChangeIcon', function() {
this.runMochaTest(destination_select_test_cros.TestNames.ChangeIcon);
});
-TEST_F(
- 'PrintPreviewDestinationSelectTestCrOS', 'ChangeIconDeprecationWarnings',
- function() {
- this.runMochaTest(
- destination_select_test_cros.TestNames.ChangeIconDeprecationWarnings);
- });
-
TEST_F('PrintPreviewDestinationSelectTestCrOS', 'EulaIsDisplayed', function() {
this.runMochaTest(destination_select_test_cros.TestNames.EulaIsDisplayed);
});
@@ -1413,23 +1353,9 @@
this.runMochaTest(destination_select_test.TestNames.UpdateStatus);
});
-TEST_F(
- 'PrintPreviewDestinationSelectTest', 'UpdateStatusDeprecationWarnings',
- function() {
- this.runMochaTest(
- destination_select_test.TestNames.UpdateStatusDeprecationWarnings);
- });
-
TEST_F('PrintPreviewDestinationSelectTest', 'ChangeIcon', function() {
this.runMochaTest(destination_select_test.TestNames.ChangeIcon);
});
-
-TEST_F(
- 'PrintPreviewDestinationSelectTest', 'ChangeIconDeprecationWarnings',
- function() {
- this.runMochaTest(
- destination_select_test.TestNames.ChangeIconDeprecationWarnings);
- });
GEN('#endif');
// eslint-disable-next-line no-var