From 0fa07edb0473b0be681699bb8a6f5bca7f1cf7d3 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Mon, 31 Mar 2008 02:41:26 +0000 Subject: [PATCH] Firefox 2.0.0.13 changed behavior iwth regard to loading files relative to an iframe included in a page from matching every other browser to matching IE. Rather than try and guess what's going to happen with this in the future, at the moment, just duplicate the data, in hopes of a more sane solution coming along in the future for all our data loading needs. git-svn-id: http://svn.openlayers.org/trunk/openlayers@6712 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- tests/Layer/atom-1.0.xml | 34 ++ tests/Layer/data_Layer_Text_textfile.txt | 3 + tests/Layer/data_Layer_Text_textfile_2.txt | 3 + .../data_Layer_Text_textfile_overflow.txt | 3 + tests/Layer/georss.txt | 378 ++++++++++++++++++ tests/Layer/mice.xml | 156 ++++++++ tests/Layer/owls.xml | 156 ++++++++ tests/Layer/test_GML.html | 15 +- tests/Layer/test_GeoRSS.html | 17 +- tests/Layer/test_Text.html | 17 +- 10 files changed, 764 insertions(+), 18 deletions(-) create mode 100644 tests/Layer/atom-1.0.xml create mode 100644 tests/Layer/data_Layer_Text_textfile.txt create mode 100644 tests/Layer/data_Layer_Text_textfile_2.txt create mode 100644 tests/Layer/data_Layer_Text_textfile_overflow.txt create mode 100644 tests/Layer/georss.txt create mode 100644 tests/Layer/mice.xml create mode 100644 tests/Layer/owls.xml diff --git a/tests/Layer/atom-1.0.xml b/tests/Layer/atom-1.0.xml new file mode 100644 index 0000000000..f0d5d6fce2 --- /dev/null +++ b/tests/Layer/atom-1.0.xml @@ -0,0 +1,34 @@ + + + + tumulus + + + + http://pleiades.stoa.org/places/tumulus + + + Unnamed Tumulus + + http://pleiades.stoa.org/places/638896 + + An ancient tumulus, attested during the Classical period (modern location: Karaburun). Its ancient name is not known. + 36.7702 29.9805 + + + Unnamed Tumulus + + http://pleiades.stoa.org/places/638924 + + An ancient tumulus, attested during the Classical period (modern location: Kızılbel). Its ancient name is not known. + 36.7263 29.8619 + + + + diff --git a/tests/Layer/data_Layer_Text_textfile.txt b/tests/Layer/data_Layer_Text_textfile.txt new file mode 100644 index 0000000000..8250988d49 --- /dev/null +++ b/tests/Layer/data_Layer_Text_textfile.txt @@ -0,0 +1,3 @@ +point image +10,20 http://boston.openguides.org/markers/ORANGE.png +15,25 http://boston.openguides.org/markers/ORANGE.png diff --git a/tests/Layer/data_Layer_Text_textfile_2.txt b/tests/Layer/data_Layer_Text_textfile_2.txt new file mode 100644 index 0000000000..91a8093bda --- /dev/null +++ b/tests/Layer/data_Layer_Text_textfile_2.txt @@ -0,0 +1,3 @@ +point title description image +10,20 a b http://boston.openguides.org/markers/ORANGE.png +15,25 c d http://boston.openguides.org/markers/ORANGE.png diff --git a/tests/Layer/data_Layer_Text_textfile_overflow.txt b/tests/Layer/data_Layer_Text_textfile_overflow.txt new file mode 100644 index 0000000000..bb4768ec51 --- /dev/null +++ b/tests/Layer/data_Layer_Text_textfile_overflow.txt @@ -0,0 +1,3 @@ +overflow point title description image +auto 10,20 a b http://boston.openguides.org/markers/ORANGE.png +hidden 15,25 c d http://boston.openguides.org/markers/ORANGE.png diff --git a/tests/Layer/georss.txt b/tests/Layer/georss.txt new file mode 100644 index 0000000000..8ad15617c1 --- /dev/null +++ b/tests/Layer/georss.txt @@ -0,0 +1,378 @@ + + + +This is an RSS file. Copy the URL into your aggregator of choice. If you don't know what this means and want to learn more, please see: http://platial.typepad.com/news/2006/04/really_simple_t.html for more info. +http://platial.com +Crschmidt's Places At Platial + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +http://platial.com/place/90306 +Knitting Room +Address: 2 lake St, Arlington, MA
Tags: knitting, yarn, pins and needles, handspun, hand dyed, novelty yarn, fancy, simple, young, hip, friendly, needles, addy, cute hats

