Created a test file for ve.ce.TextNode and fixed some minor issues.

Change-Id: Ifbf6b7ba2a27eedf6d5d4f6cb06b98c38eb52c5b
This commit is contained in:
Inez Korczynski 2012-05-02 14:18:02 -07:00
parent b4313ae262
commit dd6094842e
3 changed files with 5 additions and 3 deletions

View file

@ -209,7 +209,7 @@ ve.ce.TextNode.prototype.getHtml = function( range ) {
} else {
range = { 'start': 0, 'end': undefined };
}
var data = this.doc.getDataFromNode( this ),
var data = this.model.getDocument().getDataFromNode( this.model ),
render = ve.ce.TextNode.renderAnnotation,
htmlChars = ve.ce.TextNode.htmlCharacters;
var out = '',

View file

@ -166,7 +166,7 @@ ve.dm.BranchNode.prototype.splice = function( index, howmany ) {
* @param {ve.Node} node Node to get offset of
* @returns {Integer} Offset of node or -1 of node was not found
*/
ve.dm.DocumentFragment.prototype.getOffsetFromNode = function( node ) {
ve.dm.BranchNode.prototype.getOffsetFromNode = function( node ) {
if ( node === this ) {
return 0;
}

View file

@ -90,12 +90,14 @@
<script src="dm/ve.dm.Document.test.js"></script>
<script src="dm/ve.dm.DocumentFragment.test.js"></script>
<script src="dm/ve.dm.Transaction.test.js"></script>
<script src="dm/ve.dm.TransactionProcessor.test.js"></script>
<!-- VisualEditor ContentEditable Tests -->
<script src="ce/ve.ce.test.js"></script>
<script src="ce/ve.ce.NodeFactory.test.js"></script>
<script src="ce/ve.ce.Node.test.js"></script>
<script src="ce/ve.ce.BranchNode.test.js"></script>
<script src="ce/ve.ce.LeafNode.test.js"></script>
<script src="dm/ve.dm.TransactionProcessor.test.js"></script>
<script src="ce/nodes/ve.ce.TextNode.test.js"></script>
</body>
</html>