]> dev.renevier.net Git - syp.git/blob - openlayers/tests/OpenLayers.html
initial commit
[syp.git] / openlayers / tests / OpenLayers.html
1 <html>
2 <head>
3     <script src="bogus/1/OpenLayers.js-foo"></script>
4     <script src="bogus/2/foo-OpenLayers.js"></script>
5     <script id="script" src="../lib/OpenLayers.js"></script>
6     <script type="text/javascript">
7         function test_OpenLayers(t) {
8             t.plan(3);
9
10             var script = document.getElementById("script");
11
12             t.eq(OpenLayers._getScriptLocation(), "../", "Script location correctly detected.");
13             script.setAttribute("src", "../lib/OpenLayers.js?foo");
14             t.eq(OpenLayers._getScriptLocation(), "../", "Script location with search string correctly detected.");
15
16             // now pretend we're using a built script
17             OpenLayers._scriptName = "OpenLayers.js";
18             t.eq(OpenLayers._getScriptLocation(), "../lib/", "not fooled by bogus paths");
19             
20         }
21     </script>
22 </head>
23 <body>
24 </body>
25 </html>