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(['../options_browsertest_base.js']); | 5 GEN_INCLUDE(['../options_browsertest_base.js']); |
6 GEN('#include "chrome/browser/ui/webui/options/chromeos/' + | 6 GEN('#include "chrome/browser/ui/webui/options/chromeos/' + |
7 'guest_mode_options_browsertest.h"'); | 7 'guest_mode_options_browsertest.h"'); |
8 | 8 |
9 /** | 9 /** |
10 * TestFixture for guest mode options WebUI testing. | 10 * TestFixture for guest mode options WebUI testing. |
(...skipping 26 matching lines...) Expand all Loading... |
37 /** @param {!HTMLElement} el */ | 37 /** @param {!HTMLElement} el */ |
38 expectHidden: function(el) { | 38 expectHidden: function(el) { |
39 expectFalse(el.offsetHeight > 0 && el.offsetWidth > 0); | 39 expectFalse(el.offsetHeight > 0 && el.offsetWidth > 0); |
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 TEST_F('GuestModeOptionsUIBrowserTest', 'testSections', function() { | 44 TEST_F('GuestModeOptionsUIBrowserTest', 'testSections', function() { |
45 this.expectHidden($('startup-section')); | 45 this.expectHidden($('startup-section')); |
46 this.expectHidden($('appearance-section')); | 46 this.expectHidden($('appearance-section')); |
47 this.expectHidden($('andorid-apps-section')); | 47 this.expectHidden($('android-apps-section')); |
48 this.expectHidden($('sync-users-section')); | 48 this.expectHidden($('sync-users-section')); |
49 this.expectHidden($('easy-unlock-section')); | 49 this.expectHidden($('easy-unlock-section')); |
50 this.expectHidden($('reset-profile-settings-section')); | 50 this.expectHidden($('reset-profile-settings-section')); |
51 }); | 51 }); |
52 | 52 |
53 /** Test controls that should be disabled in guest mode. */ | 53 /** Test controls that should be disabled in guest mode. */ |
54 TEST_F('GuestModeOptionsUIBrowserTest', 'testControls', function() { | 54 TEST_F('GuestModeOptionsUIBrowserTest', 'testControls', function() { |
55 // Appearance section. | 55 // Appearance section. |
56 var setWallpaper = $('set-wallpaper'); | 56 var setWallpaper = $('set-wallpaper'); |
57 expectTrue(setWallpaper.disabled); | 57 expectTrue(setWallpaper.disabled); |
(...skipping 13 matching lines...) Expand all Loading... |
71 // Web content section. | 71 // Web content section. |
72 expectTrue($('defaultZoomFactor').disabled); | 72 expectTrue($('defaultZoomFactor').disabled); |
73 | 73 |
74 // Downloads section. | 74 // Downloads section. |
75 expectTrue(this.getControlForPref('gdata.disabled').disabled); | 75 expectTrue(this.getControlForPref('gdata.disabled').disabled); |
76 | 76 |
77 // Content settings overlay. | 77 // Content settings overlay. |
78 expectTrue(this.getControlForPref('settings.privacy.drm_enabled').disabled); | 78 expectTrue(this.getControlForPref('settings.privacy.drm_enabled').disabled); |
79 expectTrue($('protected-content-exceptions').disabled); | 79 expectTrue($('protected-content-exceptions').disabled); |
80 }); | 80 }); |
OLD | NEW |