mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-16 02:51:50 +00:00
7168b4e041
These methods are wrappers for the model methods where the rules are actually being applied Change-Id: I08be359010fa9fa81cd3a8aa5152083f92dc0b9c
25 lines
594 B
JavaScript
25 lines
594 B
JavaScript
module( 've.ce.LeafNode' );
|
|
|
|
/* Stubs */
|
|
|
|
ve.ce.LeafNodeStub = function( model ) {
|
|
// Inheritance
|
|
ve.ce.LeafNode.call( this, 'leaf-stub', model );
|
|
};
|
|
|
|
ve.extendClass( ve.ce.LeafNodeStub, ve.ce.LeafNode );
|
|
|
|
ve.ce.factory.register( 'leaf-stub', ve.ce.LeafNodeStub );
|
|
|
|
/* Tests */
|
|
|
|
test( 'canHaveChildren', 1, function() {
|
|
var node = new ve.ce.LeafNodeStub( new ve.dm.LeafNodeStub() );
|
|
equal( node.canHaveChildren(), false );
|
|
} );
|
|
|
|
test( 'canHaveGrandchildren', 1, function() {
|
|
var node = new ve.ce.LeafNodeStub( new ve.dm.LeafNodeStub() );
|
|
equal( node.canHaveGrandchildren(), false );
|
|
} );
|