Update VE core submodule to master (d6904b5)

New changes:
925ed5c Move sluggability methods to model
a618491 Calculate slug positions in the model
b8fb05e Make the trigger demo kind of work again
e41d22e Update OOjs UI to v0.1.0-pre (ec785c2c64)
4119470 build: Make headers atop dist files suitable for distribution
fca4fec Follow-up cc657c4: Change strikethrough key command to not clash with Macs
a29a561 Add hasSlugAtOffset to DM document
9f47efb Move getRelativeOffset, getRelativeRange, getNearestFocusableNode to model
aa35e96 Remove hard coded types from canHaveSlugBefore and fix logic
49a239b Emit 'position' and 'contextChange' events correctly
3c50321 Refactor out finding of CE focusedNodes
d6904b5 Update OOjs UI to v0.1.0-pre (f2c3f12959)

Local changes:
* Move ce.Document tests to dm.Document

Change-Id: Ifa5abd0341e858b20e73e9071d597a25112cadfb
This commit is contained in:
Roan Kattouw 2014-09-18 16:56:11 -07:00
parent 4025d1a723
commit 34ec304ec7
3 changed files with 7 additions and 9 deletions

View file

@ -499,6 +499,7 @@ class VisualEditorHooks {
'lib/ve/tests/dm/nodes/ve.dm.TextNode.test.js',
'modules/ve-mw/tests/dm/nodes/ve.dm.MWTransclusionNode.test.js',
'lib/ve/tests/dm/ve.dm.Document.test.js',
'modules/ve-mw/tests/dm/ve.dm.Document.test.js',
'lib/ve/tests/dm/ve.dm.DocumentSynchronizer.test.js',
'lib/ve/tests/dm/ve.dm.IndexValueStore.test.js',
'lib/ve/tests/dm/ve.dm.InternalList.test.js',
@ -522,7 +523,6 @@ class VisualEditorHooks {
'lib/ve/tests/ce/ve.ce.test.js',
'lib/ve/tests/ce/ve.ce.Document.test.js',
'lib/ve/tests/ce/ve.ce.Surface.test.js',
'modules/ve-mw/tests/ce/ve.ce.Document.test.js',
'modules/ve-mw/tests/ce/ve.ce.Surface.test.js',
'lib/ve/tests/ce/ve.ce.NodeFactory.test.js',
'lib/ve/tests/ce/ve.ce.Node.test.js',

2
lib/ve

@ -1 +1 @@
Subproject commit 6f1b98e9c117151565e0044e4eb50a1f29c02fac
Subproject commit d6904b567e3b6cdf722d5470d715c67ff39f7210

View file

@ -1,17 +1,18 @@
/*!
* VisualEditor ContentEditable Document tests.
* VisualEditor DataModel Document tests.
*
* @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
QUnit.module( 've.ce.Document' );
QUnit.module( 've.dm.Document' );
/* Tests */
// FIXME runner copypasted from core, use data provider
QUnit.test( 'getRelativeRange (mwBlockImage / mwInlineImage)', function ( assert ) {
var documentModel, surface, documentView, i, j, expectCount = 0,
var documentModel, i, j,
expectCount = 0,
store = new ve.dm.IndexValueStore(),
storeItems = [
ve.dm.mwExample.MWBlockImage.storeItems,
@ -215,12 +216,10 @@ QUnit.test( 'getRelativeRange (mwBlockImage / mwInlineImage)', function ( assert
}
for ( i = 0; i < tests.length; i++ ) {
documentModel = new ve.dm.Document( new ve.dm.ElementLinearData( store, tests[i].data ) );
surface = ve.test.utils.createSurfaceFromDocument( documentModel );
documentView = surface.getView().getDocument();
for ( j = 0; j < tests[i].cases.length; j++ ) {
expectCount++;
assert.equalRange(
documentView.getRelativeRange(
documentModel.getRelativeRange(
tests[i].cases[j].given,
tests[i].cases[j].direction,
'character',
@ -232,7 +231,6 @@ QUnit.test( 'getRelativeRange (mwBlockImage / mwInlineImage)', function ( assert
', direction ' + tests[i].cases[j].direction
);
}
surface.destroy();
}
QUnit.expect( expectCount );
} );