mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-05 03:08:37 +00:00
efafed3231
Change-Id: I8df9226a358a76b661eab6e967ff0d63d361f691
39 lines
1 KiB
JavaScript
39 lines
1 KiB
JavaScript
/*!
|
|
* VisualEditor ContentEditable LeafNode tests.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
QUnit.module( 've.ce.LeafNode' );
|
|
|
|
/* Stubs */
|
|
|
|
ve.ce.LeafNodeStub = function VeCeLeafNodeStub( model ) {
|
|
// Parent constructor
|
|
ve.ce.LeafNode.call( this, model );
|
|
};
|
|
|
|
OO.inheritClass( ve.ce.LeafNodeStub, ve.ce.LeafNode );
|
|
|
|
ve.ce.LeafNodeStub.static.name = 'leaf-stub';
|
|
|
|
ve.ce.nodeFactory.register( ve.ce.LeafNodeStub );
|
|
|
|
/* Tests */
|
|
|
|
QUnit.test( 'canBeSplit', 1, function ( assert ) {
|
|
var node = new ve.ce.LeafNodeStub( new ve.dm.LeafNodeStub() );
|
|
assert.equal( node.canBeSplit(), false );
|
|
} );
|
|
|
|
QUnit.test( 'canHaveChildren', 1, function ( assert ) {
|
|
var node = new ve.ce.LeafNodeStub( new ve.dm.LeafNodeStub() );
|
|
assert.equal( node.canHaveChildren(), false );
|
|
} );
|
|
|
|
QUnit.test( 'canHaveChildrenNotContent', 1, function ( assert ) {
|
|
var node = new ve.ce.LeafNodeStub( new ve.dm.LeafNodeStub() );
|
|
assert.equal( node.canHaveChildrenNotContent(), false );
|
|
} );
|