| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 6 |
| 7 /** | 7 /** |
| 8 * TestFixture for testing messages of dictionary download progress in language | 8 * TestFixture for testing messages of dictionary download progress in language |
| 9 * options WebUI. | 9 * options WebUI. |
| 10 * @extends {testing.Test} | 10 * @extends {testing.Test} |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 options.LanguageOptions.onDictionaryDownloadFailure('en-US'); | 104 options.LanguageOptions.onDictionaryDownloadFailure('en-US'); |
| 105 expectTrue($('spellcheck-language-message').hidden); | 105 expectTrue($('spellcheck-language-message').hidden); |
| 106 expectTrue($('language-options-dictionary-downloading-message').hidden); | 106 expectTrue($('language-options-dictionary-downloading-message').hidden); |
| 107 expectFalse($('language-options-dictionary-download-failed-message').hidden); | 107 expectFalse($('language-options-dictionary-download-failed-message').hidden); |
| 108 expectFalse( | 108 expectFalse( |
| 109 $('language-options-dictionary-download-fail-help-message').hidden); | 109 $('language-options-dictionary-download-fail-help-message').hidden); |
| 110 }); | 110 }); |
| 111 | 111 |
| 112 // Verify that clicking the retry button calls the handler. | 112 // Verify that clicking the retry button calls the handler. |
| 113 // This test is flaky on Windows. https://crbug.com/616791 |
| 114 GEN('#if defined(OS_WIN)'); |
| 115 GEN('#define MAYBE_testdictionaryDownloadRetry ' + |
| 116 'DISABLED_testdictionaryDownloadRetry'); |
| 117 GEN('#else'); |
| 118 GEN('#define MAYBE_testdictionaryDownloadRetry testdictionaryDownloadRetry'); |
| 119 GEN('#endif // defined(OS_WIN)'); |
| 113 TEST_F('LanguagesOptionsDictionaryDownloadWebUITest', | 120 TEST_F('LanguagesOptionsDictionaryDownloadWebUITest', |
| 114 'testdictionaryDownloadRetry', | 121 'MAYBE_testdictionaryDownloadRetry', |
| 115 function() { | 122 function() { |
| 116 this.mockHandler.expects(once()).retryDictionaryDownload('en-US'). | 123 this.mockHandler.expects(once()).retryDictionaryDownload('en-US'). |
| 117 will(callFunction(function() { | 124 will(callFunction(function() { |
| 118 options.LanguageOptions.onDictionaryDownloadBegin('en-US'); | 125 options.LanguageOptions.onDictionaryDownloadBegin('en-US'); |
| 119 })); | 126 })); |
| 120 options.LanguageOptions.onDictionaryDownloadFailure('en-US'); | 127 options.LanguageOptions.onDictionaryDownloadFailure('en-US'); |
| 121 $('dictionary-download-retry-button').click(); | 128 $('dictionary-download-retry-button').click(); |
| 122 }); | 129 }); |
| OLD | NEW |