summaryrefslogtreecommitdiff
path: root/misc/openlayers/tests/manual/memory
diff options
context:
space:
mode:
authorChris Schlaeger <chris@linux.com>2014-08-12 21:56:44 +0200
committerChris Schlaeger <chris@linux.com>2014-08-12 21:56:44 +0200
commitea346a785dc1b3f7c156f6fc33da634e1f1a627b (patch)
treeaf67530553d20b6e82ad60fd79593e9c4abf5565 /misc/openlayers/tests/manual/memory
parent59741cd535c47f25971bf8c32b25da25ceadc6d5 (diff)
downloadpostrunner-ea346a785dc1b3f7c156f6fc33da634e1f1a627b.zip
Adding jquery, flot and openlayers to be included with the GEM.v0.0.4
Diffstat (limited to 'misc/openlayers/tests/manual/memory')
-rw-r--r--misc/openlayers/tests/manual/memory/Marker-2258.html60
-rw-r--r--misc/openlayers/tests/manual/memory/PanZoom-2323.html41
-rw-r--r--misc/openlayers/tests/manual/memory/RemoveChild-2170.html56
-rw-r--r--misc/openlayers/tests/manual/memory/VML-2170.html49
4 files changed, 206 insertions, 0 deletions
diff --git a/misc/openlayers/tests/manual/memory/Marker-2258.html b/misc/openlayers/tests/manual/memory/Marker-2258.html
new file mode 100644
index 0000000..b2d8a37
--- /dev/null
+++ b/misc/openlayers/tests/manual/memory/Marker-2258.html
@@ -0,0 +1,60 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Memory Test - Layer.Markers / Marker</title>
+ <style type="text/css">
+ body {
+ font-size: 0.8em;
+ }
+ p {
+ padding-top: 1em;
+ }
+ #map {
+ width: 256px;
+ height: 256px;
+ border: 1px solid black;
+ }
+ </style>
+
+ <script src="../../../lib/Firebug/firebug.js"></script>
+ <script src="../../../lib/OpenLayers.js"></script>
+ <script type="text/javascript">
+ var map, layer, marker;
+
+ function init(){
+ map = new OpenLayers.Map('map');
+ map.addLayer(new OpenLayers.Layer.WMS( "OpenLayers WMS",
+ "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ));
+ map.setCenter(new OpenLayers.LonLat(0, 0), 0);
+
+ layer = new OpenLayers.Layer.Markers( "Markers" );
+ map.addLayer(layer);
+
+ marker = new OpenLayers.Marker(new OpenLayers.LonLat(0,0));
+ layer.addMarker(marker);
+
+ window.setTimeout(function() {
+ layer.removeMarker(marker);
+ layer.addMarker(marker);
+
+ // people SHOULD call marker.destroy(). But if they don't
+ // we leak memory.
+ //marker.destroy();
+
+ window.alert("Setup - hit STOP in the leak detector now");
+ }, 100);
+ }
+ </script>
+ </head>
+ <body onload="init()">
+ <h1 id="title">Memory Test - Layer.Markers / Marker</h1>
+ <pre id="status"></pre>
+ <div id="map"></div>
+ <p>
+ This test is a memory leak test for usage of Layer.Markers / Marker.
+ </p>
+ <p>
+ Run this test in IE6/7 with <a href="http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector-v2.aspx">JavaScript Memory Leak Detector v2</a>
+ and watch it identify a leak unless this is fixed.
+ </p>
+ </body>
+</html>
diff --git a/misc/openlayers/tests/manual/memory/PanZoom-2323.html b/misc/openlayers/tests/manual/memory/PanZoom-2323.html
new file mode 100644
index 0000000..de629a6
--- /dev/null
+++ b/misc/openlayers/tests/manual/memory/PanZoom-2323.html
@@ -0,0 +1,41 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Memory Test - PanZoom.getSlideFactor</title>
+ <style type="text/css">
+ body {
+ font-size: 0.8em;
+ }
+ p {
+ padding-top: 1em;
+ }
+ #map {
+ width: 256px;
+ height: 256px;
+ border: 1px solid black;
+ }
+ </style>
+
+ <script src="../../../lib/Firebug/firebug.js"></script>
+ <script src="../../../lib/OpenLayers.js"></script>
+ <script type="text/javascript">
+ var map;
+ var layer;
+
+ function init(){
+ map = new OpenLayers.Map('map');
+ }
+ </script>
+ </head>
+ <body onload="init()">
+ <h1 id="title">Memory Test - PanZoom.getSlideFactor</h1>
+ <pre id="status"></pre>
+ <div id="map"></div>
+ <p>
+ This test is a memory leak test for: PanZoom.getSlideFactor.
+ </p>
+ <p>
+ Run this test in IE6/7 with <a href="http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector-v2.aspx">JavaScript Memory Leak Detector v2</a>
+ and watch it identify a leak unless this is fixed.
+ </p>
+ </body>
+</html>
diff --git a/misc/openlayers/tests/manual/memory/RemoveChild-2170.html b/misc/openlayers/tests/manual/memory/RemoveChild-2170.html
new file mode 100644
index 0000000..abe9249
--- /dev/null
+++ b/misc/openlayers/tests/manual/memory/RemoveChild-2170.html
@@ -0,0 +1,56 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Memory Test - DOMNode.removeChild</title>
+ <style type="text/css">
+ body {
+ font-size: 0.8em;
+ }
+ p {
+ padding-top: 1em;
+ }
+ #map {
+ width: 512px;
+ height: 512px;
+ border: 1px solid black;
+ }
+ </style>
+
+ <script src="../../../lib/Firebug/firebug.js"></script>
+ <script src="../../../lib/OpenLayers.js"></script>
+ <script type="text/javascript">
+ var map, layer;
+
+ function tearDown() {
+ layer.events.unregister("loadend", layer, tearDown);
+ window.setTimeout(function() {
+ map.removeLayer(layer);
+ //map.addLayer(layer);
+ layer.destroy();
+ window.alert("Setup - hit STOP in the leak detector now");
+ }, 100);
+ }
+
+ function init(){
+ map = new OpenLayers.Map( 'map', {maxResolution:1.40625/2} );
+ layer = new OpenLayers.Layer.TMS( "TMS",
+ "http://labs.metacarta.com/wms-c/Basic.py/", {layername: 'basic', type:'png'} );
+ map.addLayer(layer);
+ map.setCenter(new OpenLayers.LonLat(5, 40), 5);
+
+ layer.events.register("loadend", layer, tearDown);
+ }
+ </script>
+ </head>
+ <body onload="init()">
+ <h1 id="title">Memory Test - DOMNode.removeChild</h1>
+ <pre id="status"></pre>
+ <div id="map"></div>
+ <p>
+ This test is a memory leak test for usage of DOMNode.removeChild
+ </p>
+ <p>
+ Run this test in IE6/7 with <a href="http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector-v2.aspx">JavaScript Memory Leak Detector v2</a>
+ and watch it identify a leak unless this is fixed.
+ </p>
+ </body>
+</html>
diff --git a/misc/openlayers/tests/manual/memory/VML-2170.html b/misc/openlayers/tests/manual/memory/VML-2170.html
new file mode 100644
index 0000000..2f72300
--- /dev/null
+++ b/misc/openlayers/tests/manual/memory/VML-2170.html
@@ -0,0 +1,49 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Memory Test - Renderer.VML - onselectstart</title>
+ <style type="text/css">
+ body {
+ font-size: 0.8em;
+ }
+ p {
+ padding-top: 1em;
+ }
+ #map {
+ width: 256px;
+ height: 256px;
+ border: 1px solid black;
+ }
+ </style>
+
+ <script src="../../../lib/Firebug/firebug.js"></script>
+ <script src="../../../lib/OpenLayers.js"></script>
+ <script type="text/javascript">
+ var map;
+ var layer;
+
+ function init(){
+ map = new OpenLayers.Map('map');
+
+ layer = new OpenLayers.Layer.Vector("Test-VML", {renderers:['VML']});
+ map.addLayers([layer]);
+
+ window.setTimeout(function() {
+ layer.redraw();
+ window.alert("Setup - hit STOP in the leak detector now");
+ }, 100);
+ }
+ </script>
+ </head>
+ <body onload="init()">
+ <h1 id="title">Memory Test - Renderer.VML - onselectstart</h1>
+ <pre id="status"></pre>
+ <div id="map"></div>
+ <p>
+ This test is a memory leak test for usage of "onselectstart" event handler in Renderer.VML
+ </p>
+ <p>
+ Run this test in IE6/7 with <a href="http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector-v2.aspx">JavaScript Memory Leak Detector v2</a>
+ and watch it identify a leak unless this is fixed.
+ </p>
+ </body>
+</html>