Skip to content

Commit

Permalink
Testcase for new method getSubcontrolId in Widget
Browse files Browse the repository at this point in the history
  • Loading branch information
level420 committed Aug 29, 2016
1 parent 650ace4 commit 6fd3bfa
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions framework/source/class/qx/test/ui/core/Widget.js
Expand Up @@ -321,6 +321,41 @@ qx.Class.define("qx.test.ui.core.Widget",
qx.Class.undefine("qx.test.ui.core.W");
},

testChildGetSubcontrolId : function() {
qx.Class.define("qx.test.ui.core.W", {
extend : qx.ui.core.Widget,

members : {
_createChildControlImpl : function(id, hash)
{
var control;

switch(id)
{
case "xyz":
control = new qx.ui.core.Widget();
break;

}

return control || this.base(arguments, id);
}
}
});

var w = new qx.test.ui.core.W();

var child = w.getChildControl("xyz");
this.flush();
this.assertEquals("xyz", child.getSubcontrolId());

this.assertNull(w.getSubcontrolId());

child.dispose();
w.dispose();
qx.Class.undefine("qx.test.ui.core.W");
},


testCreateChildControlHash: function(){
qx.Class.define("qx.test.ui.core.W", {
Expand Down

0 comments on commit 6fd3bfa

Please sign in to comment.