Commit e9593036 authored by Chris Hall's avatar Chris Hall Committed by Commit Bot

Trivial: fixing and clarifying comments in language detection unit test.

R=meredithl

Change-Id: Iacf878aea64518ad9e66a661589c7e11f55cc66e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2362382Reviewed-by: default avatarMeredith Lane <meredithl@chromium.org>
Commit-Queue: Chris Hall <chrishall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799895}
parent a8819f4d
......@@ -842,6 +842,7 @@ TEST_F(AXLanguageDetectionTestStaticContent, kLanguageUntouched) {
// Test RegisterLanguageDetectionObserver correctly respects the feature flag.
TEST_F(AXLanguageDetectionTestFixture, ObserverRegistrationObeysFlag) {
// Enable only the flag controlling static language detection.
base::CommandLine::ForCurrentProcess()->AppendSwitch(
::switches::kEnableExperimentalAccessibilityLanguageDetection);
......@@ -855,11 +856,12 @@ TEST_F(AXLanguageDetectionTestFixture, ObserverRegistrationObeysFlag) {
ASSERT_EQ(getObserver(tree), nullptr);
// Now enable the dynamic feature flag.
base::CommandLine::ForCurrentProcess()->AppendSwitch(
::switches::kEnableExperimentalAccessibilityLanguageDetectionDynamic);
// Try registration without turning on Dynamic feature flag, this should
// do nothing.
// Try registration again, this should construct and register observer as flag
// is now enabled.
tree.language_detection_manager->RegisterLanguageDetectionObserver();
// Check our observer was constructed.
......
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