Commit 55eba91a authored by David Tseng's avatar David Tseng Committed by Chromium LUCI CQ

Reland "Re-enable SelectToSpeakTest.SpeakStatusTray excluding official builds"

According to test output, the speech generated is slightly different
than what's expected:
pending speech utterances...
"Select-to-Speak button Status tray, time 5:06 AM,
...

Unsatisfied expectations...
ExpectSpeechPattern("Status tray*") RunTestOnMainThread@../../chrome/browser/chromeos/accessibility/select_to_speak_browsertest.cc:186

Change the pattern to match accordingly.

Original change's description:
> Re-enable SelectToSpeakTest.SpeakStatusTray excluding official builds
>
> On official builds, the unified status tray appears to be inactive; test
> always fails. Re-enable for non-officila builds, which still exercises
> views UI + STS reading.
>
> R=​akihiroota@chromium.org
>
> Fixed: 1158879
> Change-Id: I2fc7b4e6bb922c6d60aa819a73ce3a41b3afc003
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2595491
> Auto-Submit: David Tseng <dtseng@chromium.org>
> Commit-Queue: Akihiro Ota <akihiroota@chromium.org>
> Reviewed-by: Akihiro Ota <akihiroota@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#837680}

R=josiahk@chromium.org
TBR=akihiroota@chromium.org, chromium-scoped@luci-project-accounts.iam.gserviceaccount.com, dtseng@chromium.org

Bug: 1158879
Change-Id: Id2d9b301188fb2ee024d8d300eba3c33a2fed39b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2605296Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Reviewed-by: default avatarJosiah Krutz <josiahk@google.com>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#839548}
parent 2d9c51de
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "build/branding_buildflags.h"
#include "chrome/browser/chromeos/accessibility/accessibility_manager.h" #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
#include "chrome/browser/chromeos/accessibility/speech_monitor.h" #include "chrome/browser/chromeos/accessibility/speech_monitor.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
...@@ -162,7 +163,13 @@ class SelectToSpeakTestWithLanguageDetection : public SelectToSpeakTest { ...@@ -162,7 +163,13 @@ class SelectToSpeakTestWithLanguageDetection : public SelectToSpeakTest {
} }
}; };
IN_PROC_BROWSER_TEST_F(SelectToSpeakTest, DISABLED_SpeakStatusTray) { // The status tray is not active on official builds.
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
#define MAYBE_SpeakStatusTray DISABLED_SpeakStatusTray
#else
#define MAYBE_SpeakStatusTray SpeakStatusTray
#endif
IN_PROC_BROWSER_TEST_F(SelectToSpeakTest, MAYBE_SpeakStatusTray) {
gfx::Rect tray_bounds = ash::Shell::Get() gfx::Rect tray_bounds = ash::Shell::Get()
->GetPrimaryRootWindowController() ->GetPrimaryRootWindowController()
->GetStatusAreaWidget() ->GetStatusAreaWidget()
...@@ -176,7 +183,7 @@ IN_PROC_BROWSER_TEST_F(SelectToSpeakTest, DISABLED_SpeakStatusTray) { ...@@ -176,7 +183,7 @@ IN_PROC_BROWSER_TEST_F(SelectToSpeakTest, DISABLED_SpeakStatusTray) {
generator_->ReleaseLeftButton(); generator_->ReleaseLeftButton();
generator_->ReleaseKey(ui::VKEY_LWIN, 0 /* flags */); generator_->ReleaseKey(ui::VKEY_LWIN, 0 /* flags */);
sm_.ExpectSpeechPattern("Status tray*"); sm_.ExpectSpeechPattern("*Status tray*");
sm_.Replay(); sm_.Replay();
} }
......
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