Update test "LanguageOptionsWebUITest.reselectUILocale"

Current implementation assumes that current UI language is the first language
on the list. It works now but might break in the future.
To avoid that we should select current UI language on left pane
before making any checks.

R=dbeam@chromium.org

Review URL: https://codereview.chromium.org/399353006

Cr-Commit-Position: refs/heads/master@{#288439}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288439 0039d316-1c4b-4281-b951-d872f2087c98
parent 9e797d27
...@@ -27,6 +27,7 @@ GEN('#if defined(OS_WIN) || defined(OS_CHROMEOS)'); ...@@ -27,6 +27,7 @@ GEN('#if defined(OS_WIN) || defined(OS_CHROMEOS)');
// or a [ Display Chrome in this language ] button. // or a [ Display Chrome in this language ] button.
TEST_F('LanguageOptionsWebUITest', 'reselectUILocale', function() { TEST_F('LanguageOptionsWebUITest', 'reselectUILocale', function() {
var currentLang = loadTimeData.getString('currentUiLanguageCode'); var currentLang = loadTimeData.getString('currentUiLanguageCode');
$('language-options-list').selectLanguageByCode(currentLang);
LanguageOptions.uiLanguageSaved(currentLang); LanguageOptions.uiLanguageSaved(currentLang);
expectTrue($('language-options-ui-language-button').hidden); expectTrue($('language-options-ui-language-button').hidden);
......
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