bring back r6710 now that popup changes are in
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6719 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -5,20 +5,15 @@
|
||||
|
||||
var name = "GML Layer";
|
||||
|
||||
// The actual path these files are read from differs:
|
||||
// some browsers treat relative paths from within an iframe
|
||||
// as relative to the parent, some treat them as relative to the child
|
||||
// At this time:
|
||||
// * IE6 + IE7
|
||||
// * Firefox 2.0.0.13+
|
||||
// read them from relative to the iframe contents, rather than parent,
|
||||
// so these files are in *two* places: one in the "Layer/" subdirectory,
|
||||
// and one in the root. This majorly sucks, but it's a way to keep it
|
||||
// working without hardcoding a version number into the tests.
|
||||
var gml = "./owls.xml";
|
||||
var gml2 = "./mice.xml";
|
||||
|
||||
// if this test is running online, different rules apply
|
||||
var isMSIE = (navigator.userAgent.indexOf("MSIE") > -1);
|
||||
if (isMSIE) {
|
||||
gml = "." + gml;
|
||||
gml2 = "." + gml2;
|
||||
}
|
||||
|
||||
function test_01_Layer_GML_constructor(t) {
|
||||
t.plan(3);
|
||||
@@ -8,17 +8,12 @@
|
||||
|
||||
var georss_txt = "./georss.txt";
|
||||
var atom_xml = "./atom-1.0.xml";
|
||||
|
||||
// The actual path these files are read from differs:
|
||||
// some browsers treat relative paths from within an iframe
|
||||
// as relative to the parent, some treat them as relative to the child
|
||||
// At this time:
|
||||
// * IE6 + IE7
|
||||
// * Firefox 2.0.0.13+
|
||||
// read them from relative to the iframe contents, rather than parent,
|
||||
// so these files are in *two* places: one in the "Layer/" subdirectory,
|
||||
// and one in the root. This majorly sucks, but it's a way to keep it
|
||||
// working without hardcoding a version number into the tests.
|
||||
|
||||
// if this test is running online, different rules apply
|
||||
if (isMSIE) {
|
||||
georss_txt = "." + georss_txt;
|
||||
atom_xml = "." + atom_xml;
|
||||
}
|
||||
|
||||
function test_01_Layer_GeoRSS_constructor (t) {
|
||||
t.plan( 5 );
|
||||
@@ -97,7 +92,7 @@
|
||||
});
|
||||
}
|
||||
function test_Layer_GeoRSS_popups (t) {
|
||||
t.plan( 4 );
|
||||
t.plan( 8 );
|
||||
layer = new OpenLayers.Layer.GeoRSS('Test Layer', georss_txt);
|
||||
var map = new OpenLayers.Map('map');
|
||||
var baseLayer = new OpenLayers.Layer.WMS("Test Layer",
|
||||
@@ -112,14 +107,18 @@
|
||||
t.eq(layer.markers[0].events.listeners['click'].length, 1, "Marker events has one object");
|
||||
layer.markers[0].events.triggerEvent('click', event);
|
||||
t.eq(map.popups.length, 1, "Popup opened correctly");
|
||||
t.eq(map.popups[0].size.w, 250, "Popup sized correctly x");
|
||||
t.eq(map.popups[0].size.h, 120, "Popup sized correctly y");
|
||||
layer.markers[1].events.triggerEvent('click', event);
|
||||
t.eq(map.popups.length, 1, "1st popup gone, 2nd Popup opened correctly");
|
||||
t.eq(map.popups[0].size.w, 250, "Popup sized correctly x");
|
||||
t.eq(map.popups[0].size.h, 120, "Popup sized correctly y");
|
||||
});
|
||||
|
||||
}
|
||||
function test_Layer_GeoRSS_resizedPopups(t) {
|
||||
layer = new OpenLayers.Layer.GeoRSS('Test Layer', georss_txt, {'popupSize': new OpenLayers.Size(200,100)});
|
||||
t.plan( 4 );
|
||||
t.plan( 8 );
|
||||
var map = new OpenLayers.Map('map');
|
||||
var baseLayer = new OpenLayers.Layer.WMS("Test Layer",
|
||||
"http://octo.metacarta.com/cgi-bin/mapserv?",
|
||||
@@ -133,9 +132,13 @@
|
||||
t.eq(layer.markers[0].events.listeners['click'].length, 1, "Marker events has one object");
|
||||
layer.markers[0].events.triggerEvent('click', event);
|
||||
t.eq(map.popups.length, 1, "Popup opened correctly");
|
||||
t.eq(map.popups[0].size.w, 200, "Popup sized correctly x");
|
||||
t.eq(map.popups[0].size.h, 100, "Popup sized correctly y");
|
||||
map.popups[0].size.w=300;
|
||||
layer.markers[1].events.triggerEvent('click', event);
|
||||
t.eq(map.popups.length, 1, "1st popup gone, 2nd Popup opened correctly");
|
||||
t.eq(map.popups[0].size.w, 200, "Popup sized correctly x");
|
||||
t.eq(map.popups[0].size.h, 100, "Popup sized correctly y");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -6,20 +6,17 @@
|
||||
var isMSIE = (navigator.userAgent.indexOf("MSIE") > -1);
|
||||
var layer;
|
||||
|
||||
// The actual path these files are read from differs:
|
||||
// some browsers treat relative paths from within an iframe
|
||||
// as relative to the parent, some treat them as relative to the child
|
||||
// At this time:
|
||||
// * IE6 + IE7
|
||||
// * Firefox 2.0.0.13+
|
||||
// read them from relative to the iframe contents, rather than parent,
|
||||
// so these files are in *two* places: one in the "Layer/" subdirectory,
|
||||
// and one in the root. This majorly sucks, but it's a way to keep it
|
||||
// working without hardcoding a version number into the tests.
|
||||
var datafile = "./data_Layer_Text_textfile.txt";
|
||||
var datafile2 = "./data_Layer_Text_textfile_2.txt";
|
||||
var datafile_overflow = "./data_Layer_Text_textfile_overflow.txt";
|
||||
|
||||
// if this test is running in IE, different rules apply
|
||||
if (isMSIE) {
|
||||
datafile = "." + datafile;
|
||||
datafile2 = "." + datafile2;
|
||||
datafile_overflow = "." + datafile_overflow;
|
||||
}
|
||||
|
||||
function test_01_Layer_Text_constructor (t) {
|
||||
t.plan( 5 );
|
||||
|
||||
Reference in New Issue
Block a user