| 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 Polymer OnStartup Settings tests. */ | 5 /** @fileoverview Runs Polymer OnStartup Settings tests. */ |
| 6 | 6 |
| 7 GEN_INCLUDE(['settings_page_browsertest.js']); | 7 GEN_INCLUDE(['settings_page_browsertest.js']); |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Radio button enum values for restore on startup. | 10 * Radio button enum values for restore on startup. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 /** @return {Element} */ | 29 /** @return {Element} */ |
| 30 getPageElement: function(selector) { | 30 getPageElement: function(selector) { |
| 31 var section = this.getSection(this.basicPage, 'onStartup'); | 31 var section = this.getSection(this.basicPage, 'onStartup'); |
| 32 assertTrue(!!section); | 32 assertTrue(!!section); |
| 33 var module = section.querySelector('settings-on-startup-page'); | 33 var module = section.querySelector('settings-on-startup-page'); |
| 34 assertTrue(!!module); | 34 assertTrue(!!module); |
| 35 var result = module.$$(selector); | 35 var result = module.$$(selector); |
| 36 assertTrue(!!result); | 36 assertTrue(!!result); |
| 37 return result; | 37 return result; |
| 38 }, | 38 }, |
| 39 | |
| 40 /** @override */ | |
| 41 preLoad: function() { | |
| 42 SettingsPageBrowserTest.prototype.preLoad.call(this); | |
| 43 settingsHidePagesByDefaultForTest = true; | |
| 44 }, | |
| 45 }; | 39 }; |
| 46 | 40 |
| 47 TEST_F('OnStartupSettingsBrowserTest', 'uiTests', function() { | 41 TEST_F('OnStartupSettingsBrowserTest', 'uiTests', function() { |
| 48 /** | 42 /** |
| 49 * The prefs API that will get a fake implementation. | 43 * The prefs API that will get a fake implementation. |
| 50 * @type {!SettingsPrivate} | 44 * @type {!SettingsPrivate} |
| 51 */ | 45 */ |
| 52 var settingsPrefs; | 46 var settingsPrefs; |
| 53 var self = this; | 47 var self = this; |
| 54 | 48 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 81 }); | 75 }); |
| 82 | 76 |
| 83 test('open-specific', function() { | 77 test('open-specific', function() { |
| 84 settingsPrefs.set('prefs.session.restore_on_startup.value', | 78 settingsPrefs.set('prefs.session.restore_on_startup.value', |
| 85 RestoreOnStartupEnum.OPEN_SPECIFIC); | 79 RestoreOnStartupEnum.OPEN_SPECIFIC); |
| 86 assertEquals('Open a specific page or set of pages', restoreOnStartup()); | 80 assertEquals('Open a specific page or set of pages', restoreOnStartup()); |
| 87 }); | 81 }); |
| 88 }); | 82 }); |
| 89 mocha.run(); | 83 mocha.run(); |
| 90 }); | 84 }); |
| OLD | NEW |