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:22 UTC

[15/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/reference-update02-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference-update02-expected.html b/experiments/editorFramework/test/Layer0/outline/reference-update02-expected.html
new file mode 100644
index 0000000..92d5bf3
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference-update02-expected.html
@@ -0,0 +1,42 @@
+<html>
+  <head>
+  </head>
+  <body>
+    <p>
+      Reference
+      <a href="#one">1</a>
+    </p>
+    <p>
+      Reference
+      <a href="#two">3</a>
+    </p>
+    <p>
+      Reference
+      <a href="#three">4</a>
+    </p>
+    <figure id="one">
+      <figcaption></figcaption>
+    </figure>
+    <figure id="item1">
+      <figcaption></figcaption>
+    </figure>
+    <figure id="two">
+      <figcaption></figcaption>
+    </figure>
+    <figure id="three">
+      <figcaption></figcaption>
+    </figure>
+    <p>
+      Reference
+      <a href="#one">1</a>
+    </p>
+    <p>
+      Reference
+      <a href="#two">3</a>
+    </p>
+    <p>
+      Reference
+      <a href="#three">4</a>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/reference-update02-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference-update02-input.html b/experiments/editorFramework/test/Layer0/outline/reference-update02-input.html
new file mode 100644
index 0000000..b106603
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference-update02-input.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var two = document.getElementById("two");
+    var figure = DOM_createElement(document,"FIGURE");
+    var figcaption = DOM_createElement(document,"FIGCAPTION");
+    DOM_appendChild(figure,figcaption);
+    DOM_appendChild(figcaption,DOM_createTextNode(document,""));
+    DOM_insertBefore(document.body,figure,two);
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+<p>Reference <a href="#one">x</a></p>
+<p>Reference <a href="#two">x</a></p>
+<p>Reference <a href="#three">x</a></p>
+<figure id="one"><figcaption>Figure 4</figcaption></figure>
+<figure id="two"><figcaption>Figure 4</figcaption></figure>
+<figure id="three"><figcaption>Figure 4</figcaption></figure>
+<p>Reference <a href="#one">x</a></p>
+<p>Reference <a href="#two">x</a></p>
+<p>Reference <a href="#three">x</a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/reference-update03-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference-update03-expected.html b/experiments/editorFramework/test/Layer0/outline/reference-update03-expected.html
new file mode 100644
index 0000000..ec4edae
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference-update03-expected.html
@@ -0,0 +1,42 @@
+<html>
+  <head>
+  </head>
+  <body>
+    <p>
+      Reference
+      <a href="#one">1</a>
+    </p>
+    <p>
+      Reference
+      <a href="#two">3</a>
+    </p>
+    <p>
+      Reference
+      <a href="#three">4</a>
+    </p>
+    <table id="one">
+      <caption></caption>
+    </table>
+    <table id="item1">
+      <caption></caption>
+    </table>
+    <table id="two">
+      <caption></caption>
+    </table>
+    <table id="three">
+      <caption></caption>
+    </table>
+    <p>
+      Reference
+      <a href="#one">1</a>
+    </p>
+    <p>
+      Reference
+      <a href="#two">3</a>
+    </p>
+    <p>
+      Reference
+      <a href="#three">4</a>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/reference-update03-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference-update03-input.html b/experiments/editorFramework/test/Layer0/outline/reference-update03-input.html
new file mode 100644
index 0000000..614c87d
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference-update03-input.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var two = document.getElementById("two");
+    var table = DOM_createElement(document,"TABLE");
+    var caption = DOM_createElement(document,"CAPTION");
+    DOM_appendChild(table,caption);
+    DOM_appendChild(caption,DOM_createTextNode(document,""));
+    DOM_insertBefore(document.body,table,two);
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+<p>Reference <a href="#one">x</a></p>
+<p>Reference <a href="#two">x</a></p>
+<p>Reference <a href="#three">x</a></p>
+<table id="one"><caption>Table 4</caption></table>
+<table id="two"><caption>Table 4</caption></table>
+<table id="three"><caption>Table 4</caption></table>
+<p>Reference <a href="#one">x</a></p>
+<p>Reference <a href="#two">x</a></p>
+<p>Reference <a href="#three">x</a></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/reference01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference01-expected.html b/experiments/editorFramework/test/Layer0/outline/reference01-expected.html
new file mode 100644
index 0000000..fd32c84
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference01-expected.html
@@ -0,0 +1,136 @@
+<html>
+  <head>
+    <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
+    <title>Test document</title>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="item3">New section</h1>
+    <figure id="item2">
+      <figcaption/>
+    </figure>
+    <table id="item1">
+      <caption/>
+    </table>
+    <p>
+      Dynamically added reference:
+      <a href="#hb">2.1</a>
+    </p>
+    <p>
+      Dynamically added reference:
+      <a href="#hb">2.1</a>
+    </p>
+    <p>
+      Dynamically added reference:
+      <a href="#hb">2.1</a>
+    </p>
+    <ul>
+      <li>
+        Reference to
+        <a href="#ha">2</a>
+      </li>
+      <li>
+        Reference to
+        <a href="#hb">2.1</a>
+      </li>
+      <li>
+        Reference to
+        <a href="#hc">2.2</a>
+      </li>
+      <li>
+        Reference to
+        <a href="#hd">3</a>
+      </li>
+      <li>
+        Reference to
+        <a href="#he">3.1</a>
+      </li>
+      <li>
+        Reference to
+        <a href="#hf">3.2</a>
+      </li>
+      <li>
+        Reference to
+        <a href="#fa">2</a>
+      </li>
+      <li>
+        Reference to
+        <a href="#fb">3</a>
+      </li>
+      <li>
+        Reference to
+        <a href="#fc">4</a>
+      </li>
+      <li>
+        Reference to
+        <a href="#ta">2</a>
+      </li>
+      <li>
+        Reference to
+        <a href="#tb">3</a>
+      </li>
+      <li>
+        Reference to
+        <a href="#tc">4</a>
+      </li>
+    </ul>
+    <h1 id="ha">Heading A</h1>
+    <h2 id="hb">Heading B</h2>
+    <h2 id="hc">Heading C</h2>
+    <h1 id="hd">Heading D</h1>
+    <h2 id="he">Heading E</h2>
+    <h2 id="hf">Heading F</h2>
+    <table align="center" id="ta" 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="fa">
+      <p>First figure content</p>
+      <figcaption>First figure caption</figcaption>
+    </figure>
+    <table align="center" id="tb" 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="fb">
+      <p>[Second figure content]</p>
+      <figcaption>Second figure caption</figcaption>
+    </figure>
+    <table align="center" id="tc" width="80%">
+      <caption/>
+      <tbody>
+        <tr>
+          <td>Third</td>
+          <td>Third</td>
+        </tr>
+        <tr>
+          <td>Third</td>
+          <td>Third</td>
+        </tr>
+      </tbody>
+    </table>
+    <figure id="fc">
+      <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/reference01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/reference01-input.html b/experiments/editorFramework/test/Layer0/outline/reference01-input.html
new file mode 100644
index 0000000..4f67d10
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/reference01-input.html
@@ -0,0 +1,123 @@
+<!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();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+    setNumbering(true);
+
+    for (var i = 0; i < 3; i++) {
+        var ref = DOM_createElement(document,"A");
+        DOM_setAttribute(ref,"href","#hb");
+        DOM_appendChild(ref,DOM_createTextNode(document,"abcde"));
+
+        var p = DOM_createElement(document,"P");
+        DOM_appendChild(p,DOM_createTextNode(document,"Dynamically added reference: "));
+        DOM_appendChild(p,ref);
+        DOM_insertBefore(document.body,p,document.body.firstChild);
+    }
+
+    var newSection = DOM_createElement(document,"H1");
+    DOM_appendChild(newSection,DOM_createTextNode(document,"New section"));
+
+    var newFigure = DOM_createElement(document,"FIGURE");
+    var newTable = DOM_createElement(document,"TABLE");
+    DOM_appendChild(newFigure,DOM_createElement(document,"FIGCAPTION"));
+    DOM_appendChild(newTable,DOM_createElement(document,"CAPTION"));
+    DOM_insertBefore(document.body,newTable,document.body.firstChild);
+    DOM_insertBefore(document.body,newFigure,document.body.firstChild);
+    DOM_insertBefore(document.body,newSection,document.body.firstChild);
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+
+<ul>
+  <li>Reference to <a href="#ha">First heading</a></li>
+  <li>Reference to <a href="#hb">Second heading</a></li>
+  <li>Reference to <a href="#hc">Third heading</a></li>
+  <li>Reference to <a href="#hd">Fourth heading</a></li>
+  <li>Reference to <a href="#he">Fifth heading</a></li>
+  <li>Reference to <a href="#hf">Sixth heading</a></li>
+
+  <li>Reference to <a href="#fa">First figure</a></li>
+  <li>Reference to <a href="#fb">Second figure</a></li>
+  <li>Reference to <a href="#fc">Third figure</a></li>
+
+  <li>Reference to <a href="#ta">First table</a></li>
+  <li>Reference to <a href="#tb">Second table</a></li>
+  <li>Reference to <a href="#tc">Third table</a></li>
+</ul>
+
+<h1 id="ha">1 Heading A</h1>
+<h2 id="hb">1 Heading B</h2>
+<h2 id="hc">1 Heading C</h2>
+<h1 id="hd">1 Heading D</h1>
+<h2 id="he">1 Heading E</h2>
+<h2 id="hf">1 Heading F</h2>
+
+<table id="ta" 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 id="fa">
+  <p>[First figure content]</p>
+  <figcaption>
+    First figure caption
+  </figcaption>
+</figure>
+
+<table id="tb" 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 id="fb">
+  <p>[Second figure content]</p>
+  <figcaption>
+    Second figure caption
+  </figcaption>
+</figure>
+
+<table id="tc" width="80%" align="center">
+  <tr>
+    <td>Third</td>
+    <td>Third</td>
+  </tr>
+  <tr>
+    <td>Third</td>
+    <td>Third</td>
+  </tr>
+</table>
+
+<figure id="fc">
+  <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/refsById01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refsById01-expected.html b/experiments/editorFramework/test/Layer0/outline/refsById01-expected.html
new file mode 100644
index 0000000..6df1b7d
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refsById01-expected.html
@@ -0,0 +1,6 @@
+<html>
+  <head></head>
+  <body>
+    <h1 id="item2">Second section</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/refsById01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/refsById01-input.html b/experiments/editorFramework/test/Layer0/outline/refsById01-input.html
new file mode 100644
index 0000000..7be238e
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/refsById01-input.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    UndoManager_clear();
+
+    Selection_selectAll();
+    PostponedActions_perform();
+
+    Clipboard_cut();
+    PostponedActions_perform();
+
+    UndoManager_undo();
+    PostponedActions_perform();
+
+    Outline_deleteItem("item1");
+}
+</script>
+</head>
+<body>
+<h1 id="item1">First section</h1>
+<a href="#item2">ref</a>
+<h1 id="item2">Second section</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/setNumbered-figure01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/setNumbered-figure01-expected.html b/experiments/editorFramework/test/Layer0/outline/setNumbered-figure01-expected.html
new file mode 100644
index 0000000..f21d865
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/setNumbered-figure01-expected.html
@@ -0,0 +1,9 @@
+<html>
+  <head></head>
+  <body>
+    <figure id="item1">
+      <img src="../figures/nothing.png" width="25%"/>
+      <figcaption/>
+    </figure>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/setNumbered-figure01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/setNumbered-figure01-input.html b/experiments/editorFramework/test/Layer0/outline/setNumbered-figure01-input.html
new file mode 100644
index 0000000..7722906
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/setNumbered-figure01-input.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Outline_setNumbered("item1",true);
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<figure id="item1">
+  <img src="../figures/nothing.png" width="25%">
+</figure>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/setNumbered-figure02-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/setNumbered-figure02-expected.html b/experiments/editorFramework/test/Layer0/outline/setNumbered-figure02-expected.html
new file mode 100644
index 0000000..3760ea8
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/setNumbered-figure02-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <figure id="item1">
+      <img src="../figures/nothing.png" width="25%"/>
+    </figure>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/setNumbered-figure02-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/setNumbered-figure02-input.html b/experiments/editorFramework/test/Layer0/outline/setNumbered-figure02-input.html
new file mode 100644
index 0000000..e59b038
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/setNumbered-figure02-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Outline_setNumbered("item1",false);
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<figure id="item1">
+  <img src="../figures/nothing.png" width="25%">
+  <figcaption/>
+</figure>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/setNumbered-figure03-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/setNumbered-figure03-expected.html b/experiments/editorFramework/test/Layer0/outline/setNumbered-figure03-expected.html
new file mode 100644
index 0000000..507cd45
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/setNumbered-figure03-expected.html
@@ -0,0 +1,9 @@
+<html>
+  <head></head>
+  <body>
+    <figure id="item1">
+      <img src="../figures/nothing.png" width="25%"/>
+      <figcaption class="Unnumbered">Test figure[]</figcaption>
+    </figure>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/setNumbered-figure03-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/setNumbered-figure03-input.html b/experiments/editorFramework/test/Layer0/outline/setNumbered-figure03-input.html
new file mode 100644
index 0000000..ee7bee0
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/setNumbered-figure03-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Outline_setNumbered("item1",false);
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<figure id="item1">
+  <img src="../figures/nothing.png" width="25%">
+  <figcaption>Test figure[]</figcaption>
+</figure>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/setNumbered-figure04-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/setNumbered-figure04-expected.html b/experiments/editorFramework/test/Layer0/outline/setNumbered-figure04-expected.html
new file mode 100644
index 0000000..be66066
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/setNumbered-figure04-expected.html
@@ -0,0 +1,9 @@
+<html>
+  <head></head>
+  <body>
+    <figure id="item1">
+      <img src="../figures/nothing.png" width="25%"/>
+      <figcaption>Test figure[]</figcaption>
+    </figure>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/setNumbered-figure04-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/setNumbered-figure04-input.html b/experiments/editorFramework/test/Layer0/outline/setNumbered-figure04-input.html
new file mode 100644
index 0000000..1927c35
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/setNumbered-figure04-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Outline_setNumbered("item1",true);
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<figure id="item1">
+  <img src="../figures/nothing.png" width="25%">
+  <figcaption class="Unnumbered">Test figure[]</figcaption>
+</figure>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/setNumbered-table01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/setNumbered-table01-expected.html b/experiments/editorFramework/test/Layer0/outline/setNumbered-table01-expected.html
new file mode 100644
index 0000000..330b6d5
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/setNumbered-table01-expected.html
@@ -0,0 +1,18 @@
+<html>
+  <head></head>
+  <body>
+    <table id="item1" width="100%">
+      <caption/>
+      <tbody>
+        <tr>
+          <td>A</td>
+          <td>B</td>
+        </tr>
+        <tr>
+          <td>C</td>
+          <td>D</td>
+        </tr>
+      </tbody>
+    </table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/setNumbered-table01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/setNumbered-table01-input.html b/experiments/editorFramework/test/Layer0/outline/setNumbered-table01-input.html
new file mode 100644
index 0000000..e9aeeff
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/setNumbered-table01-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Outline_setNumbered("item1",true);
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<table id="item1" width="100%">
+  <tr>
+    <td>A</td>
+    <td>B</td>
+  </tr>
+  <tr>
+    <td>C</td>
+    <td>D</td>
+  </tr>
+</figure>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/setNumbered-table02-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/setNumbered-table02-expected.html b/experiments/editorFramework/test/Layer0/outline/setNumbered-table02-expected.html
new file mode 100644
index 0000000..7c141f4
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/setNumbered-table02-expected.html
@@ -0,0 +1,17 @@
+<html>
+  <head></head>
+  <body>
+    <table id="item1" width="100%">
+      <tbody>
+        <tr>
+          <td>A</td>
+          <td>B</td>
+        </tr>
+        <tr>
+          <td>C</td>
+          <td>D</td>
+        </tr>
+      </tbody>
+    </table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/setNumbered-table02-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/setNumbered-table02-input.html b/experiments/editorFramework/test/Layer0/outline/setNumbered-table02-input.html
new file mode 100644
index 0000000..a31d539
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/setNumbered-table02-input.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Outline_setNumbered("item1",false);
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<table id="item1" width="100%">
+  <caption/>
+  <tr>
+    <td>A</td>
+    <td>B</td>
+  </tr>
+  <tr>
+    <td>C</td>
+    <td>D</td>
+  </tr>
+</figure>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/setNumbered-table03-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/setNumbered-table03-expected.html b/experiments/editorFramework/test/Layer0/outline/setNumbered-table03-expected.html
new file mode 100644
index 0000000..4cc550e
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/setNumbered-table03-expected.html
@@ -0,0 +1,18 @@
+<html>
+  <head></head>
+  <body>
+    <table id="item1" width="100%">
+      <caption class="Unnumbered">Test table[]</caption>
+      <tbody>
+        <tr>
+          <td>A</td>
+          <td>B</td>
+        </tr>
+        <tr>
+          <td>C</td>
+          <td>D</td>
+        </tr>
+      </tbody>
+    </table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/setNumbered-table03-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/setNumbered-table03-input.html b/experiments/editorFramework/test/Layer0/outline/setNumbered-table03-input.html
new file mode 100644
index 0000000..49d780b
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/setNumbered-table03-input.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Outline_setNumbered("item1",false);
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<table id="item1" width="100%">
+  <caption>Test table[]</caption>
+  <tr>
+    <td>A</td>
+    <td>B</td>
+  </tr>
+  <tr>
+    <td>C</td>
+    <td>D</td>
+  </tr>
+</figure>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/setNumbered-table04-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/setNumbered-table04-expected.html b/experiments/editorFramework/test/Layer0/outline/setNumbered-table04-expected.html
new file mode 100644
index 0000000..48c3c30
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/setNumbered-table04-expected.html
@@ -0,0 +1,18 @@
+<html>
+  <head></head>
+  <body>
+    <table id="item1" width="100%">
+      <caption>Test table[]</caption>
+      <tbody>
+        <tr>
+          <td>A</td>
+          <td>B</td>
+        </tr>
+        <tr>
+          <td>C</td>
+          <td>D</td>
+        </tr>
+      </tbody>
+    </table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/setNumbered-table04-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/setNumbered-table04-input.html b/experiments/editorFramework/test/Layer0/outline/setNumbered-table04-input.html
new file mode 100644
index 0000000..d323500
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/setNumbered-table04-input.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+    Outline_setNumbered("item1",true);
+    PostponedActions_perform();
+    showSelection();
+}
+</script>
+</head>
+<body>
+<table id="item1" width="100%">
+  <caption class="Unnumbered">Test table[]</caption>
+  <tr>
+    <td>A</td>
+    <td>B</td>
+  </tr>
+  <tr>
+    <td>C</td>
+    <td>D</td>
+  </tr>
+</figure>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert01-expected.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert01-expected.html
new file mode 100644
index 0000000..bb1088a
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert01-expected.html
@@ -0,0 +1,19 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+    <style>
+    </style>
+  </head>
+  <body>
+    Before
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">1 Section 1</a></p>
+      <p class="toc1"><a href="#item2">2 Section 2</a></p>
+      <p class="toc1"><a href="#item3">3 Section 3</a></p>
+    </nav>
+    After
+    <h1 id="item1">Section 1</h1>
+    <h1 id="item2">Section 2</h1>
+    <h1 id="item3">Section 3</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert01-input.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert01-input.html
new file mode 100644
index 0000000..9ec6646
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert01-input.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+Before[]After
+<h1>4 Section 1</h1>
+<h1>4 Section 2</h1>
+<h1>4 Section 3</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert02-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert02-expected.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert02-expected.html
new file mode 100644
index 0000000..81d4288
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert02-expected.html
@@ -0,0 +1,19 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+    <style>
+    </style>
+  </head>
+  <body>
+    <p>Before</p>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">1 Section 1</a></p>
+      <p class="toc1"><a href="#item2">2 Section 2</a></p>
+      <p class="toc1"><a href="#item3">3 Section 3</a></p>
+    </nav>
+    <p>After</p>
+    <h1 id="item1">Section 1</h1>
+    <h1 id="item2">Section 2</h1>
+    <h1 id="item3">Section 3</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert02-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert02-input.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert02-input.html
new file mode 100644
index 0000000..7034c09
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert02-input.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+<p>Before[]After</p>
+<h1>4 Section 1</h1>
+<h1>4 Section 2</h1>
+<h1>4 Section 3</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert03-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert03-expected.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert03-expected.html
new file mode 100644
index 0000000..a04784d
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert03-expected.html
@@ -0,0 +1,21 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="item6">Before</h1>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item6">1 Before</a></p>
+      <p class="toc1"><a href="#item5">2 After</a></p>
+      <p class="toc1"><a href="#item2">3 Section 1</a></p>
+      <p class="toc1"><a href="#item3">4 Section 2</a></p>
+      <p class="toc1"><a href="#item4">5 Section 3</a></p>
+    </nav>
+    <h1 id="item5">After</h1>
+    <h1 id="item2">Section 1</h1>
+    <h1 id="item3">Section 2</h1>
+    <h1 id="item4">Section 3</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert03-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert03-input.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert03-input.html
new file mode 100644
index 0000000..cd1eec2
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert03-input.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var h1 = document.getElementsByTagName("h1")[0];
+    Selection_set(h1.lastChild,6,h1.lastChild,6);
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+<h1>4 BeforeAfter</h1>
+<h1>4 Section 1</h1>
+<h1>4 Section 2</h1>
+<h1>4 Section 3</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert04-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert04-expected.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert04-expected.html
new file mode 100644
index 0000000..b1ab0e9
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert04-expected.html
@@ -0,0 +1,19 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="item5">First</h1>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item5">1 First</a></p>
+      <p class="toc1"><a href="#item2">2 Section 1</a></p>
+      <p class="toc1"><a href="#item3">3 Section 2</a></p>
+      <p class="toc1"><a href="#item4">4 Section 3</a></p>
+    </nav>
+    <h1 id="item2">Section 1</h1>
+    <h1 id="item3">Section 2</h1>
+    <h1 id="item4">Section 3</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert04-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert04-input.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert04-input.html
new file mode 100644
index 0000000..8f1de0a
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert04-input.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var h1 = document.getElementsByTagName("h1")[0];
+    Selection_set(h1.lastChild,5,h1.lastChild,5);
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+<h1>4 First</h1>
+<h1>4 Section 1</h1>
+<h1>4 Section 2</h1>
+<h1>4 Section 3</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert05-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert05-expected.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert05-expected.html
new file mode 100644
index 0000000..b1ab0e9
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert05-expected.html
@@ -0,0 +1,19 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="item5">First</h1>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item5">1 First</a></p>
+      <p class="toc1"><a href="#item2">2 Section 1</a></p>
+      <p class="toc1"><a href="#item3">3 Section 2</a></p>
+      <p class="toc1"><a href="#item4">4 Section 3</a></p>
+    </nav>
+    <h1 id="item2">Section 1</h1>
+    <h1 id="item3">Section 2</h1>
+    <h1 id="item4">Section 3</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert05-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert05-input.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert05-input.html
new file mode 100644
index 0000000..3a1c976
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert05-input.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var h1 = document.getElementsByTagName("h1")[0];
+    Selection_set(h1,h1.childNodes.length,h1,h1.childNodes.length);
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+<h1>4 First</h1>
+<h1>4 Section 1</h1>
+<h1>4 Section 2</h1>
+<h1>4 Section 3</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert06-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert06-expected.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert06-expected.html
new file mode 100644
index 0000000..624dcfa
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert06-expected.html
@@ -0,0 +1,19 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item5">1 First</a></p>
+      <p class="toc1"><a href="#item2">2 Section 1</a></p>
+      <p class="toc1"><a href="#item3">3 Section 2</a></p>
+      <p class="toc1"><a href="#item4">4 Section 3</a></p>
+    </nav>
+    <h1 id="item5">First</h1>
+    <h1 id="item2">Section 1</h1>
+    <h1 id="item3">Section 2</h1>
+    <h1 id="item4">Section 3</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert06-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert06-input.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert06-input.html
new file mode 100644
index 0000000..0a6aaee
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert06-input.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var h1 = document.getElementsByTagName("h1")[0];
+    Selection_set(h1.lastChild,0,h1.lastChild,0);
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+<h1>4 First</h1>
+<h1>4 Section 1</h1>
+<h1>4 Section 2</h1>
+<h1>4 Section 3</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert07-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert07-expected.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert07-expected.html
new file mode 100644
index 0000000..624dcfa
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert07-expected.html
@@ -0,0 +1,19 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item5">1 First</a></p>
+      <p class="toc1"><a href="#item2">2 Section 1</a></p>
+      <p class="toc1"><a href="#item3">3 Section 2</a></p>
+      <p class="toc1"><a href="#item4">4 Section 3</a></p>
+    </nav>
+    <h1 id="item5">First</h1>
+    <h1 id="item2">Section 1</h1>
+    <h1 id="item3">Section 2</h1>
+    <h1 id="item4">Section 3</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert07-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert07-input.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert07-input.html
new file mode 100644
index 0000000..16dc8dd
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents-insert07-input.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    var h1 = document.getElementsByTagName("h1")[0];
+    Selection_set(h1,0,h1,0);
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+<h1>4 First</h1>
+<h1>4 Section 1</h1>
+<h1>4 Section 2</h1>
+<h1>4 Section 3</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents01-expected.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents01-expected.html
new file mode 100644
index 0000000..7228c73
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents01-expected.html
@@ -0,0 +1,51 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">1 Section 1</a></p>
+      <p class="toc2"><a href="#item2">1.1 Section 2</a></p>
+      <p class="toc2"><a href="#item3">1.2 Section 3</a></p>
+      <p class="toc1"><a href="#item4">2 Section 4</a></p>
+      <p class="toc2"><a href="#item5">2.1 Section 5</a></p>
+      <p class="toc3"><a href="#item6">2.1.1 Section 6</a></p>
+      <p class="toc3"><a href="#item7">2.1.2 Section 7</a></p>
+      <p class="toc2"><a href="#item8">2.2 Section 8</a></p>
+      <p class="toc3"><a href="#item9">2.2.1 Section 9</a></p>
+      <p class="toc3"><a href="#item10">2.2.2 Section 10</a></p>
+    </nav>
+    <h1 id="item1">Section 1</h1>
+    <p>Content 1 A</p>
+    <p>Content 1 B</p>
+    <h2 id="item2">Section 2</h2>
+    <p>Content 2 A</p>
+    <p>Content 2 B</p>
+    <h2 id="item3">Section 3</h2>
+    <p>Content 3 A</p>
+    <p>Content 3 B</p>
+    <h1 id="item4">Section 4</h1>
+    <p>Content 4 A</p>
+    <p>Content 4 B</p>
+    <h2 id="item5">Section 5</h2>
+    <p>Content 5 A</p>
+    <p>Content 5 B</p>
+    <h3 id="item6">Section 6</h3>
+    <p>Content 6 A</p>
+    <p>Content 6 B</p>
+    <h3 id="item7">Section 7</h3>
+    <p>Content 7 A</p>
+    <p>Content 7 B</p>
+    <h2 id="item8">Section 8</h2>
+    <p>Content 8 A</p>
+    <p>Content 8 B</p>
+    <h3 id="item9">Section 9</h3>
+    <p>Content 9 A</p>
+    <p>Content 9 B</p>
+    <h3 id="item10">Section 10</h3>
+    <p>Content 10 A</p>
+    <p>Content 10 B</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents01-input.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents01-input.html
new file mode 100644
index 0000000..d7cdc88
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents01-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+
+    // Create a series of headings
+    createTestSections([2,[2,2]]);
+
+    // Add a table of contents
+    Selection_set(document.body,0,document.body,0);
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents02-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents02-expected.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents02-expected.html
new file mode 100644
index 0000000..2e55695
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents02-expected.html
@@ -0,0 +1,54 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">1 Section 1</a></p>
+      <p class="toc2"><a href="#item2">1.1 Section 2</a></p>
+      <p class="toc2"><a href="#item3">1.2 Section 3</a></p>
+      <p class="toc1"><a href="#item4">2 Section 4XYZ</a></p>
+      <p class="toc2"><a href="#item5">2.1 Section 5</a></p>
+      <p class="toc3"><a href="#item6">2.1.1 Section 6</a></p>
+      <p class="toc3"><a href="#item7">2.1.2 Section 7</a></p>
+      <p class="toc2"><a href="#item8">2.2 Section 8</a></p>
+      <p class="toc3"><a href="#item9">2.2.1 Section 9</a></p>
+      <p class="toc3"><a href="#item10">2.2.2 Section 10</a></p>
+    </nav>
+    <h1 id="item1">Section 1</h1>
+    <p>Content 1 A</p>
+    <p>Content 1 B</p>
+    <h2 id="item2">Section 2</h2>
+    <p>Content 2 A</p>
+    <p>Content 2 B</p>
+    <h2 id="item3">Section 3</h2>
+    <p>Content 3 A</p>
+    <p>Content 3 B</p>
+    <h1 id="item4">
+      Section 4
+      XYZ
+    </h1>
+    <p>Content 4 A</p>
+    <p>Content 4 B</p>
+    <h2 id="item5">Section 5</h2>
+    <p>Content 5 A</p>
+    <p>Content 5 B</p>
+    <h3 id="item6">Section 6</h3>
+    <p>Content 6 A</p>
+    <p>Content 6 B</p>
+    <h3 id="item7">Section 7</h3>
+    <p>Content 7 A</p>
+    <p>Content 7 B</p>
+    <h2 id="item8">Section 8</h2>
+    <p>Content 8 A</p>
+    <p>Content 8 B</p>
+    <h3 id="item9">Section 9</h3>
+    <p>Content 9 A</p>
+    <p>Content 9 B</p>
+    <h3 id="item10">Section 10</h3>
+    <p>Content 10 A</p>
+    <p>Content 10 B</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents02-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents02-input.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents02-input.html
new file mode 100644
index 0000000..e325176
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents02-input.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+
+    // Create a series of headings
+    createTestSections([2,[2,2]]);
+
+    // Add a table of contents
+    Selection_set(document.body,0,document.body,0);
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+
+    // Modify the second heading, to verify that the change is reflected in the TOC
+    var heading = document.getElementsByTagName("h1")[1];
+    DOM_appendChild(heading,DOM_createTextNode(document,"XYZ"));
+    PostponedActions_perform();
+
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents03-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents03-expected.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents03-expected.html
new file mode 100644
index 0000000..31dfff6
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents03-expected.html
@@ -0,0 +1,51 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">1 Section 1</a></p>
+      <p class="toc2"><a href="#item2">1.1 Section 2</a></p>
+      <p class="toc2"><a href="#item3">1.2 Section 3</a></p>
+      <p class="toc1"><a href="#item4">2 SeXYZction 4</a></p>
+      <p class="toc2"><a href="#item5">2.1 Section 5</a></p>
+      <p class="toc3"><a href="#item6">2.1.1 Section 6</a></p>
+      <p class="toc3"><a href="#item7">2.1.2 Section 7</a></p>
+      <p class="toc2"><a href="#item8">2.2 Section 8</a></p>
+      <p class="toc3"><a href="#item9">2.2.1 Section 9</a></p>
+      <p class="toc3"><a href="#item10">2.2.2 Section 10</a></p>
+    </nav>
+    <h1 id="item1">Section 1</h1>
+    <p>Content 1 A</p>
+    <p>Content 1 B</p>
+    <h2 id="item2">Section 2</h2>
+    <p>Content 2 A</p>
+    <p>Content 2 B</p>
+    <h2 id="item3">Section 3</h2>
+    <p>Content 3 A</p>
+    <p>Content 3 B</p>
+    <h1 id="item4">SeXYZction 4</h1>
+    <p>Content 4 A</p>
+    <p>Content 4 B</p>
+    <h2 id="item5">Section 5</h2>
+    <p>Content 5 A</p>
+    <p>Content 5 B</p>
+    <h3 id="item6">Section 6</h3>
+    <p>Content 6 A</p>
+    <p>Content 6 B</p>
+    <h3 id="item7">Section 7</h3>
+    <p>Content 7 A</p>
+    <p>Content 7 B</p>
+    <h2 id="item8">Section 8</h2>
+    <p>Content 8 A</p>
+    <p>Content 8 B</p>
+    <h3 id="item9">Section 9</h3>
+    <p>Content 9 A</p>
+    <p>Content 9 B</p>
+    <h3 id="item10">Section 10</h3>
+    <p>Content 10 A</p>
+    <p>Content 10 B</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents03-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents03-input.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents03-input.html
new file mode 100644
index 0000000..15a0579
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents03-input.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+
+    // Create a series of headings
+    createTestSections([2,[2,2]]);
+
+    // Add a table of contents
+    Selection_set(document.body,0,document.body,0);
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+
+    // Modify the second heading, to verify that the change is reflected in the TOC
+    var heading = document.getElementsByTagName("h1")[1];
+    DOM_insertCharacters(heading.lastChild,2,"XYZ");
+    PostponedActions_perform();
+
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents04-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents04-expected.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents04-expected.html
new file mode 100644
index 0000000..976bf80
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents04-expected.html
@@ -0,0 +1,51 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">1 Section 1</a></p>
+      <p class="toc2"><a href="#item2">1.1 Section 2</a></p>
+      <p class="toc2"><a href="#item3">1.2 Section 3</a></p>
+      <p class="toc1"><a href="#item4">2 Sen 4</a></p>
+      <p class="toc2"><a href="#item5">2.1 Section 5</a></p>
+      <p class="toc3"><a href="#item6">2.1.1 Section 6</a></p>
+      <p class="toc3"><a href="#item7">2.1.2 Section 7</a></p>
+      <p class="toc2"><a href="#item8">2.2 Section 8</a></p>
+      <p class="toc3"><a href="#item9">2.2.1 Section 9</a></p>
+      <p class="toc3"><a href="#item10">2.2.2 Section 10</a></p>
+    </nav>
+    <h1 id="item1">Section 1</h1>
+    <p>Content 1 A</p>
+    <p>Content 1 B</p>
+    <h2 id="item2">Section 2</h2>
+    <p>Content 2 A</p>
+    <p>Content 2 B</p>
+    <h2 id="item3">Section 3</h2>
+    <p>Content 3 A</p>
+    <p>Content 3 B</p>
+    <h1 id="item4">Sen 4</h1>
+    <p>Content 4 A</p>
+    <p>Content 4 B</p>
+    <h2 id="item5">Section 5</h2>
+    <p>Content 5 A</p>
+    <p>Content 5 B</p>
+    <h3 id="item6">Section 6</h3>
+    <p>Content 6 A</p>
+    <p>Content 6 B</p>
+    <h3 id="item7">Section 7</h3>
+    <p>Content 7 A</p>
+    <p>Content 7 B</p>
+    <h2 id="item8">Section 8</h2>
+    <p>Content 8 A</p>
+    <p>Content 8 B</p>
+    <h3 id="item9">Section 9</h3>
+    <p>Content 9 A</p>
+    <p>Content 9 B</p>
+    <h3 id="item10">Section 10</h3>
+    <p>Content 10 A</p>
+    <p>Content 10 B</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents04-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents04-input.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents04-input.html
new file mode 100644
index 0000000..8d467f6
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents04-input.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+
+    // Create a series of headings
+    createTestSections([2,[2,2]]);
+
+    // Add a table of contents
+    Selection_set(document.body,0,document.body,0);
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+
+    // Modify the second heading, to verify that the change is reflected in the TOC
+    var heading = document.getElementsByTagName("h1")[1];
+    DOM_deleteCharacters(heading.lastChild,2,6);
+    PostponedActions_perform();
+
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents05-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents05-expected.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents05-expected.html
new file mode 100644
index 0000000..7228c73
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents05-expected.html
@@ -0,0 +1,51 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">1 Section 1</a></p>
+      <p class="toc2"><a href="#item2">1.1 Section 2</a></p>
+      <p class="toc2"><a href="#item3">1.2 Section 3</a></p>
+      <p class="toc1"><a href="#item4">2 Section 4</a></p>
+      <p class="toc2"><a href="#item5">2.1 Section 5</a></p>
+      <p class="toc3"><a href="#item6">2.1.1 Section 6</a></p>
+      <p class="toc3"><a href="#item7">2.1.2 Section 7</a></p>
+      <p class="toc2"><a href="#item8">2.2 Section 8</a></p>
+      <p class="toc3"><a href="#item9">2.2.1 Section 9</a></p>
+      <p class="toc3"><a href="#item10">2.2.2 Section 10</a></p>
+    </nav>
+    <h1 id="item1">Section 1</h1>
+    <p>Content 1 A</p>
+    <p>Content 1 B</p>
+    <h2 id="item2">Section 2</h2>
+    <p>Content 2 A</p>
+    <p>Content 2 B</p>
+    <h2 id="item3">Section 3</h2>
+    <p>Content 3 A</p>
+    <p>Content 3 B</p>
+    <h1 id="item4">Section 4</h1>
+    <p>Content 4 A</p>
+    <p>Content 4 B</p>
+    <h2 id="item5">Section 5</h2>
+    <p>Content 5 A</p>
+    <p>Content 5 B</p>
+    <h3 id="item6">Section 6</h3>
+    <p>Content 6 A</p>
+    <p>Content 6 B</p>
+    <h3 id="item7">Section 7</h3>
+    <p>Content 7 A</p>
+    <p>Content 7 B</p>
+    <h2 id="item8">Section 8</h2>
+    <p>Content 8 A</p>
+    <p>Content 8 B</p>
+    <h3 id="item9">Section 9</h3>
+    <p>Content 9 A</p>
+    <p>Content 9 B</p>
+    <h3 id="item10">Section 10</h3>
+    <p>Content 10 A</p>
+    <p>Content 10 B</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents05-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents05-input.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents05-input.html
new file mode 100644
index 0000000..8d4ddf4
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents05-input.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    // Add a table of contents
+    Selection_set(document.body,0,document.body,0);
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+<h1>9 Section 1</h1>
+<p>Content 1 A</p>
+<p>Content 1 B</p>
+<h2>9 Section 2</h2>
+<p>Content 2 A</p>
+<p>Content 2 B</p>
+<h2>9 Section 3</h2>
+<p>Content 3 A</p>
+<p>Content 3 B</p>
+<h1>9 Section 4</h1>
+<p>Content 4 A</p>
+<p>Content 4 B</p>
+<h2>9 Section 5</h2>
+<p>Content 5 A</p>
+<p>Content 5 B</p>
+<h3>9 Section 6</h3>
+<p>Content 6 A</p>
+<p>Content 6 B</p>
+<h3>9 Section 7</h3>
+<p>Content 7 A</p>
+<p>Content 7 B</p>
+<h2>9 Section 8</h2>
+<p>Content 8 A</p>
+<p>Content 8 B</p>
+<h3>9 Section 9</h3>
+<p>Content 9 A</p>
+<p>Content 9 B</p>
+<h3>9 Section 10</h3>
+<p>Content 10 A</p>
+<p>Content 10 B</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents06-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents06-expected.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents06-expected.html
new file mode 100644
index 0000000..59e90fa
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents06-expected.html
@@ -0,0 +1,49 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">Section 1</a></p>
+      <p class="toc2"><a href="#item2">Section 2</a></p>
+      <p class="toc2"><a href="#item3">Section 3</a></p>
+      <p class="toc1"><a href="#item4">Section 4</a></p>
+      <p class="toc2"><a href="#item5">Section 5</a></p>
+      <p class="toc3"><a href="#item6">Section 6</a></p>
+      <p class="toc3"><a href="#item7">Section 7</a></p>
+      <p class="toc2"><a href="#item8">Section 8</a></p>
+      <p class="toc3"><a href="#item9">Section 9</a></p>
+      <p class="toc3"><a href="#item10">Section 10</a></p>
+    </nav>
+    <h1 id="item1">Section 1</h1>
+    <p>Content 1 A</p>
+    <p>Content 1 B</p>
+    <h2 id="item2">Section 2</h2>
+    <p>Content 2 A</p>
+    <p>Content 2 B</p>
+    <h2 id="item3">Section 3</h2>
+    <p>Content 3 A</p>
+    <p>Content 3 B</p>
+    <h1 id="item4">Section 4</h1>
+    <p>Content 4 A</p>
+    <p>Content 4 B</p>
+    <h2 id="item5">Section 5</h2>
+    <p>Content 5 A</p>
+    <p>Content 5 B</p>
+    <h3 id="item6">Section 6</h3>
+    <p>Content 6 A</p>
+    <p>Content 6 B</p>
+    <h3 id="item7">Section 7</h3>
+    <p>Content 7 A</p>
+    <p>Content 7 B</p>
+    <h2 id="item8">Section 8</h2>
+    <p>Content 8 A</p>
+    <p>Content 8 B</p>
+    <h3 id="item9">Section 9</h3>
+    <p>Content 9 A</p>
+    <p>Content 9 B</p>
+    <h3 id="item10">Section 10</h3>
+    <p>Content 10 A</p>
+    <p>Content 10 B</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents06-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents06-input.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents06-input.html
new file mode 100644
index 0000000..4b0c7da
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents06-input.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    // Add a table of contents
+    Selection_set(document.body,0,document.body,0);
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+<h1>Section 1</h1>
+<p>Content 1 A</p>
+<p>Content 1 B</p>
+<h2>Section 2</h2>
+<p>Content 2 A</p>
+<p>Content 2 B</p>
+<h2>Section 3</h2>
+<p>Content 3 A</p>
+<p>Content 3 B</p>
+<h1>Section 4</h1>
+<p>Content 4 A</p>
+<p>Content 4 B</p>
+<h2>Section 5</h2>
+<p>Content 5 A</p>
+<p>Content 5 B</p>
+<h3>Section 6</h3>
+<p>Content 6 A</p>
+<p>Content 6 B</p>
+<h3>Section 7</h3>
+<p>Content 7 A</p>
+<p>Content 7 B</p>
+<h2>Section 8</h2>
+<p>Content 8 A</p>
+<p>Content 8 B</p>
+<h3>Section 9</h3>
+<p>Content 9 A</p>
+<p>Content 9 B</p>
+<h3>Section 10</h3>
+<p>Content 10 A</p>
+<p>Content 10 B</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents07-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents07-expected.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents07-expected.html
new file mode 100644
index 0000000..fe2f204
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents07-expected.html
@@ -0,0 +1,51 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">Section 1</a></p>
+      <p class="toc2"><a href="#item2">Section 2</a></p>
+      <p class="toc2"><a href="#item3">Section 3</a></p>
+      <p class="toc1"><a href="#item4">Section 4</a></p>
+      <p class="toc2"><a href="#item5">Section 5</a></p>
+      <p class="toc3"><a href="#item6">Section 6</a></p>
+      <p class="toc3"><a href="#item7">Section 7</a></p>
+      <p class="toc2"><a href="#item8">Section 8</a></p>
+      <p class="toc3"><a href="#item9">Section 9</a></p>
+      <p class="toc3"><a href="#item10">Section 10</a></p>
+    </nav>
+    <h1 class="Unnumbered" id="item1">Section 1</h1>
+    <p>Content 1 A</p>
+    <p>Content 1 B</p>
+    <h2 class="Unnumbered" id="item2">Section 2</h2>
+    <p>Content 2 A</p>
+    <p>Content 2 B</p>
+    <h2 class="Unnumbered" id="item3">Section 3</h2>
+    <p>Content 3 A</p>
+    <p>Content 3 B</p>
+    <h1 class="Unnumbered" id="item4">Section 4</h1>
+    <p>Content 4 A</p>
+    <p>Content 4 B</p>
+    <h2 class="Unnumbered" id="item5">Section 5</h2>
+    <p>Content 5 A</p>
+    <p>Content 5 B</p>
+    <h3 class="Unnumbered" id="item6">Section 6</h3>
+    <p>Content 6 A</p>
+    <p>Content 6 B</p>
+    <h3 class="Unnumbered" id="item7">Section 7</h3>
+    <p>Content 7 A</p>
+    <p>Content 7 B</p>
+    <h2 class="Unnumbered" id="item8">Section 8</h2>
+    <p>Content 8 A</p>
+    <p>Content 8 B</p>
+    <h3 class="Unnumbered" id="item9">Section 9</h3>
+    <p>Content 9 A</p>
+    <p>Content 9 B</p>
+    <h3 class="Unnumbered" id="item10">Section 10</h3>
+    <p>Content 10 A</p>
+    <p>Content 10 B</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents07-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents07-input.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents07-input.html
new file mode 100644
index 0000000..0324106
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents07-input.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    // Create a series of headings
+    createTestSections([2,[2,2]]);
+
+    // Turn numbering off for all headings
+    setNumbering(false);
+    PostponedActions_perform();
+
+    // Add a table of contents
+    Selection_set(document.body,0,document.body,0);
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents08-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents08-expected.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents08-expected.html
new file mode 100644
index 0000000..fe2f204
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents08-expected.html
@@ -0,0 +1,51 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">Section 1</a></p>
+      <p class="toc2"><a href="#item2">Section 2</a></p>
+      <p class="toc2"><a href="#item3">Section 3</a></p>
+      <p class="toc1"><a href="#item4">Section 4</a></p>
+      <p class="toc2"><a href="#item5">Section 5</a></p>
+      <p class="toc3"><a href="#item6">Section 6</a></p>
+      <p class="toc3"><a href="#item7">Section 7</a></p>
+      <p class="toc2"><a href="#item8">Section 8</a></p>
+      <p class="toc3"><a href="#item9">Section 9</a></p>
+      <p class="toc3"><a href="#item10">Section 10</a></p>
+    </nav>
+    <h1 class="Unnumbered" id="item1">Section 1</h1>
+    <p>Content 1 A</p>
+    <p>Content 1 B</p>
+    <h2 class="Unnumbered" id="item2">Section 2</h2>
+    <p>Content 2 A</p>
+    <p>Content 2 B</p>
+    <h2 class="Unnumbered" id="item3">Section 3</h2>
+    <p>Content 3 A</p>
+    <p>Content 3 B</p>
+    <h1 class="Unnumbered" id="item4">Section 4</h1>
+    <p>Content 4 A</p>
+    <p>Content 4 B</p>
+    <h2 class="Unnumbered" id="item5">Section 5</h2>
+    <p>Content 5 A</p>
+    <p>Content 5 B</p>
+    <h3 class="Unnumbered" id="item6">Section 6</h3>
+    <p>Content 6 A</p>
+    <p>Content 6 B</p>
+    <h3 class="Unnumbered" id="item7">Section 7</h3>
+    <p>Content 7 A</p>
+    <p>Content 7 B</p>
+    <h2 class="Unnumbered" id="item8">Section 8</h2>
+    <p>Content 8 A</p>
+    <p>Content 8 B</p>
+    <h3 class="Unnumbered" id="item9">Section 9</h3>
+    <p>Content 9 A</p>
+    <p>Content 9 B</p>
+    <h3 class="Unnumbered" id="item10">Section 10</h3>
+    <p>Content 10 A</p>
+    <p>Content 10 B</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents08-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents08-input.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents08-input.html
new file mode 100644
index 0000000..ddf65da
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents08-input.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    // Create a series of headings
+    createTestSections([2,[2,2]]);
+
+    // Add a table of contents
+    Selection_set(document.body,0,document.body,0);
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+
+    // Turn numbering off for all headings
+    setNumbering(false);
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents09-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents09-expected.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents09-expected.html
new file mode 100644
index 0000000..6d21bb7
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents09-expected.html
@@ -0,0 +1,51 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item1">1 Section 1</a></p>
+      <p class="toc2"><a href="#item2">Section 2</a></p>
+      <p class="toc2"><a href="#item3">Section 3</a></p>
+      <p class="toc1"><a href="#item4">2 Section 4</a></p>
+      <p class="toc2"><a href="#item5">Section 5</a></p>
+      <p class="toc3"><a href="#item6">Section 6</a></p>
+      <p class="toc3"><a href="#item7">Section 7</a></p>
+      <p class="toc2"><a href="#item8">Section 8</a></p>
+      <p class="toc3"><a href="#item9">Section 9</a></p>
+      <p class="toc3"><a href="#item10">Section 10</a></p>
+    </nav>
+    <h1 id="item1">Section 1</h1>
+    <p>Content 1 A</p>
+    <p>Content 1 B</p>
+    <h2 class="Unnumbered" id="item2">Section 2</h2>
+    <p>Content 2 A</p>
+    <p>Content 2 B</p>
+    <h2 class="Unnumbered" id="item3">Section 3</h2>
+    <p>Content 3 A</p>
+    <p>Content 3 B</p>
+    <h1 id="item4">Section 4</h1>
+    <p>Content 4 A</p>
+    <p>Content 4 B</p>
+    <h2 class="Unnumbered" id="item5">Section 5</h2>
+    <p>Content 5 A</p>
+    <p>Content 5 B</p>
+    <h3 class="Unnumbered" id="item6">Section 6</h3>
+    <p>Content 6 A</p>
+    <p>Content 6 B</p>
+    <h3 class="Unnumbered" id="item7">Section 7</h3>
+    <p>Content 7 A</p>
+    <p>Content 7 B</p>
+    <h2 class="Unnumbered" id="item8">Section 8</h2>
+    <p>Content 8 A</p>
+    <p>Content 8 B</p>
+    <h3 class="Unnumbered" id="item9">Section 9</h3>
+    <p>Content 9 A</p>
+    <p>Content 9 B</p>
+    <h3 class="Unnumbered" id="item10">Section 10</h3>
+    <p>Content 10 A</p>
+    <p>Content 10 B</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents09-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents09-input.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents09-input.html
new file mode 100644
index 0000000..b109e17
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents09-input.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    setupOutlineNumbering();
+    Outline_init();
+    PostponedActions_perform();
+
+    // Create a series of headings
+    createTestSections([2,[2,2]]);
+
+    // Turn numbering off for all headings
+    setNumbering(false);
+    PostponedActions_perform();
+
+    // Add a table of contents
+    Selection_set(document.body,0,document.body,0);
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+
+    // Turn numbering on for all H1s
+    var h1s = document.getElementsByTagName("h1");
+    Outline_setNumbered(h1s[0].getAttribute("id"),true);
+    Outline_setNumbered(h1s[1].getAttribute("id"),true);
+    PostponedActions_perform();
+
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents10-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents10-expected.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents10-expected.html
new file mode 100644
index 0000000..3d005dc
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents10-expected.html
@@ -0,0 +1,10 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1">[No sections defined]</p>
+    </nav>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents10-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents10-input.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents10-input.html
new file mode 100644
index 0000000..0c2de9d
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents10-input.html
@@ -0,0 +1,21 @@
+<!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();
+
+    // Add a table of contents
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+[]
+</body>
+</html>

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

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tableOfContents11-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tableOfContents11-input.html b/experiments/editorFramework/test/Layer0/outline/tableOfContents11-input.html
new file mode 100644
index 0000000..3014bd3
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tableOfContents11-input.html
@@ -0,0 +1,33 @@
+<!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 headings
+    createTestSections([2,[2,2]]);
+
+    // Add a table of contents
+    Selection_set(document.body,0,document.body,0);
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+
+    // Delete all sections
+    var current = document.getElementsByTagName("h1")[0];
+    var next;
+    for (; current != null; current = next) {
+        next = current.nextSibling;
+        DOM_deleteNode(current);
+    }
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+</body>
+</html>

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

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tocInHeading01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tocInHeading01-input.html b/experiments/editorFramework/test/Layer0/outline/tocInHeading01-input.html
new file mode 100644
index 0000000..7de6ed9
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tocInHeading01-input.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    PostponedActions_perform();
+}
+</script>
+</head>
+<body>
+
+<h1>
+  Before
+  <nav class="tableofcontents"></nav>
+  After
+</h1>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tocInsert01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tocInsert01-expected.html b/experiments/editorFramework/test/Layer0/outline/tocInsert01-expected.html
new file mode 100644
index 0000000..1c42cb7
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tocInsert01-expected.html
@@ -0,0 +1,53 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+    <style>
+    </style>
+  </head>
+  <body>
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item3">1 Section 1</a></p>
+      <p class="toc1"><a href="#item4">2 Section 2</a></p>
+    </nav>
+    <nav class="listoffigures">
+      <p class="toc1"><a href="#item5">1 Test figure A</a></p>
+      <p class="toc1"><a href="#item6">2 Test figure B</a></p>
+    </nav>
+    <nav class="listoftables">
+      <p class="toc1"><a href="#item1">1 Test table A</a></p>
+      <p class="toc1"><a href="#item2">2 Test table B</a></p>
+    </nav>
+    <h1 id="item3">Section 1</h1>
+    <h1 id="item4">Section 2</h1>
+    <figure id="item5">
+      (figure content)
+      <figcaption>Test figure A</figcaption>
+    </figure>
+    <figure id="item6">
+      (figure content)
+      <figcaption>Test figure B</figcaption>
+    </figure>
+    <table id="item1" style="width: 100%">
+      <caption>Test table A</caption>
+      <colgroup>
+        <col width="100%"/>
+      </colgroup>
+      <tbody>
+        <tr>
+          <td><p><br/></p></td>
+        </tr>
+      </tbody>
+    </table>
+    <table id="item2" style="width: 100%">
+      <caption>Test table B</caption>
+      <colgroup>
+        <col width="100%"/>
+      </colgroup>
+      <tbody>
+        <tr>
+          <td><p><br/></p></td>
+        </tr>
+      </tbody>
+    </table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tocInsert01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tocInsert01-input.html b/experiments/editorFramework/test/Layer0/outline/tocInsert01-input.html
new file mode 100644
index 0000000..c2861f4
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tocInsert01-input.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+
+    Outline_insertTableOfContents();
+    PostponedActions_perform();
+    Outline_insertListOfFigures();
+    PostponedActions_perform();
+//    showSelection();
+    Outline_insertListOfTables();
+    PostponedActions_perform();
+
+    simplifyTOCs();
+}
+</script>
+</head>
+<body>
+[]
+<h1>4 Section 1</h1>
+<h1>4 Section 2</h1>
+<figure>
+(figure content)
+<figcaption>Figure 9: Test figure A</figcaption>
+</figure>
+<figure>
+(figure content)
+<figcaption>Figure 9: Test figure B</figcaption>
+</figure>
+<table id="item1" style="width: 100%">
+  <caption>Table 9: Test table A</caption>
+  <col width="100%"/>
+  <tr><td><p><br/></p></td></tr>
+</table>
+<table id="item2" style="width: 100%">
+  <caption>Table 9: Test table B</caption>
+  <col width="100%"/>
+  <tr><td><p><br/></p></td></tr>
+</table>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/outline/tocInsert02-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/outline/tocInsert02-expected.html b/experiments/editorFramework/test/Layer0/outline/tocInsert02-expected.html
new file mode 100644
index 0000000..7a6dd77
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/outline/tocInsert02-expected.html
@@ -0,0 +1,55 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+    <style>
+    </style>
+  </head>
+  <body>
+    Before
+    <nav class="tableofcontents">
+      <p class="toc1"><a href="#item3">1 Section 1</a></p>
+      <p class="toc1"><a href="#item4">2 Section 2</a></p>
+    </nav>
+    <nav class="listoffigures">
+      <p class="toc1"><a href="#item5">1 Test figure A</a></p>
+      <p class="toc1"><a href="#item6">2 Test figure B</a></p>
+    </nav>
+    <nav class="listoftables">
+      <p class="toc1"><a href="#item1">1 Test table A</a></p>
+      <p class="toc1"><a href="#item2">2 Test table B</a></p>
+    </nav>
+    After
+    <h1 id="item3">Section 1</h1>
+    <h1 id="item4">Section 2</h1>
+    <figure id="item5">
+      (figure content)
+      <figcaption>Test figure A</figcaption>
+    </figure>
+    <figure id="item6">
+      (figure content)
+      <figcaption>Test figure B</figcaption>
+    </figure>
+    <table id="item1" style="width: 100%">
+      <caption>Test table A</caption>
+      <colgroup>
+        <col width="100%"/>
+      </colgroup>
+      <tbody>
+        <tr>
+          <td><p><br/></p></td>
+        </tr>
+      </tbody>
+    </table>
+    <table id="item2" style="width: 100%">
+      <caption>Test table B</caption>
+      <colgroup>
+        <col width="100%"/>
+      </colgroup>
+      <tbody>
+        <tr>
+          <td><p><br/></p></td>
+        </tr>
+      </tbody>
+    </table>
+  </body>
+</html>