Commit 352c4ce6 authored by Akihiro Ota's avatar Akihiro Ota Committed by Commit Bot

Write SpokenFeedbackTests for ChromeVox tutorial.

This change adds a spoken feedback test for the tutorial in OOBE,
using an existing ChromeVox test as a template
(ChromeVoxTutorialTest.QuickOrientationLessonTest)

We also add a basic test for the tutorial when signed in.

Fixed: 1127048
AX-Relnotes: N/A
Change-Id: I4715fe719de24c14462bde369a753e519619d7fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2533754
Commit-Queue: Akihiro Ota <akihiroota@chromium.org>
Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826942}
parent 1abc192f
......@@ -919,6 +919,33 @@ IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, HardwareKeysGetRewritten) {
sm_.Replay();
}
// Tests basic behavior of the tutorial when signed in.
IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, Tutorial) {
EnableChromeVox();
sm_.Call([this]() {
ui_test_utils::NavigateToURL(
browser(), GURL("data:text/html,<button autofocus>Testing</button>"));
});
sm_.Call([this]() {
SendKeyPressWithSearch(ui::VKEY_O);
ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
nullptr, ui::VKEY_T, false, false, false, false));
});
sm_.ExpectSpeech("ChromeVox tutorial");
sm_.ExpectSpeech(
"Press Search plus Right Arrow, or Search plus Left Arrow to browse "
"topics");
sm_.Call([this]() { SendKeyPressWithSearch(ui::VKEY_RIGHT); });
sm_.ExpectSpeech("Quick orientation");
sm_.Call([this]() { SendKeyPressWithSearch(ui::VKEY_RIGHT); });
sm_.ExpectSpeech("Essential keys");
sm_.Call([this]() { SendKeyPressWithSearch(ui::VKEY_B); });
sm_.ExpectSpeech("Exit tutorial");
sm_.Call([this]() { SendKeyPressWithSearch(ui::VKEY_SPACE); });
sm_.ExpectSpeech("Testing");
sm_.Replay();
}
//
// Spoken feedback tests of the out-of-box experience.
//
......@@ -972,6 +999,30 @@ IN_PROC_BROWSER_TEST_F(OobeSpokenFeedbackTest, SpokenFeedbackInOobe) {
sm_.Replay();
}
IN_PROC_BROWSER_TEST_F(OobeSpokenFeedbackTest, SpokenFeedbackTutorialInOobe) {
ui_controls::EnableUIControls();
ASSERT_FALSE(AccessibilityManager::Get()->IsSpokenFeedbackEnabled());
AccessibilityManager::Get()->EnableSpokenFeedback(true);
sm_.ExpectSpeech("Welcome to ChromeVox!");
sm_.ExpectSpeechPattern(
"Welcome to the ChromeVox tutorial*When you're ready, use the spacebar "
"to move to the next lesson.");
// Press space to move to the next lesson.
sm_.Call([]() {
ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
nullptr, ui::VKEY_SPACE, false, false, false, false));
});
sm_.ExpectSpeech("Essential Keys: Control");
sm_.ExpectSpeechPattern("*To continue, press the Control key.*");
// Press control to move to the next lesson.
sm_.Call([]() {
ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
nullptr, ui::VKEY_CONTROL, false, false, false, false));
});
sm_.ExpectSpeechPattern("*To continue, press the left Shift key.");
sm_.Replay();
}
class SigninToUserProfileSwitchTest : public OobeSpokenFeedbackTest {
public:
// OobeSpokenFeedbackTest:
......
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