<commit_before><html>
<head>
  <script src="../lib/OpenLayers.js"></script>
  <script type="text/javascript"><!--
    var map; 
    function test_01_Control_PanZoom_constructor (t) {
        t.plan( 1 );
    
        control = new OpenLayers.Control.PanZoom();
        t.ok( control instanceof OpenLayers.Control.PanZoom, "new OpenLayers.Control.PanZoom returns object" );
    }
    function test_02_Control_PanZoom_addControl (t) {
        t.plan( 8 );
        map = new OpenLayers.Map('map');
        control = new OpenLayers.Control.PanZoom();
        t.ok( control instanceof OpenLayers.Control.PanZoom, "new OpenLayers.Control.PanZoom returns object" );
        t.ok( map instanceof OpenLayers.Map, "new OpenLayers.Map creates map" );
        map.addControl(control);
        t.ok( control.map === map, "Control.map is set to the map object" );
        t.ok( map.controls[2] === control, "map.controls contains control" );
        t.eq( parseInt(control.div.style.zIndex), 253, "Control div zIndexed properly" );
        t.eq( parseInt(map.viewPortDiv.lastChild.style.zIndex), 253, "Viewport div contains control div" );
        t.eq( control.div.style.top, "4px", "Control div top located correctly by default");

        var control2 = new OpenLayers.Control.PanZoom();
        map.addControl(control2, new OpenLayers.Pixel(100,100));
        t.eq( control2.div.style.top, "100px", "2nd control div is located correctly");
    }
    function test_03_Control_PanZoom_control_events (t) {
        t.plan( 6 );
        var evt = new Object();
        map = new OpenLayers.Map('map');
        control = new OpenLayers.Control.PanZoom();
        map.addControl(control,
                       new OpenLayers.Pixel(20,20));
        map.setCenter(new OpenLayers.LonLat(0,0), 0);
        control.buttons[0].onmousedown(evt);
        t.eq( map.getCenter().lat, 360/1024*50, "Pan up works correctly" );
        control.buttons[1].onmousedown(evt);
        t.eq( map.getCenter().lon, -360/1024*50, "Pan left works correctly" );
        control.buttons[2].onmousedown(evt);
        t.eq( map.getCenter().lon, 0, "Pan right works correctly" );
        control.buttons[3].onmousedown(evt);
        t.eq( map.getCenter().lat, 0, "Pan down works correctly" );
        control.buttons[4].onmousedown(evt);
        control.buttons[4].onmousedown(evt);
        t.eq( map.getZoom(), 2, "zoomin workds correctly" );
        control.buttons[5].onmousedown(evt);
        t.eq( map.getZoom(), 1, "zoomout workds correctly" );

    }
  // -->
  </script>
</head>
<body>
    <div id="map" style="width: 1024px; height: 512px;"/>
</body>
</html>
<commit_msg>fix panzoom test to set to control constant from map. this test breakage was introduced (by me) in r404.<commit_after><html>
<head>
  <script src="../lib/OpenLayers.js"></script>
  <script type="text/javascript"><!--
    var map; 
    function test_01_Control_PanZoom_constructor (t) {
        t.plan( 1 );
    
        control = new OpenLayers.Control.PanZoom();
        t.ok( control instanceof OpenLayers.Control.PanZoom, "new OpenLayers.Control.PanZoom returns object" );
    }
    function test_02_Control_PanZoom_addControl (t) {
        t.plan( 8 );
        map = new OpenLayers.Map('map');
        control = new OpenLayers.Control.PanZoom();
        t.ok( control instanceof OpenLayers.Control.PanZoom, "new OpenLayers.Control.PanZoom returns object" );
        t.ok( map instanceof OpenLayers.Map, "new OpenLayers.Map creates map" );
        map.addControl(control);
        t.ok( control.map === map, "Control.map is set to the map object" );
        t.ok( map.controls[2] === control, "map.controls contains control" );
        t.eq( parseInt(control.div.style.zIndex), map.Z_INDEX_BASE['Control'] + 3, "Control div zIndexed properly" );
        t.eq( parseInt(map.viewPortDiv.lastChild.style.zIndex), map.Z_INDEX_BASE['Control'] + 3, "Viewport div contains control div" );
        t.eq( control.div.style.top, "4px", "Control div top located correctly by default");

        var control2 = new OpenLayers.Control.PanZoom();
        map.addControl(control2, new OpenLayers.Pixel(100,100));
        t.eq( control2.div.style.top, "100px", "2nd control div is located correctly");
    }
    function test_03_Control_PanZoom_control_events (t) {
        t.plan( 6 );
        var evt = new Object();
        map = new OpenLayers.Map('map');
        control = new OpenLayers.Control.PanZoom();
        map.addControl(control,
                       new OpenLayers.Pixel(20,20));
        map.setCenter(new OpenLayers.LonLat(0,0), 0);
        control.buttons[0].onmousedown(evt);
        t.eq( map.getCenter().lat, 360/1024*50, "Pan up works correctly" );
        control.buttons[1].onmousedown(evt);
        t.eq( map.getCenter().lon, -360/1024*50, "Pan left works correctly" );
        control.buttons[2].onmousedown(evt);
        t.eq( map.getCenter().lon, 0, "Pan right works correctly" );
        control.buttons[3].onmousedown(evt);
        t.eq( map.getCenter().lat, 0, "Pan down works correctly" );
        control.buttons[4].onmousedown(evt);
        control.buttons[4].onmousedown(evt);
        t.eq( map.getZoom(), 2, "zoomin workds correctly" );
        control.buttons[5].onmousedown(evt);
        t.eq( map.getZoom(), 1, "zoomout workds correctly" );

    }
  // -->
  </script>
</head>
<body>
    <div id="map" style="width: 1024px; height: 512px;"/>
</body>
</html>

{'fraction_non_alphanumeric': 0.1482574220910935, 'fraction_numerical': 0.026737967914438502, 'mean_word_length': 2.8715203426124196, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3690644', 'n_tokens_mistral': 1873, 'n_tokens_neox': 1750, 'n_words': 396}