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 /** @fileoverview Runs the Polymer Settings tests. */ | 5 /** @fileoverview Runs the Polymer Settings tests. */ |
6 | 6 |
7 /** @const {string} Path to source root. */ | 7 /** @const {string} Path to source root. */ |
8 var ROOT_PATH = '../../../../../'; | 8 var ROOT_PATH = '../../../../../'; |
9 | 9 |
10 // Polymer BrowserTest fixture. | 10 // Polymer BrowserTest fixture. |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ | 538 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ |
539 'settings_menu_test.js', | 539 'settings_menu_test.js', |
540 ]), | 540 ]), |
541 }; | 541 }; |
542 | 542 |
543 TEST_F('CrSettingsMenuTest', 'SettingsMenu', function() { | 543 TEST_F('CrSettingsMenuTest', 'SettingsMenu', function() { |
544 settings_menu.registerTests(); | 544 settings_menu.registerTests(); |
545 mocha.run(); | 545 mocha.run(); |
546 }); | 546 }); |
547 | 547 |
| 548 /** |
| 549 * Test fixture for |
| 550 * chrome/browser/resources/settings/settings_page/settings_subpage.html. |
| 551 * @constructor |
| 552 * @extends {CrSettingsBrowserTest} |
| 553 */ |
| 554 function CrSettingsSubpageTest() {} |
| 555 |
| 556 CrSettingsSubpageTest.prototype = { |
| 557 __proto__: CrSettingsBrowserTest.prototype, |
| 558 |
| 559 /** @override */ |
| 560 browsePreload: 'chrome://md-settings/settings_page/settings_subpage.html', |
| 561 }; |
| 562 |
| 563 TEST_F('CrSettingsSubpageTest', 'SettingsSubpage', function() { |
| 564 suite('SettingsSubpage', function() { |
| 565 test('can navigate to parent', function() { |
| 566 PolymerTest.clearBody(); |
| 567 |
| 568 settings.navigateTo(settings.Route.SYNC); |
| 569 assertEquals(settings.Route.SYNC, settings.getCurrentRoute()); |
| 570 |
| 571 var subpage = document.createElement('settings-subpage'); |
| 572 document.body.appendChild(subpage); |
| 573 |
| 574 MockInteractions.tap(subpage.$$('paper-icon-button')); |
| 575 assertEquals(settings.Route.PEOPLE, settings.getCurrentRoute()); |
| 576 }); |
| 577 }); |
| 578 |
| 579 mocha.run(); |
| 580 }); |
| 581 |
548 GEN('#if !defined(OS_CHROMEOS)'); | 582 GEN('#if !defined(OS_CHROMEOS)'); |
549 /** | 583 /** |
550 * @constructor | 584 * @constructor |
551 * @extends {CrSettingsBrowserTest} | 585 * @extends {CrSettingsBrowserTest} |
552 */ | 586 */ |
553 function CrSettingsSystemPageTest() {} | 587 function CrSettingsSystemPageTest() {} |
554 | 588 |
555 CrSettingsSystemPageTest.prototype = { | 589 CrSettingsSystemPageTest.prototype = { |
556 __proto__: CrSettingsBrowserTest.prototype, | 590 __proto__: CrSettingsBrowserTest.prototype, |
557 | 591 |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 browsePreload: 'chrome://md-settings/controls/controlled_radio_button.html', | 795 browsePreload: 'chrome://md-settings/controls/controlled_radio_button.html', |
762 | 796 |
763 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ | 797 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ |
764 'controlled_radio_button_tests.js', | 798 'controlled_radio_button_tests.js', |
765 ]), | 799 ]), |
766 }; | 800 }; |
767 | 801 |
768 TEST_F('CrControlledRadioButtonTest', 'All', function() { | 802 TEST_F('CrControlledRadioButtonTest', 'All', function() { |
769 mocha.run(); | 803 mocha.run(); |
770 }); | 804 }); |
OLD | NEW |