Commit 7d65a492 authored by Akihiro Ota's avatar Akihiro Ota Committed by Chromium LUCI CQ

Make ChromeVox hint an oobe-modal-dialog instead of a cr-dialog.

Make the ChromeVox hint dialog an oobe-modal-dialog in accordance with
the following change: http://crrev.com/c/2563481. This ensures that the
shelf buttons cannot be acted on while the dialog is open.

Bug: N/A
Change-Id: Ie08bfc44fdc6eb73e803c2ec10449cc461e455c2
AX-Relnotes: N/A
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2577545
Commit-Queue: Akihiro Ota <akihiroota@chromium.org>
Reviewed-by: default avatarDenis Kuznetsov [CET] <antrim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834286}
parent bbb39aeb
...@@ -519,15 +519,15 @@ class WelcomeScreenChromeVoxHintTest : public WelcomeScreenBrowserTest { ...@@ -519,15 +519,15 @@ class WelcomeScreenChromeVoxHintTest : public WelcomeScreenBrowserTest {
void WaitForChromeVoxHintDialogToOpen() { void WaitForChromeVoxHintDialogToOpen() {
test::OobeJS() test::OobeJS()
.CreateAttributePresenceWaiter("open", true /*present*/, .CreateWaiter(test::GetOobeElementPath({kChromeVoxHintDialog}) +
kChromeVoxHintDialog) ".open")
->Wait(); ->Wait();
} }
void WaitForChromeVoxHintDialogToClose() { void WaitForChromeVoxHintDialogToClose() {
test::OobeJS() test::OobeJS()
.CreateAttributePresenceWaiter("open", false /*present*/, .CreateWaiter(test::GetOobeElementPath({kChromeVoxHintDialog}) +
kChromeVoxHintDialog) ".open === false")
->Wait(); ->Wait();
} }
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
<link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html">
<link rel="import" href="chrome://resources/html/action_link.html"> <link rel="import" href="chrome://resources/html/action_link.html">
<link rel="import" href="chrome://resources/html/i18n_behavior.html"> <link rel="import" href="chrome://resources/html/i18n_behavior.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html"> <link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
<link rel="import" href="/components/oobe_i18n_behavior.html"> <link rel="import" href="/components/oobe_i18n_behavior.html">
...@@ -154,11 +153,11 @@ ...@@ -154,11 +153,11 @@
</oobe-text-button> </oobe-text-button>
</div> </div>
</oobe-dialog> </oobe-dialog>
<cr-dialog id="chromeVoxHint"> <oobe-modal-dialog id="chromeVoxHint">
<div class="title" slot="title"> <div slot="title">
<p>[[i18nDynamic(locale, 'chromeVoxHintText')]]</p> <p>[[i18nDynamic(locale, 'chromeVoxHintText')]]</p>
</div> </div>
<div class="button-container" slot="button-container"> <div slot="buttons">
<oobe-text-button id="dismissChromeVoxButton" <oobe-text-button id="dismissChromeVoxButton"
on-click="dismissChromeVoxHint_" on-click="dismissChromeVoxHint_"
text-key="continueWithoutChromeVox"> text-key="continueWithoutChromeVox">
...@@ -167,6 +166,6 @@ ...@@ -167,6 +166,6 @@
on-click="activateChromeVox_" text-key="activateChromeVox"> on-click="activateChromeVox_" text-key="activateChromeVox">
</oobe-text-button> </oobe-text-button>
</div> </div>
</cr-dialog> </oobe-modal-dialog>
</template> </template>
</dom-module> </dom-module>
...@@ -453,14 +453,14 @@ ...@@ -453,14 +453,14 @@
* Called to show the ChromeVox hint dialog. * Called to show the ChromeVox hint dialog.
*/ */
showChromeVoxHint() { showChromeVoxHint() {
this.$.chromeVoxHint.showModal(); this.$.chromeVoxHint.showDialog();
}, },
/** /**
* Called to close the ChromeVox hint dialog. * Called to close the ChromeVox hint dialog.
*/ */
closeChromeVoxHint() { closeChromeVoxHint() {
this.$.chromeVoxHint.close(); this.$.chromeVoxHint.hideDialog();
}, },
/** /**
......
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