corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmke...@apache.org
Subject [06/92] [abbrv] [partial] incubator-corinthia git commit: Add editing code from UX Write
Date Wed, 17 Dec 2014 13:28:16 GMT
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText06-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText06-expected.html b/Editor/tests/range/getText06-expected.html
new file mode 100644
index 0000000..81f9138
--- /dev/null
+++ b/Editor/tests/range/getText06-expected.html
@@ -0,0 +1 @@
+" text\nAnd some "

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText06-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText06-input.html b/Editor/tests/range/getText06-input.html
new file mode 100644
index 0000000..41f177e
--- /dev/null
+++ b/Editor/tests/range/getText06-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    var text = Range_getText(range);
+    return JSON.stringify(text);
+}
+</script>
+</head>
+<body>
+<p>Here is some[ text</p>
+<p>And some ]more</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText07-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText07-expected.html b/Editor/tests/range/getText07-expected.html
new file mode 100644
index 0000000..15b463a
--- /dev/null
+++ b/Editor/tests/range/getText07-expected.html
@@ -0,0 +1 @@
+"Here is some text\n"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText07-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText07-input.html b/Editor/tests/range/getText07-input.html
new file mode 100644
index 0000000..e84e03e
--- /dev/null
+++ b/Editor/tests/range/getText07-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    var text = Range_getText(range);
+    return JSON.stringify(text);
+}
+</script>
+</head>
+<body>
+<p>[Here is some text</p>
+<p>]And some more</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText08-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText08-expected.html b/Editor/tests/range/getText08-expected.html
new file mode 100644
index 0000000..25af782
--- /dev/null
+++ b/Editor/tests/range/getText08-expected.html
@@ -0,0 +1 @@
+"\nAnd some more"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText08-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText08-input.html b/Editor/tests/range/getText08-input.html
new file mode 100644
index 0000000..6c0580c
--- /dev/null
+++ b/Editor/tests/range/getText08-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    var text = Range_getText(range);
+    return JSON.stringify(text);
+}
+</script>
+</head>
+<body>
+<p>Here is some text[</p>
+<p>And some more]</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText09-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText09-expected.html b/Editor/tests/range/getText09-expected.html
new file mode 100644
index 0000000..bf9fd33
--- /dev/null
+++ b/Editor/tests/range/getText09-expected.html
@@ -0,0 +1 @@
+"Here is some text\nAnd some more"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText09-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText09-input.html b/Editor/tests/range/getText09-input.html
new file mode 100644
index 0000000..9a655ee
--- /dev/null
+++ b/Editor/tests/range/getText09-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    var text = Range_getText(range);
+    return JSON.stringify(text);
+}
+</script>
+</head>
+<body>
+<p>[Here is some text</p>
+        
+<p>And some more]</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText10-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText10-expected.html b/Editor/tests/range/getText10-expected.html
new file mode 100644
index 0000000..b4e560c
--- /dev/null
+++ b/Editor/tests/range/getText10-expected.html
@@ -0,0 +1 @@
+"Here is some text\n x \nAnd some more"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText10-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText10-input.html b/Editor/tests/range/getText10-input.html
new file mode 100644
index 0000000..7d865b9
--- /dev/null
+++ b/Editor/tests/range/getText10-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    var text = Range_getText(range);
+    return JSON.stringify(text);
+}
+</script>
+</head>
+<body>
+<p>[Here is some text</p>
+   x     
+<p>And some more]</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText11-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText11-expected.html b/Editor/tests/range/getText11-expected.html
new file mode 100644
index 0000000..bf9fd33
--- /dev/null
+++ b/Editor/tests/range/getText11-expected.html
@@ -0,0 +1 @@
+"Here is some text\nAnd some more"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText11-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText11-input.html b/Editor/tests/range/getText11-input.html
new file mode 100644
index 0000000..8283d95
--- /dev/null
+++ b/Editor/tests/range/getText11-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    var text = Range_getText(range);
+    return JSON.stringify(text);
+}
+</script>
+</head>
+<body>
+<p><b><i>[Here is some text</i></b></p>
+<p><u><s>And some more]</s></u></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText12-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText12-expected.html b/Editor/tests/range/getText12-expected.html
new file mode 100644
index 0000000..15b463a
--- /dev/null
+++ b/Editor/tests/range/getText12-expected.html
@@ -0,0 +1 @@
+"Here is some text\n"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText12-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText12-input.html b/Editor/tests/range/getText12-input.html
new file mode 100644
index 0000000..14b4fe8
--- /dev/null
+++ b/Editor/tests/range/getText12-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    var text = Range_getText(range);
+    return JSON.stringify(text);
+}
+</script>
+</head>
+<body>
+<p><b><i>[Here is some text</i></b></p>
+<p><u><s>]And some more</s></u></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText13-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText13-expected.html b/Editor/tests/range/getText13-expected.html
new file mode 100644
index 0000000..25af782
--- /dev/null
+++ b/Editor/tests/range/getText13-expected.html
@@ -0,0 +1 @@
+"\nAnd some more"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText13-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText13-input.html b/Editor/tests/range/getText13-input.html
new file mode 100644
index 0000000..ed462dc
--- /dev/null
+++ b/Editor/tests/range/getText13-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    var text = Range_getText(range);
+    return JSON.stringify(text);
+}
+</script>
+</head>
+<body>
+<p><b><i>Here is some text[</i></b></p>
+<p><u><s>And some more]</s></u></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText14-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText14-expected.html b/Editor/tests/range/getText14-expected.html
new file mode 100644
index 0000000..063ee22
--- /dev/null
+++ b/Editor/tests/range/getText14-expected.html
@@ -0,0 +1 @@
+"Here is some text\nAnd some more\nNow the final paragraph"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText14-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText14-input.html b/Editor/tests/range/getText14-input.html
new file mode 100644
index 0000000..7d866a1
--- /dev/null
+++ b/Editor/tests/range/getText14-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    var text = Range_getText(range);
+    return JSON.stringify(text);
+}
+</script>
+</head>
+<body>
+<p>[Here is some text</p>
+<p>And some more</p>
+<p>Now the final paragraph]</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText15-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText15-expected.html b/Editor/tests/range/getText15-expected.html
new file mode 100644
index 0000000..a443d62
--- /dev/null
+++ b/Editor/tests/range/getText15-expected.html
@@ -0,0 +1 @@
+"Here is some text\nAnd some more\n"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText15-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText15-input.html b/Editor/tests/range/getText15-input.html
new file mode 100644
index 0000000..673baf9
--- /dev/null
+++ b/Editor/tests/range/getText15-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    var text = Range_getText(range);
+    return JSON.stringify(text);
+}
+</script>
+</head>
+<body>
+<p>[Here is some text</p>
+<p>And some more</p>
+<p>]Now the final paragraph</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText16-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText16-expected.html b/Editor/tests/range/getText16-expected.html
new file mode 100644
index 0000000..6a891e8
--- /dev/null
+++ b/Editor/tests/range/getText16-expected.html
@@ -0,0 +1 @@
+"\nAnd some more\nNow the final paragraph"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText16-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText16-input.html b/Editor/tests/range/getText16-input.html
new file mode 100644
index 0000000..7e03b4d
--- /dev/null
+++ b/Editor/tests/range/getText16-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    var text = Range_getText(range);
+    return JSON.stringify(text);
+}
+</script>
+</head>
+<body>
+<p>Here is some text[</p>
+<p>And some more</p>
+<p>Now the final paragraph]</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText17-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText17-expected.html b/Editor/tests/range/getText17-expected.html
new file mode 100644
index 0000000..8e63e56
--- /dev/null
+++ b/Editor/tests/range/getText17-expected.html
@@ -0,0 +1 @@
+"some text\nAnd some more\nNow the final paragraph"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText17-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText17-input.html b/Editor/tests/range/getText17-input.html
new file mode 100644
index 0000000..17fa4ef
--- /dev/null
+++ b/Editor/tests/range/getText17-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    var text = Range_getText(range);
+    return JSON.stringify(text);
+}
+</script>
+</head>
+<body>
+<p>Here is [some text</p>
+<p>And some more</p>
+<p>Now the final paragraph]</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText18-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText18-expected.html b/Editor/tests/range/getText18-expected.html
new file mode 100644
index 0000000..0a4b29e
--- /dev/null
+++ b/Editor/tests/range/getText18-expected.html
@@ -0,0 +1 @@
+"Here is some text\nAnd some more\nNow the final"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText18-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText18-input.html b/Editor/tests/range/getText18-input.html
new file mode 100644
index 0000000..c9a4625
--- /dev/null
+++ b/Editor/tests/range/getText18-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    var text = Range_getText(range);
+    return JSON.stringify(text);
+}
+</script>
+</head>
+<body>
+<p>[Here is some text</p>
+<p>And some more</p>
+<p>Now the final] paragraph</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText19-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText19-expected.html b/Editor/tests/range/getText19-expected.html
new file mode 100644
index 0000000..2de0c30
--- /dev/null
+++ b/Editor/tests/range/getText19-expected.html
@@ -0,0 +1 @@
+"some text\nAnd some more\nNow the final"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText19-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText19-input.html b/Editor/tests/range/getText19-input.html
new file mode 100644
index 0000000..35a988a
--- /dev/null
+++ b/Editor/tests/range/getText19-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    var text = Range_getText(range);
+    return JSON.stringify(text);
+}
+</script>
+</head>
+<body>
+<p>Here is [some text</p>
+<p>And some more</p>
+<p>Now the final] paragraph</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText20-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText20-expected.html b/Editor/tests/range/getText20-expected.html
new file mode 100644
index 0000000..25f009d
--- /dev/null
+++ b/Editor/tests/range/getText20-expected.html
@@ -0,0 +1 @@
+"some text\none two \nAnd some more\nthree \nNow the final"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText20-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText20-input.html b/Editor/tests/range/getText20-input.html
new file mode 100644
index 0000000..d52006d
--- /dev/null
+++ b/Editor/tests/range/getText20-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    var text = Range_getText(range);
+    return JSON.stringify(text);
+}
+</script>
+</head>
+<body>
+<p>Here is [some text</p>
+
+  <span>one</span>
+  <span>two</span>
+
+<p>And some more</p>
+
+  <span>three</span>
+
+<p>Now the final] paragraph</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText21-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText21-expected.html b/Editor/tests/range/getText21-expected.html
new file mode 100644
index 0000000..8028402
--- /dev/null
+++ b/Editor/tests/range/getText21-expected.html
@@ -0,0 +1,6 @@
+At offset 0: ""
+At offset 1: ""
+At offset 2: ""
+At offset 3: ""
+At offset 4: ""
+At offset 5: ""

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/getText21-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/getText21-input.html b/Editor/tests/range/getText21-input.html
new file mode 100644
index 0000000..a4752d5
--- /dev/null
+++ b/Editor/tests/range/getText21-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var p = document.getElementsByTagName("P")[0];
+    var output = new Array();
+    for (var i = 0; i <= p.childNodes.length; i++) {
+        var range = new Range(p,i,p,i);
+        output.push("At offset "+i+": "+JSON.stringify(Range_getText(range)));
+    }
+    return output.join("\n");
+}
+</script>
+</head>
+<body>
+<p>One <b>two</b> three <i>four</i> five</p>
+<p>Here is some text</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/rangeHasContent01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/rangeHasContent01-expected.html b/Editor/tests/range/rangeHasContent01-expected.html
new file mode 100644
index 0000000..27ba77d
--- /dev/null
+++ b/Editor/tests/range/rangeHasContent01-expected.html
@@ -0,0 +1 @@
+true

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/rangeHasContent01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/rangeHasContent01-input.html b/Editor/tests/range/rangeHasContent01-input.html
new file mode 100644
index 0000000..b0786a7
--- /dev/null
+++ b/Editor/tests/range/rangeHasContent01-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    return ""+Range_hasContent(range);
+}
+</script>
+</head>
+<body>
+<p>[This is a test]</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/rangeHasContent02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/rangeHasContent02-expected.html b/Editor/tests/range/rangeHasContent02-expected.html
new file mode 100644
index 0000000..27ba77d
--- /dev/null
+++ b/Editor/tests/range/rangeHasContent02-expected.html
@@ -0,0 +1 @@
+true

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/rangeHasContent02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/rangeHasContent02-input.html b/Editor/tests/range/rangeHasContent02-input.html
new file mode 100644
index 0000000..a72791a
--- /dev/null
+++ b/Editor/tests/range/rangeHasContent02-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    return ""+Range_hasContent(range);
+}
+</script>
+</head>
+<body>
+<p>This is [a] test</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/rangeHasContent03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/rangeHasContent03-expected.html b/Editor/tests/range/rangeHasContent03-expected.html
new file mode 100644
index 0000000..c508d53
--- /dev/null
+++ b/Editor/tests/range/rangeHasContent03-expected.html
@@ -0,0 +1 @@
+false

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/rangeHasContent03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/rangeHasContent03-input.html b/Editor/tests/range/rangeHasContent03-input.html
new file mode 100644
index 0000000..17ab443
--- /dev/null
+++ b/Editor/tests/range/rangeHasContent03-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    return ""+Range_hasContent(range);
+}
+</script>
+</head>
+<body>
+<p>This is a[ ]test</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/rangeHasContent04-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/rangeHasContent04-expected.html b/Editor/tests/range/rangeHasContent04-expected.html
new file mode 100644
index 0000000..27ba77d
--- /dev/null
+++ b/Editor/tests/range/rangeHasContent04-expected.html
@@ -0,0 +1 @@
+true

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/rangeHasContent04-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/rangeHasContent04-input.html b/Editor/tests/range/rangeHasContent04-input.html
new file mode 100644
index 0000000..329cf1f
--- /dev/null
+++ b/Editor/tests/range/rangeHasContent04-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    return ""+Range_hasContent(range);
+}
+</script>
+</head>
+<body>
+<p><b>This [is   </b><b>   a] test</b></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/rangeHasContent05-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/rangeHasContent05-expected.html b/Editor/tests/range/rangeHasContent05-expected.html
new file mode 100644
index 0000000..27ba77d
--- /dev/null
+++ b/Editor/tests/range/rangeHasContent05-expected.html
@@ -0,0 +1 @@
+true

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/rangeHasContent05-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/rangeHasContent05-input.html b/Editor/tests/range/rangeHasContent05-input.html
new file mode 100644
index 0000000..c4d3c18
--- /dev/null
+++ b/Editor/tests/range/rangeHasContent05-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    return ""+Range_hasContent(range);
+}
+</script>
+</head>
+<body>
+<p><b>This is[   </b><b>   a] test</b></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/rangeHasContent06-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/rangeHasContent06-expected.html b/Editor/tests/range/rangeHasContent06-expected.html
new file mode 100644
index 0000000..27ba77d
--- /dev/null
+++ b/Editor/tests/range/rangeHasContent06-expected.html
@@ -0,0 +1 @@
+true

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/rangeHasContent06-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/rangeHasContent06-input.html b/Editor/tests/range/rangeHasContent06-input.html
new file mode 100644
index 0000000..7a30453
--- /dev/null
+++ b/Editor/tests/range/rangeHasContent06-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    return ""+Range_hasContent(range);
+}
+</script>
+</head>
+<body>
+<p><b>This [is   </b><b>   ]a test</b></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/rangeHasContent07-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/rangeHasContent07-expected.html b/Editor/tests/range/rangeHasContent07-expected.html
new file mode 100644
index 0000000..c508d53
--- /dev/null
+++ b/Editor/tests/range/rangeHasContent07-expected.html
@@ -0,0 +1 @@
+false

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/range/rangeHasContent07-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/range/rangeHasContent07-input.html b/Editor/tests/range/rangeHasContent07-input.html
new file mode 100644
index 0000000..e1800ef
--- /dev/null
+++ b/Editor/tests/range/rangeHasContent07-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    return ""+Range_hasContent(range);
+}
+</script>
+</head>
+<body>
+<p><b>This is[   </b><b>   ]a test</b></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/ScanTests.js
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/ScanTests.js b/Editor/tests/scan/ScanTests.js
new file mode 100644
index 0000000..e039a14
--- /dev/null
+++ b/Editor/tests/scan/ScanTests.js
@@ -0,0 +1,31 @@
+// 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.
+
+function testNext()
+{
+    var result = new Array();
+    Scan_reset();
+    var index = 0;
+    while (true) {
+        var paragraph = Scan_next();
+        if (paragraph == null)
+            break;
+        if (paragraph.sectionId != null)
+            result.push(index+" ("+paragraph.sectionId+"): "+JSON.stringify(paragraph.text));
+        else
+            result.push(index+": "+JSON.stringify(paragraph.text));
+        index++;
+    }
+    return result.join("\n");
+}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/next01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/next01-expected.html b/Editor/tests/scan/next01-expected.html
new file mode 100644
index 0000000..fab096d
--- /dev/null
+++ b/Editor/tests/scan/next01-expected.html
@@ -0,0 +1,4 @@
+0: "Paragraph 1"
+1: "Paragraph 2"
+2: "Paragraph 3"
+3: "Paragraph 4"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/next01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/next01-input.html b/Editor/tests/scan/next01-input.html
new file mode 100644
index 0000000..f18246d
--- /dev/null
+++ b/Editor/tests/scan/next01-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="ScanTests.js"></script>
+<script>
+function performTest()
+{
+    return testNext();
+}
+</script>
+</head>
+<body>
+<p>Paragraph 1</p>
+<p>Paragraph 2</p>
+<p>Paragraph 3</p>
+<p>Paragraph 4</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/next02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/next02-expected.html b/Editor/tests/scan/next02-expected.html
new file mode 100644
index 0000000..fab096d
--- /dev/null
+++ b/Editor/tests/scan/next02-expected.html
@@ -0,0 +1,4 @@
+0: "Paragraph 1"
+1: "Paragraph 2"
+2: "Paragraph 3"
+3: "Paragraph 4"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/next02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/next02-input.html b/Editor/tests/scan/next02-input.html
new file mode 100644
index 0000000..706ef07
--- /dev/null
+++ b/Editor/tests/scan/next02-input.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="ScanTests.js"></script>
+<script>
+function performTest()
+{
+    return testNext();
+}
+</script>
+</head>
+<body>
+
+<p>Paragraph 1</p>
+
+<p>Paragraph 2</p>
+
+<p>Paragraph 3</p>
+
+<p>Paragraph 4</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/next03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/next03-expected.html b/Editor/tests/scan/next03-expected.html
new file mode 100644
index 0000000..7d6e3e5
--- /dev/null
+++ b/Editor/tests/scan/next03-expected.html
@@ -0,0 +1,7 @@
+0: "Paragraph 1"
+1: "\n\none\n\n"
+2: "Paragraph 2"
+3: "\n\none\ntwo\n\n"
+4: "Paragraph 3"
+5: "\n\none\ntwo\nthree\n\n"
+6: "Paragraph 4"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/next03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/next03-input.html b/Editor/tests/scan/next03-input.html
new file mode 100644
index 0000000..e6cc426
--- /dev/null
+++ b/Editor/tests/scan/next03-input.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="ScanTests.js"></script>
+<script>
+function performTest()
+{
+    return testNext();
+}
+</script>
+</head>
+<body>
+
+<p>Paragraph 1</p>
+
+one
+
+<p>Paragraph 2</p>
+
+<b>one</b>
+two
+
+<p>Paragraph 3</p>
+
+<b>one</b>
+two
+<i>three</i>
+
+<p>Paragraph 4</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/next04-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/next04-expected.html b/Editor/tests/scan/next04-expected.html
new file mode 100644
index 0000000..57f32de
--- /dev/null
+++ b/Editor/tests/scan/next04-expected.html
@@ -0,0 +1,5 @@
+0: "\n\nBefore\n\n"
+1: "Item 1"
+2: "Item 2"
+3: "Item 3"
+4: "\n\nAfter\n\n\n\n"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/next04-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/next04-input.html b/Editor/tests/scan/next04-input.html
new file mode 100644
index 0000000..c09a938
--- /dev/null
+++ b/Editor/tests/scan/next04-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="ScanTests.js"></script>
+<script>
+function performTest()
+{
+    return testNext();
+}
+</script>
+</head>
+<body>
+
+Before
+
+<ul>
+  <li>Item 1</li>
+  <li>Item 2</li>
+  <li>Item 3</li>
+</ul>
+
+After
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/next05-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/next05-expected.html b/Editor/tests/scan/next05-expected.html
new file mode 100644
index 0000000..182255b
--- /dev/null
+++ b/Editor/tests/scan/next05-expected.html
@@ -0,0 +1,7 @@
+0: "\n\nBefore\n\n"
+1: "Cell 1,1"
+2: "Cell 1,2"
+3: "Cell 2,1"
+4: "Cell 2,2"
+5: "Table caption"
+6: "\n\nAfter\n\n\n\n"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/next05-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/next05-input.html b/Editor/tests/scan/next05-input.html
new file mode 100644
index 0000000..b8b2bf0
--- /dev/null
+++ b/Editor/tests/scan/next05-input.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="ScanTests.js"></script>
+<script>
+function performTest()
+{
+    return testNext();
+}
+</script>
+</head>
+<body>
+
+Before
+
+<table>
+  <caption>Table caption</caption>
+  <tr>
+    <td>Cell 1,1</td>
+  </tr>
+  <tr>
+    <td>Cell 1,2</td>
+  </tr>
+  <tr>
+    <td>Cell 2,1</td>
+  </tr>
+  <tr>
+    <td>Cell 2,2</td>
+  </tr>
+</table>
+
+After
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/next06-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/next06-expected.html b/Editor/tests/scan/next06-expected.html
new file mode 100644
index 0000000..0af6556
--- /dev/null
+++ b/Editor/tests/scan/next06-expected.html
@@ -0,0 +1,3 @@
+0: "\n\nBefore\n\n"
+1: "Figure caption"
+2: "\n\nAfter\n\n\n\n"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/next06-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/next06-input.html b/Editor/tests/scan/next06-input.html
new file mode 100644
index 0000000..272c2c9
--- /dev/null
+++ b/Editor/tests/scan/next06-input.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="ScanTests.js"></script>
+<script>
+function performTest()
+{
+    return testNext();
+}
+</script>
+</head>
+<body>
+
+Before
+
+<figure>
+  <img src="../figures/nothing.png">
+  <figcaption>Figure caption</figcaption>
+</figure>
+
+After
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/next07-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/next07-expected.html b/Editor/tests/scan/next07-expected.html
new file mode 100644
index 0000000..0df7a06
--- /dev/null
+++ b/Editor/tests/scan/next07-expected.html
@@ -0,0 +1,4 @@
+0 (item1): "Section 1"
+1: "Content 1"
+2 (item2): "Section 2"
+3: "Content 2"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/next07-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/next07-input.html b/Editor/tests/scan/next07-input.html
new file mode 100644
index 0000000..26dd1c6
--- /dev/null
+++ b/Editor/tests/scan/next07-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="ScanTests.js"></script>
+<script>
+function performTest()
+{
+    return testNext();
+}
+</script>
+</head>
+<body>
+<h1 id="item1">Section 1</h1>
+<p>Content 1</p>
+<h1 id="item2">Section 2</h1>
+<p>Content 2</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/replaceMatch01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/replaceMatch01-expected.html b/Editor/tests/scan/replaceMatch01-expected.html
new file mode 100644
index 0000000..a058d93
--- /dev/null
+++ b/Editor/tests/scan/replaceMatch01-expected.html
@@ -0,0 +1,10 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <p>FIRST quick brown</p>
+    <p>fox SECOND over</p>
+    <p>the lazy THIRD</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/replaceMatch01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/replaceMatch01-input.html b/Editor/tests/scan/replaceMatch01-input.html
new file mode 100644
index 0000000..a7543fc
--- /dev/null
+++ b/Editor/tests/scan/replaceMatch01-input.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script src="ScanTests.js"></script>
+<script>
+function performTest()
+{
+    Scan_reset();
+    Scan_next();
+    var id1 = Scan_addMatch(0,3);
+    Scan_showMatch(id1);
+    Scan_next();
+    var id2 = Scan_addMatch(4,9);
+    Scan_showMatch(id2);
+    Scan_next();
+    var id3 = Scan_addMatch(9,12);
+    Scan_showMatch(id3);
+
+    Scan_replaceMatch(id1,"FIRST");
+    Scan_replaceMatch(id2,"SECOND");
+    Scan_replaceMatch(id3,"THIRD");
+}
+</script>
+</head>
+<body>
+<p>The quick brown</p>
+<p>fox jumps over</p>
+<p>the lazy dog</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/replaceMatch02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/replaceMatch02-expected.html b/Editor/tests/scan/replaceMatch02-expected.html
new file mode 100644
index 0000000..20c6760
--- /dev/null
+++ b/Editor/tests/scan/replaceMatch02-expected.html
@@ -0,0 +1,10 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <p>FIRST quick SECOND</p>
+    <p>THIRD jumps FOURTH</p>
+    <p>FIFTH lazy SIXTH</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/replaceMatch02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/replaceMatch02-input.html b/Editor/tests/scan/replaceMatch02-input.html
new file mode 100644
index 0000000..46f4412
--- /dev/null
+++ b/Editor/tests/scan/replaceMatch02-input.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script src="ScanTests.js"></script>
+<script>
+function performTest()
+{
+    Scan_reset();
+    Scan_next();
+    var id1 = Scan_addMatch(0,3);
+    var id2 = Scan_addMatch(10,15);
+    Scan_showMatch(id1);
+    Scan_showMatch(id2);
+
+    Scan_next();
+    var id3 = Scan_addMatch(0,3);
+    var id4 = Scan_addMatch(10,14);
+    Scan_showMatch(id3);
+    Scan_showMatch(id4);
+
+    Scan_next();
+    var id5 = Scan_addMatch(0,3);
+    var id6 = Scan_addMatch(9,12);
+    Scan_showMatch(id5);
+    Scan_showMatch(id6);
+
+    Scan_replaceMatch(id1,"FIRST");
+    Scan_replaceMatch(id2,"SECOND");
+    Scan_replaceMatch(id3,"THIRD");
+    Scan_replaceMatch(id4,"FOURTH");
+    Scan_replaceMatch(id5,"FIFTH");
+    Scan_replaceMatch(id6,"SIXTH");
+}
+</script>
+</head>
+<body>
+<p>The quick brown</p>
+<p>fox jumps over</p>
+<p>the lazy dog</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/replaceMatch03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/replaceMatch03-expected.html b/Editor/tests/scan/replaceMatch03-expected.html
new file mode 100644
index 0000000..f3e8b8d
--- /dev/null
+++ b/Editor/tests/scan/replaceMatch03-expected.html
@@ -0,0 +1,20 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <p>
+      <u>FIRST</u>
+      quick brown
+    </p>
+    <p>
+      fox
+      <u>SECOND</u>
+      over
+    </p>
+    <p>
+      the lazy
+      <u>THIRD</u>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/replaceMatch03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/replaceMatch03-input.html b/Editor/tests/scan/replaceMatch03-input.html
new file mode 100644
index 0000000..461ba78
--- /dev/null
+++ b/Editor/tests/scan/replaceMatch03-input.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script src="ScanTests.js"></script>
+<script>
+function performTest()
+{
+    Scan_reset();
+    Scan_next();
+    var id1 = Scan_addMatch(0,3);
+    Scan_showMatch(id1);
+    Scan_next();
+    var id2 = Scan_addMatch(4,9);
+    Scan_showMatch(id2);
+    Scan_next();
+    var id3 = Scan_addMatch(9,12);
+    Scan_showMatch(id3);
+
+    Scan_replaceMatch(id1,"FIRST");
+    Scan_replaceMatch(id2,"SECOND");
+    Scan_replaceMatch(id3,"THIRD");
+}
+</script>
+</head>
+<body>
+<p><u>The</u> quick brown</p>
+<p>fox <u>jumps</u> over</p>
+<p>the lazy <u>dog</u></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/replaceMatch04-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/replaceMatch04-expected.html b/Editor/tests/scan/replaceMatch04-expected.html
new file mode 100644
index 0000000..29cd44c
--- /dev/null
+++ b/Editor/tests/scan/replaceMatch04-expected.html
@@ -0,0 +1,16 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <p>
+      <u>FIRST quick</u>
+      brown
+    </p>
+    <p><u>fox SECOND over</u></p>
+    <p>
+      the
+      <u>lazy THIRD</u>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/replaceMatch04-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/replaceMatch04-input.html b/Editor/tests/scan/replaceMatch04-input.html
new file mode 100644
index 0000000..3b50989
--- /dev/null
+++ b/Editor/tests/scan/replaceMatch04-input.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script src="ScanTests.js"></script>
+<script>
+function performTest()
+{
+    Scan_reset();
+    Scan_next();
+    var id1 = Scan_addMatch(0,3);
+    Scan_showMatch(id1);
+    Scan_next();
+    var id2 = Scan_addMatch(4,9);
+    Scan_showMatch(id2);
+    Scan_next();
+    var id3 = Scan_addMatch(9,12);
+    Scan_showMatch(id3);
+
+    Scan_replaceMatch(id1,"FIRST");
+    Scan_replaceMatch(id2,"SECOND");
+    Scan_replaceMatch(id3,"THIRD");
+}
+</script>
+</head>
+<body>
+<p><u>The quick</u> brown</p>
+<p><u>fox jumps over</u></p>
+<p>the <u>lazy dog</u></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/replaceMatch05-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/replaceMatch05-expected.html b/Editor/tests/scan/replaceMatch05-expected.html
new file mode 100644
index 0000000..eecf8a4
--- /dev/null
+++ b/Editor/tests/scan/replaceMatch05-expected.html
@@ -0,0 +1,13 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <p>
+      <u>FIRST</u>
+      quick brown
+    </p>
+    <p>fox SECOND over</p>
+    <p>the lazy THIRD</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/replaceMatch05-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/replaceMatch05-input.html b/Editor/tests/scan/replaceMatch05-input.html
new file mode 100644
index 0000000..1ee73ab
--- /dev/null
+++ b/Editor/tests/scan/replaceMatch05-input.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script src="ScanTests.js"></script>
+<script>
+function performTest()
+{
+    Scan_reset();
+    Scan_next();
+    var id1 = Scan_addMatch(0,3);
+    Scan_showMatch(id1);
+    Scan_next();
+    var id2 = Scan_addMatch(4,9);
+    Scan_showMatch(id2);
+    Scan_next();
+    var id3 = Scan_addMatch(9,12);
+    Scan_showMatch(id3);
+
+    Scan_replaceMatch(id1,"FIRST");
+    Scan_replaceMatch(id2,"SECOND");
+    Scan_replaceMatch(id3,"THIRD");
+}
+</script>
+</head>
+<body>
+<p><u>Th</u>e quick brown</p>
+<p>fox j<u>ump</u>s over</p>
+<p>the lazy d<u>og</u></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/showMatch01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/showMatch01-expected.html b/Editor/tests/scan/showMatch01-expected.html
new file mode 100644
index 0000000..838844f
--- /dev/null
+++ b/Editor/tests/scan/showMatch01-expected.html
@@ -0,0 +1,20 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <p>
+      <span class="uxwrite-match">The</span>
+      quick brown
+    </p>
+    <p>
+      fox
+      <span class="uxwrite-match">jumps</span>
+      over
+    </p>
+    <p>
+      the lazy
+      <span class="uxwrite-match">dog</span>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/showMatch01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/showMatch01-input.html b/Editor/tests/scan/showMatch01-input.html
new file mode 100644
index 0000000..409468f
--- /dev/null
+++ b/Editor/tests/scan/showMatch01-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script src="ScanTests.js"></script>
+<script>
+function performTest()
+{
+    Scan_reset();
+    Scan_next();
+    var id1 = Scan_addMatch(0,3);
+    Scan_showMatch(id1);
+    Scan_next();
+    var id2 = Scan_addMatch(4,9);
+    Scan_showMatch(id2);
+    Scan_next();
+    var id3 = Scan_addMatch(9,12);
+    Scan_showMatch(id3);
+}
+</script>
+</head>
+<body>
+<p>The quick brown</p>
+<p>fox jumps over</p>
+<p>the lazy dog</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/showMatch02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/showMatch02-expected.html b/Editor/tests/scan/showMatch02-expected.html
new file mode 100644
index 0000000..3e28704
--- /dev/null
+++ b/Editor/tests/scan/showMatch02-expected.html
@@ -0,0 +1,22 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <p>
+      <span class="uxwrite-match">The</span>
+      quick
+      <span class="uxwrite-match">brown</span>
+    </p>
+    <p>
+      <span class="uxwrite-match">fox</span>
+      jumps
+      <span class="uxwrite-match">over</span>
+    </p>
+    <p>
+      <span class="uxwrite-match">the</span>
+      lazy
+      <span class="uxwrite-match">dog</span>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/showMatch02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/showMatch02-input.html b/Editor/tests/scan/showMatch02-input.html
new file mode 100644
index 0000000..c0b29ef
--- /dev/null
+++ b/Editor/tests/scan/showMatch02-input.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script src="ScanTests.js"></script>
+<script>
+function performTest()
+{
+    Scan_reset();
+    Scan_next();
+    var id1 = Scan_addMatch(0,3);
+    var id2 = Scan_addMatch(10,15);
+    Scan_showMatch(id1);
+    Scan_showMatch(id2);
+
+    Scan_next();
+    var id3 = Scan_addMatch(0,3);
+    var id4 = Scan_addMatch(10,14);
+    Scan_showMatch(id3);
+    Scan_showMatch(id4);
+
+    Scan_next();
+    var id5 = Scan_addMatch(0,3);
+    var id6 = Scan_addMatch(9,12);
+    Scan_showMatch(id5);
+    Scan_showMatch(id6);
+}
+</script>
+</head>
+<body>
+<p>The quick brown</p>
+<p>fox jumps over</p>
+<p>the lazy dog</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/showMatch03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/showMatch03-expected.html b/Editor/tests/scan/showMatch03-expected.html
new file mode 100644
index 0000000..74daee2
--- /dev/null
+++ b/Editor/tests/scan/showMatch03-expected.html
@@ -0,0 +1,20 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <p>
+      <u><span class="uxwrite-match">The</span></u>
+      quick brown
+    </p>
+    <p>
+      fox
+      <u><span class="uxwrite-match">jumps</span></u>
+      over
+    </p>
+    <p>
+      the lazy
+      <u><span class="uxwrite-match">dog</span></u>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/showMatch03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/showMatch03-input.html b/Editor/tests/scan/showMatch03-input.html
new file mode 100644
index 0000000..a8a2fb2
--- /dev/null
+++ b/Editor/tests/scan/showMatch03-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script src="ScanTests.js"></script>
+<script>
+function performTest()
+{
+    Scan_reset();
+    Scan_next();
+    var id1 = Scan_addMatch(0,3);
+    Scan_showMatch(id1);
+    Scan_next();
+    var id2 = Scan_addMatch(4,9);
+    Scan_showMatch(id2);
+    Scan_next();
+    var id3 = Scan_addMatch(9,12);
+    Scan_showMatch(id3);
+}
+</script>
+</head>
+<body>
+<p><u>The</u> quick brown</p>
+<p>fox <u>jumps</u> over</p>
+<p>the lazy <u>dog</u></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/showMatch04-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/showMatch04-expected.html b/Editor/tests/scan/showMatch04-expected.html
new file mode 100644
index 0000000..4987119
--- /dev/null
+++ b/Editor/tests/scan/showMatch04-expected.html
@@ -0,0 +1,22 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <p>
+      <u><span class="uxwrite-match">The</span></u>
+      <u>quick</u>
+      brown
+    </p>
+    <p>
+      <u>fox</u>
+      <u><span class="uxwrite-match">jumps</span></u>
+      <u>over</u>
+    </p>
+    <p>
+      the
+      <u>lazy</u>
+      <u><span class="uxwrite-match">dog</span></u>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/showMatch04-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/showMatch04-input.html b/Editor/tests/scan/showMatch04-input.html
new file mode 100644
index 0000000..42e7efb
--- /dev/null
+++ b/Editor/tests/scan/showMatch04-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script src="ScanTests.js"></script>
+<script>
+function performTest()
+{
+    Scan_reset();
+    Scan_next();
+    var id1 = Scan_addMatch(0,3);
+    Scan_showMatch(id1);
+    Scan_next();
+    var id2 = Scan_addMatch(4,9);
+    Scan_showMatch(id2);
+    Scan_next();
+    var id3 = Scan_addMatch(9,12);
+    Scan_showMatch(id3);
+}
+</script>
+</head>
+<body>
+<p><u>The quick</u> brown</p>
+<p><u>fox jumps over</u></p>
+<p>the <u>lazy dog</u></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/showMatch05-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/showMatch05-expected.html b/Editor/tests/scan/showMatch05-expected.html
new file mode 100644
index 0000000..73bfded
--- /dev/null
+++ b/Editor/tests/scan/showMatch05-expected.html
@@ -0,0 +1,24 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <p>
+      <u><span class="uxwrite-match">Th</span></u>
+      <span class="uxwrite-match">e</span>
+      quick brown
+    </p>
+    <p>
+      fox
+      <span class="uxwrite-match">j</span>
+      <span class="uxwrite-match"><u>ump</u></span>
+      <span class="uxwrite-match">s</span>
+      over
+    </p>
+    <p>
+      the lazy
+      <span class="uxwrite-match">d</span>
+      <u><span class="uxwrite-match">og</span></u>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/scan/showMatch05-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/scan/showMatch05-input.html b/Editor/tests/scan/showMatch05-input.html
new file mode 100644
index 0000000..256fac6
--- /dev/null
+++ b/Editor/tests/scan/showMatch05-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script src="ScanTests.js"></script>
+<script>
+function performTest()
+{
+    Scan_reset();
+    Scan_next();
+    var id1 = Scan_addMatch(0,3);
+    Scan_showMatch(id1);
+    Scan_next();
+    var id2 = Scan_addMatch(4,9);
+    Scan_showMatch(id2);
+    Scan_next();
+    var id3 = Scan_addMatch(9,12);
+    Scan_showMatch(id3);
+}
+</script>
+</head>
+<body>
+<p><u>Th</u>e quick brown</p>
+<p>fox j<u>ump</u>s over</p>
+<p>the lazy d<u>og</u></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/PositionTests.js
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/PositionTests.js b/Editor/tests/selection/PositionTests.js
new file mode 100644
index 0000000..7367f9a
--- /dev/null
+++ b/Editor/tests/selection/PositionTests.js
@@ -0,0 +1,144 @@
+// 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.
+
+function pad(str,length)
+{
+    str = ""+str;
+    while (str.length < length)
+        str += " ";
+    return str;
+}
+
+function selectRange(p,start,end)
+{
+    var paragraph = Text_analyseParagraph(new Position(p,0));
+    var startPos = Paragraph_positionAtOffset(paragraph,start);
+    var endPos = Paragraph_positionAtOffset(paragraph,end);
+    Selection_set(startPos.node,startPos.offset,endPos.node,endPos.offset);
+}
+
+function makeStringArray(input)
+{
+    var result = new Array();
+    for (var i = 0; i < input.length; i++)
+        result.push(input[i].toString());
+    return result;
+}
+
+function createTable(arrays)
+{
+    var maxLength = 0;
+    for (var col = 0; col < arrays.length; col++) {
+        if (maxLength < arrays[col].length)
+            maxLength = arrays[col].length;
+    }
+    var colWidths = new Array();
+    for (var col = 0; col < arrays.length; col++) {
+        var width = 0;
+        for (var row = 0; row < arrays[col].length; row++) {
+            if (width < arrays[col][row].length)
+                width = arrays[col][row].length;
+        }
+        colWidths.push(width);
+    }
+
+    var output = new Array();
+    var spacer = "   ->   ";
+    for (var row = 0; row < maxLength; row++) {
+        for (var col = 0; col < arrays.length; col++) {
+            if (col > 0)
+                output.push(spacer);
+            output.push(pad(arrays[col][row],colWidths[col]));
+        }
+        output.push("\n");
+    }
+    return output.join("");
+}
+
+function rangeString(text,start,end)
+{
+    return JSON.stringify(text.substring(0,start) + "[" +
+                          text.substring(start,end) + "]" +
+                          text.substring(end));
+}
+
+var positionList = null
+
+function setPositionList(newList)
+{
+    UndoManager_addAction(setPositionList,positionList);
+    if (newList == null)
+        positionList = null;
+    else
+        positionList = newList.map(function (pos) { return new Position(pos.node,pos.offset); });
+}
+
+function getPositionList()
+{
+    return positionList;
+}
+
+function positionTest(start1,end1,start2,end2)
+{
+    var ps = document.getElementsByTagName("P");
+
+    var p = ps[0];
+    var text = p.firstChild;
+
+    var testDescription = "From "+rangeString(text.nodeValue,start1,end1) + "\n" +
+                          "To   "+rangeString(text.nodeValue,start2,end2) + "\n";
+
+    var positions = new Array();
+    for (var i = 0; i <= text.length; i++)
+        positions.push(new Position(text,i));
+    setPositionList(positions);
+
+    var origStrings = makeStringArray(positions);
+    UndoManager_newGroup();
+
+    Position_trackWhileExecuting(positions,function() { selectRange(p,start1,end1); });
+    setPositionList(positions);
+    var strings1 = makeStringArray(positions);
+
+    UndoManager_newGroup();
+
+    Position_trackWhileExecuting(positions,function() { selectRange(p,start2,end2); });
+    setPositionList(positions);
+    var strings2 = makeStringArray(positions);
+
+    UndoManager_undo();
+    positions = getPositionList();
+    var undo1 = makeStringArray(positions);
+
+    UndoManager_undo();
+    positions = getPositionList();
+    var undo2 = makeStringArray(positions);
+
+    var checks = new Array();
+    for (var i = 0; i < positions.length; i++) {
+        var str = "";
+        if (undo1[i] == strings1[i])
+            str += "YES";
+        else
+            str += "NO";
+
+        if (undo2[i] == origStrings[i])
+            str += "/YES";
+        else
+            str += "/NO";
+        checks.push(str);
+    }
+
+    return testDescription + "\n" + createTable([origStrings,strings1,strings2,checks]);
+}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table01-expected.html b/Editor/tests/selection/boundaries-table01-expected.html
new file mode 100644
index 0000000..a10ae78
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table01-expected.html
@@ -0,0 +1,20 @@
+<html>
+  <head></head>
+  <body>
+    <p>Text [before</p>
+    <table>
+      <tbody>
+        <tr>
+          <td>One</td>
+          <td>Two</td>
+        </tr>
+        <tr>
+          <td>Three</td>
+          <td>Four</td>
+        </tr>
+      </tbody>
+    </table>
+    ]
+    <p>Text after</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table01-input.html b/Editor/tests/selection/boundaries-table01-input.html
new file mode 100644
index 0000000..3d4a006
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table01-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>Text [before</p>
+<table>
+  <tr>
+    <td>One</td>
+    <td>Tw]o</td>
+  </tr>
+  <tr>
+    <td>Three</td>
+    <td>Four</td>
+  </tr>
+</table>
+<p>Text after</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table02-expected.html b/Editor/tests/selection/boundaries-table02-expected.html
new file mode 100644
index 0000000..81c8769
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table02-expected.html
@@ -0,0 +1,20 @@
+<html>
+  <head></head>
+  <body>
+    <p>Text before</p>
+    [
+    <table>
+      <tbody>
+        <tr>
+          <td>One</td>
+          <td>Two</td>
+        </tr>
+        <tr>
+          <td>Three</td>
+          <td>Four</td>
+        </tr>
+      </tbody>
+    </table>
+    <p>Text] after</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table02-input.html b/Editor/tests/selection/boundaries-table02-input.html
new file mode 100644
index 0000000..86fcafc
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table02-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>Text before</p>
+<table>
+  <tr>
+    <td>One</td>
+    <td>Tw[o</td>
+  </tr>
+  <tr>
+    <td>Three</td>
+    <td>Four</td>
+  </tr>
+</table>
+<p>Text] after</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table03-expected.html b/Editor/tests/selection/boundaries-table03-expected.html
new file mode 100644
index 0000000..492d9d9
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table03-expected.html
@@ -0,0 +1,19 @@
+<html>
+  <head></head>
+  <body>
+    <p>Text before</p>
+    <table>
+      <tbody>
+        <tr>
+          <td>One</td>
+          <td>Tw[o</td>
+        </tr>
+        <tr>
+          <td>Three</td>
+          <td>F]our</td>
+        </tr>
+      </tbody>
+    </table>
+    <p>Text after</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table03-input.html b/Editor/tests/selection/boundaries-table03-input.html
new file mode 100644
index 0000000..3e08247
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table03-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>Text before</p>
+<table>
+  <tr>
+    <td>One</td>
+    <td>Tw[o</td>
+  </tr>
+  <tr>
+    <td>Three</td>
+    <td>F]our</td>
+  </tr>
+</table>
+<p>Text after</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table04-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table04-expected.html b/Editor/tests/selection/boundaries-table04-expected.html
new file mode 100644
index 0000000..1e5725f
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table04-expected.html
@@ -0,0 +1,19 @@
+<html>
+  <head></head>
+  <body>
+    <p>Text [before</p>
+    <table>
+      <tbody>
+        <tr>
+          <td>One</td>
+          <td>Two</td>
+        </tr>
+        <tr>
+          <td>Three</td>
+          <td>Four</td>
+        </tr>
+      </tbody>
+    </table>
+    <p>Text] after</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table04-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table04-input.html b/Editor/tests/selection/boundaries-table04-input.html
new file mode 100644
index 0000000..6b97c8f
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table04-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>Text [before</p>
+<table>
+  <tr>
+    <td>One</td>
+    <td>Two</td>
+  </tr>
+  <tr>
+    <td>Three</td>
+    <td>Four</td>
+  </tr>
+</table>
+<p>Text] after</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table05-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table05-expected.html b/Editor/tests/selection/boundaries-table05-expected.html
new file mode 100644
index 0000000..334ceb0
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table05-expected.html
@@ -0,0 +1,41 @@
+<html>
+  <head></head>
+  <body>
+    <p>Text before</p>
+    <table>
+      <tbody>
+        <tr>
+          <td>
+            [
+            <table>
+              <tbody>
+                <tr>
+                  <td>One</td>
+                  <td>Two</td>
+                </tr>
+                <tr>
+                  <td>Three</td>
+                  <td>Four</td>
+                </tr>
+              </tbody>
+            </table>
+            <table>
+              <tbody>
+                <tr>
+                  <td>Five</td>
+                  <td>Six</td>
+                </tr>
+                <tr>
+                  <td>Seven</td>
+                  <td>Eight</td>
+                </tr>
+              </tbody>
+            </table>
+            ]
+          </td>
+        </tr>
+      </tbody>
+    </table>
+    <p>Text after</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table05-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table05-input.html b/Editor/tests/selection/boundaries-table05-input.html
new file mode 100644
index 0000000..2ec8be1
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table05-input.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    showSelection();
+}
+</script>
+</head>
+<body>
+
+<p>Text before</p>
+
+<table>
+  <tbody>
+    <tr>
+      <td>
+
+        <table>
+          <tbody>
+            <tr>
+              <td>One</td>
+              <td>T[wo</td>
+            </tr>
+            <tr>
+              <td>Three</td>
+              <td>Four</td>
+            </tr>
+          </tbody>
+        </table>
+
+        <table>
+          <tbody>
+            <tr>
+              <td>Five</td>
+              <td>Six</td>
+            </tr>
+            <tr>
+              <td>S]even</td>
+              <td>Eight</td>
+            </tr>
+          </tbody>
+        </table>
+
+      </td>
+    </tr>
+  </tbody>
+</table>
+
+<p>Text after</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table06-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table06-expected.html b/Editor/tests/selection/boundaries-table06-expected.html
new file mode 100644
index 0000000..95b96b8
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table06-expected.html
@@ -0,0 +1,43 @@
+<html>
+  <head></head>
+  <body>
+    <p>Text before</p>
+    <table>
+      <tbody>
+        <tr>
+          <td>
+            [
+            <table>
+              <tbody>
+                <tr>
+                  <td>One</td>
+                  <td>Two</td>
+                </tr>
+                <tr>
+                  <td>Three</td>
+                  <td>Four</td>
+                </tr>
+              </tbody>
+            </table>
+          </td>
+          <td>
+            <table>
+              <tbody>
+                <tr>
+                  <td>Five</td>
+                  <td>Six</td>
+                </tr>
+                <tr>
+                  <td>Seven</td>
+                  <td>Eight</td>
+                </tr>
+              </tbody>
+            </table>
+            ]
+          </td>
+        </tr>
+      </tbody>
+    </table>
+    <p>Text after</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table06-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table06-input.html b/Editor/tests/selection/boundaries-table06-input.html
new file mode 100644
index 0000000..a194718
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table06-input.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    showSelection();
+}
+</script>
+</head>
+<body>
+
+<p>Text before</p>
+
+<table>
+  <tbody>
+    <tr>
+      <td>
+
+        <table>
+          <tbody>
+            <tr>
+              <td>One</td>
+              <td>T[wo</td>
+            </tr>
+            <tr>
+              <td>Three</td>
+              <td>Four</td>
+            </tr>
+          </tbody>
+        </table>
+
+      </td>
+      <td>
+
+        <table>
+          <tbody>
+            <tr>
+              <td>Five</td>
+              <td>Six</td>
+            </tr>
+            <tr>
+              <td>S]even</td>
+              <td>Eight</td>
+            </tr>
+          </tbody>
+        </table>
+
+      </td>
+    </tr>
+  </tbody>
+</table>
+
+<p>Text after</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table07-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table07-expected.html b/Editor/tests/selection/boundaries-table07-expected.html
new file mode 100644
index 0000000..b2943a5
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table07-expected.html
@@ -0,0 +1,28 @@
+<html>
+  <head></head>
+  <body>
+    <p>Text [before</p>
+    <table>
+      <tbody>
+        <tr>
+          <td>
+            <table>
+              <tbody>
+                <tr>
+                  <td>One</td>
+                  <td>Two</td>
+                </tr>
+                <tr>
+                  <td>Three</td>
+                  <td>Four</td>
+                </tr>
+              </tbody>
+            </table>
+          </td>
+        </tr>
+      </tbody>
+    </table>
+    ]
+    <p>Text after</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table07-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table07-input.html b/Editor/tests/selection/boundaries-table07-input.html
new file mode 100644
index 0000000..0a0fea0
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table07-input.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    showSelection();
+}
+</script>
+</head>
+<body>
+
+<p>Text [before</p>
+
+<table>
+  <tbody>
+    <tr>
+      <td>
+
+        <table>
+          <tbody>
+            <tr>
+              <td>One</td>
+              <td>T]wo</td>
+            </tr>
+            <tr>
+              <td>Three</td>
+              <td>Four</td>
+            </tr>
+          </tbody>
+        </table>
+
+      </td>
+    </tr>
+  </tbody>
+</table>
+
+<p>Text after</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table08-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table08-expected.html b/Editor/tests/selection/boundaries-table08-expected.html
new file mode 100644
index 0000000..de62065
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table08-expected.html
@@ -0,0 +1,28 @@
+<html>
+  <head></head>
+  <body>
+    <p>Text before</p>
+    [
+    <table>
+      <tbody>
+        <tr>
+          <td>
+            <table>
+              <tbody>
+                <tr>
+                  <td>One</td>
+                  <td>Two</td>
+                </tr>
+                <tr>
+                  <td>Three</td>
+                  <td>Four</td>
+                </tr>
+              </tbody>
+            </table>
+          </td>
+        </tr>
+      </tbody>
+    </table>
+    <p>Text] after</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table08-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table08-input.html b/Editor/tests/selection/boundaries-table08-input.html
new file mode 100644
index 0000000..24970ec
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table08-input.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    showSelection();
+}
+</script>
+</head>
+<body>
+
+<p>Text before</p>
+
+<table>
+  <tbody>
+    <tr>
+      <td>
+
+        <table>
+          <tbody>
+            <tr>
+              <td>One</td>
+              <td>T[wo</td>
+            </tr>
+            <tr>
+              <td>Three</td>
+              <td>Four</td>
+            </tr>
+          </tbody>
+        </table>
+
+      </td>
+    </tr>
+  </tbody>
+</table>
+
+<p>Text] after</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table09-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table09-expected.html b/Editor/tests/selection/boundaries-table09-expected.html
new file mode 100644
index 0000000..f2c214b
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table09-expected.html
@@ -0,0 +1,21 @@
+<html>
+  <head></head>
+  <body>
+    <p>Text before</p>
+    [
+    <table>
+      <tbody>
+        <tr>
+          <td>One</td>
+          <td>Two</td>
+        </tr>
+        <tr>
+          <td>Three</td>
+          <td>Four</td>
+        </tr>
+      </tbody>
+    </table>
+    ]
+    <p>Text after</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table09-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table09-input.html b/Editor/tests/selection/boundaries-table09-input.html
new file mode 100644
index 0000000..50dac14
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table09-input.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    var table = document.getElementsByTagName("TABLE")[0];
+    var offset = DOM_nodeOffset(table);
+    range.start = new Position(table.parentNode,DOM_nodeOffset(table));
+    Selection_set(range.start.node,range.start.offset,range.end.node,range.end.offset);
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>Text before</p>
+<table>
+  <tr>
+    <td>One</td>
+    <td>Tw[]o</td>
+  </tr>
+  <tr>
+    <td>Three</td>
+    <td>Four</td>
+  </tr>
+</table>
+<p>Text after</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table10-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table10-expected.html b/Editor/tests/selection/boundaries-table10-expected.html
new file mode 100644
index 0000000..f2c214b
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table10-expected.html
@@ -0,0 +1,21 @@
+<html>
+  <head></head>
+  <body>
+    <p>Text before</p>
+    [
+    <table>
+      <tbody>
+        <tr>
+          <td>One</td>
+          <td>Two</td>
+        </tr>
+        <tr>
+          <td>Three</td>
+          <td>Four</td>
+        </tr>
+      </tbody>
+    </table>
+    ]
+    <p>Text after</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/boundaries-table10-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/boundaries-table10-input.html b/Editor/tests/selection/boundaries-table10-input.html
new file mode 100644
index 0000000..0b08e8e
--- /dev/null
+++ b/Editor/tests/selection/boundaries-table10-input.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var range = Selection_get();
+    var table = document.getElementsByTagName("TABLE")[0];
+    var offset = DOM_nodeOffset(table);
+    range.end = new Position(table.parentNode,DOM_nodeOffset(table)+1);
+    Selection_set(range.start.node,range.start.offset,range.end.node,range.end.offset);
+    showSelection();
+}
+</script>
+</head>
+<body>
+<p>Text before</p>
+<table>
+  <tr>
+    <td>One</td>
+    <td>Tw[]o</td>
+  </tr>
+  <tr>
+    <td>Three</td>
+    <td>Four</td>
+  </tr>
+</table>
+<p>Text after</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/delete01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/delete01-expected.html b/Editor/tests/selection/delete01-expected.html
new file mode 100644
index 0000000..b3b3b3c
--- /dev/null
+++ b/Editor/tests/selection/delete01-expected.html
@@ -0,0 +1,7 @@
+<html>
+  <head></head>
+  <body>
+    one tw[] three
+    <p>four five six</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/delete01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/delete01-input.html b/Editor/tests/selection/delete01-input.html
new file mode 100644
index 0000000..db1bef1
--- /dev/null
+++ b/Editor/tests/selection/delete01-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_deleteCharacter();
+    showSelection();
+}
+</script>
+</head>
+<body>
+one two[] three
+<p>four five six</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/delete02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/delete02-expected.html b/Editor/tests/selection/delete02-expected.html
new file mode 100644
index 0000000..7209012
--- /dev/null
+++ b/Editor/tests/selection/delete02-expected.html
@@ -0,0 +1,7 @@
+<html>
+  <head></head>
+  <body>
+    one [] three
+    <p>four five six</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/delete02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/delete02-input.html b/Editor/tests/selection/delete02-input.html
new file mode 100644
index 0000000..ecb3df5
--- /dev/null
+++ b/Editor/tests/selection/delete02-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+    showSelection();
+}
+</script>
+</head>
+<body>
+one [two] three
+<p>four five six</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/delete03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/delete03-expected.html b/Editor/tests/selection/delete03-expected.html
new file mode 100644
index 0000000..6ad2497
--- /dev/null
+++ b/Editor/tests/selection/delete03-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><p>one two three[]four five six</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/delete03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/delete03-input.html b/Editor/tests/selection/delete03-input.html
new file mode 100644
index 0000000..9f62e83
--- /dev/null
+++ b/Editor/tests/selection/delete03-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Cursor_deleteCharacter();
+    showSelection();
+}
+</script>
+</head>
+<body>
+one two three
+<p>[]four five six</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/delete04-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/delete04-expected.html b/Editor/tests/selection/delete04-expected.html
new file mode 100644
index 0000000..6ad2497
--- /dev/null
+++ b/Editor/tests/selection/delete04-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><p>one two three[]four five six</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/delete04-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/delete04-input.html b/Editor/tests/selection/delete04-input.html
new file mode 100644
index 0000000..0653b4e
--- /dev/null
+++ b/Editor/tests/selection/delete04-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+    showSelection();
+}
+</script>
+</head>
+<body>
+one two three[
+<p>]four five six</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/delete05-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/delete05-expected.html b/Editor/tests/selection/delete05-expected.html
new file mode 100644
index 0000000..23d8405
--- /dev/null
+++ b/Editor/tests/selection/delete05-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><p>one two [] five six</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/delete05-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/delete05-input.html b/Editor/tests/selection/delete05-input.html
new file mode 100644
index 0000000..2676cbd
--- /dev/null
+++ b/Editor/tests/selection/delete05-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+    showSelection();
+}
+</script>
+</head>
+<body>
+one two [three
+<p>four] five six</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents-list01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents-list01-expected.html b/Editor/tests/selection/deleteContents-list01-expected.html
new file mode 100644
index 0000000..cb82670
--- /dev/null
+++ b/Editor/tests/selection/deleteContents-list01-expected.html
@@ -0,0 +1,25 @@
+<html>
+  <head></head>
+  <body>
+    <ol>
+      <li>One</li>
+      <li>Two</li>
+      <li>Three</li>
+    </ol>
+    <ol>
+      <li>F[]r</li>
+      <li>Five</li>
+      <li>Six</li>
+    </ol>
+    <ol>
+      <li>Seven</li>
+      <li>Eight</li>
+      <li>Nine</li>
+    </ol>
+    <ol>
+      <li>Ten</li>
+      <li>Eleven</li>
+      <li>Twelve</li>
+    </ol>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents-list01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents-list01-input.html b/Editor/tests/selection/deleteContents-list01-input.html
new file mode 100644
index 0000000..0626cb3
--- /dev/null
+++ b/Editor/tests/selection/deleteContents-list01-input.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<ol>
+  <li>One</li>
+  <li>Two</li>
+  <li>Three</li>
+</ol>
+<ol>
+  <li>F[ou]r</li>
+  <li>Five</li>
+  <li>Six</li>
+</ol>
+<ol>
+  <li>Seven</li>
+  <li>Eight</li>
+  <li>Nine</li>
+</ol>
+<ol>
+  <li>Ten</li>
+  <li>Eleven</li>
+  <li>Twelve</li>
+</ol>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents-list02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents-list02-expected.html b/Editor/tests/selection/deleteContents-list02-expected.html
new file mode 100644
index 0000000..9333aa5
--- /dev/null
+++ b/Editor/tests/selection/deleteContents-list02-expected.html
@@ -0,0 +1,24 @@
+<html>
+  <head></head>
+  <body>
+    <ol>
+      <li>One</li>
+      <li>Two</li>
+      <li>Three</li>
+    </ol>
+    <ol>
+      <li>Fo[]ve</li>
+      <li>Six</li>
+    </ol>
+    <ol>
+      <li>Seven</li>
+      <li>Eight</li>
+      <li>Nine</li>
+    </ol>
+    <ol>
+      <li>Ten</li>
+      <li>Eleven</li>
+      <li>Twelve</li>
+    </ol>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents-list02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents-list02-input.html b/Editor/tests/selection/deleteContents-list02-input.html
new file mode 100644
index 0000000..838773b
--- /dev/null
+++ b/Editor/tests/selection/deleteContents-list02-input.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<ol>
+  <li>One</li>
+  <li>Two</li>
+  <li>Three</li>
+</ol>
+<ol>
+  <li>Fo[ur</li>
+  <li>Fi]ve</li>
+  <li>Six</li>
+</ol>
+<ol>
+  <li>Seven</li>
+  <li>Eight</li>
+  <li>Nine</li>
+</ol>
+<ol>
+  <li>Ten</li>
+  <li>Eleven</li>
+  <li>Twelve</li>
+</ol>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents-list03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents-list03-expected.html b/Editor/tests/selection/deleteContents-list03-expected.html
new file mode 100644
index 0000000..92a6973
--- /dev/null
+++ b/Editor/tests/selection/deleteContents-list03-expected.html
@@ -0,0 +1,21 @@
+<html>
+  <head></head>
+  <body>
+    <ol>
+      <li>One</li>
+      <li>Two</li>
+      <li>Three</li>
+    </ol>
+    <ol><li>Fo[]x</li></ol>
+    <ol>
+      <li>Seven</li>
+      <li>Eight</li>
+      <li>Nine</li>
+    </ol>
+    <ol>
+      <li>Ten</li>
+      <li>Eleven</li>
+      <li>Twelve</li>
+    </ol>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/selection/deleteContents-list03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/selection/deleteContents-list03-input.html b/Editor/tests/selection/deleteContents-list03-input.html
new file mode 100644
index 0000000..2431208
--- /dev/null
+++ b/Editor/tests/selection/deleteContents-list03-input.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Selection_deleteContents();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<ol>
+  <li>One</li>
+  <li>Two</li>
+  <li>Three</li>
+</ol>
+<ol>
+  <li>Fo[ur</li>
+  <li>Five</li>
+  <li>Si]x</li>
+</ol>
+<ol>
+  <li>Seven</li>
+  <li>Eight</li>
+  <li>Nine</li>
+</ol>
+<ol>
+  <li>Ten</li>
+  <li>Eleven</li>
+  <li>Twelve</li>
+</ol>
+</body>
+</html>


Mime
View raw message