2012-07-19 00:11:26 +00:00
|
|
|
/**
|
|
|
|
* VisualEditor content editable Document tests.
|
2012-07-19 21:25:16 +00:00
|
|
|
*
|
2012-07-19 00:11:26 +00:00
|
|
|
* @copyright 2011-2012 VisualEditor Team and others; see AUTHORS.txt
|
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
2012-05-10 04:11:09 +00:00
|
|
|
module( 've.ce.Document' );
|
|
|
|
|
|
|
|
/* Tests */
|
|
|
|
|
|
|
|
test( 'selectNodes', function() {
|
|
|
|
var doc = new ve.ce.Document( new ve.dm.Document( ve.dm.example.data ) ),
|
|
|
|
cases = ve.example.getSelectNodesCases( doc );
|
|
|
|
for ( var i = 0; i < cases.length; i++ ) {
|
2012-05-15 07:25:27 +00:00
|
|
|
deepEqual(
|
|
|
|
ve.example.getNodeSelectionSummary( cases[i].actual ),
|
|
|
|
ve.example.getNodeSelectionSummary( cases[i].expected ),
|
|
|
|
cases[i].msg
|
|
|
|
);
|
2012-05-10 04:11:09 +00:00
|
|
|
}
|
|
|
|
} );
|