Map this on Platial
Grab this on Platial ]]>
+42.405696 -71.142197 +crschmidt +2006-06-08T17:35:01.942452+00:00 +
+ +http://platial.com/place/67230 +Knitting Room +Address: 2 lake St, Arlington, MA
Tags: knitting, yarn, pins and needles, handspun, hand dyed, novelty yarn, fancy, simple, young, hip, friendly, needles, addy, cute hats

Map this on Platial
Grab this on Platial ]]>
+42.405524 -71.142273 +crschmidt +2006-04-24T11:35:26.733857+00:00 +
+ +http://platial.com/place/65645 +†¢¢™£ˆøœ +Address: 151 Erie St., Cambridge, MA
Tags: platial graffiti

Map this on Platial
Grab this on Platial ]]>
+42.352455 -71.110210 +crschmidt +2006-04-20T08:56:12.696224+00:00 +
+ +http://platial.com/place/62200 +Allen Hall +Address: 1301 W Gregory Dr, Urbana, IL
Tags: dorm, uiuc, college



Map this on Platial
Grab this on Platial ]]>
+40.104172 -88.220623 +crschmidt +2006-04-14T08:01:01.872873+00:00 +
+ +http://platial.com/place/28232 +Bagby Hot Springs, OR +Tags: 20s, rosalie, romance, childhood, hike, camping, soak, relax, beautiful, hot springs, bathhouse, favorite, popular, crowded, organized, honeymoon tub, plumbing made from hollowed out trees, hot springs, mt hood, notorious car break in spot, rash, bacteria

Map this on Platial
Grab this on Platial ]]>
+44.936000 -122.173000 +crschmidt +2006-01-03T23:10:18.553063+00:00 +
+ +http://platial.com/place/43666 +Shooting Location for "The Field of Dreams" Film +Address: Dyersville, Iowa
Tags: iowa, baseball, movie locations, field of dreams, kevin costner, costner, dyersville, kinsella, james earl jones, chicago black sox, shoeless joe, joe jackson, famous farms, film, movie, cinema, shooting location

Map this on Platial
Grab this on Platial ]]>
+42.481213 -91.111679 +echinodermata +2006-03-23T11:40:17.654061+00:00 +
+ +http://platial.com/place/28394 +Moffetts (Bonneville) Hot Springs, WA +Tags: soak, hot springs, relax, nature

Map this on Platial
Grab this on Platial ]]>
+45.658000 -121.962000 +crschmidt +2006-01-03T23:16:27.329816+00:00 +
+ +http://platial.com/place/28251 +Austin Hot Springs, OR +Tags: soak, hot springs, relax, nature, popular, crowded

Map this on Platial
Grab this on Platial ]]>
+45.021000 -122.009000 +crschmidt +2006-01-03T23:11:04.489886+00:00 +
+ +http://platial.com/place/28392 +Rock Creek Hot Springs, WA +Tags: soak, hot springs, relax, nature

Map this on Platial
Grab this on Platial ]]>
+45.723000 -121.927000 +crschmidt +2006-01-03T23:16:22.636855+00:00 +
+ +http://platial.com/place/28391 +St. Martins (Wind River) Hot Springs, WA +Tags: hot springs, soak, relax, nature, wonderful

Map this on Platial
Grab this on Platial ]]>
+45.728000 -121.800000 +crschmidt +2006-01-03T23:16:20.383244+00:00 +
+ +http://platial.com/place/28231 +Breitenbush Hot Springs, OR +Tags: hot springs, resort, relax, nature, beautiful, http:www.breitenbush.com, soaking

Map this on Platial
Grab this on Platial ]]>
+44.782000 -121.975000 +crschmidt +2006-01-03T23:10:16.529195+00:00 +
+ +http://platial.com/place/28393 +Collins Hot Springs, WA +Tags: portland, nice, hot springs, soak

Map this on Platial
Grab this on Platial ]]>
+45.701000 -121.728000 +crschmidt +2006-01-03T23:16:24.648745+00:00 +
+ +http://platial.com/place/31685 +Darwin's Ltd. +Address: 148 Mount Auburn St, Cambridge, MA
Tags: coffee, beer, sandwiches, freewifi



Map this on Platial
Grab this on Platial ]]>
+42.373974 -71.125053 +crschmidt +2006-01-10T09:24:08.152985+00:00 +
+ +http://platial.com/place/28596 +Huckleberry Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.115000 -110.684000 +crschmidt +2006-01-03T23:24:32.283094+00:00 +
+ +http://platial.com/place/28595 +South Entrance Hot Springs, WY +


Map this on Platial
Grab this on Platial ]]>
+44.142000 -110.656000 +crschmidt +2006-01-03T23:24:30.279497+00:00 +
+ +http://platial.com/place/28594 +Crawfish Creek Hot Springs, WY +


