Update VE core submodule to master (b57d224)

New changes:
541659f [BREAKING CHANGE] Remove domElements attribute from aliens

Local changes:
* Update alien tests

Change-Id: I26a7ebc709fae9d2365a7f9ce2c4cfdcc10620a2
This commit is contained in:
Ed Sanders 2015-03-16 15:22:14 +00:00 committed by James D. Forrester
parent 70cff83f68
commit b83d23c620
4 changed files with 21 additions and 41 deletions

2
lib/ve

@ -1 +1 @@
Subproject commit 6bd2ea52b534cfa73b8fca9004021084a4225046 Subproject commit b57d224ec06f582b1b73270c140a84a3450a0c27

View file

@ -27,7 +27,7 @@ QUnit.test( 'getRenderedContents', function ( assert ) {
['d', [ { type: 'textStyle/bold' } ]], ['d', [ { type: 'textStyle/bold' } ]],
{ {
type: 'alienInline', type: 'alienInline',
attributes: { domElements: $( '<tt>e</tt>' ).toArray() }, originalDomElements: $( '<tt>e</tt>' ).toArray(),
annotations: [ { type: 'textStyle/bold' } ] annotations: [ { type: 'textStyle/bold' } ]
}, },
{ type: '/alienInline' }, { type: '/alienInline' },

View file

@ -11,7 +11,7 @@ QUnit.module( 've.dm.Transaction (MW)' );
QUnit.test( 'newFromDocumentInsertion with references', function ( assert ) { QUnit.test( 'newFromDocumentInsertion with references', function ( assert ) {
var i, j, doc2, tx, actualStoreItems, expectedStoreItems, removalOps, doc, var i, j, doc2, tx, actualStoreItems, expectedStoreItems, removalOps, doc,
complexDoc = ve.dm.mwExample.createExampleDocument( 'complexInternalData' ), complexDoc = ve.dm.mwExample.createExampleDocument( 'complexInternalData' ),
comment = { type: 'alienMeta', attributes: { domElements: $( '<!-- hello -->' ).get() } }, comment = { type: 'alienMeta', originalDomElements: $( '<!-- hello -->' ).toArray() },
withReference = [ withReference = [
{ type: 'paragraph' }, { type: 'paragraph' },
'B', 'a', 'r', 'B', 'a', 'r',

View file

@ -363,9 +363,7 @@ ve.dm.mwExample.withMeta = [
{ type: '/paragraph' }, { type: '/paragraph' },
{ {
type: 'mwAlienMeta', type: 'mwAlienMeta',
attributes: { originalDomElements: $( '<meta property="mw:ThisIsAnAlien" />' ).toArray()
domElements: $( '<meta property="mw:ThisIsAnAlien" />' ).toArray()
}
}, },
{ type: '/mwAlienMeta' }, { type: '/mwAlienMeta' },
{ type: 'paragraph' }, { type: 'paragraph' },
@ -388,9 +386,7 @@ ve.dm.mwExample.withMeta = [
'r', 'r',
{ {
type: 'mwAlienMeta', type: 'mwAlienMeta',
attributes: { originalDomElements: $( '<meta property="mw:foo" content="bar" />' ).toArray()
domElements: $( '<meta property="mw:foo" content="bar" />' ).toArray()
}
}, },
{ type: '/mwAlienMeta' }, { type: '/mwAlienMeta' },
'B', 'B',
@ -406,9 +402,7 @@ ve.dm.mwExample.withMeta = [
{ type: '/paragraph' }, { type: '/paragraph' },
{ {
type: 'mwAlienMeta', type: 'mwAlienMeta',
attributes: { originalDomElements: $( '<meta property="mw:bar" content="baz" />' ).toArray()
domElements: $( '<meta property="mw:bar" content="baz" />' ).toArray()
}
}, },
{ type: '/mwAlienMeta' }, { type: '/mwAlienMeta' },
{ {
@ -438,9 +432,7 @@ ve.dm.mwExample.withMeta = [
{ type: '/mwCategory' }, { type: '/mwCategory' },
{ {
type: 'mwAlienMeta', type: 'mwAlienMeta',
attributes: { originalDomElements: $( '<meta typeof="mw:Placeholder" data-parsoid="foobar" />' ).toArray()
domElements: $( '<meta typeof="mw:Placeholder" data-parsoid="foobar" />' ).toArray()
}
}, },
{ type: '/mwAlienMeta' }, { type: '/mwAlienMeta' },
{ type: 'internalList' }, { type: 'internalList' },
@ -467,15 +459,11 @@ ve.dm.mwExample.withMetaMetaData = [
[ [
{ {
type: 'alienMeta', type: 'alienMeta',
attributes: { originalDomElements: $( '<!-- No content conversion -->' ).toArray()
domElements: $( '<!-- No content conversion -->' ).toArray()
}
}, },
{ {
type: 'mwAlienMeta', type: 'mwAlienMeta',
attributes: { originalDomElements: $( '<meta property="mw:ThisIsAnAlien" />' ).toArray()
domElements: $( '<meta property="mw:ThisIsAnAlien" />' ).toArray()
}
} }
], ],
undefined, undefined,
@ -498,27 +486,21 @@ ve.dm.mwExample.withMetaMetaData = [
[ [
{ {
type: 'mwAlienMeta', type: 'mwAlienMeta',
attributes: { originalDomElements: $( '<meta property="mw:foo" content="bar" />' ).toArray()
domElements: $( '<meta property="mw:foo" content="bar" />' ).toArray()
}
} }
], ],
undefined, undefined,
[ [
{ {
type: 'alienMeta', type: 'alienMeta',
attributes: { originalDomElements: $( '<!-- inline -->' ).toArray()
domElements: $( '<!-- inline -->' ).toArray()
}
} }
], ],
undefined, undefined,
[ [
{ {
type: 'mwAlienMeta', type: 'mwAlienMeta',
attributes: { originalDomElements: $( '<meta property="mw:bar" content="baz" />' ).toArray()
domElements: $( '<meta property="mw:bar" content="baz" />' ).toArray()
}
}, },
{ {
type: 'comment', type: 'comment',
@ -538,9 +520,7 @@ ve.dm.mwExample.withMetaMetaData = [
}, },
{ {
type: 'mwAlienMeta', type: 'mwAlienMeta',
attributes: { originalDomElements: $( '<meta typeof="mw:Placeholder" data-parsoid="foobar" />' ).toArray()
domElements: $( '<meta typeof="mw:Placeholder" data-parsoid="foobar" />' ).toArray()
}
} }
], ],
undefined, undefined,
@ -661,13 +641,13 @@ ve.dm.mwExample.references = [
{ type: '/paragraph' }, { type: '/paragraph' },
{ {
type: 'mwReferencesList', type: 'mwReferencesList',
// orginalDomElements: HTML,
attributes: { attributes: {
mw: { mw: {
name: 'references', name: 'references',
attrs: { group: 'g1' } attrs: { group: 'g1' }
}, },
originalMw: '{"name":"references","attrs":{"group":"g1"}"}', originalMw: '{"name":"references","attrs":{"group":"g1"}"}',
// domElements: HTML,
listGroup: 'mwReference/', listGroup: 'mwReference/',
refGroup: '' refGroup: ''
} }
@ -704,7 +684,7 @@ ve.dm.mwExample.references = [
ve.dm.mwExample.complexInternalData = [ ve.dm.mwExample.complexInternalData = [
// 0 // 0
{ type: 'alienMeta', attributes: { domElements: $( '<!-- before -->' ).get() } }, { type: 'alienMeta', originalDomElements: $( '<!-- before -->' ).toArray() },
{ type: '/alienMeta' }, { type: '/alienMeta' },
{ type: 'paragraph' }, { type: 'paragraph' },
'F', ['o', [ve.dm.example.bold]], ['o', [ve.dm.example.italic]], 'F', ['o', [ve.dm.example.bold]], ['o', [ve.dm.example.italic]],
@ -722,7 +702,7 @@ ve.dm.mwExample.complexInternalData = [
{ type: '/mwReference' }, { type: '/mwReference' },
// 6 // 6
{ type: '/paragraph' }, { type: '/paragraph' },
{ type: 'alienMeta', attributes: { domElements: $( '<!-- after -->' ).get() } }, { type: 'alienMeta', originalDomElements: $( '<!-- after -->' ).toArray() },
{ type: '/alienMeta' }, { type: '/alienMeta' },
// 7 // 7
{ type: 'internalList' }, { type: 'internalList' },
@ -732,7 +712,7 @@ ve.dm.mwExample.complexInternalData = [
{ type: 'paragraph', internal: { generated: 'wrapper' } }, { type: 'paragraph', internal: { generated: 'wrapper' } },
'R', ['e', [ve.dm.example.bold]], 'f', 'R', ['e', [ve.dm.example.bold]], 'f',
// 13 // 13
{ type: 'alienMeta', attributes: { domElements: $( '<!-- reference -->' ).get() } }, { type: 'alienMeta', originalDomElements: $( '<!-- reference -->' ).toArray() },
{ type: '/alienMeta' }, { type: '/alienMeta' },
'e', ['r', [ve.dm.example.italic]], ['e', [ve.dm.example.italic]], 'e', ['r', [ve.dm.example.italic]], ['e', [ve.dm.example.italic]],
// 16 // 16
@ -754,22 +734,22 @@ ve.dm.mwExample.complexInternalData = [
{ type: '/internalItem' }, { type: '/internalItem' },
// 23 // 23
{ type: 'internalItem' }, { type: 'internalItem' },
{ type: 'alienMeta', attributes: { domElements: $( '<!-- beginning -->' ).get() } }, { type: 'alienMeta', originalDomElements: $( '<!-- beginning -->' ).toArray() },
{ type: '/alienMeta' }, { type: '/alienMeta' },
// 24 // 24
{ type: 'preformatted' }, { type: 'preformatted' },
{ type: 'alienMeta', attributes: { domElements: $( '<!-- inside -->' ).get() } }, { type: 'alienMeta', originalDomElements: $( '<!-- inside -->' ).toArray() },
{ type: '/alienMeta' }, { type: '/alienMeta' },
// 25 // 25
{ type: 'mwEntity', attributes: { character: '€' } }, { type: 'mwEntity', attributes: { character: '€' } },
// 26 // 26
{ type: '/mwEntity' }, { type: '/mwEntity' },
'2', '5', '0', '2', '5', '0',
{ type: 'alienMeta', attributes: { domElements: $( '<!-- inside2 -->' ).get() } }, { type: 'alienMeta', originalDomElements: $( '<!-- inside2 -->' ).toArray() },
{ type: '/alienMeta' }, { type: '/alienMeta' },
// 30 // 30
{ type: '/preformatted' }, { type: '/preformatted' },
{ type: 'alienMeta', attributes: { domElements: $( '<!-- end -->' ).get() } }, { type: 'alienMeta', originalDomElements: $( '<!-- end -->' ).toArray() },
{ type: '/alienMeta' }, { type: '/alienMeta' },
// 31 // 31
{ type: '/internalItem' }, { type: '/internalItem' },