<commit_before><html>
<head>
    <script src="../../OLLoader.js"></script>
    <script type="text/javascript">
    var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
    var isOpera   = (navigator.userAgent.indexOf("Opera") != -1);
    var isIE      = (navigator.userAgent.indexOf("MSIE") != -1);

    var map, layer;
    var position = new OpenLayers.Pixel(20,30);
    var bounds   = new OpenLayers.Bounds(1,2,3,4);
    var url      = "http://www.openlayers.org/dev/tests/tileimage";
    var size     = new OpenLayers.Size(5,6);
    var name     = "OpenaLayers WMS";
    var wmsUrl   = "http://labs.metacarta.com/wms/vmap0?";
    
    function test_Tile_Image_IFrame_create (t) {
        t.plan( 5 );
        map   = new OpenLayers.Map('map');
        var bar = new Array(205).join("1234567890");
        layer = new OpenLayers.Layer.WMS(name, wmsUrl,
                                         {layers: 'basic', foo: bar},
                                         {tileOptions: {maxGetUrlLength: 2048},
                                          transitionEffect: 'resize'});
        map.addLayer(layer);

        var tile = layer.addTile(bounds, position);
        t.eq(tile.backBufferMode, 2, "backBufferMode is 2 after tile creation");

        tile.draw();
        t.eq(tile.imgDiv.nodeName.toLowerCase(), "iframe", "IFrame used for long URL");
        
        layer.mergeNewParams({foo: null});
        tile.draw();
        t.eq(tile.imgDiv.nodeName.toLowerCase(), "img", "IMG used for short URL");
        t.eq(tile.backBufferMode, 2, "backBufferMode reset to 2");
        
        tile.maxGetUrlLength = 0;
        tile.draw();
        t.eq(tile.imgDiv.nodeName.toLowerCase(), "iframe", "IFrame used when maxGetUrlLength is 0");
        
        tile.destroy();
        layer.destroy();
        map.destroy();
    }

    function test_Tile_Image_IFrame_clear (t) {
        t.plan( 1 );<commit_msg>Make the IFrame.html tests pass<commit_after><html>
<head>
    <script src="../../OLLoader.js"></script>
    <script type="text/javascript">
    var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
    var isOpera   = (navigator.userAgent.indexOf("Opera") != -1);
    var isIE      = (navigator.userAgent.indexOf("MSIE") != -1);

    var map, layer;
    var position = new OpenLayers.Pixel(20,30);
    var bounds   = new OpenLayers.Bounds(1,2,3,4);
    var url      = "http://www.openlayers.org/dev/tests/tileimage";
    var size     = new OpenLayers.Size(5,6);
    var name     = "OpenaLayers WMS";
    var wmsUrl   = "http://labs.metacarta.com/wms/vmap0?";
    
    function test_Tile_Image_IFrame_create (t) {
        t.plan( 3 );
        map   = new OpenLayers.Map('map');
        var bar = new Array(205).join("1234567890");
        layer = new OpenLayers.Layer.WMS(name, wmsUrl,
                                         {layers: 'basic', foo: bar},
                                         {tileOptions: {maxGetUrlLength: 2048},
                                          transitionEffect: 'resize'});
        map.addLayer(layer);

        var tile = layer.addTile(bounds, position);

        tile.draw();
        t.eq(tile.imgDiv.nodeName.toLowerCase(), "iframe", "IFrame used for long URL");
        
        layer.mergeNewParams({foo: null});
        tile.draw();
        t.eq(tile.imgDiv.nodeName.toLowerCase(), "img", "IMG used for short URL");
        
        tile.maxGetUrlLength = 0;
        tile.draw();
        t.eq(tile.imgDiv.nodeName.toLowerCase(), "iframe", "IFrame used when maxGetUrlLength is 0");
        
        tile.destroy();
        layer.destroy();
        map.destroy();
    }

    function test_Tile_Image_IFrame_clear (t) {
        t.plan( 1 );
{'fraction_non_alphanumeric': 0.14690026954177898, 'fraction_numerical': 0.019946091644204852, 'mean_word_length': 2.0771144278606966, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6788106', 'n_tokens_mistral': 1208, 'n_tokens_neox': 1157, 'n_words': 238}