corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmke...@apache.org
Subject [30/92] [abbrv] [partial] incubator-corinthia git commit: Add editing code from UX Write
Date Wed, 17 Dec 2014 13:28:40 GMT
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint02b-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint02b-input.html b/Editor/tests/cursor/makeContainerInsertionPoint02b-input.html
new file mode 100644
index 0000000..a959adb
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint02b-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_makeContainerInsertionPoint();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>[Sample te]xt</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint02c-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint02c-expected.html b/Editor/tests/cursor/makeContainerInsertionPoint02c-expected.html
new file mode 100644
index 0000000..90101bd
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint02c-expected.html
@@ -0,0 +1,7 @@
+<html>
+  <head></head>
+  <body>
+    <p>Sam</p>
+    []
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint02c-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint02c-input.html b/Editor/tests/cursor/makeContainerInsertionPoint02c-input.html
new file mode 100644
index 0000000..342cf7a
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint02c-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_makeContainerInsertionPoint();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>Sam[ple text]</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint03a-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint03a-expected.html b/Editor/tests/cursor/makeContainerInsertionPoint03a-expected.html
new file mode 100644
index 0000000..7c3ef20
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint03a-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <h1 id="item3">Sam</h1>
+    []
+    <h1 id="item2">xt</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint03a-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint03a-input.html b/Editor/tests/cursor/makeContainerInsertionPoint03a-input.html
new file mode 100644
index 0000000..cf4a8d0
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint03a-input.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+    Cursor_makeContainerInsertionPoint();
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<h1>Sam[ple te]xt</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint03b-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint03b-expected.html b/Editor/tests/cursor/makeContainerInsertionPoint03b-expected.html
new file mode 100644
index 0000000..5d9a930
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint03b-expected.html
@@ -0,0 +1,10 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    []
+    <h1 id="item2">xt</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint03b-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint03b-input.html b/Editor/tests/cursor/makeContainerInsertionPoint03b-input.html
new file mode 100644
index 0000000..a12724e
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint03b-input.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+    Cursor_makeContainerInsertionPoint();
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<h1>4 [Sample te]xt</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint03c-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint03c-expected.html b/Editor/tests/cursor/makeContainerInsertionPoint03c-expected.html
new file mode 100644
index 0000000..b229ce8
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint03c-expected.html
@@ -0,0 +1,10 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="item2">Sam</h1>
+    []
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint03c-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint03c-input.html b/Editor/tests/cursor/makeContainerInsertionPoint03c-input.html
new file mode 100644
index 0000000..cadf465
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint03c-input.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+    Cursor_makeContainerInsertionPoint();
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<h1>4 Sam[ple text]</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint04-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint04-expected.html b/Editor/tests/cursor/makeContainerInsertionPoint04-expected.html
new file mode 100644
index 0000000..6805b40
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint04-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <p><b>Sam</b></p>
+    []
+    <p><b>xt</b></p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint04-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint04-input.html b/Editor/tests/cursor/makeContainerInsertionPoint04-input.html
new file mode 100644
index 0000000..d2667d0
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint04-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_makeContainerInsertionPoint();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p><b>Sam[ple te]xt</b></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint05a-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint05a-expected.html b/Editor/tests/cursor/makeContainerInsertionPoint05a-expected.html
new file mode 100644
index 0000000..4dd1d56
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint05a-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <p><b><i><u>Sam</u></i></b></p>
+    []
+    <p><b><i><u>xt</u></i></b></p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint05a-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint05a-input.html b/Editor/tests/cursor/makeContainerInsertionPoint05a-input.html
new file mode 100644
index 0000000..0baeeac
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint05a-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_makeContainerInsertionPoint();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p><b><i><u>Sam[ple te]xt</u></i></b></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint05b-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint05b-expected.html b/Editor/tests/cursor/makeContainerInsertionPoint05b-expected.html
new file mode 100644
index 0000000..0077c3b
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint05b-expected.html
@@ -0,0 +1,7 @@
+<html>
+  <head></head>
+  <body>
+    []
+    <p><b><i><u>xt</u></i></b></p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint05b-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint05b-input.html b/Editor/tests/cursor/makeContainerInsertionPoint05b-input.html
new file mode 100644
index 0000000..b09312d
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint05b-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_makeContainerInsertionPoint();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p><b><i><u>[Sample te]xt</u></i></b></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint05c-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint05c-expected.html b/Editor/tests/cursor/makeContainerInsertionPoint05c-expected.html
new file mode 100644
index 0000000..02e1240
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint05c-expected.html
@@ -0,0 +1,7 @@
+<html>
+  <head></head>
+  <body>
+    <p><b><i><u>Sam</u></i></b></p>
+    []
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint05c-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint05c-input.html b/Editor/tests/cursor/makeContainerInsertionPoint05c-input.html
new file mode 100644
index 0000000..84a9992
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint05c-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_makeContainerInsertionPoint();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p><b><i><u>Sam[ple text]</u></i></b></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint06-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint06-expected.html b/Editor/tests/cursor/makeContainerInsertionPoint06-expected.html
new file mode 100644
index 0000000..bc6dab9
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint06-expected.html
@@ -0,0 +1,14 @@
+<html>
+  <head></head>
+  <body>
+    <ul>
+      <li>Before</li>
+      <li>
+        <p><b><i><u>Sam</u></i></b></p>
+        []
+        <p><b><i><u>xt</u></i></b></p>
+      </li>
+      <li>After</li>
+    </ul>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint06-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint06-input.html b/Editor/tests/cursor/makeContainerInsertionPoint06-input.html
new file mode 100644
index 0000000..f90f593
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint06-input.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_makeContainerInsertionPoint();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<ul>
+  <li>Before</li>
+  <li><p><b><i><u>Sam[ple te]xt</u></i></b></p></li>
+  <li>After</li>
+</ul>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint07-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint07-expected.html b/Editor/tests/cursor/makeContainerInsertionPoint07-expected.html
new file mode 100644
index 0000000..e277c81
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint07-expected.html
@@ -0,0 +1,21 @@
+<html>
+  <head></head>
+  <body>
+    <table>
+      <tbody>
+        <tr>
+          <td>One</td>
+          <td>
+            <p><b><i><u>Sam</u></i></b></p>
+            []
+            <p><b><i><u>xt</u></i></b></p>
+          </td>
+        </tr>
+        <tr>
+          <td>Three</td>
+          <td>Four</td>
+        </tr>
+      </tbody>
+    </table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/makeContainerInsertionPoint07-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/makeContainerInsertionPoint07-input.html b/Editor/tests/cursor/makeContainerInsertionPoint07-input.html
new file mode 100644
index 0000000..5c87b11
--- /dev/null
+++ b/Editor/tests/cursor/makeContainerInsertionPoint07-input.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_makeContainerInsertionPoint();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<table>
+  <tr>
+    <td>One</td>
+    <td><p><b><i><u>Sam[ple te]xt</u></i></b></p></td>
+  </tr>
+  <tr>
+    <td>Three</td>
+    <td>Four</td>
+  </tr>
+</table>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/nbsp01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/nbsp01-expected.html b/Editor/tests/cursor/nbsp01-expected.html
new file mode 100644
index 0000000..0421d72
--- /dev/null
+++ b/Editor/tests/cursor/nbsp01-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><p>Sample text&nbsp;[]</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/nbsp01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/nbsp01-input.html b/Editor/tests/cursor/nbsp01-input.html
new file mode 100644
index 0000000..c855459
--- /dev/null
+++ b/Editor/tests/cursor/nbsp01-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_insertCharacter(" ");
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>Sample text[]</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/nbsp02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/nbsp02-expected.html b/Editor/tests/cursor/nbsp02-expected.html
new file mode 100644
index 0000000..b629b7d
--- /dev/null
+++ b/Editor/tests/cursor/nbsp02-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><p>Sample text []</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/nbsp02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/nbsp02-input.html b/Editor/tests/cursor/nbsp02-input.html
new file mode 100644
index 0000000..4c70a52
--- /dev/null
+++ b/Editor/tests/cursor/nbsp02-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_insertCharacter(" ");
+    UndoManager_newGroup();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>Sample text[]</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/nbsp03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/nbsp03-expected.html b/Editor/tests/cursor/nbsp03-expected.html
new file mode 100644
index 0000000..8fcec03
--- /dev/null
+++ b/Editor/tests/cursor/nbsp03-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><p>Sample text a[]</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/nbsp03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/nbsp03-input.html b/Editor/tests/cursor/nbsp03-input.html
new file mode 100644
index 0000000..b8a4a1d
--- /dev/null
+++ b/Editor/tests/cursor/nbsp03-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_insertCharacter(" ");
+    Cursor_insertCharacter("a");
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>Sample text[]</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/nbsp04-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/nbsp04-expected.html b/Editor/tests/cursor/nbsp04-expected.html
new file mode 100644
index 0000000..0421d72
--- /dev/null
+++ b/Editor/tests/cursor/nbsp04-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><p>Sample text&nbsp;[]</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/nbsp04-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/nbsp04-input.html b/Editor/tests/cursor/nbsp04-input.html
new file mode 100644
index 0000000..d0218b9
--- /dev/null
+++ b/Editor/tests/cursor/nbsp04-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_insertCharacter(" ");
+    Cursor_insertCharacter("a");
+    Cursor_deleteCharacter();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>Sample text[]</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/nbsp05-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/nbsp05-expected.html b/Editor/tests/cursor/nbsp05-expected.html
new file mode 100644
index 0000000..b629b7d
--- /dev/null
+++ b/Editor/tests/cursor/nbsp05-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><p>Sample text []</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/nbsp05-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/nbsp05-input.html b/Editor/tests/cursor/nbsp05-input.html
new file mode 100644
index 0000000..00f9f41
--- /dev/null
+++ b/Editor/tests/cursor/nbsp05-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_insertCharacter(" ");
+    Cursor_insertCharacter("a");
+    Cursor_deleteCharacter();
+    UndoManager_newGroup();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>Sample text[]</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/position-br01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/position-br01-expected.html b/Editor/tests/cursor/position-br01-expected.html
new file mode 100644
index 0000000..83e1635
--- /dev/null
+++ b/Editor/tests/cursor/position-br01-expected.html
@@ -0,0 +1,23 @@
+<html>
+  <head></head>
+  <body>
+    .L.i.n.e. .1.
+    <br/>
+    .L.i.n.e. .2.
+    <br/>
+    .L.i.n.e. .3.
+    <br/>
+    .
+    <br/>
+    .
+    <br/>
+    .
+    <br/>
+    .L.i.n.e. .7.
+    <br/>
+    .L.i.n.e. .8.
+    <br/>
+    .L.i.n.e. .9.[]
+    <br/>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/position-br01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/position-br01-input.html b/Editor/tests/cursor/position-br01-input.html
new file mode 100644
index 0000000..a4a7145
--- /dev/null
+++ b/Editor/tests/cursor/position-br01-input.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    for (var i = 0; i < 45; i++) {
+        Cursor_insertCharacter(".",false,true);
+        Cursor_moveRight();
+    }
+    showSelection();
+}
+</script>
+</head>
+<body>
+[]Line 1<br>
+Line 2<br>
+Line 3<br>
+<br>
+<br>
+<br>
+Line 7<br>
+Line 8<br>
+Line 9<br>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/position-br02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/position-br02-expected.html b/Editor/tests/cursor/position-br02-expected.html
new file mode 100644
index 0000000..dacf76d
--- /dev/null
+++ b/Editor/tests/cursor/position-br02-expected.html
@@ -0,0 +1,10 @@
+<html>
+  <head></head>
+  <body>
+    <p>.</p>
+    <p>.</p>
+    <p>.</p>
+    <p>.</p>
+    <p>.[]</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/position-br02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/position-br02-input.html b/Editor/tests/cursor/position-br02-input.html
new file mode 100644
index 0000000..3e50268
--- /dev/null
+++ b/Editor/tests/cursor/position-br02-input.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    for (var i = 0; i < 5; i++) {
+        Cursor_insertCharacter(".",false,true);
+        Cursor_moveRight();
+    }
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>[]<br></p>
+<p><br></p>
+<p><br></p>
+<p><br></p>
+<p><br></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/position-br03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/position-br03-expected.html b/Editor/tests/cursor/position-br03-expected.html
new file mode 100644
index 0000000..a3cd77f
--- /dev/null
+++ b/Editor/tests/cursor/position-br03-expected.html
@@ -0,0 +1,20 @@
+<html>
+  <head></head>
+  <body>
+    <p>.L.i.n.e. .1.</p>
+    .
+    <br/>
+    <p>.L.i.n.e. .2.</p>
+    .
+    <br/>
+    <p>.L.i.n.e. .3.</p>
+    .
+    <br/>
+    <p>.L.i.n.e. .4.</p>
+    .
+    <br/>
+    <p>.L.i.n.e. .5.</p>
+    .[]
+    <br/>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/position-br03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/position-br03-input.html b/Editor/tests/cursor/position-br03-input.html
new file mode 100644
index 0000000..847e17c
--- /dev/null
+++ b/Editor/tests/cursor/position-br03-input.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    for (var i = 0; i < 40; i++) {
+        Cursor_insertCharacter(".",false,true);
+        Cursor_moveRight();
+    }
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>[]Line 1</p><br>
+<p>Line 2</p><br>
+<p>Line 3</p><br>
+<p>Line 4</p><br>
+<p>Line 5</p><br>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/position-br04-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/position-br04-expected.html b/Editor/tests/cursor/position-br04-expected.html
new file mode 100644
index 0000000..ccf0795
--- /dev/null
+++ b/Editor/tests/cursor/position-br04-expected.html
@@ -0,0 +1,28 @@
+<html>
+  <head></head>
+  <body>
+    <p>.L.i.n.e. .1.</p>
+    .
+    <br/>
+    <p>.L.i.n.e. .2.</p>
+    .
+    <br/>
+    .
+    <br/>
+    <p>.L.i.n.e. .3.</p>
+    .
+    <br/>
+    .
+    <br/>
+    <p>.L.i.n.e. .4.</p>
+    .
+    <br/>
+    .
+    <br/>
+    <p>.L.i.n.e. .5.</p>
+    .
+    <br/>
+    .[]
+    <br/>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/position-br04-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/position-br04-input.html b/Editor/tests/cursor/position-br04-input.html
new file mode 100644
index 0000000..ad5b1ad
--- /dev/null
+++ b/Editor/tests/cursor/position-br04-input.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    for (var i = 0; i < 44; i++) {
+        Cursor_insertCharacter(".",false,true);
+        Cursor_moveRight();
+    }
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>[]Line 1</p><br>
+<p>Line 2</p><br><br>
+<p>Line 3</p><br><br>
+<p>Line 4</p><br><br>
+<p>Line 5</p><br><br>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textAfterFigure01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textAfterFigure01-expected.html b/Editor/tests/cursor/textAfterFigure01-expected.html
new file mode 100644
index 0000000..19deea7
--- /dev/null
+++ b/Editor/tests/cursor/textAfterFigure01-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <figure><img src="../figures/nothing.png"/></figure>
+    <p>X[]</p>
+    <p>one two three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textAfterFigure01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textAfterFigure01-input.html b/Editor/tests/cursor/textAfterFigure01-input.html
new file mode 100644
index 0000000..94f51cd
--- /dev/null
+++ b/Editor/tests/cursor/textAfterFigure01-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_insertCharacter("X");
+    showSelection();
+}
+</script>
+</head>
+<body>
+<figure>
+  <img src="../figures/nothing.png">
+</figure>[]
+<p>one two three</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textAfterFigure02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textAfterFigure02-expected.html b/Editor/tests/cursor/textAfterFigure02-expected.html
new file mode 100644
index 0000000..47a6df3
--- /dev/null
+++ b/Editor/tests/cursor/textAfterFigure02-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <figure><img src="../figures/nothing.png"/></figure>
+    <p>aX[]</p>
+    <p>one two three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textAfterFigure02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textAfterFigure02-input.html b/Editor/tests/cursor/textAfterFigure02-input.html
new file mode 100644
index 0000000..2dd1105
--- /dev/null
+++ b/Editor/tests/cursor/textAfterFigure02-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_insertCharacter("X");
+    showSelection();
+}
+</script>
+</head>
+<body>
+<figure>
+  <img src="../figures/nothing.png">
+</figure>a[]
+<p>one two three</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textAfterFigure03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textAfterFigure03-expected.html b/Editor/tests/cursor/textAfterFigure03-expected.html
new file mode 100644
index 0000000..4da2c29
--- /dev/null
+++ b/Editor/tests/cursor/textAfterFigure03-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <figure><img src="../figures/nothing.png"/></figure>
+    <p>X[]a</p>
+    <p>one two three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textAfterFigure03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textAfterFigure03-input.html b/Editor/tests/cursor/textAfterFigure03-input.html
new file mode 100644
index 0000000..cec8ad3
--- /dev/null
+++ b/Editor/tests/cursor/textAfterFigure03-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_insertCharacter("X");
+    showSelection();
+}
+</script>
+</head>
+<body>
+<figure>
+  <img src="../figures/nothing.png">
+</figure>[]a
+<p>one two three</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textAfterTable01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textAfterTable01-expected.html b/Editor/tests/cursor/textAfterTable01-expected.html
new file mode 100644
index 0000000..85d005a
--- /dev/null
+++ b/Editor/tests/cursor/textAfterTable01-expected.html
@@ -0,0 +1,19 @@
+<html>
+  <head></head>
+  <body>
+    <table>
+      <tbody>
+        <tr>
+          <td>Cell</td>
+          <td>Cell</td>
+        </tr>
+        <tr>
+          <td>Cell</td>
+          <td>Cell</td>
+        </tr>
+      </tbody>
+    </table>
+    <p>X[]</p>
+    <p>one two three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textAfterTable01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textAfterTable01-input.html b/Editor/tests/cursor/textAfterTable01-input.html
new file mode 100644
index 0000000..680af18
--- /dev/null
+++ b/Editor/tests/cursor/textAfterTable01-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_insertCharacter("X");
+    showSelection();
+}
+</script>
+</head>
+<body>
+<table>
+  <tr>
+    <td>Cell</td>
+    <td>Cell</td>
+  </tr>
+  <tr>
+    <td>Cell</td>
+    <td>Cell</td>
+  </tr>
+</table>[]
+<p>one two three</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textAfterTable02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textAfterTable02-expected.html b/Editor/tests/cursor/textAfterTable02-expected.html
new file mode 100644
index 0000000..0fb0003
--- /dev/null
+++ b/Editor/tests/cursor/textAfterTable02-expected.html
@@ -0,0 +1,19 @@
+<html>
+  <head></head>
+  <body>
+    <table>
+      <tbody>
+        <tr>
+          <td>Cell</td>
+          <td>Cell</td>
+        </tr>
+        <tr>
+          <td>Cell</td>
+          <td>Cell</td>
+        </tr>
+      </tbody>
+    </table>
+    <p>aX[]</p>
+    <p>one two three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textAfterTable02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textAfterTable02-input.html b/Editor/tests/cursor/textAfterTable02-input.html
new file mode 100644
index 0000000..acddf8c
--- /dev/null
+++ b/Editor/tests/cursor/textAfterTable02-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_insertCharacter("X");
+    showSelection();
+}
+</script>
+</head>
+<body>
+<table>
+  <tr>
+    <td>Cell</td>
+    <td>Cell</td>
+  </tr>
+  <tr>
+    <td>Cell</td>
+    <td>Cell</td>
+  </tr>
+</table>a[]
+<p>one two three</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textAfterTable03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textAfterTable03-expected.html b/Editor/tests/cursor/textAfterTable03-expected.html
new file mode 100644
index 0000000..cf2c37c
--- /dev/null
+++ b/Editor/tests/cursor/textAfterTable03-expected.html
@@ -0,0 +1,19 @@
+<html>
+  <head></head>
+  <body>
+    <table>
+      <tbody>
+        <tr>
+          <td>Cell</td>
+          <td>Cell</td>
+        </tr>
+        <tr>
+          <td>Cell</td>
+          <td>Cell</td>
+        </tr>
+      </tbody>
+    </table>
+    <p>X[]a</p>
+    <p>one two three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textAfterTable03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textAfterTable03-input.html b/Editor/tests/cursor/textAfterTable03-input.html
new file mode 100644
index 0000000..45aacd6
--- /dev/null
+++ b/Editor/tests/cursor/textAfterTable03-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_insertCharacter("X");
+    showSelection();
+}
+</script>
+</head>
+<body>
+<table>
+  <tr>
+    <td>Cell</td>
+    <td>Cell</td>
+  </tr>
+  <tr>
+    <td>Cell</td>
+    <td>Cell</td>
+  </tr>
+</table>[]a
+<p>one two three</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textBeforeFigure01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textBeforeFigure01-expected.html b/Editor/tests/cursor/textBeforeFigure01-expected.html
new file mode 100644
index 0000000..b264b98
--- /dev/null
+++ b/Editor/tests/cursor/textBeforeFigure01-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <p>one two three</p>
+    <p>X[]</p>
+    <figure><img src="../figures/nothing.png"/></figure>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textBeforeFigure01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textBeforeFigure01-input.html b/Editor/tests/cursor/textBeforeFigure01-input.html
new file mode 100644
index 0000000..497d51d
--- /dev/null
+++ b/Editor/tests/cursor/textBeforeFigure01-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_insertCharacter("X");
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>one two three</p>
+[]<figure>
+  <img src="../figures/nothing.png">
+</figure>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textBeforeFigure02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textBeforeFigure02-expected.html b/Editor/tests/cursor/textBeforeFigure02-expected.html
new file mode 100644
index 0000000..7fcff8f
--- /dev/null
+++ b/Editor/tests/cursor/textBeforeFigure02-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <p>one two three</p>
+    <p>aX[]</p>
+    <figure><img src="../figures/nothing.png"/></figure>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textBeforeFigure02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textBeforeFigure02-input.html b/Editor/tests/cursor/textBeforeFigure02-input.html
new file mode 100644
index 0000000..481b99f
--- /dev/null
+++ b/Editor/tests/cursor/textBeforeFigure02-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_insertCharacter("X");
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>one two three</p>
+a[]<figure>
+  <img src="../figures/nothing.png">
+</figure>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textBeforeFigure03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textBeforeFigure03-expected.html b/Editor/tests/cursor/textBeforeFigure03-expected.html
new file mode 100644
index 0000000..8947896
--- /dev/null
+++ b/Editor/tests/cursor/textBeforeFigure03-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <p>one two three</p>
+    <p>X[]a</p>
+    <figure><img src="../figures/nothing.png"/></figure>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textBeforeFigure03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textBeforeFigure03-input.html b/Editor/tests/cursor/textBeforeFigure03-input.html
new file mode 100644
index 0000000..9489405
--- /dev/null
+++ b/Editor/tests/cursor/textBeforeFigure03-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_insertCharacter("X");
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>one two three</p>
+[]a<figure>
+  <img src="../figures/nothing.png">
+</figure>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textBeforeTable01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textBeforeTable01-expected.html b/Editor/tests/cursor/textBeforeTable01-expected.html
new file mode 100644
index 0000000..240c213
--- /dev/null
+++ b/Editor/tests/cursor/textBeforeTable01-expected.html
@@ -0,0 +1,19 @@
+<html>
+  <head></head>
+  <body>
+    <p>one two three</p>
+    <p>X[]</p>
+    <table>
+      <tbody>
+        <tr>
+          <td>Cell</td>
+          <td>Cell</td>
+        </tr>
+        <tr>
+          <td>Cell</td>
+          <td>Cell</td>
+        </tr>
+      </tbody>
+    </table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textBeforeTable01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textBeforeTable01-input.html b/Editor/tests/cursor/textBeforeTable01-input.html
new file mode 100644
index 0000000..6123d87
--- /dev/null
+++ b/Editor/tests/cursor/textBeforeTable01-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_insertCharacter("X");
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>one two three</p>
+[]<table>
+  <tr>
+    <td>Cell</td>
+    <td>Cell</td>
+  </tr>
+  <tr>
+    <td>Cell</td>
+    <td>Cell</td>
+  </tr>
+</table>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textBeforeTable02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textBeforeTable02-expected.html b/Editor/tests/cursor/textBeforeTable02-expected.html
new file mode 100644
index 0000000..0ba5dd0
--- /dev/null
+++ b/Editor/tests/cursor/textBeforeTable02-expected.html
@@ -0,0 +1,19 @@
+<html>
+  <head></head>
+  <body>
+    <p>one two three</p>
+    <p>aX[]</p>
+    <table>
+      <tbody>
+        <tr>
+          <td>Cell</td>
+          <td>Cell</td>
+        </tr>
+        <tr>
+          <td>Cell</td>
+          <td>Cell</td>
+        </tr>
+      </tbody>
+    </table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textBeforeTable02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textBeforeTable02-input.html b/Editor/tests/cursor/textBeforeTable02-input.html
new file mode 100644
index 0000000..f8fcf12
--- /dev/null
+++ b/Editor/tests/cursor/textBeforeTable02-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_insertCharacter("X");
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>one two three</p>
+a[]<table>
+  <tr>
+    <td>Cell</td>
+    <td>Cell</td>
+  </tr>
+  <tr>
+    <td>Cell</td>
+    <td>Cell</td>
+  </tr>
+</table>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textBeforeTable03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textBeforeTable03-expected.html b/Editor/tests/cursor/textBeforeTable03-expected.html
new file mode 100644
index 0000000..36a0f77
--- /dev/null
+++ b/Editor/tests/cursor/textBeforeTable03-expected.html
@@ -0,0 +1,19 @@
+<html>
+  <head></head>
+  <body>
+    <p>one two three</p>
+    <p>X[]a</p>
+    <table>
+      <tbody>
+        <tr>
+          <td>Cell</td>
+          <td>Cell</td>
+        </tr>
+        <tr>
+          <td>Cell</td>
+          <td>Cell</td>
+        </tr>
+      </tbody>
+    </table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/cursor/textBeforeTable03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/cursor/textBeforeTable03-input.html b/Editor/tests/cursor/textBeforeTable03-input.html
new file mode 100644
index 0000000..f1193b1
--- /dev/null
+++ b/Editor/tests/cursor/textBeforeTable03-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_insertCharacter("X");
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>one two three</p>
+[]a<table>
+  <tr>
+    <td>Cell</td>
+    <td>Cell</td>
+  </tr>
+  <tr>
+    <td>Cell</td>
+    <td>Cell</td>
+  </tr>
+</table>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/Position_next-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/Position_next-expected.html b/Editor/tests/dom/Position_next-expected.html
new file mode 100644
index 0000000..e960157
--- /dev/null
+++ b/Editor/tests/dom/Position_next-expected.html
@@ -0,0 +1,9 @@
+<html>
+  <head>
+  </head>
+  <body>
+    allPositions.length = 84
+    <br/>
+    Test results: total 84, pass 84, fail 0
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/Position_next-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/Position_next-input.html b/Editor/tests/dom/Position_next-input.html
new file mode 100644
index 0000000..7884c75
--- /dev/null
+++ b/Editor/tests/dom/Position_next-input.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="RangeTest.js"></script>
+<script>
+
+function arraysEqual(a,b)
+{
+    if (a.length != b.length)
+        return false;
+
+    for (var i = 0; i < a.length; i++) {
+        if (a[i] != b[i])
+            return false;
+    }
+
+    return true;
+}
+
+function performTest()
+{
+    var root = document.body;
+    removeWhitespaceTextNodes(root);
+    setup(root);
+
+    var total = 0;
+    var pass = 0;
+    var fail = 0;
+    for (var index = 0; index < allPositions.length; index++) {
+        var pos = allPositions[index];
+
+        total++;
+
+        var actual = Position_next(pos);
+        var expected = allPositions[index+1];
+
+        if (comparePositions(actual,expected))
+            pass++;
+        else {
+            debug("fail: "+actual+" and "+expected+" (index "+index+")");
+            fail++;
+        }
+    }
+
+    var message1 = "allPositions.length = "+allPositions.length;
+    var message2 = "Test results: total "+total+", pass "+pass+", fail "+fail;
+    DOM_deleteAllChildren(document.body);
+    DOM_appendChild(document.body,DOM_createTextNode(document,message1));
+    DOM_appendChild(document.body,DOM_createElement(document,"BR"));
+    DOM_appendChild(document.body,DOM_createTextNode(document,message2));
+
+    function comparePositions(a,b)
+    {
+        if ((a == null) && (b == null))
+            return true;
+        if ((a != null) && (b != null) &&
+            (a.node == b.node) && (a.offset == b.offset))
+            return true;
+        return false;
+    }
+}
+</script>
+</head>
+<body>
+
+<div style="display: none">
+    <div>
+        <div>
+            <div></div>
+            <div></div>
+            <div></div>
+        </div>
+        <div>
+            <div></div>
+            <div></div>
+            <div></div>
+        </div>
+        <div>
+            <div>One</div>
+            <div>Two</div>
+            <div></div>
+        </div>
+    </div>
+    <div>
+        <div>ONE</div>
+        <div>TWO</div>
+        <div>THREE</div>
+    </div>
+    <div>
+        <div>
+            <div></div>
+            <div></div>
+            <div></div>
+        </div>
+        <div>
+            <div></div>
+            <div></div>
+        </div>
+        <div>
+            <div></div>
+        </div>
+    </div>
+</div>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/Position_prev-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/Position_prev-expected.html b/Editor/tests/dom/Position_prev-expected.html
new file mode 100644
index 0000000..e960157
--- /dev/null
+++ b/Editor/tests/dom/Position_prev-expected.html
@@ -0,0 +1,9 @@
+<html>
+  <head>
+  </head>
+  <body>
+    allPositions.length = 84
+    <br/>
+    Test results: total 84, pass 84, fail 0
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/Position_prev-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/Position_prev-input.html b/Editor/tests/dom/Position_prev-input.html
new file mode 100644
index 0000000..010737a
--- /dev/null
+++ b/Editor/tests/dom/Position_prev-input.html
@@ -0,0 +1,104 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="RangeTest.js"></script>
+<script>
+
+function arraysEqual(a,b)
+{
+    if (a.length != b.length)
+        return false;
+
+    for (var i = 0; i < a.length; i++) {
+        if (a[i] != b[i])
+            return false;
+    }
+
+    return true;
+}
+
+function performTest()
+{
+    var root = document.body;
+    removeWhitespaceTextNodes(root);
+    setup(root);
+
+    var total = 0;
+    var pass = 0;
+    var fail = 0;
+    for (var index = 0; index < allPositions.length; index++) {
+        var pos = allPositions[index];
+
+        total++;
+
+        var actual = Position_prev(pos);
+        var expected = allPositions[index-1];
+
+        if (comparePositions(actual,expected))
+            pass++;
+        else
+            fail++;
+    }
+
+    var message1 = "allPositions.length = "+allPositions.length;
+    var message2 = "Test results: total "+total+", pass "+pass+", fail "+fail;
+    DOM_deleteAllChildren(document.body);
+    DOM_appendChild(document.body,DOM_createTextNode(document,message1));
+    DOM_appendChild(document.body,DOM_createElement(document,"BR"));
+    DOM_appendChild(document.body,DOM_createTextNode(document,message2));
+
+    function comparePositions(a,b)
+    {
+        if ((a == null) && (b == null))
+            return true;
+        if ((a != null) && (b != null) &&
+            (a.node == b.node) && (a.offset == b.offset))
+            return true;
+        return false;
+    }
+}
+</script>
+</head>
+<body>
+
+<div style="display: none">
+    <div>
+        <div>
+            <div></div>
+            <div></div>
+            <div></div>
+        </div>
+        <div>
+            <div></div>
+            <div></div>
+            <div></div>
+        </div>
+        <div>
+            <div>One</div>
+            <div>Two</div>
+            <div></div>
+        </div>
+    </div>
+    <div>
+        <div>ONE</div>
+        <div>TWO</div>
+        <div>THREE</div>
+    </div>
+    <div>
+        <div>
+            <div></div>
+            <div></div>
+            <div></div>
+        </div>
+        <div>
+            <div></div>
+            <div></div>
+        </div>
+        <div>
+            <div></div>
+        </div>
+    </div>
+</div>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/RangeTest.js
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/RangeTest.js b/Editor/tests/dom/RangeTest.js
new file mode 100644
index 0000000..b182f63
--- /dev/null
+++ b/Editor/tests/dom/RangeTest.js
@@ -0,0 +1,179 @@
+// Copyright 2011-2014 UX Productivity Pty Ltd
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+var allPositions;
+var allPositionsIndexMap;
+
+function positionKey(pos)
+{
+    return pos.node._nodeId+","+pos.offset;
+}
+
+function removeWhitespaceTextNodes(parent)
+{
+    var next;
+    for (var child = parent.firstChild; child != null; child = next) {
+        next = child.nextSibling;
+        if (isWhitespaceTextNode(child) || (child.nodeType == Node.COMMENT_NODE))
+            DOM_deleteNode(child);
+        else
+            removeWhitespaceTextNodes(child);
+    }
+}
+
+function setup(root)
+{
+    allPositions = getAllPositions(root);
+
+    allPositionsIndexMap = new Object();
+    for (var i = 0; i < allPositions.length; i++) {
+        var pos = allPositions[i];
+        allPositionsIndexMap[positionKey(pos)] = i;
+    }
+}
+
+function comparePositionsBeforeAndAfter(fun)
+{
+    var messages = new Array();
+    var positions = getAllPositions(document.body);
+    var positionStrings = new Array();
+    for (var i = 0; i < positions.length; i++) {
+        messages.push("Before: positions["+i+"] = "+positions[i]);
+        positionStrings[i] = positions[i].toString();
+    }
+
+    Position_trackWhileExecuting(positions,function() {
+        fun();
+
+    });
+
+    messages.push("");
+    for (var i = 0; i < positions.length; i++) {
+        if (positionStrings[i] != positions[i].toString())
+            messages.push("After: positions["+i+"] = "+positions[i]+" - changed from "+
+                          positionStrings[i]);
+        else
+            messages.push("After: positions["+i+"] = "+positions[i]);
+    }
+
+    return messages.join("\n");
+}
+
+function getAllPositions(root)
+{
+    var includeEmptyElements = true;
+
+    var positions = new Array();
+    var rootOffset = DOM_nodeOffset(root);
+//    positions.push(new Position(root.parentNode,rootOffset));
+    recurse(root);
+//    positions.push(new Position(root.parentNode,rootOffset+1));
+    return positions;
+
+    function recurse(node)
+    {
+        if (node.nodeType == Node.TEXT_NODE) {
+            for (var offset = 0; offset <= node.nodeValue.length; offset++)
+                positions.push(new Position(node,offset));
+        }
+        else if ((node.nodeType == Node.ELEMENT_NODE) &&
+                 (node.firstChild != null) || includeEmptyElements) {
+            var offset = 0;
+            for (var child = node.firstChild; child != null; child = child.nextSibling) {
+                positions.push(new Position(node,offset));
+                recurse(child);
+                offset++;
+            }
+            positions.push(new Position(node,offset));
+        }
+    }
+}
+
+function getPositionIndex(pos)
+{
+    var result = allPositionsIndexMap[pos.node._nodeId+","+pos.offset];
+    if (result == null)
+        throw new Error(pos+": no index for position");
+    return result;
+}
+
+function isForwardsSimple(range)
+{
+    var startIndex = getPositionIndex(range.start);
+    var endIndex = getPositionIndex(range.end);
+//    debug("startIndex = "+indices.startIndex+", endIndex = "+indices.endIndex);
+    return (endIndex >= startIndex);
+}
+
+function getOutermostNodesSimple(range)
+{
+    if (!isForwardsSimple(range)) {
+        var reverse = new Range(range.end.node,range.end.offset,
+                                range.start.node,range.start.offset);
+        if (!Range_isForwards(reverse)) {
+            var startIndex = getPositionIndex(range.start);
+            var endIndex = getPositionIndex(range.end);
+            debug("startIndex = "+startIndex+", endIndex = "+endIndex);
+            throw new Error("Both range "+range+" and its reverse are not forwards");
+        }
+        return getOutermostNodesSimple(reverse);
+    }
+
+    var startIndex = getPositionIndex(range.start);
+    var endIndex = getPositionIndex(range.end);
+    var havePositions = new Object();
+
+    var allArray = new Array();
+    var allSet = new NodeSet();
+
+    for (var i = startIndex; i <= endIndex; i++) {
+        var pos = allPositions[i];
+
+        if ((pos.node.nodeType == Node.TEXT_NODE) && (i < endIndex)) {
+            allArray.push(pos.node);
+            allSet.add(pos.node);
+        }
+        else if (pos.node.nodeType == Node.ELEMENT_NODE) {
+            var prev = new Position(pos.node,pos.offset-1);
+            if (havePositions[positionKey(prev)]) {
+                var target = pos.node.childNodes[pos.offset-1];
+                allArray.push(target);
+                allSet.add(target);
+            }
+            havePositions[positionKey(pos)] = true;
+        }
+
+    }
+
+    var outermostArray = new Array();
+    var outermostSet = new NodeSet();
+
+    allArray.forEach(function (node) {
+        if (!outermostSet.contains(node) && !setContainsAncestor(allSet,node)) {
+            outermostArray.push(node);
+            outermostSet.add(node);
+        }
+    });
+
+    return outermostArray;
+
+    function setContainsAncestor(set,node)
+    {
+        for (var ancestor = node.parentNode; ancestor != null; ancestor = ancestor.parentNode) {
+            if (set.contains(ancestor))
+                return true;
+        }
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/Range_getOutermostNodes-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/Range_getOutermostNodes-expected.html b/Editor/tests/dom/Range_getOutermostNodes-expected.html
new file mode 100644
index 0000000..a4a0331
--- /dev/null
+++ b/Editor/tests/dom/Range_getOutermostNodes-expected.html
@@ -0,0 +1,9 @@
+<html>
+  <head>
+  </head>
+  <body>
+    allPositions.length = 82
+    <br/>
+    Test results: total 6724, pass 6724, fail 0
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/Range_getOutermostNodes-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/Range_getOutermostNodes-input.html b/Editor/tests/dom/Range_getOutermostNodes-input.html
new file mode 100644
index 0000000..6518538
--- /dev/null
+++ b/Editor/tests/dom/Range_getOutermostNodes-input.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="RangeTest.js"></script>
+<script>
+
+function arraysEqual(a,b)
+{
+    if (a.length != b.length)
+        return false;
+
+    for (var i = 0; i < a.length; i++) {
+        if (a[i] != b[i])
+            return false;
+    }
+
+    return true;
+}
+
+function performTest()
+{
+    var root = document.getElementById("root");
+    removeWhitespaceTextNodes(root);
+    setup(root);
+
+    var total = 0;
+    var pass = 0;
+    var fail = 0;
+    for (var startIndex = 0; startIndex < allPositions.length; startIndex++) {
+        for (var endIndex = 0; endIndex < allPositions.length; endIndex++) {
+            var start = allPositions[startIndex];
+            var end = allPositions[endIndex];
+            var range = new Range(start.node,start.offset,end.node,end.offset);
+
+            total++;
+
+            var actual = Range_getOutermostNodes(range);
+            var expected = getOutermostNodesSimple(range);
+            if (arraysEqual(actual,expected))
+                pass++;
+            else
+                fail++;
+        }
+    }
+
+    var message1 = "allPositions.length = "+allPositions.length;
+    var message2 = "Test results: total "+total+", pass "+pass+", fail "+fail;
+    DOM_deleteAllChildren(document.body);
+    DOM_appendChild(document.body,DOM_createTextNode(document,message1));
+    DOM_appendChild(document.body,DOM_createElement(document,"BR"));
+    DOM_appendChild(document.body,DOM_createTextNode(document,message2));
+}
+</script>
+</head>
+<body>
+
+<div id="root" style="display: none">
+    <div>
+        <div>
+            <div></div>
+            <div></div>
+            <div></div>
+        </div>
+        <div>
+            <div></div>
+            <div></div>
+            <div></div>
+        </div>
+        <div>
+            <div>One</div>
+            <div>Two</div>
+            <div></div>
+        </div>
+    </div>
+    <div>
+        <div>ONE</div>
+        <div>TWO</div>
+        <div>THREE</div>
+    </div>
+    <div>
+        <div>
+            <div></div>
+            <div></div>
+            <div></div>
+        </div>
+        <div>
+            <div></div>
+            <div></div>
+        </div>
+        <div>
+            <div></div>
+        </div>
+    </div>
+</div>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/Range_isForward-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/Range_isForward-expected.html b/Editor/tests/dom/Range_isForward-expected.html
new file mode 100644
index 0000000..a4a0331
--- /dev/null
+++ b/Editor/tests/dom/Range_isForward-expected.html
@@ -0,0 +1,9 @@
+<html>
+  <head>
+  </head>
+  <body>
+    allPositions.length = 82
+    <br/>
+    Test results: total 6724, pass 6724, fail 0
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/Range_isForward-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/Range_isForward-input.html b/Editor/tests/dom/Range_isForward-input.html
new file mode 100644
index 0000000..d301a25
--- /dev/null
+++ b/Editor/tests/dom/Range_isForward-input.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="RangeTest.js"></script>
+<script>
+
+function arraysEqual(a,b)
+{
+    if (a.length != b.length)
+        return false;
+
+    for (var i = 0; i < a.length; i++) {
+        if (a[i] != b[i])
+            return false;
+    }
+
+    return true;
+}
+
+function performTest()
+{
+    var root = document.getElementById("root");
+    removeWhitespaceTextNodes(root);
+    setup(root);
+
+    var total = 0;
+    var pass = 0;
+    var fail = 0;
+    for (var startIndex = 0; startIndex < allPositions.length; startIndex++) {
+        for (var endIndex = 0; endIndex < allPositions.length; endIndex++) {
+            var start = allPositions[startIndex];
+            var end = allPositions[endIndex];
+            var range = new Range(start.node,start.offset,end.node,end.offset);
+
+            total++;
+
+            var actual = Range_isForwards(range);
+            var expected = isForwardsSimple(range);
+            if (actual == expected)
+                pass++;
+            else
+                fail++;
+        }
+    }
+
+    var message1 = "allPositions.length = "+allPositions.length;
+    var message2 = "Test results: total "+total+", pass "+pass+", fail "+fail;
+    DOM_deleteAllChildren(document.body);
+    DOM_appendChild(document.body,DOM_createTextNode(document,message1));
+    DOM_appendChild(document.body,DOM_createElement(document,"BR"));
+    DOM_appendChild(document.body,DOM_createTextNode(document,message2));
+}
+</script>
+</head>
+<body>
+
+<div id="root" style="display: none">
+    <div>
+        <div>
+            <div></div>
+            <div></div>
+            <div></div>
+        </div>
+        <div>
+            <div></div>
+            <div></div>
+            <div></div>
+        </div>
+        <div>
+            <div>One</div>
+            <div>Two</div>
+            <div></div>
+        </div>
+    </div>
+    <div>
+        <div>ONE</div>
+        <div>TWO</div>
+        <div>THREE</div>
+    </div>
+    <div>
+        <div>
+            <div></div>
+            <div></div>
+            <div></div>
+        </div>
+        <div>
+            <div></div>
+            <div></div>
+        </div>
+        <div>
+            <div></div>
+        </div>
+    </div>
+</div>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/avoidInline01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/avoidInline01-expected.html b/Editor/tests/dom/avoidInline01-expected.html
new file mode 100644
index 0000000..85d14c3
--- /dev/null
+++ b/Editor/tests/dom/avoidInline01-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><p>One</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/avoidInline01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/avoidInline01-input.html b/Editor/tests/dom/avoidInline01-input.html
new file mode 100644
index 0000000..2918fa6
--- /dev/null
+++ b/Editor/tests/dom/avoidInline01-input.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Hierarchy_avoidInlineChildren(document.body);
+}
+</script>
+</head>
+<body>
+One
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/avoidInline02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/avoidInline02-expected.html b/Editor/tests/dom/avoidInline02-expected.html
new file mode 100644
index 0000000..f2b0ceb
--- /dev/null
+++ b/Editor/tests/dom/avoidInline02-expected.html
@@ -0,0 +1,7 @@
+<html>
+  <head></head>
+  <body>
+    <p>One</p>
+    <p>Two</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/avoidInline02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/avoidInline02-input.html b/Editor/tests/dom/avoidInline02-input.html
new file mode 100644
index 0000000..d73d41b
--- /dev/null
+++ b/Editor/tests/dom/avoidInline02-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Hierarchy_avoidInlineChildren(document.body);
+}
+</script>
+</head>
+<body>
+One
+<p>Two</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/avoidInline03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/avoidInline03-expected.html b/Editor/tests/dom/avoidInline03-expected.html
new file mode 100644
index 0000000..f2b0ceb
--- /dev/null
+++ b/Editor/tests/dom/avoidInline03-expected.html
@@ -0,0 +1,7 @@
+<html>
+  <head></head>
+  <body>
+    <p>One</p>
+    <p>Two</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/avoidInline03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/avoidInline03-input.html b/Editor/tests/dom/avoidInline03-input.html
new file mode 100644
index 0000000..3ed1274
--- /dev/null
+++ b/Editor/tests/dom/avoidInline03-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Hierarchy_avoidInlineChildren(document.body);
+}
+</script>
+</head>
+<body>
+<p>One</p>
+Two
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/avoidInline04-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/avoidInline04-expected.html b/Editor/tests/dom/avoidInline04-expected.html
new file mode 100644
index 0000000..0efffd4
--- /dev/null
+++ b/Editor/tests/dom/avoidInline04-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <p>One</p>
+    <p>Two</p>
+    <p>Three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/avoidInline04-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/avoidInline04-input.html b/Editor/tests/dom/avoidInline04-input.html
new file mode 100644
index 0000000..2610418
--- /dev/null
+++ b/Editor/tests/dom/avoidInline04-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Hierarchy_avoidInlineChildren(document.body);
+}
+</script>
+</head>
+<body>
+One
+<p>Two</p>
+Three
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/avoidInline05-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/avoidInline05-expected.html b/Editor/tests/dom/avoidInline05-expected.html
new file mode 100644
index 0000000..0efffd4
--- /dev/null
+++ b/Editor/tests/dom/avoidInline05-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <p>One</p>
+    <p>Two</p>
+    <p>Three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/avoidInline05-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/avoidInline05-input.html b/Editor/tests/dom/avoidInline05-input.html
new file mode 100644
index 0000000..cd8f440
--- /dev/null
+++ b/Editor/tests/dom/avoidInline05-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Hierarchy_avoidInlineChildren(document.body);
+}
+</script>
+</head>
+<body>
+<p>One</p>
+Two
+<p>Three</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/avoidInline06-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/avoidInline06-expected.html b/Editor/tests/dom/avoidInline06-expected.html
new file mode 100644
index 0000000..5963095
--- /dev/null
+++ b/Editor/tests/dom/avoidInline06-expected.html
@@ -0,0 +1,10 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>Two</b>
+      Three
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/avoidInline06-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/avoidInline06-input.html b/Editor/tests/dom/avoidInline06-input.html
new file mode 100644
index 0000000..fff9662
--- /dev/null
+++ b/Editor/tests/dom/avoidInline06-input.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Hierarchy_avoidInlineChildren(document.body);
+}
+</script>
+</head>
+<body>
+One <b>Two</b> Three
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/avoidInline07-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/avoidInline07-expected.html b/Editor/tests/dom/avoidInline07-expected.html
new file mode 100644
index 0000000..c81cb00
--- /dev/null
+++ b/Editor/tests/dom/avoidInline07-expected.html
@@ -0,0 +1,16 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>Two</b>
+      Three
+    </p>
+    <p>Test</p>
+    <p>
+      Four
+      <b>Five</b>
+      Six
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/avoidInline07-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/avoidInline07-input.html b/Editor/tests/dom/avoidInline07-input.html
new file mode 100644
index 0000000..2b0ffb6
--- /dev/null
+++ b/Editor/tests/dom/avoidInline07-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Hierarchy_avoidInlineChildren(document.body);
+}
+</script>
+</head>
+<body>
+One <b>Two</b> Three
+<p>Test</p>
+Four <b>Five</b> Six
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/avoidInline08-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/avoidInline08-expected.html b/Editor/tests/dom/avoidInline08-expected.html
new file mode 100644
index 0000000..6d06b64
--- /dev/null
+++ b/Editor/tests/dom/avoidInline08-expected.html
@@ -0,0 +1,18 @@
+<html>
+  <head></head>
+  <body>
+    <p>Test 1</p>
+    <p>
+      One
+      <b>Two</b>
+      Three
+    </p>
+    <p>Test 2</p>
+    <p>
+      Four
+      <b>Five</b>
+      Six
+    </p>
+    <p>Test 3</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/avoidInline08-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/avoidInline08-input.html b/Editor/tests/dom/avoidInline08-input.html
new file mode 100644
index 0000000..ab28de1
--- /dev/null
+++ b/Editor/tests/dom/avoidInline08-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Hierarchy_avoidInlineChildren(document.body);
+}
+</script>
+</head>
+<body>
+<p>Test 1</p>
+One <b>Two</b> Three
+<p>Test 2</p>
+Four <b>Five</b> Six
+<p>Test 3</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph01-expected.html b/Editor/tests/dom/ensureInlineNodesInParagraph01-expected.html
new file mode 100644
index 0000000..430934e
--- /dev/null
+++ b/Editor/tests/dom/ensureInlineNodesInParagraph01-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><p>Test</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph01-input.html b/Editor/tests/dom/ensureInlineNodesInParagraph01-input.html
new file mode 100644
index 0000000..9660b9d
--- /dev/null
+++ b/Editor/tests/dom/ensureInlineNodesInParagraph01-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+   Hierarchy_ensureInlineNodesInParagraph(document.body.firstChild,true);
+}
+</script>
+</head>
+<body>
+
+Test
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph02-expected.html b/Editor/tests/dom/ensureInlineNodesInParagraph02-expected.html
new file mode 100644
index 0000000..836c9a5
--- /dev/null
+++ b/Editor/tests/dom/ensureInlineNodesInParagraph02-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      <br/>
+      One
+      <br/>
+      Two
+      <br/>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph02-input.html b/Editor/tests/dom/ensureInlineNodesInParagraph02-input.html
new file mode 100644
index 0000000..b46f632
--- /dev/null
+++ b/Editor/tests/dom/ensureInlineNodesInParagraph02-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+   var br = document.getElementsByTagName("BR")[0];
+   Hierarchy_ensureInlineNodesInParagraph(br,true);
+}
+</script>
+</head>
+<body>
+
+<br>
+One
+<br>
+Two
+<br>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph03-expected.html b/Editor/tests/dom/ensureInlineNodesInParagraph03-expected.html
new file mode 100644
index 0000000..836c9a5
--- /dev/null
+++ b/Editor/tests/dom/ensureInlineNodesInParagraph03-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      <br/>
+      One
+      <br/>
+      Two
+      <br/>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph03-input.html b/Editor/tests/dom/ensureInlineNodesInParagraph03-input.html
new file mode 100644
index 0000000..aaeacf0
--- /dev/null
+++ b/Editor/tests/dom/ensureInlineNodesInParagraph03-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+   var br = document.getElementsByTagName("BR")[1];
+   Hierarchy_ensureInlineNodesInParagraph(br,true);
+}
+</script>
+</head>
+<body>
+
+<br>
+One
+<br>
+Two
+<br>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph04-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph04-expected.html b/Editor/tests/dom/ensureInlineNodesInParagraph04-expected.html
new file mode 100644
index 0000000..836c9a5
--- /dev/null
+++ b/Editor/tests/dom/ensureInlineNodesInParagraph04-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      <br/>
+      One
+      <br/>
+      Two
+      <br/>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph04-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph04-input.html b/Editor/tests/dom/ensureInlineNodesInParagraph04-input.html
new file mode 100644
index 0000000..584b550
--- /dev/null
+++ b/Editor/tests/dom/ensureInlineNodesInParagraph04-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+   var br = document.getElementsByTagName("BR")[2];
+   Hierarchy_ensureInlineNodesInParagraph(br,true);
+}
+</script>
+</head>
+<body>
+
+<br>
+One
+<br>
+Two
+<br>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph05-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph05-expected.html b/Editor/tests/dom/ensureInlineNodesInParagraph05-expected.html
new file mode 100644
index 0000000..a88c020
--- /dev/null
+++ b/Editor/tests/dom/ensureInlineNodesInParagraph05-expected.html
@@ -0,0 +1,20 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      <br/>
+      One
+      <br id="first"/>
+      Two
+      <br/>
+    </p>
+    <p>Explicit paragraph</p>
+    <p>
+      <br/>
+      Three
+      <br id="second"/>
+      Four
+      <br/>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph05-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph05-input.html b/Editor/tests/dom/ensureInlineNodesInParagraph05-input.html
new file mode 100644
index 0000000..920df14
--- /dev/null
+++ b/Editor/tests/dom/ensureInlineNodesInParagraph05-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 id="first">
+Two
+<br>
+
+<p>Explicit paragraph</p>
+
+<br>
+Three
+<br id="second">
+Four
+<br>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph06-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph06-expected.html b/Editor/tests/dom/ensureInlineNodesInParagraph06-expected.html
new file mode 100644
index 0000000..b59738c
--- /dev/null
+++ b/Editor/tests/dom/ensureInlineNodesInParagraph06-expected.html
@@ -0,0 +1,20 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      <br id="first"/>
+      One
+      <br/>
+      Two
+      <br/>
+    </p>
+    <p>Explicit paragraph</p>
+    <p>
+      <br id="second"/>
+      Three
+      <br/>
+      Four
+      <br/>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph06-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph06-input.html b/Editor/tests/dom/ensureInlineNodesInParagraph06-input.html
new file mode 100644
index 0000000..840ce1f
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph07-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph07-expected.html b/Editor/tests/dom/ensureInlineNodesInParagraph07-expected.html
new file mode 100644
index 0000000..c6ce7c7
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph07-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph07-input.html b/Editor/tests/dom/ensureInlineNodesInParagraph07-input.html
new file mode 100644
index 0000000..e084d85
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph08-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph08-expected.html b/Editor/tests/dom/ensureInlineNodesInParagraph08-expected.html
new file mode 100644
index 0000000..8825c42
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph08-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph08-input.html b/Editor/tests/dom/ensureInlineNodesInParagraph08-input.html
new file mode 100644
index 0000000..2985dbc
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph09-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph09-expected.html b/Editor/tests/dom/ensureInlineNodesInParagraph09-expected.html
new file mode 100644
index 0000000..dcaa6db
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph09-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph09-input.html b/Editor/tests/dom/ensureInlineNodesInParagraph09-input.html
new file mode 100644
index 0000000..369ce25
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph10-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph10-expected.html b/Editor/tests/dom/ensureInlineNodesInParagraph10-expected.html
new file mode 100644
index 0000000..dcaa6db
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph10-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph10-input.html b/Editor/tests/dom/ensureInlineNodesInParagraph10-input.html
new file mode 100644
index 0000000..98abf06
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph11-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph11-expected.html b/Editor/tests/dom/ensureInlineNodesInParagraph11-expected.html
new file mode 100644
index 0000000..dcaa6db
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/dom/ensureInlineNodesInParagraph11-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/ensureInlineNodesInParagraph11-input.html b/Editor/tests/dom/ensureInlineNodesInParagraph11-input.html
new file mode 100644
index 0000000..d012315
--- /dev/null
+++ b/Editor/tests/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>


Mime
View raw message