| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 Site settings page tests. */ | 5 /** @fileoverview Site settings page tests. */ |
| 6 | 6 |
| 7 GEN_INCLUDE(['settings_page_browsertest.js']); | 7 GEN_INCLUDE(['settings_page_browsertest.js']); |
| 8 /** | 8 /** |
| 9 * @constructor | 9 * @constructor |
| 10 * @extends {SettingsPageBrowserTest} | 10 * @extends {SettingsPageBrowserTest} |
| 11 */ | 11 */ |
| 12 function SettingsSiteSettingsPageBrowserTest() {} | 12 function SettingsSiteSettingsPageBrowserTest() {} |
| 13 | 13 |
| 14 SettingsSiteSettingsPageBrowserTest.prototype = { | 14 SettingsSiteSettingsPageBrowserTest.prototype = { |
| 15 __proto__: SettingsPageBrowserTest.prototype, | 15 __proto__: SettingsPageBrowserTest.prototype, |
| 16 }; | 16 }; |
| 17 | 17 |
| 18 TEST_F('SettingsSiteSettingsPageBrowserTest', 'labels', function() { | 18 // Failing on ChromiumOS dbg. https://crbug.com/709442 |
| 19 GEN('#if defined(OS_CHROMEOS) && !defined(NDEBUG)'); |
| 20 GEN('#define MAYBE_labels DISABLED_labels'); |
| 21 GEN('#else'); |
| 22 GEN('#define MAYBE_labels labels'); |
| 23 GEN('#endif'); |
| 24 TEST_F('SettingsSiteSettingsPageBrowserTest', 'MAYBE_labels', function() { |
| 19 suite('Site settings page', function() { | 25 suite('Site settings page', function() { |
| 20 var ui; | 26 var ui; |
| 21 | 27 |
| 22 suiteSetup(function() { | 28 suiteSetup(function() { |
| 23 ui = assert(document.createElement('settings-site-settings-page')); | 29 ui = assert(document.createElement('settings-site-settings-page')); |
| 24 }); | 30 }); |
| 25 | 31 |
| 26 test('defaultSettingLabel_ tests', function() { | 32 test('defaultSettingLabel_ tests', function() { |
| 27 assertEquals('a', ui.defaultSettingLabel_( | 33 assertEquals('a', ui.defaultSettingLabel_( |
| 28 settings.PermissionValues.ALLOW, 'a', 'b')); | 34 settings.PermissionValues.ALLOW, 'a', 'b')); |
| 29 assertEquals('b', ui.defaultSettingLabel_( | 35 assertEquals('b', ui.defaultSettingLabel_( |
| 30 settings.PermissionValues.BLOCK, 'a', 'b')); | 36 settings.PermissionValues.BLOCK, 'a', 'b')); |
| 31 assertEquals('a', ui.defaultSettingLabel_( | 37 assertEquals('a', ui.defaultSettingLabel_( |
| 32 settings.PermissionValues.ALLOW, 'a', 'b', 'c')); | 38 settings.PermissionValues.ALLOW, 'a', 'b', 'c')); |
| 33 assertEquals('b', ui.defaultSettingLabel_( | 39 assertEquals('b', ui.defaultSettingLabel_( |
| 34 settings.PermissionValues.BLOCK, 'a', 'b', 'c')); | 40 settings.PermissionValues.BLOCK, 'a', 'b', 'c')); |
| 35 assertEquals('c', ui.defaultSettingLabel_( | 41 assertEquals('c', ui.defaultSettingLabel_( |
| 36 settings.PermissionValues.SESSION_ONLY, 'a', 'b', 'c')); | 42 settings.PermissionValues.SESSION_ONLY, 'a', 'b', 'c')); |
| 37 assertEquals('c', ui.defaultSettingLabel_( | 43 assertEquals('c', ui.defaultSettingLabel_( |
| 38 settings.PermissionValues.DEFAULT, 'a', 'b', 'c')); | 44 settings.PermissionValues.DEFAULT, 'a', 'b', 'c')); |
| 39 assertEquals('c', ui.defaultSettingLabel_( | 45 assertEquals('c', ui.defaultSettingLabel_( |
| 40 settings.PermissionValues.ASK, 'a', 'b', 'c')); | 46 settings.PermissionValues.ASK, 'a', 'b', 'c')); |
| 41 assertEquals('c', ui.defaultSettingLabel_( | 47 assertEquals('c', ui.defaultSettingLabel_( |
| 42 settings.PermissionValues.DETECT_IMPORTANT_CONTENT, 'a', 'b', 'c')); | 48 settings.PermissionValues.DETECT_IMPORTANT_CONTENT, 'a', 'b', 'c')); |
| 43 }); | 49 }); |
| 44 }); | 50 }); |
| 45 | 51 |
| 46 mocha.run(); | 52 mocha.run(); |
| 47 }); | 53 }); |
| OLD | NEW |