Changeset 14990

Show
Ignore:
Timestamp:
08/28/08 04:24:10 (3 months ago)
Author:
sfoster
Message:

Refs #5647
Adding test case for destroying simple sub-widgets created by the parser, when we replace the content

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dijit/trunk/tests/layout/test_ContentPane.html

    r14987 r14990  
    3939                dojo.require("dojo.parser");    // scan page for widgets and instantiate them 
    4040 
     41                // create a do nothing, only for test widget 
     42                dojo.declare("dijit.TestWidget", 
     43                        [dijit._Widget, dijit._Templated], { 
     44                        templateString: "<span class='dojoxTestWidget'></span>" 
     45                }); 
     46 
    4147                dojo.addOnLoad(function(){ 
    4248 
     
    5561                        },  
    5662                        { 
    57                                 name: 'parseContent', 
     63                                name: 'parseInitialContent', 
     64                                runTest: function(t){ 
     65                                        console.log("basicChecks: " + this.name); 
     66                                        var parserTest = dijit.byId("parserTest"); 
     67                                        t.assertTrue(parserTest); 
     68                                } 
     69                        }, 
     70                        { 
     71                                name: 'parseNewContent', 
    5872                                runTest: function(t){ 
    5973                                        console.log("basicChecks: " + this.name); 
     
    6478                                                +'</div>' 
    6579                                        ); 
     80 
    6681                                        t.assertTrue(dijit.byId("sacrificialDlg")); 
     82                                        t.assertFalse(dijit.byId("parserTest")); 
    6783                                } 
    6884                        }, 
     
    174190                </div> 
    175191                <div class='box' dojoType="dijit.layout.ContentPane" id='dialogContainer'> 
    176                         Nothing here yet 
     192                        <div dojoType="dijit.TestWidget" id="parserTest"></div> 
    177193                </div> 
    178194        </body>