Sha256: f27d04f310a26be1fb253256cd02eb7e7e69f4a3bff5d2a74953c143cc3f399b

Contents?: true

Size: 1.12 KB

Versions: 7

Compression:

Stored size: 1.12 KB

Contents

<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>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
postrunner-0.0.10 misc/openlayers/tests/Popup/Anchored.html
postrunner-0.0.9 misc/openlayers/tests/Popup/Anchored.html
postrunner-0.0.8 misc/openlayers/tests/Popup/Anchored.html
postrunner-0.0.7 misc/openlayers/tests/Popup/Anchored.html
postrunner-0.0.6 misc/openlayers/tests/Popup/Anchored.html
postrunner-0.0.5 misc/openlayers/tests/Popup/Anchored.html
postrunner-0.0.4 misc/openlayers/tests/Popup/Anchored.html