| 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 GEN('#include "chrome/browser/ui/webui/options/chromeos/' + | 5 GEN('#include "chrome/browser/ui/webui/options/chromeos/' + |
| 6 'guest_mode_options_browsertest.h"'); | 6 'guest_mode_options_browsertest.h"'); |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * TestFixture for guest mode options WebUI testing. | 9 * TestFixture for guest mode options WebUI testing. |
| 10 * @extends {testing.Test} | 10 * @extends {testing.Test} |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 }, | 34 }, |
| 35 | 35 |
| 36 /** @param {!HTMLElement} el */ | 36 /** @param {!HTMLElement} el */ |
| 37 expectHidden: function(el) { | 37 expectHidden: function(el) { |
| 38 expectFalse(el.offsetHeight > 0 && el.offsetWidth > 0); | 38 expectFalse(el.offsetHeight > 0 && el.offsetWidth > 0); |
| 39 }, | 39 }, |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 /** | 42 /** |
| 43 * Test sections that should be hidden in guest mode. | 43 * Test sections that should be hidden in guest mode. |
| 44 * TODO(michaelpg): Debug flakiness: crbug.com/591154. |
| 44 */ | 45 */ |
| 45 TEST_F('GuestModeOptionsUIBrowserTest', 'testSections', function() { | 46 TEST_F('GuestModeOptionsUIBrowserTest', 'DISABLED_testSections', function() { |
| 46 this.expectHidden($('startup-section')); | 47 this.expectHidden($('startup-section')); |
| 47 this.expectHidden($('appearance-section')); | 48 this.expectHidden($('appearance-section')); |
| 48 this.expectHidden($('andorid-apps-section')); | 49 this.expectHidden($('andorid-apps-section')); |
| 49 this.expectHidden($('sync-users-section')); | 50 this.expectHidden($('sync-users-section')); |
| 50 this.expectHidden($('easy-unlock-section')); | 51 this.expectHidden($('easy-unlock-section')); |
| 51 this.expectHidden($('reset-profile-settings-section')); | 52 this.expectHidden($('reset-profile-settings-section')); |
| 52 }); | 53 }); |
| 53 | 54 |
| 54 /** | 55 /** |
| 55 * Test controls that should be disabled in guest mode. | 56 * Test controls that should be disabled in guest mode. |
| 57 * TODO(michaelpg): Debug flakiness: crbug.com/591154. |
| 56 */ | 58 */ |
| 57 TEST_F('GuestModeOptionsUIBrowserTest', 'testControls', function() { | 59 TEST_F('GuestModeOptionsUIBrowserTest', 'DISABLED_testControls', function() { |
| 58 // Appearance section. | 60 // Appearance section. |
| 59 var setWallpaper = $('set-wallpaper'); | 61 var setWallpaper = $('set-wallpaper'); |
| 60 expectTrue(setWallpaper.disabled); | 62 expectTrue(setWallpaper.disabled); |
| 61 | 63 |
| 62 // Passwords and autofill section. | 64 // Passwords and autofill section. |
| 63 expectTrue($('autofill-enabled').disabled); | 65 expectTrue($('autofill-enabled').disabled); |
| 64 | 66 |
| 65 // Date and time section. | 67 // Date and time section. |
| 66 expectTrue($('timezone-value-select').disabled); | 68 expectTrue($('timezone-value-select').disabled); |
| 67 expectFalse($('resolve-timezone-by-geolocation').disabled); | 69 expectFalse($('resolve-timezone-by-geolocation').disabled); |
| 68 expectFalse($('use-24hour-clock').disabled); | 70 expectFalse($('use-24hour-clock').disabled); |
| 69 | 71 |
| 70 // Privacy section. | 72 // Privacy section. |
| 71 expectTrue(this.getControlForPref('search.suggest_enabled').disabled); | 73 expectTrue(this.getControlForPref('search.suggest_enabled').disabled); |
| 72 expectTrue($('networkPredictionOptions').disabled); | 74 expectTrue($('networkPredictionOptions').disabled); |
| 73 | 75 |
| 74 // Web content section. | 76 // Web content section. |
| 75 expectTrue($('defaultZoomFactor').disabled); | 77 expectTrue($('defaultZoomFactor').disabled); |
| 76 | 78 |
| 77 // Downloads section. | 79 // Downloads section. |
| 78 expectTrue(this.getControlForPref('gdata.disabled').disabled); | 80 expectTrue(this.getControlForPref('gdata.disabled').disabled); |
| 79 | 81 |
| 80 // Content settings overlay. | 82 // Content settings overlay. |
| 81 expectTrue(this.getControlForPref('settings.privacy.drm_enabled').disabled); | 83 expectTrue(this.getControlForPref('settings.privacy.drm_enabled').disabled); |
| 82 expectTrue($('protected-content-exceptions').disabled); | 84 expectTrue($('protected-content-exceptions').disabled); |
| 83 }); | 85 }); |
| OLD | NEW |