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

Side by Side Diff: chrome/browser/resources/options/options_page.js

Issue 8423031: Fix failing policy_prefs_ui tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with trunk. Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/test/functional/PYAUTO_TESTS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 cr.define('options', function() { 5 cr.define('options', function() {
6 ///////////////////////////////////////////////////////////////////////////// 6 /////////////////////////////////////////////////////////////////////////////
7 // OptionsPage class: 7 // OptionsPage class:
8 8
9 /** 9 /**
10 * Base class for options page. 10 * Base class for options page.
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 * all input fields of a window and if any of these is marked as managed 850 * all input fields of a window and if any of these is marked as managed
851 * it triggers the managed banner to be visible. The banner can be enforced 851 * it triggers the managed banner to be visible. The banner can be enforced
852 * being on through the managed flag of this class but it can not be forced 852 * being on through the managed flag of this class but it can not be forced
853 * being off if managed items exist. 853 * being off if managed items exist.
854 */ 854 */
855 updateManagedBannerVisibility: function() { 855 updateManagedBannerVisibility: function() {
856 var bannerDiv = $('managed-prefs-banner'); 856 var bannerDiv = $('managed-prefs-banner');
857 857
858 var controlledByPolicy = false; 858 var controlledByPolicy = false;
859 var controlledByExtension = false; 859 var controlledByExtension = false;
860 var inputElements = this.pageDiv.querySelectorAll('input[controlledBy]'); 860 var inputElements = this.pageDiv.querySelectorAll('input[controlled-by]');
861 for (var i = 0, len = inputElements.length; i < len; i++) { 861 for (var i = 0, len = inputElements.length; i < len; i++) {
862 if (inputElements[i].controlledBy == 'policy') 862 if (inputElements[i].controlledBy == 'policy')
863 controlledByPolicy = true; 863 controlledByPolicy = true;
864 else if (inputElements[i].controlledBy == 'extension') 864 else if (inputElements[i].controlledBy == 'extension')
865 controlledByExtension = true; 865 controlledByExtension = true;
866 } 866 }
867 if (!controlledByPolicy && !controlledByExtension) { 867 if (!controlledByPolicy && !controlledByExtension) {
868 bannerDiv.hidden = true; 868 bannerDiv.hidden = true;
869 $('subpage-backdrop').style.top = '0'; 869 $('subpage-backdrop').style.top = '0';
870 } else { 870 } else {
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 canShowPage: function() { 1057 canShowPage: function() {
1058 return true; 1058 return true;
1059 }, 1059 },
1060 }; 1060 };
1061 1061
1062 // Export 1062 // Export
1063 return { 1063 return {
1064 OptionsPage: OptionsPage 1064 OptionsPage: OptionsPage
1065 }; 1065 };
1066 }); 1066 });
OLDNEW
« no previous file with comments | « no previous file | chrome/test/functional/PYAUTO_TESTS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698