shimless: Show spinner while updating Chrome version

http://screen/vrTHdNTCgx822yw

Bug: 1198187
Change-Id: Iebe026276707f97866a127a779894b5fbc1a8a9d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3251503
Commit-Queue: Gavin Williams <gavinwill@chromium.org>
Reviewed-by: Gavin Dodd <gavindodd@google.com>
Cr-Commit-Position: refs/heads/main@{#936185}
diff --git a/ash/webui/shimless_rma/resources/BUILD.gn b/ash/webui/shimless_rma/resources/BUILD.gn
index 0aaf40f..345958f 100644
--- a/ash/webui/shimless_rma/resources/BUILD.gn
+++ b/ash/webui/shimless_rma/resources/BUILD.gn
@@ -244,6 +244,7 @@
     ":base_page",
     ":mojo_interface_provider",
     ":shimless_rma_types",
+    "//third_party/polymer/v3_0/components-chromium/paper-spinner:paper-spinner-lite",
     "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
   ]
 }
diff --git a/ash/webui/shimless_rma/resources/onboarding_update_page.html b/ash/webui/shimless_rma/resources/onboarding_update_page.html
index 58388497a..5725c61 100644
--- a/ash/webui/shimless_rma/resources/onboarding_update_page.html
+++ b/ash/webui/shimless_rma/resources/onboarding_update_page.html
@@ -11,7 +11,11 @@
     <h1>Make sure Chrome OS is up to date</h1>
     <p>Update to the latest version of Chrome OS for an optimized repair process.</p>
     <p id="versionInfo">{{currentVersionText_}}</p>
-    <p id="progressMessage">{{updateProgressMessage_}}</p>
+    <div id="progressMessage">
+      <paper-spinner-lite hidden$="[[!updateInProgress_]]" active>
+      </paper-spinner-lite>
+      [[updateProgressMessage_]]
+    </div>
     <p id="networkUnavailable" hidden$="{{networkAvailable}}">
       To check if OS is up to date, connect to the internet in previous screen
     </p>
diff --git a/ash/webui/shimless_rma/resources/onboarding_update_page.js b/ash/webui/shimless_rma/resources/onboarding_update_page.js
index 85a49ce..05feb34 100644
--- a/ash/webui/shimless_rma/resources/onboarding_update_page.js
+++ b/ash/webui/shimless_rma/resources/onboarding_update_page.js
@@ -4,6 +4,7 @@
 
 import 'chrome://resources/cr_elements/icons.m.js';
 import 'chrome://resources/polymer/v3_0/iron-icon/iron-icon.js';
+import 'chrome://resources/polymer/v3_0/paper-spinner/paper-spinner-lite.js';
 import 'chrome://resources/cr_elements/cr_button/cr_button.m.js';
 import './shimless_rma_shared_css.js';
 import './base_page.js';
diff --git a/chrome/test/data/webui/chromeos/shimless_rma/onboarding_update_page_test.js b/chrome/test/data/webui/chromeos/shimless_rma/onboarding_update_page_test.js
index ed9391b..b98d9f4 100644
--- a/chrome/test/data/webui/chromeos/shimless_rma/onboarding_update_page_test.js
+++ b/chrome/test/data/webui/chromeos/shimless_rma/onboarding_update_page_test.js
@@ -176,14 +176,14 @@
 
     const progressComponent =
         component.shadowRoot.querySelector('#progressMessage');
-    assertEquals('', progressComponent.textContent);
+    assertEquals('', progressComponent.textContent.trim());
     await clickPerformUpdateButton();
 
     service.triggerOsUpdateObserver(OsUpdateOperation.kDownloading, 0.5, 0);
     await flushTasks();
 
     // TODO(gavindodd): update with i18n string
-    assertTrue(progressComponent.textContent.startsWith(
+    assertTrue(progressComponent.textContent.trim().startsWith(
         'OS update progress received '));
   });
 }