1 module('googleLayers');
  2 
  3 earthTest("layers", 4, function(ge, gex){
  4     // append form for layers
  5     $(document.body).append('<form name="ge_layers"><li><input type="checkbox" name="LAYER_BORDERS">Borders</li><li><input type="checkbox" name="LAYER_ROADS">Roads</li></form>');
  6     // append form for options
  7     $(document.body).append('<form name="ge_options"><li><input type="checkbox" name="setStatusBarVisibility" checked />Status Bar</li><li><input type="checkbox" name="nav" />Navigation Control</li><li><input type="checkbox" name="setGridVisibility" />Grid</li><li><input type="checkbox" name="setOverviewMapVisibility" />Overview Map</li><li><input type="checkbox" name="setScaleLegendVisibility" />Scale Legend</li><li><input type="checkbox" name="setAtmosphereVisibility" checked />Atmosphere</li><li><input type="checkbox" name="sun" />Sun</li></form>');
  8     var googleLayers = new madrona.map.googleLayers(ge, document.ge_options, document.ge_layers);
  9     equals(ge.getLayerRoot().getLayerById(ge['LAYER_BORDERS']).getVisibility(), false);
 10     equals(ge.getLayerRoot().getLayerById(ge['LAYER_ROADS']).getVisibility(), false);
 11     // no idea why I have to call this twice.
 12     $('input[name="LAYER_BORDERS"]').click();
 13     $('input[name="LAYER_BORDERS"]').click();
 14     equals(ge.getLayerRoot().getLayerById(ge['LAYER_BORDERS']).getVisibility(), true);
 15     equals(ge.getLayerRoot().getLayerById(ge['LAYER_ROADS']).getVisibility(), false);
 16 });
 17 
 18 earthTest("options", function(ge, gex){
 19     equals(ge.getOptions().getGridVisibility(), false);
 20     $('input[name="setGridVisibility"]').click();
 21     $('input[name="setGridVisibility"]').click();
 22     equals(ge.getOptions().getGridVisibility(), true);
 23 });
 24 
 25 test('cleanup (no assertions)', function(){
 26     $("form[name='ge_layers']").remove();
 27     $("form[name='ge_options']").remove();
 28 });