Roan Kattouw
5ac817a6f4
Fix bugs in prepareContentAnnotation() related to structural offsets, and add a test. Also add parenthesis to the if statement mixing || and &&, for clarity
2011-11-24 16:27:40 +00:00
Trevor Parscal
3ed6544fe2
Added test that exposes bugs in prepareContentAnnotation
2011-11-23 23:24:05 +00:00
Trevor Parscal
8ed6ee5e3c
Fixed a test which was poorly named and had incorrect data
2011-11-23 19:37:57 +00:00
Trevor Parscal
779a63f486
* Switched to using JSON for hashing, allowing us to use the native JSON.stringify where available, which is much faster
...
* Added a bunch of utility functions for working with character data and annotations
* Got toolbar button states to follow selection of more than one character
2011-11-21 22:32:22 +00:00
Roan Kattouw
117c785d85
Improve the merging logic in prepareRemoval() to also allow merging nested nodes, e.g. by deleting </p></li><li><p>
2011-11-17 19:23:15 +00:00
Trevor Parscal
b89d7d7eeb
Removed some accidental globals
2011-11-16 23:32:57 +00:00
Roan Kattouw
cb8a14b954
Add test cases to illustrate the breakage in r103271
2011-11-16 19:07:17 +00:00
Trevor Parscal
8a2e8b4aab
Rewrote prepareRemoval to support dropping nodes that are considered droppable (not tableCells) and are covered completely by the range - otherwise nodes are stripped of content
2011-11-16 00:03:17 +00:00
Roan Kattouw
8563e7e451
Add FIXME comment for a failing test and fix a typo in its description
2011-11-15 10:15:52 +00:00
Trevor Parscal
ff07930171
Added test for prepareRemoval which fails atm, because strip doesn't drop nodes that are covered completely. Also cleaned up some comments in prepareRemoval
2011-11-15 01:15:21 +00:00
Trevor Parscal
482d477449
Added test for prepareRemoval which fails atm, because strip doesn't drop nodes that are covered completely.
2011-11-15 01:04:37 +00:00
Trevor Parscal
ba64cfaf46
Moved tests for es.TransactionProcessor to their own file
2011-11-14 23:10:00 +00:00
Roan Kattouw
a4f71ace69
Rewrite the remove() function in es.DocumentModel.operations such that the tests added in r102564 pass now
2011-11-10 15:50:59 +00:00
Trevor Parscal
4bf41fc3e8
Updated tests and test data to support listItem nodes being branches instead of leafs
2011-11-09 23:39:47 +00:00
Roan Kattouw
25a04133b0
Add test cases for inserting a paragraph break (</p><p>) in the middle of a paragraph. Interestingly, committing this insertion actually works, but rolling it back doesn't.
2011-11-09 20:24:13 +00:00
Trevor Parscal
cd18698bbc
Moved es.DocumentModelBranchNode tests to their own file
2011-11-04 21:16:20 +00:00
Trevor Parscal
add7c23191
Added es.Transaction.optimize and added in a test that neilk sent a patch for
2011-11-04 20:38:47 +00:00
Roan Kattouw
84c6b8925a
Refactor the large data objects in es.DocumentModel.test.js out to es.testData.js so they can be shared with other tests
2011-11-04 20:11:51 +00:00
Trevor Parscal
04b7e80096
Prepare removal tests are working now that DocumentModelNode objects have a type property
2011-11-04 18:31:22 +00:00
Trevor Parscal
4963b05e14
Split tests up by method
2011-11-04 18:08:51 +00:00
Trevor Parscal
4d7cbded2c
Minor cleanup
2011-11-04 17:54:02 +00:00
Trevor Parscal
36c6bee0a8
Moved es tests to their own folder
2011-11-04 17:47:09 +00:00