| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 /** @fileoverview Suite of tests for settings-languages-page. */ | 5 /** @fileoverview Suite of tests for settings-languages-page. */ |
| 6 | 6 |
| 7 /** @const {string} Path to root from chrome/test/data/webui/settings/. */ | 7 /** @const {string} Path to root from chrome/test/data/webui/settings/. */ |
| 8 var ROOT_PATH = '../../../../../'; | 8 var ROOT_PATH = '../../../../../'; |
| 9 | 9 |
| 10 // Polymer BrowserTest fixture. | 10 // Polymer BrowserTest fixture. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 SettingsLanguagesPageBrowserTest.prototype = { | 24 SettingsLanguagesPageBrowserTest.prototype = { |
| 25 __proto__: SettingsPageBrowserTest.prototype, | 25 __proto__: SettingsPageBrowserTest.prototype, |
| 26 | 26 |
| 27 /** @override */ | 27 /** @override */ |
| 28 preLoad: function() { | 28 preLoad: function() { |
| 29 SettingsPageBrowserTest.prototype.preLoad.call(this); | 29 SettingsPageBrowserTest.prototype.preLoad.call(this); |
| 30 settingsHidePagesByDefaultForTest = true; | 30 settingsHidePagesByDefaultForTest = true; |
| 31 }, | 31 }, |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 // Flaky on Windows. See https://crbug.com/641400. | 34 // Flaky on Windows, Mac and Linux. See https://crbug.com/641400. |
| 35 // May time out on debug builders and memory bots because | 35 // |
| 36 // the Settings page can take several seconds to load in a Release build | 36 // May time out on debug builders and memory bots because the Settings page can |
| 37 // and several times that in a Debug build. See https://crbug.com/558434. | 37 // take several seconds to load in a Release build and several times that in a |
| 38 GEN('#if defined(OS_WINDOWS) || defined(MEMORY_SANITIZER) || !defined(NDEBUG)'); | 38 // Debug build. See https://crbug.com/558434. |
| 39 // |
| 40 // Disabling this test in general. |
| 39 GEN('#define MAYBE_LanguagesPage DISABLED_LanguagesPage'); | 41 GEN('#define MAYBE_LanguagesPage DISABLED_LanguagesPage'); |
| 40 GEN('#else'); | |
| 41 GEN('#define MAYBE_LanguagesPage LanguagesPage'); | |
| 42 GEN('#endif'); | |
| 43 | 42 |
| 44 // Runs languages page tests. | 43 // Runs languages page tests. |
| 45 TEST_F('SettingsLanguagesPageBrowserTest', 'MAYBE_LanguagesPage', function() { | 44 TEST_F('SettingsLanguagesPageBrowserTest', 'MAYBE_LanguagesPage', function() { |
| 46 var self = this; | 45 var self = this; |
| 47 | 46 |
| 48 suiteSetup(function() { | 47 suiteSetup(function() { |
| 49 self.toggleAdvanced(); | 48 self.toggleAdvanced(); |
| 50 }); | 49 }); |
| 51 | 50 |
| 52 suite('languages page', function() { | 51 suite('languages page', function() { |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 0, triggerRow.querySelector('.secondary').textContent.length); | 452 0, triggerRow.querySelector('.secondary').textContent.length); |
| 454 } | 453 } |
| 455 }); | 454 }); |
| 456 }.bind(this)); | 455 }.bind(this)); |
| 457 | 456 |
| 458 // TODO(michaelpg): Test more aspects of the languages UI. | 457 // TODO(michaelpg): Test more aspects of the languages UI. |
| 459 | 458 |
| 460 // Run all registered tests. | 459 // Run all registered tests. |
| 461 mocha.run(); | 460 mocha.run(); |
| 462 }); | 461 }); |
| OLD | NEW |