jsp-demo/web/js/closure/goog/tweak/testhelpers.js
/**
 * Creates a registry with some entries in it.
 * @param {string} queryParams The query parameter string to use for the
 *     registry.
 */
Creates a registry with some entries in it.
@param {string} queryParams The query parameter string to use for the
registry.
Creates a registry with some entries in it . @param { string } queryParams The query parameter string to use for the registry .
function createRegistryEntries(queryParams) {
  var registry = new goog.tweak.Registry(queryParams);
  goog.tweak.registry_ = registry;
  goog.tweak.registerBoolean('Bool', 'The bool');
  goog.tweak.registerBoolean('Bool2', 'The bool2', true);
  goog.tweak.registerString('Str', 'The Str', undefined, {
    paramName: 's'
  });
  goog.tweak.registerString('Str2', 'The str2', 'foo');
  goog.tweak.registerString('Enum', 'The Enum', undefined, {
    validValues: ['A', 'B', 'C'],
    restartRequired: false
  });
  goog.tweak.registerNumber('Num', 'The Num', 99);
  goog.tweak.registerNumber('Enum2', 'The enum2', undefined, {
    validValues: [1, 2, 3],
    label: 'Enum the second&'
  });
  goog.tweak.beginBooleanGroup('BoolGroup', 'The Bool Group');
  goog.tweak.registerBoolean('BoolOne', 'Desc for 1', false, {
    token: 'B1',
    restartRequired: false
  });
  goog.tweak.registerBoolean('BoolTwo', 'Desc for 2', true);
  goog.tweak.endBooleanGroup();
  goog.tweak.registerButton('Button', 'The Btn', goog.nullFunction, '<btn>');
  boolEntry = registry.getEntry('Bool');
  boolEntry2 = registry.getEntry('Bool2');
  strEntry = registry.getEntry('Str');
  strEntry2 = registry.getEntry('Str2');
  strEnumEntry = registry.getEntry('Enum');
  numEntry = registry.getEntry('Num');
  numEnumEntry = registry.getEntry('Enum2');
  boolGroup = registry.getEntry('BoolGroup');
  boolOneEntry = registry.getEntry('BoolOne');
  boolTwoEntry = registry.getEntry('BoolTwo');
  buttonEntry = registry.getEntry('Button');
}
function createRegistryEntries ( queryParams ) { var registry = new goog . tweak . Registry ( queryParams ) ; goog . tweak . registry_ = registry ; goog . tweak . registerBoolean ( 'Bool' , 'The bool' ) ; goog . tweak . registerBoolean ( 'Bool2' , 'The bool2' , true ) ; goog . tweak . registerString ( 'Str' , 'The Str' , undefined , { paramName : 's' } ) ; goog . tweak . registerString ( 'Str2' , 'The str2' , 'foo' ) ; goog . tweak . registerString ( 'Enum' , 'The Enum' , undefined , { validValues : [ 'A' , 'B' , 'C' ] , restartRequired : false } ) ; goog . tweak . registerNumber ( 'Num' , 'The Num' , 99 ) ; goog . tweak . registerNumber ( 'Enum2' , 'The enum2' , undefined , { validValues : [ 1 , 2 , 3 ] , label : 'Enum the second&' } ) ; goog . tweak . beginBooleanGroup ( 'BoolGroup' , 'The Bool Group' ) ; goog . tweak . registerBoolean ( 'BoolOne' , 'Desc for 1' , false , { token : 'B1' , restartRequired : false } ) ; goog . tweak . registerBoolean ( 'BoolTwo' , 'Desc for 2' , true ) ; goog . tweak . endBooleanGroup ( ) ; goog . tweak . registerButton ( 'Button' , 'The Btn' , goog . nullFunction , '<btn>' ) ; boolEntry = registry . getEntry ( 'Bool' ) ; boolEntry2 = registry . getEntry ( 'Bool2' ) ; strEntry = registry . getEntry ( 'Str' ) ; strEntry2 = registry . getEntry ( 'Str2' ) ; strEnumEntry = registry . getEntry ( 'Enum' ) ; numEntry = registry . getEntry ( 'Num' ) ; numEnumEntry = registry . getEntry ( 'Enum2' ) ; boolGroup = registry . getEntry ( 'BoolGroup' ) ; boolOneEntry = registry . getEntry ( 'BoolOne' ) ; boolTwoEntry = registry . getEntry ( 'BoolTwo' ) ; buttonEntry = registry . getEntry ( 'Button' ) ; }
Creates a registry with some entries in it.
Creates a registry with some entries in it .
// Initialize the registry with the given query string.