You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@corinthia.apache.org by ja...@apache.org on 2015/08/14 18:10:44 UTC
[37/51] [abbrv] [partial] incubator-corinthia git commit: added js
test files
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph06-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph06-input.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph06-input.html
new file mode 100644
index 0000000..840ce1f
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph06-input.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var first = document.getElementById("first");
+ var second = document.getElementById("second");
+ Hierarchy_ensureInlineNodesInParagraph(first,true);
+ Hierarchy_ensureInlineNodesInParagraph(second,true);
+}
+</script>
+</head>
+<body>
+
+<br id="first">
+One
+<br>
+Two
+<br>
+
+<p>Explicit paragraph</p>
+
+<br id="second">
+Three
+<br>
+Four
+<br>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph07-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph07-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph07-expected.html
new file mode 100644
index 0000000..c6ce7c7
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph07-expected.html
@@ -0,0 +1,20 @@
+<html>
+ <head></head>
+ <body>
+ <p>
+ <br/>
+ One
+ <br/>
+ Two
+ <br id="first"/>
+ </p>
+ <p>Explicit paragraph</p>
+ <p>
+ <br/>
+ Three
+ <br/>
+ Four
+ <br id="second"/>
+ </p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph07-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph07-input.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph07-input.html
new file mode 100644
index 0000000..e084d85
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph07-input.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var first = document.getElementById("first");
+ var second = document.getElementById("second");
+ Hierarchy_ensureInlineNodesInParagraph(first,true);
+ Hierarchy_ensureInlineNodesInParagraph(second,true);
+}
+</script>
+</head>
+<body>
+
+<br>
+One
+<br>
+Two
+<br id="first">
+
+<p>Explicit paragraph</p>
+
+<br>
+Three
+<br>
+Four
+<br id="second">
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph08-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph08-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph08-expected.html
new file mode 100644
index 0000000..8825c42
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph08-expected.html
@@ -0,0 +1,24 @@
+<html>
+ <head></head>
+ <body>
+ <p>
+ <br/>
+ One
+ <br id="first"/>
+ Two
+ <br/>
+ </p>
+ <ol>
+ <li>Item 1</li>
+ <li>Item 2</li>
+ <li>Item 3</li>
+ </ol>
+ <p>
+ <br/>
+ Three
+ <br id="second"/>
+ Four
+ <br/>
+ </p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph08-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph08-input.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph08-input.html
new file mode 100644
index 0000000..2985dbc
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph08-input.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var first = document.getElementById("first");
+ var second = document.getElementById("second");
+ Hierarchy_ensureInlineNodesInParagraph(first,true);
+ Hierarchy_ensureInlineNodesInParagraph(second,true);
+}
+</script>
+</head>
+<body>
+
+<br>
+One
+<br id="first">
+Two
+<br>
+
+<ol>
+ <li>Item 1</li>
+ <li>Item 2</li>
+ <li>Item 3</li>
+</ol>
+
+<br>
+Three
+<br id="second">
+Four
+<br>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph09-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph09-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph09-expected.html
new file mode 100644
index 0000000..dcaa6db
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph09-expected.html
@@ -0,0 +1,10 @@
+<html>
+ <head></head>
+ <body>
+ <p>
+ One
+ [Two
+ ]Three
+ </p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph09-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph09-input.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph09-input.html
new file mode 100644
index 0000000..369ce25
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph09-input.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var text1 = DOM_createTextNode(document,"One");
+ var text2 = DOM_createTextNode(document,"Two");
+ var text3 = DOM_createTextNode(document,"Three");
+ DOM_deleteAllChildren(document.body);
+ DOM_appendChild(document.body,text1);
+ DOM_appendChild(document.body,text2);
+ DOM_appendChild(document.body,text3);
+
+ var range = new Range(document.body,1,document.body,2);
+
+ Range_trackWhileExecuting(range,function() {
+ Hierarchy_ensureInlineNodesInParagraph(text1);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph10-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph10-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph10-expected.html
new file mode 100644
index 0000000..dcaa6db
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph10-expected.html
@@ -0,0 +1,10 @@
+<html>
+ <head></head>
+ <body>
+ <p>
+ One
+ [Two
+ ]Three
+ </p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph10-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph10-input.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph10-input.html
new file mode 100644
index 0000000..98abf06
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph10-input.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var text1 = DOM_createTextNode(document,"One");
+ var text2 = DOM_createTextNode(document,"Two");
+ var text3 = DOM_createTextNode(document,"Three");
+ DOM_deleteAllChildren(document.body);
+ DOM_appendChild(document.body,text1);
+ DOM_appendChild(document.body,text2);
+ DOM_appendChild(document.body,text3);
+
+ var range = new Range(document.body,1,document.body,2);
+
+ Range_trackWhileExecuting(range,function() {
+ Hierarchy_ensureInlineNodesInParagraph(text2);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph11-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph11-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph11-expected.html
new file mode 100644
index 0000000..dcaa6db
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph11-expected.html
@@ -0,0 +1,10 @@
+<html>
+ <head></head>
+ <body>
+ <p>
+ One
+ [Two
+ ]Three
+ </p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph11-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph11-input.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph11-input.html
new file mode 100644
index 0000000..d012315
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph11-input.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var text1 = DOM_createTextNode(document,"One");
+ var text2 = DOM_createTextNode(document,"Two");
+ var text3 = DOM_createTextNode(document,"Three");
+ DOM_deleteAllChildren(document.body);
+ DOM_appendChild(document.body,text1);
+ DOM_appendChild(document.body,text2);
+ DOM_appendChild(document.body,text3);
+
+ var range = new Range(document.body,1,document.body,2);
+
+ Range_trackWhileExecuting(range,function() {
+ Hierarchy_ensureInlineNodesInParagraph(text3);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph12-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph12-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph12-expected.html
new file mode 100644
index 0000000..dcaa6db
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph12-expected.html
@@ -0,0 +1,10 @@
+<html>
+ <head></head>
+ <body>
+ <p>
+ One
+ [Two
+ ]Three
+ </p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph12-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph12-input.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph12-input.html
new file mode 100644
index 0000000..754d737
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph12-input.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var text1 = DOM_createTextNode(document,"One");
+ var text2 = DOM_createTextNode(document,"Two");
+ var text3 = DOM_createTextNode(document,"Three");
+ DOM_deleteAllChildren(document.body);
+ DOM_appendChild(document.body,text1);
+ DOM_appendChild(document.body,text2);
+ DOM_appendChild(document.body,text3);
+
+ var range = new Range(document.body,1,document.body,2);
+
+ Range_trackWhileExecuting(range,function() {
+ Range_ensureInlineNodesInParagraph(range);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph13-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph13-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph13-expected.html
new file mode 100644
index 0000000..8053ad7
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph13-expected.html
@@ -0,0 +1,10 @@
+<html>
+ <head></head>
+ <body>
+ <p>
+ [One
+ Two
+ Three]
+ </p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph13-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph13-input.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph13-input.html
new file mode 100644
index 0000000..a6f6e14
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph13-input.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var text1 = DOM_createTextNode(document,"One");
+ var text2 = DOM_createTextNode(document,"Two");
+ var text3 = DOM_createTextNode(document,"Three");
+ DOM_deleteAllChildren(document.body);
+ DOM_appendChild(document.body,text1);
+ DOM_appendChild(document.body,text2);
+ DOM_appendChild(document.body,text3);
+
+ var range = new Range(document.body,0,document.body,3);
+
+ Range_trackWhileExecuting(range,function() {
+ Hierarchy_ensureInlineNodesInParagraph(text1);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph14-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph14-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph14-expected.html
new file mode 100644
index 0000000..8053ad7
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph14-expected.html
@@ -0,0 +1,10 @@
+<html>
+ <head></head>
+ <body>
+ <p>
+ [One
+ Two
+ Three]
+ </p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph14-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph14-input.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph14-input.html
new file mode 100644
index 0000000..ff558d2
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph14-input.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var text1 = DOM_createTextNode(document,"One");
+ var text2 = DOM_createTextNode(document,"Two");
+ var text3 = DOM_createTextNode(document,"Three");
+ DOM_deleteAllChildren(document.body);
+ DOM_appendChild(document.body,text1);
+ DOM_appendChild(document.body,text2);
+ DOM_appendChild(document.body,text3);
+
+ var range = new Range(document.body,0,document.body,3);
+
+ Range_trackWhileExecuting(range,function() {
+ Hierarchy_ensureInlineNodesInParagraph(text2);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph15-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph15-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph15-expected.html
new file mode 100644
index 0000000..8053ad7
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph15-expected.html
@@ -0,0 +1,10 @@
+<html>
+ <head></head>
+ <body>
+ <p>
+ [One
+ Two
+ Three]
+ </p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph15-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph15-input.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph15-input.html
new file mode 100644
index 0000000..bf78a9c
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph15-input.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var text1 = DOM_createTextNode(document,"One");
+ var text2 = DOM_createTextNode(document,"Two");
+ var text3 = DOM_createTextNode(document,"Three");
+ DOM_deleteAllChildren(document.body);
+ DOM_appendChild(document.body,text1);
+ DOM_appendChild(document.body,text2);
+ DOM_appendChild(document.body,text3);
+
+ var range = new Range(document.body,0,document.body,3);
+
+ Range_trackWhileExecuting(range,function() {
+ Hierarchy_ensureInlineNodesInParagraph(text3);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph16-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph16-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph16-expected.html
new file mode 100644
index 0000000..8053ad7
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph16-expected.html
@@ -0,0 +1,10 @@
+<html>
+ <head></head>
+ <body>
+ <p>
+ [One
+ Two
+ Three]
+ </p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph16-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph16-input.html b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph16-input.html
new file mode 100644
index 0000000..96d7002
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureInlineNodesInParagraph16-input.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var text1 = DOM_createTextNode(document,"One");
+ var text2 = DOM_createTextNode(document,"Two");
+ var text3 = DOM_createTextNode(document,"Three");
+ DOM_deleteAllChildren(document.body);
+ DOM_appendChild(document.body,text1);
+ DOM_appendChild(document.body,text2);
+ DOM_appendChild(document.body,text3);
+
+ var range = new Range(document.body,0,document.body,3);
+
+ Range_trackWhileExecuting(range,function() {
+ Range_ensureInlineNodesInParagraph(range);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy01-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy01-expected.html
new file mode 100644
index 0000000..d79a0f8
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy01-expected.html
@@ -0,0 +1,6 @@
+<html>
+ <head></head>
+ <body>
+ <p><b>Sample text</b></p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy01-input.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy01-input.html
new file mode 100644
index 0000000..67ad9bd
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy01-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var p = document.getElementsByTagName("P")[0];
+ Hierarchy_ensureValidHierarchy(p.firstChild,true);
+}
+</script>
+</head>
+<body>
+
+<b><p>Sample text</p></b>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy02-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy02-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy02-expected.html
new file mode 100644
index 0000000..d79a0f8
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy02-expected.html
@@ -0,0 +1,6 @@
+<html>
+ <head></head>
+ <body>
+ <p><b>Sample text</b></p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy02-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy02-input.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy02-input.html
new file mode 100644
index 0000000..5e8c370
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy02-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var p = document.getElementsByTagName("P")[0];
+ Hierarchy_ensureValidHierarchy(p,true);
+}
+</script>
+</head>
+<body>
+
+<b><p>Sample text</p></b>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy03-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy03-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy03-expected.html
new file mode 100644
index 0000000..99f2e5b
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy03-expected.html
@@ -0,0 +1,7 @@
+<html>
+ <head></head>
+ <body>
+ <p><b>Sample text</b></p>
+ <b><p>More text</p></b>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy03-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy03-input.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy03-input.html
new file mode 100644
index 0000000..df900a8
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy03-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var p = document.getElementsByTagName("P")[0];
+ Hierarchy_ensureValidHierarchy(p.firstChild,true);
+}
+</script>
+</head>
+<body>
+
+<b><p>Sample text</p><p>More text</p></b>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy04-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy04-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy04-expected.html
new file mode 100644
index 0000000..fa0fef6
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy04-expected.html
@@ -0,0 +1,7 @@
+<html>
+ <head></head>
+ <body>
+ <b><p>Sample text</p></b>
+ <p><b>More text</b></p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy04-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy04-input.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy04-input.html
new file mode 100644
index 0000000..d5c6c87
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy04-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var p = document.getElementsByTagName("P")[1];
+ Hierarchy_ensureValidHierarchy(p.firstChild,true);
+}
+</script>
+</head>
+<body>
+
+<b><p>Sample text</p><p>More text</p></b>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy05-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy05-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy05-expected.html
new file mode 100644
index 0000000..5bd6582
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy05-expected.html
@@ -0,0 +1,7 @@
+<html>
+ <head></head>
+ <body>
+ <p><b>Sample text</b></p>
+ <p><b>More text</b></p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy05-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy05-input.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy05-input.html
new file mode 100644
index 0000000..a00f331
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy05-input.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var p0 = document.getElementsByTagName("P")[0];
+ var p1 = document.getElementsByTagName("P")[1];
+ Hierarchy_ensureValidHierarchy(p0.firstChild,true);
+ Hierarchy_ensureValidHierarchy(p1.firstChild,true);
+}
+</script>
+</head>
+<body>
+
+<b><p>Sample text</p><p>More text</p></b>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy06-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy06-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy06-expected.html
new file mode 100644
index 0000000..300d365
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy06-expected.html
@@ -0,0 +1,6 @@
+<html>
+ <head></head>
+ <body>
+ <p><b><i><u>Sample text</u></i></b></p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy06-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy06-input.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy06-input.html
new file mode 100644
index 0000000..4cc8bef
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy06-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var p0 = document.getElementsByTagName("P")[0];
+ Hierarchy_ensureValidHierarchy(p0.firstChild,true);
+}
+</script>
+</head>
+<body>
+
+<b><i><u><p>Sample text</p></u></i></b>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy07-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy07-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy07-expected.html
new file mode 100644
index 0000000..d1da84b
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy07-expected.html
@@ -0,0 +1,24 @@
+<html>
+ <head></head>
+ <body>
+ <ul>
+ <li><b><i><u>Item 1</u></i></b></li>
+ </ul>
+ <b>
+ <i>
+ <u>
+ <ol>
+ <li>Item 2</li>
+ </ol>
+ <p>Sample text</p>
+ <ul>
+ <li>Item 3</li>
+ </ul>
+ <ol>
+ <li>Item 4</li>
+ </ol>
+ </u>
+ </i>
+ </b>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy07-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy07-input.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy07-input.html
new file mode 100644
index 0000000..e267d0f
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy07-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var li = document.getElementsByTagName("LI")[0];
+ Hierarchy_ensureValidHierarchy(li,true);
+}
+</script>
+</head>
+<body>
+
+<b><i><u><ul><li>Item 1</li></ul><ol><li>Item 2</li></ol><p>Sample text</p><ul><li>Item 3</li></ul><ol><li>Item 4</li></ol></u></i></b>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy08-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy08-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy08-expected.html
new file mode 100644
index 0000000..555f18d
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy08-expected.html
@@ -0,0 +1,22 @@
+<html>
+ <head></head>
+ <body>
+ <b><i><u><ul><li>Item 1</li></ul></u></i></b>
+ <ol>
+ <li><b><i><u>Item 2</u></i></b></li>
+ </ol>
+ <b>
+ <i>
+ <u>
+ <p>Sample text</p>
+ <ul>
+ <li>Item 3</li>
+ </ul>
+ <ol>
+ <li>Item 4</li>
+ </ol>
+ </u>
+ </i>
+ </b>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy08-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy08-input.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy08-input.html
new file mode 100644
index 0000000..a2c517b
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy08-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var li = document.getElementsByTagName("LI")[1];
+ Hierarchy_ensureValidHierarchy(li,true);
+}
+</script>
+</head>
+<body>
+
+<b><i><u><ul><li>Item 1</li></ul><ol><li>Item 2</li></ol><p>Sample text</p><ul><li>Item 3</li></ul><ol><li>Item 4</li></ol></u></i></b>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy09-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy09-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy09-expected.html
new file mode 100644
index 0000000..b463ceb
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy09-expected.html
@@ -0,0 +1,30 @@
+<html>
+ <head></head>
+ <body>
+ <b>
+ <i>
+ <u>
+ <ul>
+ <li>Item 1</li>
+ </ul>
+ <ol>
+ <li>Item 2</li>
+ </ol>
+ </u>
+ </i>
+ </b>
+ <p><b><i><u>Sample text</u></i></b></p>
+ <b>
+ <i>
+ <u>
+ <ul>
+ <li>Item 3</li>
+ </ul>
+ <ol>
+ <li>Item 4</li>
+ </ol>
+ </u>
+ </i>
+ </b>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy09-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy09-input.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy09-input.html
new file mode 100644
index 0000000..507bc73
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy09-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var p = document.getElementsByTagName("P")[0];
+ Hierarchy_ensureValidHierarchy(p,true);
+}
+</script>
+</head>
+<body>
+
+<b><i><u><ul><li>Item 1</li></ul><ol><li>Item 2</li></ol><p>Sample text</p><ul><li>Item 3</li></ul><ol><li>Item 4</li></ol></u></i></b>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy10-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy10-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy10-expected.html
new file mode 100644
index 0000000..a77382d
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy10-expected.html
@@ -0,0 +1,22 @@
+<html>
+ <head></head>
+ <body>
+ <b>
+ <i>
+ <u>
+ <ul>
+ <li>Item 1</li>
+ </ul>
+ <ol>
+ <li>Item 2</li>
+ </ol>
+ <p>Sample text</p>
+ </u>
+ </i>
+ </b>
+ <ul>
+ <li><b><i><u>Item 3</u></i></b></li>
+ </ul>
+ <b><i><u><ol><li>Item 4</li></ol></u></i></b>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy10-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy10-input.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy10-input.html
new file mode 100644
index 0000000..36cfc00
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy10-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var li = document.getElementsByTagName("LI")[2];
+ Hierarchy_ensureValidHierarchy(li,true);
+}
+</script>
+</head>
+<body>
+
+<b><i><u><ul><li>Item 1</li></ul><ol><li>Item 2</li></ol><p>Sample text</p><ul><li>Item 3</li></ul><ol><li>Item 4</li></ol></u></i></b>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy11-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy11-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy11-expected.html
new file mode 100644
index 0000000..1d96c09
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy11-expected.html
@@ -0,0 +1,24 @@
+<html>
+ <head></head>
+ <body>
+ <b>
+ <i>
+ <u>
+ <ul>
+ <li>Item 1</li>
+ </ul>
+ <ol>
+ <li>Item 2</li>
+ </ol>
+ <p>Sample text</p>
+ <ul>
+ <li>Item 3</li>
+ </ul>
+ </u>
+ </i>
+ </b>
+ <ol>
+ <li><b><i><u>Item 4</u></i></b></li>
+ </ol>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy11-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy11-input.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy11-input.html
new file mode 100644
index 0000000..ac5d35b
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy11-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var li = document.getElementsByTagName("LI")[3];
+ Hierarchy_ensureValidHierarchy(li,true);
+}
+</script>
+</head>
+<body>
+
+<b><i><u><ul><li>Item 1</li></ul><ol><li>Item 2</li></ol><p>Sample text</p><ul><li>Item 3</li></ul><ol><li>Item 4</li></ol></u></i></b>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy12-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy12-expected.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy12-expected.html
new file mode 100644
index 0000000..7c84d61
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy12-expected.html
@@ -0,0 +1,55 @@
+<html>
+ <head></head>
+ <body>
+ <b><i>Beginning</i></b>
+ <ul>
+ <li id="1">
+ <b>
+ <i>
+ One
+ <br/>
+ Two
+ <br/>
+ </i>
+ </b>
+ <p><b><i>Hello</i></b></p>
+ <b>
+ <i>
+ Three
+ <br/>
+ Four
+ <br/>
+ </i>
+ </b>
+ <ul>
+ <li><b><i>List item 1</i></b></li>
+ <li><b><i>List item 2</i></b></li>
+ </ul>
+ <b>
+ <i>
+ Five
+ <br/>
+ </i>
+ </b>
+ </li>
+ <li id="2"><b><i>Two</i></b></li>
+ <li id="3"><p><b><i>Three</i></b></p></li>
+ </ul>
+ <b>
+ <i>
+ Middle
+ <ol>
+ <li>Four</li>
+ <li>Five</li>
+ <li>Six</li>
+ </ol>
+ End
+ </i>
+ </b>
+ <br/>
+ One
+ <br/>
+ Two
+ <br/>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy12-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy12-input.html b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy12-input.html
new file mode 100644
index 0000000..4cccd2b
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/ensureValidHierarchy12-input.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var ul = document.getElementsByTagName("UL")[0];
+ Hierarchy_ensureValidHierarchy(ul,true);
+}
+</script>
+</head>
+<body>
+
+<b>
+ <i>
+ Beginning
+ <ul>
+ <li id="1">
+ One<br>
+ Two<br>
+ <p>Hello</p>
+ Three<br>
+ Four<br>
+ <ul>
+ <li>List item 1</li>
+ <li>List item 2</li>
+ </ul>
+ Five<br>
+ </li>
+ <li id="2">Two</li>
+ <li id="3"><p>Three</p></li>
+ </ul>
+ Middle
+ <ol>
+ <li>Four</li>
+ <li>Five</li>
+ <li>Six</li>
+ </ol>
+ End
+ </i>
+</b>
+
+<br>
+One
+<br>
+Two
+<br>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours01-expected.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours01-expected.html
new file mode 100644
index 0000000..bb8d07e
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours01-expected.html
@@ -0,0 +1,6 @@
+<html>
+ <head></head>
+ <body>
+ <p>OneT[woThreeFou]rFive</p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours01-input.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours01-input.html
new file mode 100644
index 0000000..8e86189
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours01-input.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var p = DOM_createElement(document,"P");
+ var text1 = DOM_createTextNode(document,"One");
+ var text2 = DOM_createTextNode(document,"Two");
+ var text3 = DOM_createTextNode(document,"Three");
+ var text4 = DOM_createTextNode(document,"Four");
+ var text5 = DOM_createTextNode(document,"Five");
+ DOM_appendChild(p,text1);
+ DOM_appendChild(p,text2);
+ DOM_appendChild(p,text3);
+ DOM_appendChild(p,text4);
+ DOM_appendChild(p,text5);
+ DOM_appendChild(document.body,p);
+
+ var range = new Range(text2,1,text4,3);
+ Range_trackWhileExecuting(range,function() {
+ Formatting_mergeWithNeighbours(text3,Formatting_MERGEABLE_INLINE);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours02-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours02-expected.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours02-expected.html
new file mode 100644
index 0000000..e827e60
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours02-expected.html
@@ -0,0 +1,6 @@
+<html>
+ <head></head>
+ <body>
+ <p>O[neTwoThreeFourFiv]e</p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours02-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours02-input.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours02-input.html
new file mode 100644
index 0000000..c203565
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours02-input.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var p = DOM_createElement(document,"P");
+ var text1 = DOM_createTextNode(document,"One");
+ var text2 = DOM_createTextNode(document,"Two");
+ var text3 = DOM_createTextNode(document,"Three");
+ var text4 = DOM_createTextNode(document,"Four");
+ var text5 = DOM_createTextNode(document,"Five");
+ DOM_appendChild(p,text1);
+ DOM_appendChild(p,text2);
+ DOM_appendChild(p,text3);
+ DOM_appendChild(p,text4);
+ DOM_appendChild(p,text5);
+ DOM_appendChild(document.body,p);
+
+ var range = new Range(text1,1,text5,3);
+ Range_trackWhileExecuting(range,function() {
+ Formatting_mergeWithNeighbours(text3,Formatting_MERGEABLE_INLINE);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours03-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours03-expected.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours03-expected.html
new file mode 100644
index 0000000..9430e9d
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours03-expected.html
@@ -0,0 +1,6 @@
+<html>
+ <head></head>
+ <body>
+ <p>One[TwoThreeFourFive]</p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours03-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours03-input.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours03-input.html
new file mode 100644
index 0000000..509f8ec
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours03-input.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var p = DOM_createElement(document,"P");
+ var text1 = DOM_createTextNode(document,"One");
+ var text2 = DOM_createTextNode(document,"Two");
+ var text3 = DOM_createTextNode(document,"Three");
+ var text4 = DOM_createTextNode(document,"Four");
+ var text5 = DOM_createTextNode(document,"Five");
+ DOM_appendChild(p,text1);
+ DOM_appendChild(p,text2);
+ DOM_appendChild(p,text3);
+ DOM_appendChild(p,text4);
+ DOM_appendChild(p,text5);
+ DOM_appendChild(document.body,p);
+
+ var range = new Range(text1,3,text5,4);
+ Range_trackWhileExecuting(range,function() {
+ Formatting_mergeWithNeighbours(text3,Formatting_MERGEABLE_INLINE);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours04-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours04-expected.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours04-expected.html
new file mode 100644
index 0000000..40431bb
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours04-expected.html
@@ -0,0 +1,6 @@
+<html>
+ <head></head>
+ <body>
+ <p>One[OneOneOneOne]</p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours04-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours04-input.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours04-input.html
new file mode 100644
index 0000000..669e692
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours04-input.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var p = DOM_createElement(document,"P");
+ var text1 = DOM_createTextNode(document,"One");
+ var text2 = DOM_createTextNode(document,"One");
+ var text3 = DOM_createTextNode(document,"One");
+ var text4 = DOM_createTextNode(document,"One");
+ var text5 = DOM_createTextNode(document,"One");
+ DOM_appendChild(p,text1);
+ DOM_appendChild(p,text2);
+ DOM_appendChild(p,text3);
+ DOM_appendChild(p,text4);
+ DOM_appendChild(p,text5);
+ DOM_appendChild(document.body,p);
+
+ var range = new Range(text1,3,text5,4);
+ Range_trackWhileExecuting(range,function() {
+ Formatting_mergeWithNeighbours(text3,Formatting_MERGEABLE_INLINE);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours05-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours05-expected.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours05-expected.html
new file mode 100644
index 0000000..1e895ad
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours05-expected.html
@@ -0,0 +1,6 @@
+<html>
+ <head></head>
+ <body>
+ <p><b><i>OneTwoThreeFour[FiveSixSevenEight]Nine</i></b></p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours05-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours05-input.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours05-input.html
new file mode 100644
index 0000000..38ac111
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours05-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var bs = document.getElementsByTagName("B");
+ var is = document.getElementsByTagName("I");
+
+ var range = new Range(bs[1],DOM_nodeOffset(is[4]),
+ bs[2],DOM_nodeOffset(is[8]));
+
+ Range_trackWhileExecuting(range,function() {
+ Formatting_mergeWithNeighbours(bs[1],Formatting_MERGEABLE_INLINE);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+
+<p><b><i>One</i><i>Two</i><i>Three</i></b><b><i>Four</i><i>Five</i><i>Six</i></b><b><i>Seven</i><i>Eight</i><i>Nine</i></b></p>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours06-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours06-expected.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours06-expected.html
new file mode 100644
index 0000000..2cf0aa5
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours06-expected.html
@@ -0,0 +1,11 @@
+<html>
+ <head></head>
+ <body>
+ <p>
+ <b>
+ <i>One[TwoThreeFourFiveSixSevenEightNine</i>
+ ]
+ </b>
+ </p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours06-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours06-input.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours06-input.html
new file mode 100644
index 0000000..0224e91
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours06-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var bs = document.getElementsByTagName("B");
+ var is = document.getElementsByTagName("I");
+
+ var range = new Range(bs[0],1,
+ bs[2],bs[2].childNodes.length);
+
+ Range_trackWhileExecuting(range,function() {
+ Formatting_mergeWithNeighbours(bs[1],Formatting_MERGEABLE_INLINE);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+
+<p><b><i>One</i><i>Two</i><i>Three</i></b><b><i>Four</i><i>Five</i><i>Six</i></b><b><i>Seven</i><i>Eight</i><i>Nine</i></b></p>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours07-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours07-expected.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours07-expected.html
new file mode 100644
index 0000000..790e84c
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours07-expected.html
@@ -0,0 +1,6 @@
+<html>
+ <head></head>
+ <body>
+ <p>OneTwo[ThreeFour]Five</p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours07-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours07-input.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours07-input.html
new file mode 100644
index 0000000..8ebf653
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours07-input.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var p = DOM_createElement(document,"P");
+ var text1 = DOM_createTextNode(document,"One");
+ var text2 = DOM_createTextNode(document,"Two");
+ var text3 = DOM_createTextNode(document,"Three");
+ var text4 = DOM_createTextNode(document,"Four");
+ var text5 = DOM_createTextNode(document,"Five");
+ DOM_appendChild(p,text1);
+ DOM_appendChild(p,text2);
+ DOM_appendChild(p,text3);
+ DOM_appendChild(p,text4);
+ DOM_appendChild(p,text5);
+ DOM_appendChild(document.body,p);
+
+ var range = new Range(p,2,p,4);
+ Range_trackWhileExecuting(range,function() {
+ Formatting_mergeWithNeighbours(text3,Formatting_MERGEABLE_INLINE);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours08-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours08-expected.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours08-expected.html
new file mode 100644
index 0000000..9d090c6
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours08-expected.html
@@ -0,0 +1,12 @@
+<html>
+ <head></head>
+ <body>
+ <p>
+ <br/>
+ <br/>
+ [OneTwoThreeFourFive]
+ <br/>
+ <br/>
+ </p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours08-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours08-input.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours08-input.html
new file mode 100644
index 0000000..5521088
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours08-input.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var p = DOM_createElement(document,"P");
+ var text1 = DOM_createTextNode(document,"One");
+ var text2 = DOM_createTextNode(document,"Two");
+ var text3 = DOM_createTextNode(document,"Three");
+ var text4 = DOM_createTextNode(document,"Four");
+ var text5 = DOM_createTextNode(document,"Five");
+ var br1 = DOM_createElement(document,"BR");
+ var br2 = DOM_createElement(document,"BR");
+ var br3 = DOM_createElement(document,"BR");
+ var br4 = DOM_createElement(document,"BR");
+ DOM_appendChild(p,br1);
+ DOM_appendChild(p,br2);
+ DOM_appendChild(p,text1);
+ DOM_appendChild(p,text2);
+ DOM_appendChild(p,text3);
+ DOM_appendChild(p,text4);
+ DOM_appendChild(p,text5);
+ DOM_appendChild(p,br3);
+ DOM_appendChild(p,br4);
+ DOM_appendChild(document.body,p);
+
+ var range = new Range(p,2,p,7);
+ Range_trackWhileExecuting(range,function() {
+ Formatting_mergeWithNeighbours(text3,Formatting_MERGEABLE_INLINE);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours09-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours09-expected.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours09-expected.html
new file mode 100644
index 0000000..8229f01
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours09-expected.html
@@ -0,0 +1,14 @@
+<html>
+ <head></head>
+ <body>
+ <p>
+ <br/>
+ [
+ <br/>
+ OneTwoThreeFourFive
+ <br/>
+ ]
+ <br/>
+ </p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours09-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours09-input.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours09-input.html
new file mode 100644
index 0000000..858d654
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours09-input.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var p = DOM_createElement(document,"P");
+ var text1 = DOM_createTextNode(document,"One");
+ var text2 = DOM_createTextNode(document,"Two");
+ var text3 = DOM_createTextNode(document,"Three");
+ var text4 = DOM_createTextNode(document,"Four");
+ var text5 = DOM_createTextNode(document,"Five");
+ var br1 = DOM_createElement(document,"BR");
+ var br2 = DOM_createElement(document,"BR");
+ var br3 = DOM_createElement(document,"BR");
+ var br4 = DOM_createElement(document,"BR");
+ DOM_appendChild(p,br1);
+ DOM_appendChild(p,br2);
+ DOM_appendChild(p,text1);
+ DOM_appendChild(p,text2);
+ DOM_appendChild(p,text3);
+ DOM_appendChild(p,text4);
+ DOM_appendChild(p,text5);
+ DOM_appendChild(p,br3);
+ DOM_appendChild(p,br4);
+ DOM_appendChild(document.body,p);
+
+ var range = new Range(p,1,p,8);
+ Range_trackWhileExecuting(range,function() {
+ Formatting_mergeWithNeighbours(text3,Formatting_MERGEABLE_INLINE);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours10-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours10-expected.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours10-expected.html
new file mode 100644
index 0000000..2adec16
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours10-expected.html
@@ -0,0 +1,14 @@
+<html>
+ <head></head>
+ <body>
+ <p>
+ [
+ <br/>
+ <br/>
+ OneTwoThreeFourFive
+ <br/>
+ <br/>
+ ]
+ </p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours10-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours10-input.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours10-input.html
new file mode 100644
index 0000000..5953ac7
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours10-input.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var p = DOM_createElement(document,"P");
+ var text1 = DOM_createTextNode(document,"One");
+ var text2 = DOM_createTextNode(document,"Two");
+ var text3 = DOM_createTextNode(document,"Three");
+ var text4 = DOM_createTextNode(document,"Four");
+ var text5 = DOM_createTextNode(document,"Five");
+ var br1 = DOM_createElement(document,"BR");
+ var br2 = DOM_createElement(document,"BR");
+ var br3 = DOM_createElement(document,"BR");
+ var br4 = DOM_createElement(document,"BR");
+ DOM_appendChild(p,br1);
+ DOM_appendChild(p,br2);
+ DOM_appendChild(p,text1);
+ DOM_appendChild(p,text2);
+ DOM_appendChild(p,text3);
+ DOM_appendChild(p,text4);
+ DOM_appendChild(p,text5);
+ DOM_appendChild(p,br3);
+ DOM_appendChild(p,br4);
+ DOM_appendChild(document.body,p);
+
+ var range = new Range(p,0,p,9);
+ Range_trackWhileExecuting(range,function() {
+ Formatting_mergeWithNeighbours(text3,Formatting_MERGEABLE_INLINE);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours11-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours11-expected.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours11-expected.html
new file mode 100644
index 0000000..73d9c83
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours11-expected.html
@@ -0,0 +1,6 @@
+<html>
+ <head></head>
+ <body>
+ <p><b><i>OneTwoThree[FourFiveSix]SevenEightNine</i></b></p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours11-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours11-input.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours11-input.html
new file mode 100644
index 0000000..5c58d04
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours11-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var p = document.getElementsByTagName("P")[0];
+ var bs = document.getElementsByTagName("B");
+ var is = document.getElementsByTagName("I");
+
+ var range = new Range(p,1,p,2);
+
+ Range_trackWhileExecuting(range,function() {
+ Formatting_mergeWithNeighbours(bs[1],Formatting_MERGEABLE_INLINE);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+
+<p><b><i>One</i><i>Two</i><i>Three</i></b><b><i>Four</i><i>Five</i><i>Six</i></b><b><i>Seven</i><i>Eight</i><i>Nine</i></b></p>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours12-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours12-expected.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours12-expected.html
new file mode 100644
index 0000000..7629b0f
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours12-expected.html
@@ -0,0 +1,14 @@
+<html>
+ <head></head>
+ <body>
+ <p>
+ <br/>
+ <br/>
+ [
+ <b><i>OneTwoThreeFourFiveSixSevenEightNine</i></b>
+ ]
+ <br/>
+ <br/>
+ </p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours12-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours12-input.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours12-input.html
new file mode 100644
index 0000000..5cee75a
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours12-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var p = document.getElementsByTagName("P")[0];
+ var bs = document.getElementsByTagName("B");
+ var is = document.getElementsByTagName("I");
+
+ var range = new Range(p,2,p,5);
+
+ Range_trackWhileExecuting(range,function() {
+ Formatting_mergeWithNeighbours(bs[1],Formatting_MERGEABLE_INLINE);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+
+<p><br><br><b><i>One</i><i>Two</i><i>Three</i></b><b><i>Four</i><i>Five</i><i>Six</i></b><b><i>Seven</i><i>Eight</i><i>Nine</i></b><br><br></p>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours13-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours13-expected.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours13-expected.html
new file mode 100644
index 0000000..baa6cf8
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours13-expected.html
@@ -0,0 +1,14 @@
+<html>
+ <head></head>
+ <body>
+ <p>
+ <br/>
+ [
+ <br/>
+ <b><i>OneTwoThreeFourFiveSixSevenEightNine</i></b>
+ <br/>
+ ]
+ <br/>
+ </p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours13-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours13-input.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours13-input.html
new file mode 100644
index 0000000..ad8c2eb
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours13-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var p = document.getElementsByTagName("P")[0];
+ var bs = document.getElementsByTagName("B");
+ var is = document.getElementsByTagName("I");
+
+ var range = new Range(p,1,p,6);
+
+ Range_trackWhileExecuting(range,function() {
+ Formatting_mergeWithNeighbours(bs[1],Formatting_MERGEABLE_INLINE);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+
+<p><br><br><b><i>One</i><i>Two</i><i>Three</i></b><b><i>Four</i><i>Five</i><i>Six</i></b><b><i>Seven</i><i>Eight</i><i>Nine</i></b><br><br></p>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours14-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours14-expected.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours14-expected.html
new file mode 100644
index 0000000..93a1e30
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours14-expected.html
@@ -0,0 +1,14 @@
+<html>
+ <head></head>
+ <body>
+ <p>
+ [
+ <br/>
+ <br/>
+ <b><i>OneTwoThreeFourFiveSixSevenEightNine</i></b>
+ <br/>
+ <br/>
+ ]
+ </p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours14-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours14-input.html b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours14-input.html
new file mode 100644
index 0000000..363c0ea
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/mergeWithNeighbours14-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ var p = document.getElementsByTagName("P")[0];
+ var bs = document.getElementsByTagName("B");
+ var is = document.getElementsByTagName("I");
+
+ var range = new Range(p,0,p,7);
+
+ Range_trackWhileExecuting(range,function() {
+ Formatting_mergeWithNeighbours(bs[1],Formatting_MERGEABLE_INLINE);
+ });
+ showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+
+<p><br><br><b><i>One</i><i>Two</i><i>Three</i></b><b><i>Four</i><i>Five</i><i>Six</i></b><b><i>Seven</i><i>Eight</i><i>Nine</i></b><br><br></p>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/moveCharacters01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/moveCharacters01-expected.html b/experiments/editorFramework/test/Layer0/dom/moveCharacters01-expected.html
new file mode 100644
index 0000000..1806ced
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/moveCharacters01-expected.html
@@ -0,0 +1,28 @@
+"|one two three" -> "|one three" -> "|one two three"
+"o|ne two three" -> "o|ne three" -> "o|ne two three"
+"on|e two three" -> "on|e three" -> "on|e two three"
+"one| two three" -> "one| three" -> "one| two three"
+"one |two three" -> "four five |two six" -> "one |two three"
+"one t|wo three" -> "four five t|wo six" -> "one t|wo three"
+"one tw|o three" -> "four five tw|o six" -> "one tw|o three"
+"one two| three" -> "four five two| six" -> "one two| three"
+"one two |three" -> "four five two |six" -> "one two |three"
+"one two t|hree" -> "one t|hree" -> "one two t|hree"
+"one two th|ree" -> "one th|ree" -> "one two th|ree"
+"one two thr|ee" -> "one thr|ee" -> "one two thr|ee"
+"one two thre|e" -> "one thre|e" -> "one two thre|e"
+"one two three|" -> "one three|" -> "one two three|"
+"|four five six" -> "|four five two six" -> "|four five six"
+"f|our five six" -> "f|our five two six" -> "f|our five six"
+"fo|ur five six" -> "fo|ur five two six" -> "fo|ur five six"
+"fou|r five six" -> "fou|r five two six" -> "fou|r five six"
+"four| five six" -> "four| five two six" -> "four| five six"
+"four |five six" -> "four |five two six" -> "four |five six"
+"four f|ive six" -> "four f|ive two six" -> "four f|ive six"
+"four fi|ve six" -> "four fi|ve two six" -> "four fi|ve six"
+"four fiv|e six" -> "four fiv|e two six" -> "four fiv|e six"
+"four five| six" -> "four five| two six" -> "four five| six"
+"four five |six" -> "four five two |six" -> "one two |three" ***
+"four five s|ix" -> "four five two s|ix" -> "four five s|ix"
+"four five si|x" -> "four five two si|x" -> "four five si|x"
+"four five six|" -> "four five two six|" -> "four five six|"
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/moveCharacters01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/moveCharacters01-input.html b/experiments/editorFramework/test/Layer0/dom/moveCharacters01-input.html
new file mode 100644
index 0000000..a3ab123
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/moveCharacters01-input.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function pad(str,length)
+{
+ str = ""+str;
+ while (str.length < length)
+ str += " ";
+ return str;
+}
+
+function performTest()
+{
+ var ps = document.getElementsByTagName("P");
+ var text1 = ps[0].firstChild;
+ var text2 = ps[1].firstChild;
+
+ var positions = new Array();
+ for (var i = 0; i <= text1.nodeValue.length; i++)
+ positions.push(new Position(text1,i));
+
+ for (var i = 0; i <= text2.nodeValue.length; i++)
+ positions.push(new Position(text2,i));
+
+ var origStrings = new Array();
+ for (var i = 0; i < positions.length; i++)
+ origStrings.push(positions[i].toString());
+
+ Position_trackWhileExecuting(positions,function() {
+ DOM_moveCharacters(text1,4,8,text2,10,false,false);
+ });
+
+ var movedStrings = new Array();
+ for (var i = 0; i < positions.length; i++)
+ movedStrings.push(positions[i].toString());
+
+ Position_trackWhileExecuting(positions,function() {
+ UndoManager_undo();
+ });
+ var undoneStrings = new Array();
+ for (var i = 0; i < positions.length; i++)
+ undoneStrings.push(positions[i].toString());
+
+ var lines = new Array();
+ for (var i = 0; i < positions.length; i++) {
+ var extra = "";
+ if (undoneStrings[i] != origStrings[i])
+ extra += " ***";
+ lines.push(origStrings[i]+" -> "+
+ pad(movedStrings[i],20)+" -> "+
+ undoneStrings[i]+extra+"\n");
+ }
+ return lines.join("");
+}
+</script>
+</head>
+<body>
+<p>one two three</p>
+<p>four five six</p>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/moveCharacters02-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/moveCharacters02-expected.html b/experiments/editorFramework/test/Layer0/dom/moveCharacters02-expected.html
new file mode 100644
index 0000000..1a6ddfb
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/moveCharacters02-expected.html
@@ -0,0 +1,28 @@
+"|one two three" -> "|one three" -> "|one two three"
+"o|ne two three" -> "o|ne three" -> "o|ne two three"
+"on|e two three" -> "on|e three" -> "on|e two three"
+"one| two three" -> "one| three" -> "one| two three"
+"one |two three" -> "one |three" -> "one |two three"
+"one t|wo three" -> "four five t|wo six" -> "one t|wo three"
+"one tw|o three" -> "four five tw|o six" -> "one tw|o three"
+"one two| three" -> "four five two| six" -> "one two| three"
+"one two |three" -> "four five two |six" -> "one two |three"
+"one two t|hree" -> "one t|hree" -> "one two t|hree"
+"one two th|ree" -> "one th|ree" -> "one two th|ree"
+"one two thr|ee" -> "one thr|ee" -> "one two thr|ee"
+"one two thre|e" -> "one thre|e" -> "one two thre|e"
+"one two three|" -> "one three|" -> "one two three|"
+"|four five six" -> "|four five two six" -> "|four five six"
+"f|our five six" -> "f|our five two six" -> "f|our five six"
+"fo|ur five six" -> "fo|ur five two six" -> "fo|ur five six"
+"fou|r five six" -> "fou|r five two six" -> "fou|r five six"
+"four| five six" -> "four| five two six" -> "four| five six"
+"four |five six" -> "four |five two six" -> "four |five six"
+"four f|ive six" -> "four f|ive two six" -> "four f|ive six"
+"four fi|ve six" -> "four fi|ve two six" -> "four fi|ve six"
+"four fiv|e six" -> "four fiv|e two six" -> "four fiv|e six"
+"four five| six" -> "four five| two six" -> "four five| six"
+"four five |six" -> "four five |two six" -> "four five |six"
+"four five s|ix" -> "four five two s|ix" -> "four five s|ix"
+"four five si|x" -> "four five two si|x" -> "four five si|x"
+"four five six|" -> "four five two six|" -> "four five six|"
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/moveCharacters02-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/moveCharacters02-input.html b/experiments/editorFramework/test/Layer0/dom/moveCharacters02-input.html
new file mode 100644
index 0000000..38ed8a1
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/moveCharacters02-input.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function pad(str,length)
+{
+ str = ""+str;
+ while (str.length < length)
+ str += " ";
+ return str;
+}
+
+function performTest()
+{
+ var ps = document.getElementsByTagName("P");
+ var text1 = ps[0].firstChild;
+ var text2 = ps[1].firstChild;
+
+ var positions = new Array();
+ for (var i = 0; i <= text1.nodeValue.length; i++)
+ positions.push(new Position(text1,i));
+
+ for (var i = 0; i <= text2.nodeValue.length; i++)
+ positions.push(new Position(text2,i));
+
+ var origStrings = new Array();
+ for (var i = 0; i < positions.length; i++)
+ origStrings.push(positions[i].toString());
+
+ Position_trackWhileExecuting(positions,function() {
+ DOM_moveCharacters(text1,4,8,text2,10,true,false);
+ });
+
+ var movedStrings = new Array();
+ for (var i = 0; i < positions.length; i++)
+ movedStrings.push(positions[i].toString());
+
+ Position_trackWhileExecuting(positions,function() {
+ UndoManager_undo();
+ });
+ var undoneStrings = new Array();
+ for (var i = 0; i < positions.length; i++)
+ undoneStrings.push(positions[i].toString());
+
+ var lines = new Array();
+ for (var i = 0; i < positions.length; i++) {
+ var extra = "";
+ if (undoneStrings[i] != origStrings[i])
+ extra += " ***";
+ lines.push(origStrings[i]+" -> "+
+ pad(movedStrings[i],20)+" -> "+
+ undoneStrings[i]+extra+"\n");
+ }
+ return lines.join("");
+}
+</script>
+</head>
+<body>
+<p>one two three</p>
+<p>four five six</p>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/moveCharacters03-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/moveCharacters03-expected.html b/experiments/editorFramework/test/Layer0/dom/moveCharacters03-expected.html
new file mode 100644
index 0000000..c5aeb63
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/moveCharacters03-expected.html
@@ -0,0 +1,28 @@
+"|one two three" -> "|one three" -> "|one two three"
+"o|ne two three" -> "o|ne three" -> "o|ne two three"
+"on|e two three" -> "on|e three" -> "on|e two three"
+"one| two three" -> "one| three" -> "one| two three"
+"one |two three" -> "four five |two six" -> "one |two three"
+"one t|wo three" -> "four five t|wo six" -> "one t|wo three"
+"one tw|o three" -> "four five tw|o six" -> "one tw|o three"
+"one two| three" -> "four five two| six" -> "one two| three"
+"one two |three" -> "one |three" -> "one two |three"
+"one two t|hree" -> "one t|hree" -> "one two t|hree"
+"one two th|ree" -> "one th|ree" -> "one two th|ree"
+"one two thr|ee" -> "one thr|ee" -> "one two thr|ee"
+"one two thre|e" -> "one thre|e" -> "one two thre|e"
+"one two three|" -> "one three|" -> "one two three|"
+"|four five six" -> "|four five two six" -> "|four five six"
+"f|our five six" -> "f|our five two six" -> "f|our five six"
+"fo|ur five six" -> "fo|ur five two six" -> "fo|ur five six"
+"fou|r five six" -> "fou|r five two six" -> "fou|r five six"
+"four| five six" -> "four| five two six" -> "four| five six"
+"four |five six" -> "four |five two six" -> "four |five six"
+"four f|ive six" -> "four f|ive two six" -> "four f|ive six"
+"four fi|ve six" -> "four fi|ve two six" -> "four fi|ve six"
+"four fiv|e six" -> "four fiv|e two six" -> "four fiv|e six"
+"four five| six" -> "four five| two six" -> "four five| six"
+"four five |six" -> "four five two |six" -> "four five |six"
+"four five s|ix" -> "four five two s|ix" -> "four five s|ix"
+"four five si|x" -> "four five two si|x" -> "four five si|x"
+"four five six|" -> "four five two six|" -> "four five six|"
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/moveCharacters03-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/moveCharacters03-input.html b/experiments/editorFramework/test/Layer0/dom/moveCharacters03-input.html
new file mode 100644
index 0000000..a18c32e
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/moveCharacters03-input.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function pad(str,length)
+{
+ str = ""+str;
+ while (str.length < length)
+ str += " ";
+ return str;
+}
+
+function performTest()
+{
+ var ps = document.getElementsByTagName("P");
+ var text1 = ps[0].firstChild;
+ var text2 = ps[1].firstChild;
+
+ var positions = new Array();
+ for (var i = 0; i <= text1.nodeValue.length; i++)
+ positions.push(new Position(text1,i));
+
+ for (var i = 0; i <= text2.nodeValue.length; i++)
+ positions.push(new Position(text2,i));
+
+ var origStrings = new Array();
+ for (var i = 0; i < positions.length; i++)
+ origStrings.push(positions[i].toString());
+
+ Position_trackWhileExecuting(positions,function() {
+ DOM_moveCharacters(text1,4,8,text2,10,false,true);
+ });
+
+ var movedStrings = new Array();
+ for (var i = 0; i < positions.length; i++)
+ movedStrings.push(positions[i].toString());
+
+ Position_trackWhileExecuting(positions,function() {
+ UndoManager_undo();
+ });
+ var undoneStrings = new Array();
+ for (var i = 0; i < positions.length; i++)
+ undoneStrings.push(positions[i].toString());
+
+ var lines = new Array();
+ for (var i = 0; i < positions.length; i++) {
+ var extra = "";
+ if (undoneStrings[i] != origStrings[i])
+ extra += " ***";
+ lines.push(origStrings[i]+" -> "+
+ pad(movedStrings[i],20)+" -> "+
+ undoneStrings[i]+extra+"\n");
+ }
+ return lines.join("");
+}
+</script>
+</head>
+<body>
+<p>one two three</p>
+<p>four five six</p>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/moveCharacters04-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/moveCharacters04-expected.html b/experiments/editorFramework/test/Layer0/dom/moveCharacters04-expected.html
new file mode 100644
index 0000000..c59f731
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/moveCharacters04-expected.html
@@ -0,0 +1,28 @@
+"|one two three" -> "|one three" -> "|one two three"
+"o|ne two three" -> "o|ne three" -> "o|ne two three"
+"on|e two three" -> "on|e three" -> "on|e two three"
+"one| two three" -> "one| three" -> "one| two three"
+"one |two three" -> "one |three" -> "one |two three"
+"one t|wo three" -> "four five t|wo six" -> "one t|wo three"
+"one tw|o three" -> "four five tw|o six" -> "one tw|o three"
+"one two| three" -> "four five two| six" -> "one two| three"
+"one two |three" -> "one |three" -> "one |two three" ***
+"one two t|hree" -> "one t|hree" -> "one two t|hree"
+"one two th|ree" -> "one th|ree" -> "one two th|ree"
+"one two thr|ee" -> "one thr|ee" -> "one two thr|ee"
+"one two thre|e" -> "one thre|e" -> "one two thre|e"
+"one two three|" -> "one three|" -> "one two three|"
+"|four five six" -> "|four five two six" -> "|four five six"
+"f|our five six" -> "f|our five two six" -> "f|our five six"
+"fo|ur five six" -> "fo|ur five two six" -> "fo|ur five six"
+"fou|r five six" -> "fou|r five two six" -> "fou|r five six"
+"four| five six" -> "four| five two six" -> "four| five six"
+"four |five six" -> "four |five two six" -> "four |five six"
+"four f|ive six" -> "four f|ive two six" -> "four f|ive six"
+"four fi|ve six" -> "four fi|ve two six" -> "four fi|ve six"
+"four fiv|e six" -> "four fiv|e two six" -> "four fiv|e six"
+"four five| six" -> "four five| two six" -> "four five| six"
+"four five |six" -> "four five |two six" -> "four five |six"
+"four five s|ix" -> "four five two s|ix" -> "four five s|ix"
+"four five si|x" -> "four five two si|x" -> "four five si|x"
+"four five six|" -> "four five two six|" -> "four five six|"
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/dom/moveCharacters04-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/dom/moveCharacters04-input.html b/experiments/editorFramework/test/Layer0/dom/moveCharacters04-input.html
new file mode 100644
index 0000000..7d409d7
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/dom/moveCharacters04-input.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function pad(str,length)
+{
+ str = ""+str;
+ while (str.length < length)
+ str += " ";
+ return str;
+}
+
+function performTest()
+{
+ var ps = document.getElementsByTagName("P");
+ var text1 = ps[0].firstChild;
+ var text2 = ps[1].firstChild;
+
+ var positions = new Array();
+ for (var i = 0; i <= text1.nodeValue.length; i++)
+ positions.push(new Position(text1,i));
+
+ for (var i = 0; i <= text2.nodeValue.length; i++)
+ positions.push(new Position(text2,i));
+
+ var origStrings = new Array();
+ for (var i = 0; i < positions.length; i++)
+ origStrings.push(positions[i].toString());
+
+ Position_trackWhileExecuting(positions,function() {
+ DOM_moveCharacters(text1,4,8,text2,10,true,true);
+ });
+
+ var movedStrings = new Array();
+ for (var i = 0; i < positions.length; i++)
+ movedStrings.push(positions[i].toString());
+
+ Position_trackWhileExecuting(positions,function() {
+ UndoManager_undo();
+ });
+ var undoneStrings = new Array();
+ for (var i = 0; i < positions.length; i++)
+ undoneStrings.push(positions[i].toString());
+
+ var lines = new Array();
+ for (var i = 0; i < positions.length; i++) {
+ var extra = "";
+ if (undoneStrings[i] != origStrings[i])
+ extra += " ***";
+ lines.push(origStrings[i]+" -> "+
+ pad(movedStrings[i],20)+" -> "+
+ undoneStrings[i]+extra+"\n");
+ }
+ return lines.join("");
+}
+</script>
+</head>
+<body>
+<p>one two three</p>
+<p>four five six</p>
+</body>
+</html>