Commit 7cde465a authored by Nick Burris's avatar Nick Burris Committed by Commit Bot

Settings WebUI: Fix extensions url on cleanup result page

The cleaner success string now has HTML in it, and the JS i18n
function strips it off. i18nAdvanced allows us to let the <a> through to
the string, but the way the cleanup result page works is it simply sets
the card text variable ("title") to the result message string. This
would result in the raw string (with HTML) getting displayed, so the
title variable needs to also be set to be the inner-h-t-m-l.

Bug: 853339
Cq-Include-Trybots: luci.chromium.try:closure_compilation
Change-Id: I8ea98e9868f83fc14a674841072cc2915c7b4a48
Reviewed-on: https://chromium-review.googlesource.com/1134191
Commit-Queue: Nick Burris <nburris@google.com>
Reviewed-by: default avatarproberge <proberge@chromium.org>
Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574594}
parent 96544636
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</iron-icon> </iron-icon>
</div> </div>
<div class="start"> <div class="start">
<div role="status">[[title_]]</div> <div id="status-title" role="status" inner-h-t-m-l="[[title_]]"></div>
<div hidden="[[!showExplanation_]]"> <div hidden="[[!showExplanation_]]">
<span class="secondary">[[explanation_]]</span> <span class="secondary">[[explanation_]]</span>
</div> </div>
......
...@@ -746,7 +746,7 @@ Polymer({ ...@@ -746,7 +746,7 @@ Polymer({
], ],
[ [
settings.ChromeCleanerCardState.CLEANUP_SUCCEEDED, { settings.ChromeCleanerCardState.CLEANUP_SUCCEEDED, {
title: this.i18n('chromeCleanupTitleRemoved'), title: this.i18nAdvanced('chromeCleanupTitleRemoved', {tags: ['a']}),
explanation: null, explanation: null,
icon: icons.DONE, icon: icons.DONE,
actionButton: null, actionButton: null,
......
...@@ -437,6 +437,10 @@ suite('ChromeCleanupHandler', function() { ...@@ -437,6 +437,10 @@ suite('ChromeCleanupHandler', function() {
const actionButton = chromeCleanupPage.$$('#action-button'); const actionButton = chromeCleanupPage.$$('#action-button');
assertFalse(!!actionButton); assertFalse(!!actionButton);
const title = chromeCleanupPage.$$('#status-title');
assertTrue(!!title);
assertTrue(!!title.querySelector('a'));
}); });
test('logsUploadingOnScanOffered', function() { test('logsUploadingOnScanOffered', 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