Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: chrome/test/data/webui/settings/cr_settings_browsertest.js

Issue 2234093002: Settings Router Refactor: Update subpage-back button to use history back sometimes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix closure compile using typecast Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 * @constructor 551 * @constructor
552 * @extends {CrSettingsBrowserTest} 552 * @extends {CrSettingsBrowserTest}
553 */ 553 */
554 function CrSettingsSubpageTest() {} 554 function CrSettingsSubpageTest() {}
555 555
556 CrSettingsSubpageTest.prototype = { 556 CrSettingsSubpageTest.prototype = {
557 __proto__: CrSettingsBrowserTest.prototype, 557 __proto__: CrSettingsBrowserTest.prototype,
558 558
559 /** @override */ 559 /** @override */
560 browsePreload: 'chrome://md-settings/settings_page/settings_subpage.html', 560 browsePreload: 'chrome://md-settings/settings_page/settings_subpage.html',
561
562 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
563 'settings_subpage_test.js',
564 ]),
561 }; 565 };
562 566
563 TEST_F('CrSettingsSubpageTest', 'SettingsSubpage', function() { 567 TEST_F('CrSettingsSubpageTest', 'SettingsSubpage', function() {
564 suite('SettingsSubpage', function() { 568 settings_subpage.registerTests();
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(); 569 mocha.run();
580 }); 570 });
581 571
582 GEN('#if !defined(OS_CHROMEOS)'); 572 GEN('#if !defined(OS_CHROMEOS)');
583 /** 573 /**
584 * @constructor 574 * @constructor
585 * @extends {CrSettingsBrowserTest} 575 * @extends {CrSettingsBrowserTest}
586 */ 576 */
587 function CrSettingsSystemPageTest() {} 577 function CrSettingsSystemPageTest() {}
588 578
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 browsePreload: 'chrome://md-settings/controls/controlled_radio_button.html', 785 browsePreload: 'chrome://md-settings/controls/controlled_radio_button.html',
796 786
797 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ 787 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
798 'controlled_radio_button_tests.js', 788 'controlled_radio_button_tests.js',
799 ]), 789 ]),
800 }; 790 };
801 791
802 TEST_F('CrControlledRadioButtonTest', 'All', function() { 792 TEST_F('CrControlledRadioButtonTest', 'All', function() {
803 mocha.run(); 793 mocha.run();
804 }); 794 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698