Fix confirm-dialog-sk render
Noticed this while I was adding one to gold.
Change-Id: I49657887e323948db5567b5e2a48ea7ce739fc2c
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/263712
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
diff --git a/infra-sk/modules/confirm-dialog-sk/confirm-dialog-sk.js b/infra-sk/modules/confirm-dialog-sk/confirm-dialog-sk.js
index 043a391..a0d7c03 100644
--- a/infra-sk/modules/confirm-dialog-sk/confirm-dialog-sk.js
+++ b/infra-sk/modules/confirm-dialog-sk/confirm-dialog-sk.js
@@ -13,7 +13,7 @@
*
* <script>
* (function(){
- * $('#confirm-dialog').open("Proceed with taking over the world?").then(() => {
+ * $$('#confirm-dialog').open("Proceed with taking over the world?").then(() => {
* // Do some thing on confirm.
* }).catch(() => {
* // Do some thing on cancel.
@@ -60,6 +60,7 @@
*/
open(message) {
this._message = message;
+ this._render();
this._dialog.showModal();
return new Promise((resolve, reject) => {
this._resolve = resolve;
diff --git a/infra-sk/modules/confirm-dialog-sk/confirm-dialog-sk_test.js b/infra-sk/modules/confirm-dialog-sk/confirm-dialog-sk_test.js
index 2e3d410..050a777 100644
--- a/infra-sk/modules/confirm-dialog-sk/confirm-dialog-sk_test.js
+++ b/infra-sk/modules/confirm-dialog-sk/confirm-dialog-sk_test.js
@@ -21,9 +21,10 @@
return window.customElements.whenDefined('confirm-dialog-sk').then(() => {
container.innerHTML = `<confirm-dialog-sk></confirm-dialog-sk>`;
let dialog = container.firstElementChild;
- let promise = dialog.open("Testing");
+ let promise = dialog.open('Testing');
let button = dialog.querySelectorAll('button')[1];
assert.equal(button.textContent, 'OK');
+ expect(dialog.textContent).to.contain('Testing');
button.click();
// Return the promise and let Mocha check that it resolves.
return promise;