mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-16 02:51:50 +00:00
07b4534a4c
Change-Id: Ie3fa3e036b92052305288c64edca8f404afded72
22 lines
516 B
JavaScript
22 lines
516 B
JavaScript
module( 've.dm.HTMLConverter' );
|
|
|
|
|
|
// Tests
|
|
|
|
test( 'convertHTML', 1, function() {
|
|
var HTML = $('<div><p>abc</p></div>');
|
|
var linearModel = [
|
|
{ 'type': 'paragraph' },
|
|
'a',
|
|
'b',
|
|
'c',
|
|
{ 'type': '/paragraph' },
|
|
];
|
|
var convertedLinearModel = ve.dm.HTMLConverter.getLinearModel(HTML[0]);
|
|
|
|
var documentFromLinearModel = new ve.dm.Document ( linearModel );
|
|
var documentFromConvertedLinearModel = new ve.dm.Document ( convertedLinearModel );
|
|
|
|
strictEqual( convertedLinearModel.data, linearModel.data );
|
|
} );
|