corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmke...@apache.org
Subject [14/92] [abbrv] [partial] incubator-corinthia git commit: Add editing code from UX Write
Date Wed, 17 Dec 2014 13:28:24 GMT
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery01-expected.html b/Editor/tests/outline/discovery01-expected.html
new file mode 100644
index 0000000..6b82bc6
--- /dev/null
+++ b/Editor/tests/outline/discovery01-expected.html
@@ -0,0 +1,27 @@
+Sections:
+    First heading (item1)
+        Second heading (item4)
+            Third heading (item7)
+Figures:
+    [no caption] (item2)
+    [no caption] (item5)
+    [no caption] (item8)
+Tables:
+    [no caption] (item3)
+    [no caption] (item6)
+    [no caption] (item9)
+<html>
+  <head>
+  </head>
+  <body>
+    <h1 id="item1">First heading</h1>
+    <figure id="item2"/>
+    <table id="item3"/>
+    <h2 id="item4">Second heading</h2>
+    <figure id="item5"/>
+    <table id="item6"/>
+    <h3 id="item7">Third heading</h3>
+    <figure id="item8"/>
+    <table id="item9"/>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery01-input.html b/Editor/tests/outline/discovery01-input.html
new file mode 100644
index 0000000..d587a09
--- /dev/null
+++ b/Editor/tests/outline/discovery01-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>First heading</h1>
+<figure></figure>
+<table></table>
+<h2>Second heading</h2>
+<figure></figure>
+<table></table>
+<h3>Third heading</h3>
+<figure></figure>
+<table></table>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery02-expected.html b/Editor/tests/outline/discovery02-expected.html
new file mode 100644
index 0000000..2e9ec0d
--- /dev/null
+++ b/Editor/tests/outline/discovery02-expected.html
@@ -0,0 +1,29 @@
+Sections:
+    1 First heading (item1)
+        1.1 Second heading (item4)
+            1.1.1 Third heading (item7)
+Figures:
+    1 (item2)
+    2 (item5)
+    3 (item8)
+Tables:
+    1 (item3)
+    2 (item6)
+    3 (item9)
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="item1">First heading</h1>
+    <figure id="item2"><figcaption/></figure>
+    <table id="item3"><caption/></table>
+    <h2 id="item4">Second heading</h2>
+    <figure id="item5"><figcaption/></figure>
+    <table id="item6"><caption/></table>
+    <h3 id="item7">Third heading</h3>
+    <figure id="item8"><figcaption/></figure>
+    <table id="item9"><caption/></table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery02-input.html b/Editor/tests/outline/discovery02-input.html
new file mode 100644
index 0000000..5967cac
--- /dev/null
+++ b/Editor/tests/outline/discovery02-input.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+    setNumbering(true);
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<h1>First heading</h1>
+<figure></figure>
+<table></table>
+<h2>Second heading</h2>
+<figure></figure>
+<table></table>
+<h3>Third heading</h3>
+<figure></figure>
+<table></table>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery03-expected.html b/Editor/tests/outline/discovery03-expected.html
new file mode 100644
index 0000000..cb9e66f
--- /dev/null
+++ b/Editor/tests/outline/discovery03-expected.html
@@ -0,0 +1,27 @@
+Sections:
+    First section (item1)
+    Second section (item4)
+    Third section (item7)
+Figures:
+    First figure (item2)
+    Second figure (item5)
+    Third figure (item8)
+Tables:
+    First table (item3)
+    Second table (item6)
+    Third table (item9)
+<html>
+  <head>
+  </head>
+  <body>
+    <h1 id="item1">First section</h1>
+    <figure id="item2"><figcaption class="Unnumbered">First figure</figcaption></figure>
+    <table id="item3"><caption class="Unnumbered">First table</caption></table>
+    <h1 id="item4">Second section</h1>
+    <figure id="item5"><figcaption class="Unnumbered">Second figure</figcaption></figure>
+    <table id="item6"><caption class="Unnumbered">Second table</caption></table>
+    <h1 id="item7">Third section</h1>
+    <figure id="item8"><figcaption class="Unnumbered">Third figure</figcaption></figure>
+    <table id="item9"><caption class="Unnumbered">Third table</caption></table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery03-input.html b/Editor/tests/outline/discovery03-input.html
new file mode 100644
index 0000000..4d5c4ab
--- /dev/null
+++ b/Editor/tests/outline/discovery03-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>First section</h1>
+<figure><figcaption>First figure</figcaption></figure>
+<table><caption>First table</caption></table>
+<h1>Second section</h1>
+<figure><figcaption>Second figure</figcaption></figure>
+<table><caption>Second table</caption></table>
+<h1>Third section</h1>
+<figure><figcaption>Third figure</figcaption></figure>
+<table><caption>Third table</caption></table>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery04-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery04-expected.html b/Editor/tests/outline/discovery04-expected.html
new file mode 100644
index 0000000..28a8f9f
--- /dev/null
+++ b/Editor/tests/outline/discovery04-expected.html
@@ -0,0 +1,29 @@
+Sections:
+    1 First section (item1)
+    2 Second section (item4)
+    3 Third section (item7)
+Figures:
+    1 First figure (item2)
+    2 Second figure (item5)
+    3 Third figure (item8)
+Tables:
+    1 First table (item3)
+    2 Second table (item6)
+    3 Third table (item9)
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="item1">First section</h1>
+    <figure id="item2"><figcaption>First figure</figcaption></figure>
+    <table id="item3"><caption>First table</caption></table>
+    <h1 id="item4">Second section</h1>
+    <figure id="item5"><figcaption>Second figure</figcaption></figure>
+    <table id="item6"><caption>Second table</caption></table>
+    <h1 id="item7">Third section</h1>
+    <figure id="item8"><figcaption>Third figure</figcaption></figure>
+    <table id="item9"><caption>Third table</caption></table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery04-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery04-input.html b/Editor/tests/outline/discovery04-input.html
new file mode 100644
index 0000000..ac0a6e1
--- /dev/null
+++ b/Editor/tests/outline/discovery04-input.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+    setNumbering(true);
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<h1>First section</h1>
+<figure><figcaption>First figure</figcaption></figure>
+<table><caption>First table</caption></table>
+<h1>Second section</h1>
+<figure><figcaption>Second figure</figcaption></figure>
+<table><caption>Second table</caption></table>
+<h1>Third section</h1>
+<figure><figcaption>Third figure</figcaption></figure>
+<table><caption>Third table</caption></table>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery05-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery05-expected.html b/Editor/tests/outline/discovery05-expected.html
new file mode 100644
index 0000000..28a8f9f
--- /dev/null
+++ b/Editor/tests/outline/discovery05-expected.html
@@ -0,0 +1,29 @@
+Sections:
+    1 First section (item1)
+    2 Second section (item4)
+    3 Third section (item7)
+Figures:
+    1 First figure (item2)
+    2 Second figure (item5)
+    3 Third figure (item8)
+Tables:
+    1 First table (item3)
+    2 Second table (item6)
+    3 Third table (item9)
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="item1">First section</h1>
+    <figure id="item2"><figcaption>First figure</figcaption></figure>
+    <table id="item3"><caption>First table</caption></table>
+    <h1 id="item4">Second section</h1>
+    <figure id="item5"><figcaption>Second figure</figcaption></figure>
+    <table id="item6"><caption>Second table</caption></table>
+    <h1 id="item7">Third section</h1>
+    <figure id="item8"><figcaption>Third figure</figcaption></figure>
+    <table id="item9"><caption>Third table</caption></table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery05-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery05-input.html b/Editor/tests/outline/discovery05-input.html
new file mode 100644
index 0000000..9c806e6
--- /dev/null
+++ b/Editor/tests/outline/discovery05-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>6 First section</h1>
+<figure><figcaption>Figure 4: First figure</figcaption></figure>
+<table><caption>Table 9: First table</caption></table>
+<h1>12.3 Second section</h1>
+<figure><figcaption>Figure 5.11: Second figure</figcaption></figure>
+<table><caption>Table 9.13: Second table</caption></table>
+<h1>14.5.3 Third section</h1>
+<figure><figcaption>Figure 3.12.199: Third figure</figcaption></figure>
+<table><caption>Table 88.55.44: Third table</caption></table>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery06-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery06-expected.html b/Editor/tests/outline/discovery06-expected.html
new file mode 100644
index 0000000..adb404f
--- /dev/null
+++ b/Editor/tests/outline/discovery06-expected.html
@@ -0,0 +1,29 @@
+Sections:
+    First section (item1)
+    Second section (item4)
+    Third section (item7)
+Figures:
+    First figure (item2)
+    Second figure (item5)
+    Third figure (item8)
+Tables:
+    First table (item3)
+    Second table (item6)
+    Third table (item9)
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 class="Unnumbered" id="item1">First section</h1>
+    <figure id="item2"><figcaption class="Unnumbered">First figure</figcaption></figure>
+    <table id="item3"><caption class="Unnumbered">First table</caption></table>
+    <h1 class="Unnumbered" id="item4">Second section</h1>
+    <figure id="item5"><figcaption class="Unnumbered">Second figure</figcaption></figure>
+    <table id="item6"><caption class="Unnumbered">Second table</caption></table>
+    <h1 class="Unnumbered" id="item7">Third section</h1>
+    <figure id="item8"><figcaption class="Unnumbered">Third figure</figcaption></figure>
+    <table id="item9"><caption class="Unnumbered">Third table</caption></table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery06-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery06-input.html b/Editor/tests/outline/discovery06-input.html
new file mode 100644
index 0000000..8284d44
--- /dev/null
+++ b/Editor/tests/outline/discovery06-input.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+    setNumbering(true);
+    setNumbering(false);
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<h1>First section</h1>
+<figure><figcaption>First figure</figcaption></figure>
+<table><caption>First table</caption></table>
+<h1>Second section</h1>
+<figure><figcaption>Second figure</figcaption></figure>
+<table><caption>Second table</caption></table>
+<h1>Third section</h1>
+<figure><figcaption>Third figure</figcaption></figure>
+<table><caption>Third table</caption></table>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery07-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery07-expected.html b/Editor/tests/outline/discovery07-expected.html
new file mode 100644
index 0000000..adb404f
--- /dev/null
+++ b/Editor/tests/outline/discovery07-expected.html
@@ -0,0 +1,29 @@
+Sections:
+    First section (item1)
+    Second section (item4)
+    Third section (item7)
+Figures:
+    First figure (item2)
+    Second figure (item5)
+    Third figure (item8)
+Tables:
+    First table (item3)
+    Second table (item6)
+    Third table (item9)
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 class="Unnumbered" id="item1">First section</h1>
+    <figure id="item2"><figcaption class="Unnumbered">First figure</figcaption></figure>
+    <table id="item3"><caption class="Unnumbered">First table</caption></table>
+    <h1 class="Unnumbered" id="item4">Second section</h1>
+    <figure id="item5"><figcaption class="Unnumbered">Second figure</figcaption></figure>
+    <table id="item6"><caption class="Unnumbered">Second table</caption></table>
+    <h1 class="Unnumbered" id="item7">Third section</h1>
+    <figure id="item8"><figcaption class="Unnumbered">Third figure</figcaption></figure>
+    <table id="item9"><caption class="Unnumbered">Third table</caption></table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery07-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery07-input.html b/Editor/tests/outline/discovery07-input.html
new file mode 100644
index 0000000..da5886c
--- /dev/null
+++ b/Editor/tests/outline/discovery07-input.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="OutlineTest.js"></script>
+<script>
+
+function performTest()
+{
+    Outline_init();
+    if (Outline_detectSectionNumbering())
+        setupOutlineNumbering();
+    PostponedActions_perform();
+    setNumbering(false);
+    return Outline_plainText()+PrettyPrinter.getHTML(document.documentElement);
+}
+</script>
+</head>
+<body>
+<h1>6 First section</h1>
+<figure><figcaption>Figure 4: First figure</figcaption></figure>
+<table><caption>Table 9: First table</caption></table>
+<h1>12.3 Second section</h1>
+<figure><figcaption>Figure 5.11: Second figure</figcaption></figure>
+<table><caption>Table 9.13: Second table</caption></table>
+<h1>14.5.3 Third section</h1>
+<figure><figcaption>Figure 3.12.199: Third figure</figcaption></figure>
+<table><caption>Table 88.55.44: Third table</caption></table>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery08-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery08-expected.html b/Editor/tests/outline/discovery08-expected.html
new file mode 100644
index 0000000..cca44e2
--- /dev/null
+++ b/Editor/tests/outline/discovery08-expected.html
@@ -0,0 +1,25 @@
+Sections:
+    First section (item1)
+    1 Second section (item2)
+    2 Third section (item3)
+    3 Fourth section (item4)
+    4 Fifth section (item5)
+    5 Sixth section (item6)
+    6 Seventh section (item7)
+Figures:
+Tables:
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 class="Unnumbered" id="item1">First section</h1>
+    <h1 id="item2">Second section</h1>
+    <h1 id="item3">Third section</h1>
+    <h1 id="item4">Fourth section</h1>
+    <h1 id="item5">Fifth section</h1>
+    <h1 id="item6">Sixth section</h1>
+    <h1 id="item7">Seventh section</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery08-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery08-input.html b/Editor/tests/outline/discovery08-input.html
new file mode 100644
index 0000000..74a2810
--- /dev/null
+++ b/Editor/tests/outline/discovery08-input.html
@@ -0,0 +1,26 @@
+<!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>First section</h1>
+<h1>5 Second section</h1>
+<h1>5. Third section</h1>
+<h1>5.4 Fourth section</h1>
+<h1>5.4. Fifth section</h1>
+<h1>5.4.3 Sixth section</h1>
+<h1>5.4.3. Seventh section</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery09-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery09-expected.html b/Editor/tests/outline/discovery09-expected.html
new file mode 100644
index 0000000..584bdc6
--- /dev/null
+++ b/Editor/tests/outline/discovery09-expected.html
@@ -0,0 +1,27 @@
+Sections:
+    First section - not numbered (item1)
+    1 Second section (item2)
+    2 Third section (item3)
+    Fourth section - not numbered (item4)
+    Fifth section - not numbered (item5)
+    3 Sixth section (item6)
+    4 Seventh section (item7)
+    Eighth section - not numbered (item8)
+Figures:
+Tables:
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 class="Unnumbered" id="item1">First section - not numbered</h1>
+    <h1 id="item2">Second section</h1>
+    <h1 id="item3">Third section</h1>
+    <h1 class="Unnumbered" id="item4">Fourth section - not numbered</h1>
+    <h1 class="Unnumbered" id="item5">Fifth section - not numbered</h1>
+    <h1 id="item6">Sixth section</h1>
+    <h1 id="item7">Seventh section</h1>
+    <h1 class="Unnumbered" id="item8">Eighth section - not numbered</h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery09-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery09-input.html b/Editor/tests/outline/discovery09-input.html
new file mode 100644
index 0000000..c1d0acf
--- /dev/null
+++ b/Editor/tests/outline/discovery09-input.html
@@ -0,0 +1,27 @@
+<!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>First section - not numbered</h1>
+<h1>99 Second section</h1>
+<h1>99 Third section</h1>
+<h1>Fourth section - not numbered</h1>
+<h1>Fifth section - not numbered</h1>
+<h1>99 Sixth section</h1>
+<h1>99 Seventh section</h1>
+<h1>Eighth section - not numbered</h1>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery10-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery10-expected.html b/Editor/tests/outline/discovery10-expected.html
new file mode 100644
index 0000000..3ac52bf
--- /dev/null
+++ b/Editor/tests/outline/discovery10-expected.html
@@ -0,0 +1,29 @@
+Sections:
+    1 Top-level heading (item1)
+        First section - not numbered (item2)
+        1.1 Second section (item3)
+        1.2 Third section (item4)
+        Fourth section - not numbered (item5)
+        Fifth section - not numbered (item6)
+        1.3 Sixth section (item7)
+        1.4 Seventh section (item8)
+        Eighth section - not numbered (item9)
+Figures:
+Tables:
+<html>
+  <head>
+    <style>
+    </style>
+  </head>
+  <body>
+    <h1 id="item1">Top-level heading</h1>
+    <h2 class="Unnumbered" id="item2">First section - not numbered</h2>
+    <h2 id="item3">Second section</h2>
+    <h2 id="item4">Third section</h2>
+    <h2 class="Unnumbered" id="item5">Fourth section - not numbered</h2>
+    <h2 class="Unnumbered" id="item6">Fifth section - not numbered</h2>
+    <h2 id="item7">Sixth section</h2>
+    <h2 id="item8">Seventh section</h2>
+    <h2 class="Unnumbered" id="item9">Eighth section - not numbered</h2>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/outline/discovery10-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/discovery10-input.html b/Editor/tests/outline/discovery10-input.html
new file mode 100644
index 0000000..58ff03a
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-editing01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-editing01-expected.html b/Editor/tests/outline/heading-editing01-expected.html
new file mode 100644
index 0000000..f3e172d
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-editing01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-editing01-input.html b/Editor/tests/outline/heading-editing01-input.html
new file mode 100644
index 0000000..3333a45
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-editing02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-editing02-expected.html b/Editor/tests/outline/heading-editing02-expected.html
new file mode 100644
index 0000000..21e8740
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-editing02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-editing02-input.html b/Editor/tests/outline/heading-editing02-input.html
new file mode 100644
index 0000000..129b3e3
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-editing03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-editing03-expected.html b/Editor/tests/outline/heading-editing03-expected.html
new file mode 100644
index 0000000..55e2f54
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-editing03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-editing03-input.html b/Editor/tests/outline/heading-editing03-input.html
new file mode 100644
index 0000000..e19e9c9
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-editing04-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-editing04-expected.html b/Editor/tests/outline/heading-editing04-expected.html
new file mode 100644
index 0000000..909decd
--- /dev/null
+++ b/Editor/tests/outline/heading-editing04-expected.html
@@ -0,0 +1,10 @@
+<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/03bd5af0/Editor/tests/outline/heading-editing04-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-editing04-input.html b/Editor/tests/outline/heading-editing04-input.html
new file mode 100644
index 0000000..5888e83
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-editing05-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-editing05-expected.html b/Editor/tests/outline/heading-editing05-expected.html
new file mode 100644
index 0000000..53122e5
--- /dev/null
+++ b/Editor/tests/outline/heading-editing05-expected.html
@@ -0,0 +1,10 @@
+<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/03bd5af0/Editor/tests/outline/heading-editing05-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-editing05-input.html b/Editor/tests/outline/heading-editing05-input.html
new file mode 100644
index 0000000..4909327
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-editing06-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-editing06-expected.html b/Editor/tests/outline/heading-editing06-expected.html
new file mode 100644
index 0000000..fdb03f8
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-editing06-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-editing06-input.html b/Editor/tests/outline/heading-editing06-input.html
new file mode 100644
index 0000000..c5c6f3e
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-editing07-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-editing07-expected.html b/Editor/tests/outline/heading-editing07-expected.html
new file mode 100644
index 0000000..7e1a033
--- /dev/null
+++ b/Editor/tests/outline/heading-editing07-expected.html
@@ -0,0 +1,10 @@
+<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/03bd5af0/Editor/tests/outline/heading-editing07-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-editing07-input.html b/Editor/tests/outline/heading-editing07-input.html
new file mode 100644
index 0000000..bcaa501
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-editing08-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-editing08-expected.html b/Editor/tests/outline/heading-editing08-expected.html
new file mode 100644
index 0000000..7988be2
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-editing08-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-editing08-input.html b/Editor/tests/outline/heading-editing08-input.html
new file mode 100644
index 0000000..1bc61a3
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy01a-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy01a-expected.html b/Editor/tests/outline/heading-hierarchy01a-expected.html
new file mode 100644
index 0000000..108bbfa
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy01a-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy01a-input.html b/Editor/tests/outline/heading-hierarchy01a-input.html
new file mode 100644
index 0000000..81cd522
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy01b-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy01b-expected.html b/Editor/tests/outline/heading-hierarchy01b-expected.html
new file mode 100644
index 0000000..ca7eceb
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy01b-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy01b-input.html b/Editor/tests/outline/heading-hierarchy01b-input.html
new file mode 100644
index 0000000..85edf0b
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy01c-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy01c-expected.html b/Editor/tests/outline/heading-hierarchy01c-expected.html
new file mode 100644
index 0000000..f7cbcf3
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy01c-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy01c-input.html b/Editor/tests/outline/heading-hierarchy01c-input.html
new file mode 100644
index 0000000..c476cbb
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy02a-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy02a-expected.html b/Editor/tests/outline/heading-hierarchy02a-expected.html
new file mode 100644
index 0000000..e941693
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy02a-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy02a-input.html b/Editor/tests/outline/heading-hierarchy02a-input.html
new file mode 100644
index 0000000..5b8e238
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy02b-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy02b-expected.html b/Editor/tests/outline/heading-hierarchy02b-expected.html
new file mode 100644
index 0000000..a6c1992
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy02b-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy02b-input.html b/Editor/tests/outline/heading-hierarchy02b-input.html
new file mode 100644
index 0000000..f6e8271
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy02c-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy02c-expected.html b/Editor/tests/outline/heading-hierarchy02c-expected.html
new file mode 100644
index 0000000..2a7e541
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy02c-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy02c-input.html b/Editor/tests/outline/heading-hierarchy02c-input.html
new file mode 100644
index 0000000..84f471b
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy03a-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy03a-expected.html b/Editor/tests/outline/heading-hierarchy03a-expected.html
new file mode 100644
index 0000000..aa81985
--- /dev/null
+++ b/Editor/tests/outline/heading-hierarchy03a-expected.html
@@ -0,0 +1,14 @@
+<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/03bd5af0/Editor/tests/outline/heading-hierarchy03a-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy03a-input.html b/Editor/tests/outline/heading-hierarchy03a-input.html
new file mode 100644
index 0000000..d30c1a5
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy03b-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy03b-expected.html b/Editor/tests/outline/heading-hierarchy03b-expected.html
new file mode 100644
index 0000000..a6c1992
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy03b-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy03b-input.html b/Editor/tests/outline/heading-hierarchy03b-input.html
new file mode 100644
index 0000000..3ddf170
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy03c-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy03c-expected.html b/Editor/tests/outline/heading-hierarchy03c-expected.html
new file mode 100644
index 0000000..daa8627
--- /dev/null
+++ b/Editor/tests/outline/heading-hierarchy03c-expected.html
@@ -0,0 +1,14 @@
+<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/03bd5af0/Editor/tests/outline/heading-hierarchy03c-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy03c-input.html b/Editor/tests/outline/heading-hierarchy03c-input.html
new file mode 100644
index 0000000..0ab35d4
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy04a-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy04a-expected.html b/Editor/tests/outline/heading-hierarchy04a-expected.html
new file mode 100644
index 0000000..6d20bab
--- /dev/null
+++ b/Editor/tests/outline/heading-hierarchy04a-expected.html
@@ -0,0 +1,16 @@
+<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/03bd5af0/Editor/tests/outline/heading-hierarchy04a-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy04a-input.html b/Editor/tests/outline/heading-hierarchy04a-input.html
new file mode 100644
index 0000000..426b96e
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy04b-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy04b-expected.html b/Editor/tests/outline/heading-hierarchy04b-expected.html
new file mode 100644
index 0000000..ca2038a
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy04b-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy04b-input.html b/Editor/tests/outline/heading-hierarchy04b-input.html
new file mode 100644
index 0000000..34593b2
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-hierarchy04c-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy04c-expected.html b/Editor/tests/outline/heading-hierarchy04c-expected.html
new file mode 100644
index 0000000..56bbcad
--- /dev/null
+++ b/Editor/tests/outline/heading-hierarchy04c-expected.html
@@ -0,0 +1,16 @@
+<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/03bd5af0/Editor/tests/outline/heading-hierarchy04c-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-hierarchy04c-input.html b/Editor/tests/outline/heading-hierarchy04c-input.html
new file mode 100644
index 0000000..6f148fe
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering01-expected.html b/Editor/tests/outline/heading-numbering01-expected.html
new file mode 100644
index 0000000..5673eba
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering01-input.html b/Editor/tests/outline/heading-numbering01-input.html
new file mode 100644
index 0000000..97f85d0
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering02-expected.html b/Editor/tests/outline/heading-numbering02-expected.html
new file mode 100644
index 0000000..4d685d4
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering02-input.html b/Editor/tests/outline/heading-numbering02-input.html
new file mode 100644
index 0000000..a5e8d03
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering03-expected.html b/Editor/tests/outline/heading-numbering03-expected.html
new file mode 100644
index 0000000..4d685d4
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering03-input.html b/Editor/tests/outline/heading-numbering03-input.html
new file mode 100644
index 0000000..34a4a5d
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering04-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering04-expected.html b/Editor/tests/outline/heading-numbering04-expected.html
new file mode 100644
index 0000000..8261741
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering04-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering04-input.html b/Editor/tests/outline/heading-numbering04-input.html
new file mode 100644
index 0000000..bc6e0c5
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering05-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering05-expected.html b/Editor/tests/outline/heading-numbering05-expected.html
new file mode 100644
index 0000000..9391a21
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering05-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering05-input.html b/Editor/tests/outline/heading-numbering05-input.html
new file mode 100644
index 0000000..f508c81
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering06-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering06-expected.html b/Editor/tests/outline/heading-numbering06-expected.html
new file mode 100644
index 0000000..6164cfb
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering06-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering06-input.html b/Editor/tests/outline/heading-numbering06-input.html
new file mode 100644
index 0000000..8c11784
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering07-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering07-expected.html b/Editor/tests/outline/heading-numbering07-expected.html
new file mode 100644
index 0000000..293b448
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering07-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering07-input.html b/Editor/tests/outline/heading-numbering07-input.html
new file mode 100644
index 0000000..11c1b6f
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering08-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering08-expected.html b/Editor/tests/outline/heading-numbering08-expected.html
new file mode 100644
index 0000000..bfea97f
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering08-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering08-input.html b/Editor/tests/outline/heading-numbering08-input.html
new file mode 100644
index 0000000..6a00d8a
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering09-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering09-expected.html b/Editor/tests/outline/heading-numbering09-expected.html
new file mode 100644
index 0000000..0fcb631
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering09-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering09-input.html b/Editor/tests/outline/heading-numbering09-input.html
new file mode 100644
index 0000000..2fbff2f
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering10-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering10-expected.html b/Editor/tests/outline/heading-numbering10-expected.html
new file mode 100644
index 0000000..2dfecf7
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/heading-numbering10-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/heading-numbering10-input.html b/Editor/tests/outline/heading-numbering10-input.html
new file mode 100644
index 0000000..0b447a7
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/headings01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/headings01-expected.html b/Editor/tests/outline/headings01-expected.html
new file mode 100644
index 0000000..3e783b7
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/headings01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/headings01-input.html b/Editor/tests/outline/headings01-input.html
new file mode 100644
index 0000000..362df1e
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/headings02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/headings02-expected.html b/Editor/tests/outline/headings02-expected.html
new file mode 100644
index 0000000..3e783b7
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/headings02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/headings02-input.html b/Editor/tests/outline/headings02-input.html
new file mode 100644
index 0000000..03f4b66
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/headings03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/headings03-expected.html b/Editor/tests/outline/headings03-expected.html
new file mode 100644
index 0000000..5c278a4
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/headings03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/headings03-input.html b/Editor/tests/outline/headings03-input.html
new file mode 100644
index 0000000..1915e19
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/headings04-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/headings04-expected.html b/Editor/tests/outline/headings04-expected.html
new file mode 100644
index 0000000..1da4740
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/headings04-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/headings04-input.html b/Editor/tests/outline/headings04-input.html
new file mode 100644
index 0000000..b8e414a
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/headings05-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/headings05-expected.html b/Editor/tests/outline/headings05-expected.html
new file mode 100644
index 0000000..1da4740
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/headings05-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/headings05-input.html b/Editor/tests/outline/headings05-input.html
new file mode 100644
index 0000000..f913948
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/itemtypes01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/itemtypes01-expected.html b/Editor/tests/outline/itemtypes01-expected.html
new file mode 100644
index 0000000..09530eb
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/itemtypes01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/itemtypes01-input.html b/Editor/tests/outline/itemtypes01-input.html
new file mode 100644
index 0000000..01fe246
--- /dev/null
+++ b/Editor/tests/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/03bd5af0/Editor/tests/outline/listOfFigures01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/outline/listOfFigures01-expected.html b/Editor/tests/outline/listOfFigures01-expected.html
new file mode 100644
index 0000000..34e9a8f
--- /dev/null
+++ b/Editor/tests/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>


Mime
View raw message