Map this on Platial
Grab this on Platial ]]>
+44.157000 -110.699000 +crschmidt +2006-01-03T23:24:28.280271+00:00 +
+ +http://platial.com/place/28593 +Crawfish Creek Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.165000 -110.723000 +crschmidt +2006-01-03T23:24:20.364077+00:00 +
+ +http://platial.com/place/28592 +Snake Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.169000 -110.583000 +crschmidt +2006-01-03T23:24:12.234974+00:00 +
+ +http://platial.com/place/28591 +Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.187000 -110.726000 +crschmidt +2006-01-03T23:24:10.027857+00:00 +
+ +http://platial.com/place/28590 +Hot Springs on Upper Snake River, WY +
Map this on Platial
Grab this on Platial ]]>
+44.204000 -110.486000 +crschmidt +2006-01-03T23:24:07.79658+00:00 +
+ +http://platial.com/place/28589 +Hot Springs on lewis Lake, WY +
Map this on Platial
Grab this on Platial ]]>
+44.276000 -110.636000 +crschmidt +2006-01-03T23:24:05.683418+00:00 +
+ +http://platial.com/place/28588 +Rustic Geyser, WY +
Map this on Platial
Grab this on Platial ]]>
+44.282000 -110.506000 +crschmidt +2006-01-03T23:24:03.66329+00:00 +
+ +http://platial.com/place/28587 +Bechler River Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.285000 -110.900000 +crschmidt +2006-01-03T23:24:01.611442+00:00 +
+ +http://platial.com/place/28586 +Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.290000 -110.504000 +crschmidt +2006-01-03T23:23:59.658699+00:00 +
+ +http://platial.com/place/28585 +Heart Lake Geyser Basin, WY +
Map this on Platial
Grab this on Platial ]]>
+44.299000 -110.517000 +crschmidt +2006-01-03T23:23:57.181801+00:00 +
+ +http://platial.com/place/28584 +Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.307000 -110.526000 +crschmidt +2006-01-03T23:23:55.240485+00:00 +
+ +http://platial.com/place/28583 +Hot Springs on lewis Lake, WY +
Map this on Platial
Grab this on Platial ]]>
+44.309000 -110.654000 +crschmidt +2006-01-03T23:23:53.22295+00:00 +
+ +http://platial.com/place/28582 +Shoshone Geyser Basin, WY +
Map this on Platial
Grab this on Platial ]]>
+44.354000 -110.800000 +crschmidt +2006-01-03T23:23:51.179049+00:00 +
+ +http://platial.com/place/28581 +Hot Springs on Continental Divide, WY +
Map this on Platial
Grab this on Platial ]]>
+44.401000 -110.936000 +crschmidt +2006-01-03T23:23:49.077176+00:00 +
+ +http://platial.com/place/28580 +Hot Springs on Upper Firehole River, WY +
Map this on Platial
Grab this on Platial ]]>
+44.404000 -110.824000 +crschmidt +2006-01-03T23:23:47.054664+00:00 +
+ +http://platial.com/place/28579 +Summit Lake Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.410000 -110.953000 +crschmidt +2006-01-03T23:23:45.039394+00:00 +
+ +http://platial.com/place/28578 +Lone Star Geyser Basin, WY +
Map this on Platial
Grab this on Platial ]]>
+44.414000 -110.817000 +crschmidt +2006-01-03T23:23:42.938808+00:00 +
+ +http://platial.com/place/28577 +West. Thumb Geyser Basin, WY +
Map this on Platial
Grab this on Platial ]]>
+44.417000 -110.570000 +crschmidt +2006-01-03T23:23:40.90238+00:00 +
+ +http://platial.com/place/28576 +Lone Star Geyser, WY +
Map this on Platial
Grab this on Platial ]]>
+44.418000 -110.805000 +crschmidt +2006-01-03T23:23:38.844625+00:00 +
+ +http://platial.com/place/28575 +Smoke Jumper Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.421000 -110.952000 +crschmidt +2006-01-03T23:23:36.818513+00:00 +
+ +http://platial.com/place/28574 +West. Thumb Geyser Basin, WY +
Map this on Platial
Grab this on Platial ]]>
+44.422000 -110.574000 +crschmidt +2006-01-03T23:23:34.767729+00:00 +
+ +http://platial.com/place/28573 +Potts Hot Spring Basin, WY +
Map this on Platial
Grab this on Platial ]]>
+44.433000 -110.581000 +crschmidt +2006-01-03T23:23:32.749915+00:00 +
+ +http://platial.com/place/28572 +Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.433000 -110.813000 +crschmidt +2006-01-03T23:23:30.829745+00:00 +
+ +http://platial.com/place/28571 +Hot Springs on Continental Divide, WY +
Map this on Platial
Grab this on Platial ]]>
+44.438000 -110.977000 +crschmidt +2006-01-03T23:23:28.730401+00:00 +
+ +http://platial.com/place/28570 +SouthEastern Group, WY +
Map this on Platial
Grab this on Platial ]]>
+44.459000 -110.817000 +crschmidt +2006-01-03T23:23:26.706763+00:00 +
+
\ No newline at end of file diff --git a/tests/Layer/mice.xml b/tests/Layer/mice.xml new file mode 100644 index 0000000000..4a001eca26 --- /dev/null +++ b/tests/Layer/mice.xml @@ -0,0 +1,156 @@ + + + + + -89.817223,45.005555 -74.755001,51.701388 + + + + + + -79.771668,45.891110 -79.771668,45.891110 + + + + + -79.771668,45.891110 + + + + + + + + + -83.755834,46.365277 -83.755834,46.365277 + + + owl + + + -83.755834,46.365277 + + + + + + + + + -83.808612,46.175277 -83.808612,46.175277 + + + + + -83.808612,46.175277 + + + + + + + + + -84.111112,46.309166 -84.111112,46.309166 + + + + + -84.111112,46.309166 + + + + + + + + + -83.678612,46.821110 -83.678612,46.821110 + + + + + -83.678612,46.821110 + + + + + + + + + -83.664445,46.518888 -83.664445,46.518888 + + + + + -83.664445,46.518888 + + + + + + + + + -80.613334,46.730277 -80.613334,46.730277 + + + + + -80.613334,46.730277 + + + + + + + + + -79.676946,45.428054 -79.676946,45.428054 + + + + + -79.676946,45.428054 + + + + + + + + + -83.853056,46.236944 -83.853056,46.236944 + + + + + -83.853056,46.236944 + + + + + + + + + -82.289167,45.896388 -82.289167,45.896388 + + + + + -82.289167,45.896388 + + + + + + diff --git a/tests/Layer/owls.xml b/tests/Layer/owls.xml new file mode 100644 index 0000000000..4a001eca26 --- /dev/null +++ b/tests/Layer/owls.xml @@ -0,0 +1,156 @@ + + + + + -89.817223,45.005555 -74.755001,51.701388 + + + + + + -79.771668,45.891110 -79.771668,45.891110 + + + + + -79.771668,45.891110 + + + + + + + + + -83.755834,46.365277 -83.755834,46.365277 + + + owl + + + -83.755834,46.365277 + + + + + + + + + -83.808612,46.175277 -83.808612,46.175277 + + + + + -83.808612,46.175277 + + + + + + + + + -84.111112,46.309166 -84.111112,46.309166 + + + + + -84.111112,46.309166 + + + + + + + + + -83.678612,46.821110 -83.678612,46.821110 + + + + + -83.678612,46.821110 + + + + + + + + + -83.664445,46.518888 -83.664445,46.518888 + + + + + -83.664445,46.518888 + + + + + + + + + -80.613334,46.730277 -80.613334,46.730277 + + + + + -80.613334,46.730277 + + + + + + + + + -79.676946,45.428054 -79.676946,45.428054 + + + + + -79.676946,45.428054 + + + + + + + + + -83.853056,46.236944 -83.853056,46.236944 + + + + + -83.853056,46.236944 + + + + + + + + + -82.289167,45.896388 -82.289167,45.896388 + + + + + -82.289167,45.896388 + + + + + + diff --git a/tests/Layer/test_GML.html b/tests/Layer/test_GML.html index 16fb9eb15e..09b83a7f91 100644 --- a/tests/Layer/test_GML.html +++ b/tests/Layer/test_GML.html @@ -5,15 +5,20 @@ 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); diff --git a/tests/Layer/test_GeoRSS.html b/tests/Layer/test_GeoRSS.html index 8d5ecbf6cf..8744be82b4 100644 --- a/tests/Layer/test_GeoRSS.html +++ b/tests/Layer/test_GeoRSS.html @@ -8,12 +8,17 @@ var georss_txt = "./georss.txt"; var atom_xml = "./atom-1.0.xml"; - - // if this test is running online, different rules apply - if (isMSIE) { - georss_txt = "." + georss_txt; - atom_xml = "." + atom_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. function test_01_Layer_GeoRSS_constructor (t) { t.plan( 5 ); diff --git a/tests/Layer/test_Text.html b/tests/Layer/test_Text.html index dcbe679f0f..ef9993ba08 100644 --- a/tests/Layer/test_Text.html +++ b/tests/Layer/test_Text.html @@ -6,17 +6,20 @@ 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 );