| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 GEN_INCLUDE(['options_browsertest_base.js']); | 5 GEN_INCLUDE(['options_browsertest_base.js']); |
| 6 GEN('#include "chrome/browser/ui/webui/options/' + | 6 GEN('#include "chrome/browser/ui/webui/options/' + |
| 7 'multilanguage_options_browsertest.h"'); | 7 'multilanguage_options_browsertest.h"'); |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Test C++ fixture for Language Options WebUI testing. | 10 * Test C++ fixture for Language Options WebUI testing. |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 184 |
| 185 // Enable when failure is resolved. | 185 // Enable when failure is resolved. |
| 186 // AX_FOCUS_01: http://crbug.com/570046 | 186 // AX_FOCUS_01: http://crbug.com/570046 |
| 187 this.accessibilityAuditConfig.ignoreSelectors( | 187 this.accessibilityAuditConfig.ignoreSelectors( |
| 188 'focusableElementNotVisibleAndNotAriaHidden', | 188 'focusableElementNotVisibleAndNotAriaHidden', |
| 189 '#offer-to-translate-in-this-language'); | 189 '#offer-to-translate-in-this-language'); |
| 190 }, | 190 }, |
| 191 }; | 191 }; |
| 192 | 192 |
| 193 // Make sure the case where no languages are selected is handled properly. | 193 // Make sure the case where no languages are selected is handled properly. |
| 194 // TODO(crbug.com/657514) Flakes on linux and chromeos. | 194 TEST_F('MultilanguagePreferenceWebUIBrowserTest', 'SelectFromBlank', |
| 195 GEN('#if defined(OS_LINUX) || defined(OS_CHROMEOS)'); | |
| 196 GEN('#define MAYBE_SelectFromBlank DISABLED_SelectFromBlank'); | |
| 197 GEN('#else'); | |
| 198 GEN('#define MAYBE_SelectFromBlank SelectFromBlank'); | |
| 199 GEN('#endif // defined(OS_WIN)'); | |
| 200 TEST_F('MultilanguagePreferenceWebUIBrowserTest', 'MAYBE_SelectFromBlank', | |
| 201 function() { | 195 function() { |
| 202 expectTrue($('language-options-list').selectLanguageByCode('fr')); | 196 expectTrue($('language-options-list').selectLanguageByCode('fr')); |
| 203 expectFalse($('spellcheck-language-checkbox').checked, 'fr'); | 197 expectFalse($('spellcheck-language-checkbox').checked, 'fr'); |
| 204 expectTrue($('edit-custom-dictionary-button').hidden); | 198 expectTrue($('edit-custom-dictionary-button').hidden); |
| 205 | 199 |
| 206 // Add a preference change event listener which ensures that the preference is | 200 // Add a preference change event listener which ensures that the preference is |
| 207 // updated correctly and that 'fr' is the only thing in the dictionary object. | 201 // updated correctly and that 'fr' is the only thing in the dictionary object. |
| 208 this.addPreferenceListener('spellcheck.dictionaries', function() { | 202 this.addPreferenceListener('spellcheck.dictionaries', function() { |
| 209 expectTrue($('spellcheck-language-checkbox').checked, 'fr'); | 203 expectTrue($('spellcheck-language-checkbox').checked, 'fr'); |
| 210 this.expectRegisteredDictionariesPref('fr'); | 204 this.expectRegisteredDictionariesPref('fr'); |
| 211 this.expectCurrentlySelected('fr'); | 205 this.expectCurrentlySelected('fr'); |
| 212 expectFalse($('edit-custom-dictionary-button').hidden); | 206 expectFalse($('edit-custom-dictionary-button').hidden); |
| 213 testDone(); | 207 testDone(); |
| 214 }.bind(this)); | 208 }.bind(this)); |
| 215 | 209 |
| 216 // Click 'fr' and trigger the preference listener. | 210 // Click 'fr' and trigger the preference listener. |
| 217 $('spellcheck-language-checkbox').click(); | 211 $('spellcheck-language-checkbox').click(); |
| 218 }); | 212 }); |
| OLD | NEW |