Since opening window is the bane of our auto-testing existence -- browsers not
configured to allow popups, and so on -- add an option to turn off opening new windows. Patch the tests to check for open_window before using it, and bail out of tests early if they can't find it. By default, the auto-tests.html file will not allow any window opening. This gives us *slightly* smaller test coverage, with fewer false positives on test failures. git-svn-id: http://svn.openlayers.org/trunk/openlayers@8571 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -111,7 +111,12 @@
|
||||
}
|
||||
|
||||
function test_Element_getDimensions(t) {
|
||||
t.plan(4);
|
||||
if (!t.open_window) {
|
||||
t.plan(0);
|
||||
return;
|
||||
} else {
|
||||
t.plan(4);
|
||||
}
|
||||
|
||||
//shown
|
||||
t.open_window( "BaseTypes/Element.html", function( wnd ) {
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
function test_Control_PanZoom_control_events (t) {
|
||||
|
||||
if ( !window.document.createEvent || OpenLayers.Util.getBrowserName() == "opera") {
|
||||
if ( !window.document.createEvent || OpenLayers.Util.getBrowserName() == "opera" || !t.open_window) {
|
||||
//ie can't simulate mouseclicks
|
||||
t.plan(0);
|
||||
t.debug_print("FIXME: This browser does not support the PanZoom test at this time.");
|
||||
|
||||
@@ -2259,6 +2259,9 @@ onload=function()
|
||||
}
|
||||
}else if( param[0]=="testframe_no_clear" ) {
|
||||
Test.AnotherWay._g_test_frame_no_clear=true;
|
||||
}else if( param[0]=="windows" ) {
|
||||
if (param[1] == "none") {
|
||||
}
|
||||
}else if( param[0]=="run" ) {
|
||||
auto_run=true;
|
||||
if( param[1]=="all" ) {
|
||||
@@ -2338,6 +2341,7 @@ onload=function()
|
||||
Test.AnotherWay._run_pages_to_run();
|
||||
}
|
||||
}
|
||||
Test.AnotherWay._test_object_t.prototype.open_window=null;
|
||||
// -->
|
||||
</script>
|
||||
<script type="text/javascript" src="xml_eq.js"></script>
|
||||
|
||||
@@ -2225,6 +2225,10 @@ onload=function()
|
||||
}
|
||||
}else if( param[0]=="testframe_no_clear" ) {
|
||||
Test.AnotherWay._g_test_frame_no_clear=true;
|
||||
}else if( param[0]=="windows" ) {
|
||||
if (param[1] == "none") {
|
||||
Test.AnotherWay._test_object_t.prototype.open_window=null;
|
||||
}
|
||||
}else if( param[0]=="run" ) {
|
||||
auto_run=true;
|
||||
if( param[1]=="all" ) {
|
||||
|
||||
Reference in New Issue
Block a user