You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@corinthia.apache.org by ja...@apache.org on 2015/08/14 18:10:26 UTC

[19/51] [abbrv] [partial] incubator-corinthia git commit: added js test files

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/discovery10-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/discovery10-input.html b/experiments/editorFramework/test/Layer0/outline/discovery10-input.html
new file mode 100644
index 0000000..58ff03a
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/discovery10-input.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<h1>99 Top-level heading</h1>
+<h2>First section - not numbered</h2>
+<h2>99 Second section</h2>
+<h2>99 Third section</h2>
+<h2>Fourth section - not numbered</h2>
+<h2>Fifth section - not numbered</h2>
+<h2>99 Sixth section</h2>
+<h2>99 Seventh section</h2>
+<h2>Eighth section - not numbered</h2>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-editing01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-editing01-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-editing01-expected.html
new file mode 100644
index 0000000..f3e172d
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-editing01-expected.html
@@ -0,0 +1,31 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1">
+        <a href="#item1">
+          1
+          d[]
+        </a>
+      </p>
+      <p class="toc1">
+        <a href="#item2">
+          2
+          Two
+        </a>
+      </p>
+      <p class="toc1">
+        <a href="#item3">
+          3
+          Three
+        </a>
+      </p>
+    </nav>
+    <h1 id="item1">d[]</h1>
+    <h1 id="item2">Two</h1>
+    <h1 id="item3">Three</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-editing01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-editing01-input.html b/experiments/editorFramework/test/Layer0/outline/heading-editing01-input.html
new file mode 100644
index 0000000..3333a45
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-editing01-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+    var heading = document.getElementsByTagName("H1")[0];
+    Selection_set(heading.lastChild,0,heading.lastChild,heading.lastChild.nodeValue.length);
+    Cursor_insertCharacter("d");
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<nav class="tableofcontents"></nav>
+<h1>One</h1>
+<h1>Two</h1>
+<h1>Three</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-editing02-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-editing02-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-editing02-expected.html
new file mode 100644
index 0000000..21e8740
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-editing02-expected.html
@@ -0,0 +1,9 @@
+<html>
+  <head>
+  </head>
+  <body>
+    <h1 id="item1">.O.n.e.</h1>
+    <h1 id="item2">.T.w.o.</h1>
+    <h1 id="item3">.T.h.r.e.e.</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-editing02-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-editing02-input.html b/experiments/editorFramework/test/Layer0/outline/heading-editing02-input.html
new file mode 100644
index 0000000..129b3e3
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-editing02-input.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../position/validPositions.js"></script>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    showValidPositions();
+}
+</script>
+</head>
+<body>
+<h1>One</h1>
+<h1>Two</h1>
+<h1>Three</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-editing03-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-editing03-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-editing03-expected.html
new file mode 100644
index 0000000..55e2f54
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-editing03-expected.html
@@ -0,0 +1,18 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1">
+        <a href="#item1">
+          1
+          er
+        </a>
+      </p>
+    </nav>
+    <p>Text</p>
+    <h1 id="item1">er</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-editing03-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-editing03-input.html b/experiments/editorFramework/test/Layer0/outline/heading-editing03-input.html
new file mode 100644
index 0000000..e19e9c9
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-editing03-input.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+    for (var i = 0; i < 7; i++) {
+        Cursor_deleteCharacter();
+        PostponedActions_perform();
+   }
+}
+</script>
+</head>
+<body>
+<nav class="tableofcontents"></nav>
+<p>Text</p>
+<h1>One</h1>
+<p>Oth[]er</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-editing04-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-editing04-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-editing04-expected.html
new file mode 100644
index 0000000..25e101b
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-editing04-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1">[No sections defined]</p>
+    </nav>
+    <p>Texter</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-editing04-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-editing04-input.html b/experiments/editorFramework/test/Layer0/outline/heading-editing04-input.html
new file mode 100644
index 0000000..5888e83
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-editing04-input.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+    for (var i = 0; i < 8; i++) {
+        Cursor_deleteCharacter();
+        PostponedActions_perform();
+   }
+}
+</script>
+</head>
+<body>
+<nav class="tableofcontents"></nav>
+<p>Text</p>
+<h1>One</h1>
+<p>Oth[]er</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-editing05-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-editing05-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-editing05-expected.html
new file mode 100644
index 0000000..b01af02
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-editing05-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1">[No sections defined]</p>
+    </nav>
+    <p>Texer</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-editing05-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-editing05-input.html b/experiments/editorFramework/test/Layer0/outline/heading-editing05-input.html
new file mode 100644
index 0000000..4909327
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-editing05-input.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+    for (var i = 0; i < 9; i++) {
+        Cursor_deleteCharacter();
+        PostponedActions_perform();
+   }
+}
+</script>
+</head>
+<body>
+<nav class="tableofcontents"></nav>
+<p>Text</p>
+<h1>One</h1>
+<p>Oth[]er</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-editing06-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-editing06-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-editing06-expected.html
new file mode 100644
index 0000000..fdb03f8
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-editing06-expected.html
@@ -0,0 +1,17 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1">
+        <a href="#item1">
+          1
+          Oner
+        </a>
+      </p>
+    </nav>
+    <h1 id="item1">Oner</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-editing06-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-editing06-input.html b/experiments/editorFramework/test/Layer0/outline/heading-editing06-input.html
new file mode 100644
index 0000000..c5c6f3e
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-editing06-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+    for (var i = 0; i < 15; i++) {
+        Cursor_deleteCharacter();
+        PostponedActions_perform();
+   }
+}
+</script>
+</head>
+<body>
+<nav class="tableofcontents"></nav>
+<h1>One</h1>
+<h1>Two</h1>
+<h1>Three</h1>
+<p>Oth[]er</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-editing07-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-editing07-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-editing07-expected.html
new file mode 100644
index 0000000..616c3c5
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-editing07-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">1</a></p>
+    </nav>
+    <h1 id="item1"><br/></h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-editing07-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-editing07-input.html b/experiments/editorFramework/test/Layer0/outline/heading-editing07-input.html
new file mode 100644
index 0000000..bcaa501
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-editing07-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+    for (var i = 0; i < 19; i++) {
+        Cursor_deleteCharacter();
+        PostponedActions_perform();
+    }
+}
+</script>
+</head>
+<body>
+<nav class="tableofcontents"></nav>
+<h1>One</h1>
+<h1>Two</h1>
+<h1>Three</h1>
+<p>Other[]</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-editing08-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-editing08-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-editing08-expected.html
new file mode 100644
index 0000000..7988be2
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-editing08-expected.html
@@ -0,0 +1,18 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1">
+        <a href="#item1">
+          1
+          One
+        </a>
+      </p>
+    </nav>
+    <h1 id="item1">One</h1>
+    <p>Two</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-editing08-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-editing08-input.html b/experiments/editorFramework/test/Layer0/outline/heading-editing08-input.html
new file mode 100644
index 0000000..1bc61a3
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-editing08-input.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+    for (var i = 0; i < 19; i++) {
+        Cursor_deleteCharacter();
+        PostponedActions_perform();
+    }
+    Cursor_insertCharacter("One");
+    Cursor_enterPressed();
+    Cursor_insertCharacter("Two");
+}
+</script>
+</head>
+<body>
+<nav class="tableofcontents"></nav>
+<h1>One</h1>
+<h1>Two</h1>
+<h1>Three</h1>
+<p>Other[]</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01a-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01a-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01a-expected.html
new file mode 100644
index 0000000..108bbfa
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01a-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <h1 id="item1">[One]</h1>
+    <ol>
+      <li>Two</li>
+      <li>Three</li>
+      <li>Four</li>
+      <li>Five</li>
+    </ol>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01a-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01a-input.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01a-input.html
new file mode 100644
index 0000000..81cd522
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01a-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<ol>
+  <li>[One]</li>
+  <li>Two</li>
+  <li>Three</li>
+  <li>Four</li>
+  <li>Five</li>
+</ol>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01b-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01b-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01b-expected.html
new file mode 100644
index 0000000..ca7eceb
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01b-expected.html
@@ -0,0 +1,14 @@
+<html>
+  <head></head>
+  <body>
+    <ol>
+      <li>One</li>
+      <li>Two</li>
+    </ol>
+    <h1 id="item1">[Three]</h1>
+    <ol>
+      <li>Four</li>
+      <li>Five</li>
+    </ol>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01b-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01b-input.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01b-input.html
new file mode 100644
index 0000000..85edf0b
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01b-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<ol>
+  <li>One</li>
+  <li>Two</li>
+  <li>[Three]</li>
+  <li>Four</li>
+  <li>Five</li>
+</ol>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01c-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01c-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01c-expected.html
new file mode 100644
index 0000000..f7cbcf3
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01c-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <ol>
+      <li>One</li>
+      <li>Two</li>
+      <li>Three</li>
+      <li>Four</li>
+    </ol>
+    <h1 id="item1">[Five]</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01c-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01c-input.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01c-input.html
new file mode 100644
index 0000000..c476cbb
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy01c-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<ol>
+  <li>One</li>
+  <li>Two</li>
+  <li>Three</li>
+  <li>Four</li>
+  <li>[Five]</li>
+</ol>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02a-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02a-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02a-expected.html
new file mode 100644
index 0000000..e941693
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02a-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <h1 id="item1">[One]</h1>
+    <ol>
+      <li><p>Two</p></li>
+      <li><p>Three</p></li>
+      <li><p>Four</p></li>
+      <li><p>Five</p></li>
+    </ol>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02a-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02a-input.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02a-input.html
new file mode 100644
index 0000000..5b8e238
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02a-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<ol>
+  <li><p>[One]</p></li>
+  <li><p>Two</p></li>
+  <li><p>Three</p></li>
+  <li><p>Four</p></li>
+  <li><p>Five</p></li>
+</ol>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02b-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02b-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02b-expected.html
new file mode 100644
index 0000000..a6c1992
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02b-expected.html
@@ -0,0 +1,14 @@
+<html>
+  <head></head>
+  <body>
+    <ol>
+      <li><p>One</p></li>
+      <li><p>Two</p></li>
+    </ol>
+    <h1 id="item1">[Three]</h1>
+    <ol>
+      <li><p>Four</p></li>
+      <li><p>Five</p></li>
+    </ol>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02b-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02b-input.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02b-input.html
new file mode 100644
index 0000000..f6e8271
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02b-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<ol>
+  <li><p>One</p></li>
+  <li><p>Two</p></li>
+  <li><p>[Three]</p></li>
+  <li><p>Four</p></li>
+  <li><p>Five</p></li>
+</ol>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02c-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02c-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02c-expected.html
new file mode 100644
index 0000000..2a7e541
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02c-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <ol>
+      <li><p>One</p></li>
+      <li><p>Two</p></li>
+      <li><p>Three</p></li>
+      <li><p>Four</p></li>
+    </ol>
+    <h1 id="item1">[Five]</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02c-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02c-input.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02c-input.html
new file mode 100644
index 0000000..84f471b
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy02c-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<ol>
+  <li><p>One</p></li>
+  <li><p>Two</p></li>
+  <li><p>Three</p></li>
+  <li><p>Four</p></li>
+  <li><p>[Five]</p></li>
+</ol>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03a-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03a-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03a-expected.html
new file mode 100644
index 0000000..5efc7d6
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03a-expected.html
@@ -0,0 +1,16 @@
+<html>
+  <head></head>
+  <body>
+    <ol>
+      <li><p>One</p></li>
+    </ol>
+    <h1 id="item1">[Two]</h1>
+    <ol>
+      <li>
+        <p>Three</p>
+        <p>Four</p>
+      </li>
+      <li><p>Five</p></li>
+    </ol>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03a-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03a-input.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03a-input.html
new file mode 100644
index 0000000..d30c1a5
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03a-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<ol>
+  <li><p>One</p></li>
+  <li>
+    <p>[Two]</p>
+    <p>Three</p>
+    <p>Four</p>
+  </li>
+  <li><p>Five</p></li>
+</ol>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03b-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03b-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03b-expected.html
new file mode 100644
index 0000000..a6c1992
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03b-expected.html
@@ -0,0 +1,14 @@
+<html>
+  <head></head>
+  <body>
+    <ol>
+      <li><p>One</p></li>
+      <li><p>Two</p></li>
+    </ol>
+    <h1 id="item1">[Three]</h1>
+    <ol>
+      <li><p>Four</p></li>
+      <li><p>Five</p></li>
+    </ol>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03b-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03b-input.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03b-input.html
new file mode 100644
index 0000000..3ddf170
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03b-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<ol>
+  <li><p>One</p></li>
+  <li>
+    <p>Two</p>
+    <p>[Three]</p>
+    <p>Four</p>
+  </li>
+  <li><p>Five</p></li>
+</ol>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03c-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03c-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03c-expected.html
new file mode 100644
index 0000000..0ae7cc1
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03c-expected.html
@@ -0,0 +1,16 @@
+<html>
+  <head></head>
+  <body>
+    <ol>
+      <li><p>One</p></li>
+      <li>
+        <p>Two</p>
+        <p>Three</p>
+      </li>
+    </ol>
+    <h1 id="item1">[Four]</h1>
+    <ol>
+      <li><p>Five</p></li>
+    </ol>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03c-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03c-input.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03c-input.html
new file mode 100644
index 0000000..0ab35d4
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy03c-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<ol>
+  <li><p>One</p></li>
+  <li>
+    <p>Two</p>
+    <p>Three</p>
+    <p>[Four]</p>
+  </li>
+  <li><p>Five</p></li>
+</ol>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04a-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04a-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04a-expected.html
new file mode 100644
index 0000000..a95e2c1
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04a-expected.html
@@ -0,0 +1,18 @@
+<html>
+  <head></head>
+  <body>
+    <ol>
+      <li>One</li>
+    </ol>
+    <h1 id="item1">[Two]</h1>
+    <ol>
+      <li>
+        <ul>
+          <li>Three</li>
+          <li>Four</li>
+        </ul>
+      </li>
+      <li>Five</li>
+    </ol>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04a-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04a-input.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04a-input.html
new file mode 100644
index 0000000..426b96e
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04a-input.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<ol>
+  <li>One</li>
+  <li>
+    <ul>
+      <li>[Two]</li>
+      <li>Three</li>
+      <li>Four</li>
+    </ul>
+  </li>
+  <li>Five</li>
+</ol>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04b-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04b-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04b-expected.html
new file mode 100644
index 0000000..ca2038a
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04b-expected.html
@@ -0,0 +1,14 @@
+<html>
+  <head></head>
+  <body>
+    <ol>
+      <li>One</li>
+      <li><ul><li>Two</li></ul></li>
+    </ol>
+    <h1 id="item1">[Three]</h1>
+    <ol>
+      <li><ul><li>Four</li></ul></li>
+      <li>Five</li>
+    </ol>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04b-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04b-input.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04b-input.html
new file mode 100644
index 0000000..34593b2
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04b-input.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<ol>
+  <li>One</li>
+  <li>
+    <ul>
+      <li>Two</li>
+      <li>[Three]</li>
+      <li>Four</li>
+    </ul>
+  </li>
+  <li>Five</li>
+</ol>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04c-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04c-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04c-expected.html
new file mode 100644
index 0000000..c320022
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04c-expected.html
@@ -0,0 +1,18 @@
+<html>
+  <head></head>
+  <body>
+    <ol>
+      <li>One</li>
+      <li>
+        <ul>
+          <li>Two</li>
+          <li>Three</li>
+        </ul>
+      </li>
+    </ol>
+    <h1 id="item1">[Four]</h1>
+    <ol>
+      <li>Five</li>
+    </ol>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04c-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04c-input.html b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04c-input.html
new file mode 100644
index 0000000..6f148fe
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-hierarchy04c-input.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<ol>
+  <li>One</li>
+  <li>
+    <ul>
+      <li>Two</li>
+      <li>Three</li>
+      <li>[Four]</li>
+    </ul>
+  </li>
+  <li>Five</li>
+</ol>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering01-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering01-expected.html
new file mode 100644
index 0000000..5673eba
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering01-expected.html
@@ -0,0 +1,28 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">One</a></p>
+      <p class="toc2"><a href="#item2">One - first subsection</a></p>
+      <p class="toc2"><a href="#item3">One - second subsection</a></p>
+      <p class="toc1"><a href="#item4">Two</a></p>
+      <p class="toc2"><a href="#item5">Two - first subsection</a></p>
+      <p class="toc3"><a href="#item6">Two - first level 3</a></p>
+      <p class="toc3"><a href="#item7">Two - second level 3</a></p>
+      <p class="toc2"><a href="#item8">Two - second subsection</a></p>
+      <p class="toc1"><a href="#item9">Three</a></p>
+    </nav>
+    <h1 id="item1">One</h1>
+    <h2 id="item2">One - first subsection</h2>
+    <h2 id="item3">One - second subsection</h2>
+    <h1 id="item4">Two</h1>
+    <h2 id="item5">Two - first subsection</h2>
+    <h3 id="item6">Two - first level 3</h3>
+    <h3 id="item7">Two - second level 3</h3>
+    <h2 id="item8">Two - second subsection</h2>
+    <h1 id="item9">Three</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering01-input.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering01-input.html
new file mode 100644
index 0000000..97f85d0
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering01-input.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+</style>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+<nav class="tableofcontents"></nav>
+<h1>One</h1>
+  <h2>One - first subsection</h2>
+  <h2>One - second subsection</h2>
+<h1>Two</h1>
+  <h2>Two - first subsection</h2>
+    <h3>Two - first level 3</h3>
+    <h3>Two - second level 3</h3>
+  <h2>Two - second subsection</h2>
+<h1>Three</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering02-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering02-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering02-expected.html
new file mode 100644
index 0000000..4d685d4
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering02-expected.html
@@ -0,0 +1,28 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">1 One</a></p>
+      <p class="toc2"><a href="#item2">1.1 One - first subsection</a></p>
+      <p class="toc2"><a href="#item3">1.2 One - second subsection</a></p>
+      <p class="toc1"><a href="#item4">2 Two</a></p>
+      <p class="toc2"><a href="#item5">2.1 Two - first subsection</a></p>
+      <p class="toc3"><a href="#item6">2.1.1 Two - first level 3</a></p>
+      <p class="toc3"><a href="#item7">2.1.2 Two - second level 3</a></p>
+      <p class="toc2"><a href="#item8">2.2 Two - second subsection</a></p>
+      <p class="toc1"><a href="#item9">3 Three</a></p>
+    </nav>
+    <h1 id="item1">One</h1>
+    <h2 id="item2">One - first subsection</h2>
+    <h2 id="item3">One - second subsection</h2>
+    <h1 id="item4">Two</h1>
+    <h2 id="item5">Two - first subsection</h2>
+    <h3 id="item6">Two - first level 3</h3>
+    <h3 id="item7">Two - second level 3</h3>
+    <h2 id="item8">Two - second subsection</h2>
+    <h1 id="item9">Three</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering02-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering02-input.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering02-input.html
new file mode 100644
index 0000000..a5e8d03
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering02-input.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+</style>
+<script>
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+<nav class="tableofcontents"></nav>
+<h1>One</h1>
+  <h2>One - first subsection</h2>
+  <h2>One - second subsection</h2>
+<h1>Two</h1>
+  <h2>Two - first subsection</h2>
+    <h3>Two - first level 3</h3>
+    <h3>Two - second level 3</h3>
+  <h2>Two - second subsection</h2>
+<h1>Three</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering03-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering03-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering03-expected.html
new file mode 100644
index 0000000..4d685d4
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering03-expected.html
@@ -0,0 +1,28 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">1 One</a></p>
+      <p class="toc2"><a href="#item2">1.1 One - first subsection</a></p>
+      <p class="toc2"><a href="#item3">1.2 One - second subsection</a></p>
+      <p class="toc1"><a href="#item4">2 Two</a></p>
+      <p class="toc2"><a href="#item5">2.1 Two - first subsection</a></p>
+      <p class="toc3"><a href="#item6">2.1.1 Two - first level 3</a></p>
+      <p class="toc3"><a href="#item7">2.1.2 Two - second level 3</a></p>
+      <p class="toc2"><a href="#item8">2.2 Two - second subsection</a></p>
+      <p class="toc1"><a href="#item9">3 Three</a></p>
+    </nav>
+    <h1 id="item1">One</h1>
+    <h2 id="item2">One - first subsection</h2>
+    <h2 id="item3">One - second subsection</h2>
+    <h1 id="item4">Two</h1>
+    <h2 id="item5">Two - first subsection</h2>
+    <h3 id="item6">Two - first level 3</h3>
+    <h3 id="item7">Two - second level 3</h3>
+    <h2 id="item8">Two - second subsection</h2>
+    <h1 id="item9">Three</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering03-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering03-input.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering03-input.html
new file mode 100644
index 0000000..34a4a5d
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering03-input.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+</style>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+<nav class="tableofcontents"></nav>
+<h1>9 One</h1>
+  <h2>9 One - first subsection</h2>
+  <h2>9 One - second subsection</h2>
+<h1>91.331 Two</h1>
+  <h2>4. Two - first subsection</h2>
+    <h3>441 Two - first level 3</h3>
+    <h3>9.55.41 Two - second level 3</h3>
+  <h2>4.24 Two - second subsection</h2>
+<h1>1.2.3.4.5 Three</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering04-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering04-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering04-expected.html
new file mode 100644
index 0000000..8261741
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering04-expected.html
@@ -0,0 +1,28 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">One</a></p>
+      <p class="toc2"><a href="#item2">One - first subsection</a></p>
+      <p class="toc2"><a href="#item3">One - second subsection</a></p>
+      <p class="toc1"><a href="#item4">Two</a></p>
+      <p class="toc2"><a href="#item5">Two - first subsection</a></p>
+      <p class="toc3"><a href="#item6">Two - first level 3</a></p>
+      <p class="toc3"><a href="#item7">Two - second level 3</a></p>
+      <p class="toc2"><a href="#item8">Two - second subsection</a></p>
+      <p class="toc1"><a href="#item9">Three</a></p>
+    </nav>
+    <h1 class="Unnumbered" id="item1">One</h1>
+    <h2 class="Unnumbered" id="item2">One - first subsection</h2>
+    <h2 class="Unnumbered" id="item3">One - second subsection</h2>
+    <h1 class="Unnumbered" id="item4">Two</h1>
+    <h2 class="Unnumbered" id="item5">Two - first subsection</h2>
+    <h3 class="Unnumbered" id="item6">Two - first level 3</h3>
+    <h3 class="Unnumbered" id="item7">Two - second level 3</h3>
+    <h2 class="Unnumbered" id="item8">Two - second subsection</h2>
+    <h1 class="Unnumbered" id="item9">Three</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering04-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering04-input.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering04-input.html
new file mode 100644
index 0000000..bc6e0c5
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering04-input.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+</style>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+    setNumbering(false);
+    PostponedActions_perform();
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+<nav class="tableofcontents"></nav>
+<h1>9 One</h1>
+  <h2>9 One - first subsection</h2>
+  <h2>9 One - second subsection</h2>
+<h1>91.331 Two</h1>
+  <h2>4. Two - first subsection</h2>
+    <h3>441 Two - first level 3</h3>
+    <h3>9.55.41 Two - second level 3</h3>
+  <h2>4.24 Two - second subsection</h2>
+<h1>1.2.3.4.5 Three</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering05-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering05-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering05-expected.html
new file mode 100644
index 0000000..9391a21
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering05-expected.html
@@ -0,0 +1,16 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">1 One</a></p>
+      <p class="toc1"><a href="#item2">2 Two</a></p>
+      <p class="toc1"><a href="#item3">3 Three</a></p>
+    </nav>
+    <h1 id="item1">One</h1>
+    <h1 id="item2">Two</h1>
+    <h1 id="item3">Three</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering05-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering05-input.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering05-input.html
new file mode 100644
index 0000000..f508c81
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering05-input.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+</style>
+<script>
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+<nav class="tableofcontents"></nav>
+[<p>One</p>
+<p>Two</p>
+<p>Three</p>]
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering06-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering06-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering06-expected.html
new file mode 100644
index 0000000..6164cfb
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering06-expected.html
@@ -0,0 +1,16 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">One</a></p>
+      <p class="toc1"><a href="#item3">Two</a></p>
+      <p class="toc1"><a href="#item2">Three</a></p>
+    </nav>
+    <h1 id="item1">One</h1>
+    <h1 id="item3">Two</h1>
+    <h1 id="item2">Three</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering06-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering06-input.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering06-input.html
new file mode 100644
index 0000000..8c11784
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering06-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+</style>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+<nav class="tableofcontents"></nav>
+<h1>One</h1>
+[<p>Two</p>]
+<h1>Three</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering07-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering07-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering07-expected.html
new file mode 100644
index 0000000..293b448
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering07-expected.html
@@ -0,0 +1,16 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">1 One</a></p>
+      <p class="toc1"><a href="#item3">2 Two</a></p>
+      <p class="toc1"><a href="#item2">Three</a></p>
+    </nav>
+    <h1 id="item1">One</h1>
+    <h1 id="item3">Two</h1>
+    <h1 class="Unnumbered" id="item2">Three</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering07-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering07-input.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering07-input.html
new file mode 100644
index 0000000..11c1b6f
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering07-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+</style>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+<nav class="tableofcontents"></nav>
+<h1>7 One</h1>
+[<p>Two</p>]
+<h1>Three</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering08-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering08-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering08-expected.html
new file mode 100644
index 0000000..bfea97f
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering08-expected.html
@@ -0,0 +1,16 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">One</a></p>
+      <p class="toc1"><a href="#item3">1 Two</a></p>
+      <p class="toc1"><a href="#item2">2 Three</a></p>
+    </nav>
+    <h1 class="Unnumbered" id="item1">One</h1>
+    <h1 id="item3">Two</h1>
+    <h1 id="item2">Three</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering08-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering08-input.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering08-input.html
new file mode 100644
index 0000000..6a00d8a
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering08-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+</style>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+<nav class="tableofcontents"></nav>
+<h1>One</h1>
+[<p>Two</p>]
+<h1>7 Three</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering09-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering09-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering09-expected.html
new file mode 100644
index 0000000..0fcb631
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering09-expected.html
@@ -0,0 +1,16 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">1 One</a></p>
+      <p class="toc1"><a href="#item3">2 Two</a></p>
+      <p class="toc1"><a href="#item2">3 Three</a></p>
+    </nav>
+    <h1 id="item1">One</h1>
+    <h1 id="item3">Two</h1>
+    <h1 id="item2">Three</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering09-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering09-input.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering09-input.html
new file mode 100644
index 0000000..2fbff2f
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering09-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+</style>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+<nav class="tableofcontents"></nav>
+<h1>7. One</h1>
+[<p>Two</p>]
+<h1>7. Three</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering10-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering10-expected.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering10-expected.html
new file mode 100644
index 0000000..2dfecf7
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering10-expected.html
@@ -0,0 +1,15 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="item1">One</h1>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">1 One</a></p>
+      <p class="toc1"><a href="#item2">2 Two</a></p>
+    </nav>
+    <h1 id="item2">Two</h1>
+    <p><br/></p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/heading-numbering10-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/heading-numbering10-input.html b/experiments/editorFramework/test/Layer0/outline/heading-numbering10-input.html
new file mode 100644
index 0000000..0b447a7
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/heading-numbering10-input.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+</style>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+
+    Cursor_insertCharacter("Two");
+    Formatting_applyFormattingChanges("h1",null);
+    PostponedActions_perform();
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+<h1>1 One</h1>
+<p>[]<br></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/headings01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/headings01-expected.html b/experiments/editorFramework/test/Layer0/outline/headings01-expected.html
new file mode 100644
index 0000000..3e783b7
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/headings01-expected.html
@@ -0,0 +1,20 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1">
+        <a href="#item1">
+          1
+          []
+        </a>
+      </p>
+    </nav>
+    <h1 id="item1">
+      []
+      <br/>
+    </h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/headings01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/headings01-input.html b/experiments/editorFramework/test/Layer0/outline/headings01-input.html
new file mode 100644
index 0000000..362df1e
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/headings01-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    showSelection();
+    prependTableOfContents();
+}
+</script>
+</head>
+<body>
+[]
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/headings02-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/headings02-expected.html b/experiments/editorFramework/test/Layer0/outline/headings02-expected.html
new file mode 100644
index 0000000..3e783b7
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/headings02-expected.html
@@ -0,0 +1,20 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1">
+        <a href="#item1">
+          1
+          []
+        </a>
+      </p>
+    </nav>
+    <h1 id="item1">
+      []
+      <br/>
+    </h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/headings02-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/headings02-input.html b/experiments/editorFramework/test/Layer0/outline/headings02-input.html
new file mode 100644
index 0000000..03f4b66
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/headings02-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    showSelection();
+    prependTableOfContents();
+}
+</script>
+</head>
+<body>
+<p>[]<br/></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/headings03-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/headings03-expected.html b/experiments/editorFramework/test/Layer0/outline/headings03-expected.html
new file mode 100644
index 0000000..5c278a4
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/headings03-expected.html
@@ -0,0 +1,17 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1">
+        <a href="#item1">
+          1
+          A[]
+        </a>
+      </p>
+    </nav>
+    <h1 id="item1">A[]</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/headings03-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/headings03-input.html b/experiments/editorFramework/test/Layer0/outline/headings03-input.html
new file mode 100644
index 0000000..1915e19
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/headings03-input.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    Cursor_insertCharacter("A");
+    showSelection();
+    prependTableOfContents();
+}
+</script>
+</head>
+<body>
+<p>[]<br/></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/headings04-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/headings04-expected.html b/experiments/editorFramework/test/Layer0/outline/headings04-expected.html
new file mode 100644
index 0000000..1da4740
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/headings04-expected.html
@@ -0,0 +1,17 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1">
+        <a href="#item1">
+          1
+          [Test]
+        </a>
+      </p>
+    </nav>
+    <h1 id="item1">[Test]</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/headings04-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/headings04-input.html b/experiments/editorFramework/test/Layer0/outline/headings04-input.html
new file mode 100644
index 0000000..b8e414a
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/headings04-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    showSelection();
+    prependTableOfContents();
+}
+</script>
+</head>
+<body>
+<p>[Test]</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/headings05-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/headings05-expected.html b/experiments/editorFramework/test/Layer0/outline/headings05-expected.html
new file mode 100644
index 0000000..1da4740
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/headings05-expected.html
@@ -0,0 +1,17 @@
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1">
+        <a href="#item1">
+          1
+          [Test]
+        </a>
+      </p>
+    </nav>
+    <h1 id="item1">[Test]</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/headings05-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/headings05-input.html b/experiments/editorFramework/test/Layer0/outline/headings05-input.html
new file mode 100644
index 0000000..f913948
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/headings05-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+    Formatting_applyFormattingChanges("H1",{});
+    PostponedActions_perform();
+    showSelection();
+    prependTableOfContents();
+}
+</script>
+</head>
+<body>
+[Test]
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/itemtypes01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/itemtypes01-expected.html b/experiments/editorFramework/test/Layer0/outline/itemtypes01-expected.html
new file mode 100644
index 0000000..09530eb
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/itemtypes01-expected.html
@@ -0,0 +1,82 @@
+Sections:
+    1 Heading A (item1)
+        1.1 Heading B (item2)
+        1.2 Heading C (item3)
+    2 Heading D (item4)
+        2.1 Heading E (item5)
+        2.2 Heading F (item6)
+Figures:
+    1 First figure caption (item8)
+    2 Second figure caption (item10)
+    3 (item12)
+Tables:
+    1 First table caption (item7)
+    2 Second table caption (item9)
+    3 (item11)
+<html>
+  <head>
+    <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
+    <title>Test document</title>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="item1">Heading A</h1>
+    <h2 id="item2">Heading B</h2>
+    <h2 id="item3">Heading C</h2>
+    <h1 id="item4">Heading D</h1>
+    <h2 id="item5">Heading E</h2>
+    <h2 id="item6">Heading F</h2>
+    <table align="center" id="item7" width="80%">
+      <caption>First table caption</caption>
+      <tbody>
+        <tr>
+          <td>First</td>
+          <td>First</td>
+        </tr>
+        <tr>
+          <td>First</td>
+          <td>First</td>
+        </tr>
+      </tbody>
+    </table>
+    <figure id="item8">
+      <p>First figure content</p>
+      <figcaption>First figure caption</figcaption>
+    </figure>
+    <table align="center" id="item9" width="80%">
+      <caption>Second table caption</caption>
+      <tbody>
+        <tr>
+          <td>Second</td>
+          <td>Second</td>
+        </tr>
+        <tr>
+          <td>Second</td>
+          <td>Second</td>
+        </tr>
+      </tbody>
+    </table>
+    <figure id="item10">
+      <p>[Second figure content]</p>
+      <figcaption>Second figure caption</figcaption>
+    </figure>
+    <table align="center" id="item11" width="80%">
+      <caption/>
+      <tbody>
+        <tr>
+          <td>Third</td>
+          <td>Third</td>
+        </tr>
+        <tr>
+          <td>Third</td>
+          <td>Third</td>
+        </tr>
+      </tbody>
+    </table>
+    <figure id="item12">
+      <p>[Third figure content]</p>
+      <figcaption/>
+    </figure>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/itemtypes01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/itemtypes01-input.html b/experiments/editorFramework/test/Layer0/outline/itemtypes01-input.html
new file mode 100644
index 0000000..01fe246
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/itemtypes01-input.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Test document</title>
+<style>
+</style>
+<script type="text/javascript">
+
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    setNumbering(true);
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+
+<h1>Heading A</h1>
+<h2>Heading B</h2>
+<h2>Heading C</h2>
+<h1>Heading D</h1>
+<h2>Heading E</h2>
+<h2>Heading F</h2>
+
+<table width="80%" align="center">
+  <caption>First table caption</caption>
+  <tr>
+    <td>First</td>
+    <td>First</td>
+  </tr>
+  <tr>
+    <td>First</td>
+    <td>First</td>
+  </tr>
+</table>
+
+<figure>
+  <p>[First figure content]</p>
+  <figcaption>First figure caption</figcaption>
+</figure>
+
+<table width="80%" align="center">
+  <caption>Second table caption</caption>
+  <tr>
+    <td>Second</td>
+    <td>Second</td>
+  </tr>
+  <tr>
+    <td>Second</td>
+    <td>Second</td>
+  </tr>
+</table>
+
+<figure>
+  <p>[Second figure content]</p>
+  <figcaption>Second figure caption</figcaption>
+</figure>
+
+<table width="80%" align="center">
+  <tr>
+    <td>Third</td>
+    <td>Third</td>
+  </tr>
+  <tr>
+    <td>Third</td>
+    <td>Third</td>
+  </tr>
+</table>
+
+<figure>
+  <p>[Third figure content]</p>
+</figure>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/listOfFigures01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/listOfFigures01-expected.html b/experiments/editorFramework/test/Layer0/outline/listOfFigures01-expected.html
new file mode 100644
index 0000000..34e9a8f
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/listOfFigures01-expected.html
@@ -0,0 +1,49 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <nav class="listoffigures">
+      <p class="toc1">
+        <a href="#item1">
+          1
+          Test figure A
+        </a>
+      </p>
+      <p class="toc1">
+        <a href="#item2">
+          2
+          Test figure B
+        </a>
+      </p>
+      <p class="toc1">
+        <a href="#item3">
+          3
+          Test figure C
+        </a>
+      </p>
+      <p class="toc1">
+        <a href="#item4">
+          4
+          Test figure D
+        </a>
+      </p>
+    </nav>
+    <figure id="item1">
+      (figure content)
+      <figcaption>Test figure A</figcaption>
+    </figure>
+    <figure id="item2">
+      (figure content)
+      <figcaption>Test figure B</figcaption>
+    </figure>
+    <figure id="item3">
+      (figure content)
+      <figcaption>Test figure C</figcaption>
+    </figure>
+    <figure id="item4">
+      (figure content)
+      <figcaption>Test figure D</figcaption>
+    </figure>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/listOfFigures01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/listOfFigures01-input.html b/experiments/editorFramework/test/Layer0/outline/listOfFigures01-input.html
new file mode 100644
index 0000000..3e22f5a
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/listOfFigures01-input.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+
+    // Create a series of figures
+    createTestFigures(4);
+
+    // Add a list of figures
+    Selection_set(document.body,0,document.body,0);
+    Outline_insertListOfFigures();
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/listOfFigures02-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/listOfFigures02-expected.html b/experiments/editorFramework/test/Layer0/outline/listOfFigures02-expected.html
new file mode 100644
index 0000000..73833c7
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/listOfFigures02-expected.html
@@ -0,0 +1,52 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <nav class="listoffigures">
+      <p class="toc1">
+        <a href="#item1">
+          1
+          Test figure A
+        </a>
+      </p>
+      <p class="toc1">
+        <a href="#item2">
+          2
+          Test figure BXYZ
+        </a>
+      </p>
+      <p class="toc1">
+        <a href="#item3">
+          3
+          Test figure C
+        </a>
+      </p>
+      <p class="toc1">
+        <a href="#item4">
+          4
+          Test figure D
+        </a>
+      </p>
+    </nav>
+    <figure id="item1">
+      (figure content)
+      <figcaption>Test figure A</figcaption>
+    </figure>
+    <figure id="item2">
+      (figure content)
+      <figcaption>
+        Test figure B
+        XYZ
+      </figcaption>
+    </figure>
+    <figure id="item3">
+      (figure content)
+      <figcaption>Test figure C</figcaption>
+    </figure>
+    <figure id="item4">
+      (figure content)
+      <figcaption>Test figure D</figcaption>
+    </figure>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/listOfFigures02-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/listOfFigures02-input.html b/experiments/editorFramework/test/Layer0/outline/listOfFigures02-input.html
new file mode 100644
index 0000000..81d0b70
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/listOfFigures02-input.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+
+    // Create a series of figures
+    createTestFigures(4);
+
+    // Add a list of figures
+    Selection_set(document.body,0,document.body,0);
+    Outline_insertListOfFigures();
+    PostponedActions_perform();
+
+    // Modify the second figure caption, to verify that the change is reflected in the LOF
+    var figcaption = document.getElementsByTagName("figcaption")[1];
+    DOM_appendChild(figcaption,DOM_createTextNode(document,"XYZ"));
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/listOfFigures03-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/listOfFigures03-expected.html b/experiments/editorFramework/test/Layer0/outline/listOfFigures03-expected.html
new file mode 100644
index 0000000..cc14ffe
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/listOfFigures03-expected.html
@@ -0,0 +1,49 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <nav class="listoffigures">
+      <p class="toc1">
+        <a href="#item1">
+          1
+          Test figure A
+        </a>
+      </p>
+      <p class="toc1">
+        <a href="#item2">
+          2
+          TeXYZst figure B
+        </a>
+      </p>
+      <p class="toc1">
+        <a href="#item3">
+          3
+          Test figure C
+        </a>
+      </p>
+      <p class="toc1">
+        <a href="#item4">
+          4
+          Test figure D
+        </a>
+      </p>
+    </nav>
+    <figure id="item1">
+      (figure content)
+      <figcaption>Test figure A</figcaption>
+    </figure>
+    <figure id="item2">
+      (figure content)
+      <figcaption>TeXYZst figure B</figcaption>
+    </figure>
+    <figure id="item3">
+      (figure content)
+      <figcaption>Test figure C</figcaption>
+    </figure>
+    <figure id="item4">
+      (figure content)
+      <figcaption>Test figure D</figcaption>
+    </figure>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/listOfFigures03-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/listOfFigures03-input.html b/experiments/editorFramework/test/Layer0/outline/listOfFigures03-input.html
new file mode 100644
index 0000000..a87177f
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/listOfFigures03-input.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+
+    // Create a series of figures
+    createTestFigures(4);
+
+    // Add a list of figures
+    Selection_set(document.body,0,document.body,0);
+    Outline_insertListOfFigures();
+    PostponedActions_perform();
+
+    // Modify the second figure caption, to verify that the change is reflected in the LOF
+    var figcaption = document.getElementsByTagName("figcaption")[1];
+    DOM_insertCharacters(figcaption.lastChild,2,"XYZ");
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/listOfFigures04-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/listOfFigures04-expected.html b/experiments/editorFramework/test/Layer0/outline/listOfFigures04-expected.html
new file mode 100644
index 0000000..28578f1
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/listOfFigures04-expected.html
@@ -0,0 +1,49 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <nav class="listoffigures">
+      <p class="toc1">
+        <a href="#item1">
+          1
+          Test figure A
+        </a>
+      </p>
+      <p class="toc1">
+        <a href="#item2">
+          2
+          Tegure B
+        </a>
+      </p>
+      <p class="toc1">
+        <a href="#item3">
+          3
+          Test figure C
+        </a>
+      </p>
+      <p class="toc1">
+        <a href="#item4">
+          4
+          Test figure D
+        </a>
+      </p>
+    </nav>
+    <figure id="item1">
+      (figure content)
+      <figcaption>Test figure A</figcaption>
+    </figure>
+    <figure id="item2">
+      (figure content)
+      <figcaption>Tegure B</figcaption>
+    </figure>
+    <figure id="item3">
+      (figure content)
+      <figcaption>Test figure C</figcaption>
+    </figure>
+    <figure id="item4">
+      (figure content)
+      <figcaption>Test figure D</figcaption>
+    </figure>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/listOfFigures04-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/listOfFigures04-input.html b/experiments/editorFramework/test/Layer0/outline/listOfFigures04-input.html
new file mode 100644
index 0000000..99c107b
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/listOfFigures04-input.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+
+    // Create a series of figures
+    createTestFigures(4);
+
+    // Add a list of figures
+    Selection_set(document.body,0,document.body,0);
+    Outline_insertListOfFigures();
+    PostponedActions_perform();
+
+    // Modify the second figure caption, to verify that the change is reflected in the LOF
+    var figcaption = document.getElementsByTagName("figcaption")[1];
+    DOM_deleteCharacters(figcaption.lastChild,2,7);
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/listOfFigures05-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/listOfFigures05-expected.html b/experiments/editorFramework/test/Layer0/outline/listOfFigures05-expected.html
new file mode 100644
index 0000000..34e9a8f
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/listOfFigures05-expected.html
@@ -0,0 +1,49 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <nav class="listoffigures">
+      <p class="toc1">
+        <a href="#item1">
+          1
+          Test figure A
+        </a>
+      </p>
+      <p class="toc1">
+        <a href="#item2">
+          2
+          Test figure B
+        </a>
+      </p>
+      <p class="toc1">
+        <a href="#item3">
+          3
+          Test figure C
+        </a>
+      </p>
+      <p class="toc1">
+        <a href="#item4">
+          4
+          Test figure D
+        </a>
+      </p>
+    </nav>
+    <figure id="item1">
+      (figure content)
+      <figcaption>Test figure A</figcaption>
+    </figure>
+    <figure id="item2">
+      (figure content)
+      <figcaption>Test figure B</figcaption>
+    </figure>
+    <figure id="item3">
+      (figure content)
+      <figcaption>Test figure C</figcaption>
+    </figure>
+    <figure id="item4">
+      (figure content)
+      <figcaption>Test figure D</figcaption>
+    </figure>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/listOfFigures05-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/listOfFigures05-input.html b/experiments/editorFramework/test/Layer0/outline/listOfFigures05-input.html
new file mode 100644
index 0000000..f7cfb67
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/listOfFigures05-input.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    Outline_detectSectionNumbering();
+    PostponedActions_perform();
+
+    // Add a list of figures
+    Selection_set(document.body,0,document.body,0);
+    Outline_insertListOfFigures();
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+<figure>
+(figure content)
+<figcaption>Figure 9: Test figure A</figcaption>
+</figure>
+<figure>
+(figure content)
+<figcaption>Figure 9: Test figure B</figcaption>
+</figure>
+<figure>
+(figure content)
+<figcaption>Figure 9: Test figure C</figcaption>
+</figure>
+<figure>
+(figure content)
+<figcaption>Figure 9: Test figure D</figcaption>
+</figure>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/listOfFigures06-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/listOfFigures06-expected.html b/experiments/editorFramework/test/Layer0/outline/listOfFigures06-expected.html
new file mode 100644
index 0000000..d182840
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/listOfFigures06-expected.html
@@ -0,0 +1,29 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <nav class="listoffigures">
+      <p class="toc1"><a href="#item1">Test figure A</a></p>
+      <p class="toc1"><a href="#item2">Test figure B</a></p>
+      <p class="toc1"><a href="#item3">Test figure C</a></p>
+      <p class="toc1"><a href="#item4">Test figure D</a></p>
+    </nav>
+    <figure id="item1">
+      (figure content)
+      <figcaption class="Unnumbered">Test figure A</figcaption>
+    </figure>
+    <figure id="item2">
+      (figure content)
+      <figcaption class="Unnumbered">Test figure B</figcaption>
+    </figure>
+    <figure id="item3">
+      (figure content)
+      <figcaption class="Unnumbered">Test figure C</figcaption>
+    </figure>
+    <figure id="item4">
+      (figure content)
+      <figcaption class="Unnumbered">Test figure D</figcaption>
+    </figure>
+  </body>
+</html>