summaryrefslogtreecommitdiff
path: root/misc/openlayers/tests/Popup/Anchored.html
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/Popup/Anchored.html
parent59741cd535c47f25971bf8c32b25da25ceadc6d5 (diff)
downloadpostrunner-0.0.4.zip
Adding jquery, flot and openlayers to be included with the GEM.v0.0.4
Diffstat (limited to 'misc/openlayers/tests/Popup/Anchored.html')
-rw-r--r--misc/openlayers/tests/Popup/Anchored.html37
1 files changed, 37 insertions, 0 deletions
diff --git a/misc/openlayers/tests/Popup/Anchored.html b/misc/openlayers/tests/Popup/Anchored.html
new file mode 100644
index 0000000..3197e84
--- /dev/null
+++ b/misc/openlayers/tests/Popup/Anchored.html
@@ -0,0 +1,37 @@
+<html>
+<head>
+ <script src="../OLLoader.js"></script>
+ <script type="text/javascript">
+
+ var popup;
+
+ function test_Popup_Anchored_default_constructor(t) {
+ t.plan( 4 );
+
+ popup = new OpenLayers.Popup.Anchored();
+
+ t.ok( popup instanceof OpenLayers.Popup.Anchored, "new OpenLayers.Popup.Anchored returns Popup.Anchored object" );
+ t.ok(OpenLayers.String.startsWith(popup.id, "OpenLayers_Popup_Anchored"), "valid default popupid");
+ var firstID = popup.id;
+ t.eq(popup.contentHTML, null, "good default popup.contentHTML");
+
+
+ popup = new OpenLayers.Popup.Anchored();
+ var newID = popup.id;
+ t.ok(newID != firstID, "default id generator creating unique ids");
+ }
+ function test_Popup_Anchored_updateRelPos(t) {
+ t.plan(1);
+ var popup = new OpenLayers.Popup.Anchored();
+ popup.calculateNewPx = function () {}
+ popup.calculateRelativePosition = function() {
+ t.ok(true, "update relative position is called on moveTo");
+ }
+ popup.moveTo(new OpenLayers.Pixel(0,0));
+ }
+
+ </script>
+</head>
+<body>
+</body>
+</html>