-
Notifications
You must be signed in to change notification settings - Fork 892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a farbling-determined voice name to getVoices #10618
Conversation
10960ab
to
2abb1ff
Compare
2abb1ff
to
031c8c8
Compare
chromium_src/third_party/blink/renderer/modules/speech/speech_synthesis.cc
Show resolved
Hide resolved
031c8c8
to
1c5b49f
Compare
e202abf
to
4e25a01
Compare
EXPECT_EQ(off_voices_b, off_voices_z); | ||
|
||
// On platforms without any voices, the rest of this test is invalid. | ||
if (off_voices_b == "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could hide the real issues. Can we do this check with platform-specific ifdef
s?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately the API itself is so flaky (requires setting a timeout to decide that there are no voices) that the test sometimes fails on Windows CI where there are definitely voices. This was the compromise solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, but maybe it's the title
-observing approach flaky in its nature? I was wondering why you decided to go with it instead of directly calling async JS via something like content::EvalJS
.
chromium_src/third_party/blink/renderer/modules/speech/speech_synthesis.cc
Outdated
Show resolved
Hide resolved
chromium_src/third_party/blink/renderer/modules/speech/speech_synthesis.cc
Outdated
Show resolved
Hide resolved
4e25a01
to
0b094e8
Compare
call upstream function if farbling is off add DEPS exit early if no voices extend test timeout move exit condition earlier feedback
0b094e8
to
8a6e84d
Compare
"Hubert", "Vernon", "Rudolph", "Clayton", "Irving", | ||
"Wilson", "Alva", "Harley", "Beauregard", "Cleveland", | ||
"Cecil", "Reuben", "Sylvester", "Jasper"}; | ||
const int kFakeNamesCount = 14; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
base::size
to the rescue! feel free to use it whenever you have a good ol' array.
https://github.com/chromium/chromium/blob/97.0.4690.7/base/cxx17_backports.h#L29-L32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logged brave/brave-browser#19316 for followup
Resolves brave/brave-browser#18062
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: