3 <script src="../../lib/OpenLayers.js"></script>
4 <script type="text/javascript">
8 function test_Popup_Anchored_default_constructor(t) {
11 popup = new OpenLayers.Popup.Anchored();
13 t.ok( popup instanceof OpenLayers.Popup.Anchored, "new OpenLayers.Popup.Anchored returns Popup.Anchored object" );
14 t.ok(popup.id.startsWith("OpenLayers.Popup.Anchored"), "valid default popupid");
15 var firstID = popup.id;
16 t.eq(popup.contentHTML, null, "good default popup.contentHTML");
19 popup = new OpenLayers.Popup.Anchored();
21 t.ok(newID != firstID, "default id generator creating unique ids");
23 function test_Popup_Anchored_updateRelPos(t) {
25 var popup = new OpenLayers.Popup.Anchored();
26 popup.calculateNewPx = function () {}
27 popup.calculateRelativePosition = function() {
28 t.ok(true, "update relative position is called on moveTo");
30 popup.moveTo(new OpenLayers.Pixel(0,0));