mediawiki-extensions-Visual.../modules/ve/test/dm
Ed Sanders cddb3f1b39 AlienNode stores original DOM elements instead of HTML
As jQuery hash problems in some cases converting HTML, it is
easier just to store the original DOM elements.

The bulk of this commit is fixing the tests as although we have an
assertion for comparing DOM elements, we don't have one for comparing
objects or arrays which may contain DOM elements.

ve.js
* copyObject & copyArray fixed to run cloneNode(true) on any item
  of type Node.
* Added callback function so an object/array can be copied with
  modifications.

ve.qunit.js
* Added deepEqualWithDomElements: Using the new copyObect/Array
  callback, we can copy the incoming object and convert any nodes
  to node summaries, then just run the normal deep equal comparison.

ve.dm.AlienNodes.js
* Instead of storing HMTL we store cloned DOM elements which we can
  send straight back to the converter without any processing.

ve.dm.example.js
* Updated tests to expect DOM elements instead of HTML.

ve.dm.Converter.test.js
* Updated tests to use deepEqualWithDomElements

Bug: 47737
Change-Id: I3df8f49b170c31da9610129d53cf8cb65dd5d5f8
2013-04-27 21:04:58 +00:00
..
lineardata Fix a bug where trimOuterSpaceFromRange() didn't trim an all-whitespace range 2013-04-03 16:58:51 -07:00
nodes Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.dm.AnnotationSet.test.js Further AnnotationSet optimisation: create containsIndex 2013-04-25 22:55:43 +01:00
ve.dm.BranchNode.test.js Correct name of can(Node)HaveGrandchildren functions 2013-03-13 23:25:33 +00:00
ve.dm.Converter.test.js AlienNode stores original DOM elements instead of HTML 2013-04-27 21:04:58 +00:00
ve.dm.Document.test.js Transactions to store metadata merge info when present 2013-04-16 22:26:56 +01:00
ve.dm.DocumentSynchronizer.test.js Merge "Make the AnnotationSet constructor take an array of indexes" 2013-04-18 21:50:25 +00:00
ve.dm.example.js AlienNode stores original DOM elements instead of HTML 2013-04-27 21:04:58 +00:00
ve.dm.IndexValueStore.test.js Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00:00
ve.dm.LeafNode.test.js Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00:00
ve.dm.LinearData.test.js Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00:00
ve.dm.MetaList.test.js Transactions to store metadata merge info when present 2013-04-16 22:26:56 +01:00
ve.dm.ModelRegistry.test.js Fix ModelRegistry bugs 2013-04-08 18:05:34 -07:00
ve.dm.Node.test.js Remove html/* attributes in getClonedElement() 2013-04-18 09:27:28 -07:00
ve.dm.NodeFactory.test.js Correct name of can(Node)HaveGrandchildren functions 2013-03-13 23:25:33 +00:00
ve.dm.Surface.test.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.dm.SurfaceFragment.test.js The resurrection 2013-04-22 12:50:23 +01:00
ve.dm.Transaction.test.js Allow fixUpInsertion to move offsets when inserting at start/end 2013-04-26 22:52:27 +00:00
ve.dm.TransactionProcessor.test.js Transactions to store metadata merge info when present 2013-04-16 22:26:56 +01:00