corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmke...@apache.org
Subject [21/92] [abbrv] [partial] incubator-corinthia git commit: Add editing code from UX Write
Date Wed, 17 Dec 2014 13:28:31 GMT
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style07-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style07-input.html b/Editor/tests/formatting/style07-input.html
new file mode 100644
index 0000000..a37f865
--- /dev/null
+++ b/Editor/tests/formatting/style07-input.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Formatting_applyFormattingChanges("h1",null);
+
+    // An unrelated part of the code adds "id" attributes to heading elements to keep track of
+    // sections - we're not testing that functionality here, so we want to ignore them
+    removeIds();
+}
+</script>
+</head>
+<body>
+[<p>Paragraph one</p>
+<p>Paragraph two</p>
+<p>Paragraph three</p>
+<p>Paragraph four</p>
+<p>Paragraph five</p>]
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style08-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style08-expected.html b/Editor/tests/formatting/style08-expected.html
new file mode 100644
index 0000000..fdb480d
--- /dev/null
+++ b/Editor/tests/formatting/style08-expected.html
@@ -0,0 +1,10 @@
+<html>
+  <head></head>
+  <body>
+    <p>Paragraph one</p>
+    <h1>Paragraph two</h1>
+    <h1>Paragraph three</h1>
+    <h1>Paragraph four</h1>
+    <p>Paragraph five</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style08-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style08-input.html b/Editor/tests/formatting/style08-input.html
new file mode 100644
index 0000000..0a4d1fe
--- /dev/null
+++ b/Editor/tests/formatting/style08-input.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Formatting_applyFormattingChanges("h1",null);
+
+    // An unrelated part of the code adds "id" attributes to heading elements to keep track of
+    // sections - we're not testing that functionality here, so we want to ignore them
+    removeIds();
+}
+</script>
+</head>
+<body>
+<p>Paragraph one</p>
+[<p>Paragraph two</p>
+<p>Paragraph three</p>
+<p>Paragraph four</p>]
+<p>Paragraph five</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style09-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style09-expected.html b/Editor/tests/formatting/style09-expected.html
new file mode 100644
index 0000000..452ce51
--- /dev/null
+++ b/Editor/tests/formatting/style09-expected.html
@@ -0,0 +1,35 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      <i>
+        Paragraph
+        <u>one</u>
+      </i>
+    </p>
+    <h1>
+      <i>
+        Paragraph
+        <u>two</u>
+      </i>
+    </h1>
+    <h1>
+      <i>
+        Paragraph
+        <u>three</u>
+      </i>
+    </h1>
+    <h1>
+      <i>
+        Paragraph
+        <u>four</u>
+      </i>
+    </h1>
+    <p>
+      <i>
+        Paragraph
+        <u>five</u>
+      </i>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style09-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style09-input.html b/Editor/tests/formatting/style09-input.html
new file mode 100644
index 0000000..2570885
--- /dev/null
+++ b/Editor/tests/formatting/style09-input.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Formatting_applyFormattingChanges("h1",null);
+
+    // An unrelated part of the code adds "id" attributes to heading elements to keep track of
+    // sections - we're not testing that functionality here, so we want to ignore them
+    removeIds();
+}
+</script>
+</head>
+<body>
+<p><i>Paragraph <u>one</u></i></p>
+[<p><i>Paragraph <u>two</u></i></p>
+<p><i>Paragraph <u>three</u></i></p>
+<p><i>Paragraph <u>fou]r</u></i></p>
+<p><i>Paragraph <u>five</u></i></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style10-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style10-expected.html b/Editor/tests/formatting/style10-expected.html
new file mode 100644
index 0000000..452ce51
--- /dev/null
+++ b/Editor/tests/formatting/style10-expected.html
@@ -0,0 +1,35 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      <i>
+        Paragraph
+        <u>one</u>
+      </i>
+    </p>
+    <h1>
+      <i>
+        Paragraph
+        <u>two</u>
+      </i>
+    </h1>
+    <h1>
+      <i>
+        Paragraph
+        <u>three</u>
+      </i>
+    </h1>
+    <h1>
+      <i>
+        Paragraph
+        <u>four</u>
+      </i>
+    </h1>
+    <p>
+      <i>
+        Paragraph
+        <u>five</u>
+      </i>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style10-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style10-input.html b/Editor/tests/formatting/style10-input.html
new file mode 100644
index 0000000..bde1e8a
--- /dev/null
+++ b/Editor/tests/formatting/style10-input.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Formatting_applyFormattingChanges("h1",null);
+
+    // An unrelated part of the code adds "id" attributes to heading elements to keep track of
+    // sections - we're not testing that functionality here, so we want to ignore them
+    removeIds();
+}
+</script>
+</head>
+<body>
+<p><i>Paragraph <u>one</u></i></p>
+<p><i>Paragraph <u>t[wo</u></i></p>
+<p><i>Paragraph <u>three</u></i></p>
+<p><i>Paragraph <u>four</u></i></p>]
+<p><i>Paragraph <u>five</u></i></p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style11-nop-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style11-nop-expected.html b/Editor/tests/formatting/style11-nop-expected.html
new file mode 100644
index 0000000..c95b4aa
--- /dev/null
+++ b/Editor/tests/formatting/style11-nop-expected.html
@@ -0,0 +1,10 @@
+<html>
+  <head></head>
+  <body>
+    <ul>
+      <li><p class="test">Item one</p></li>
+      <li><p class="test">Item two</p></li>
+      <li><p class="test">Item three</p></li>
+    </ul>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style11-nop-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style11-nop-input.html b/Editor/tests/formatting/style11-nop-input.html
new file mode 100644
index 0000000..a68b915
--- /dev/null
+++ b/Editor/tests/formatting/style11-nop-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Formatting_applyFormattingChanges(".test",null);
+}
+</script>
+</head>
+<body>
+[<ul>
+  <li>Item one</li>
+  <li>Item two</li>
+  <li>Item three</li>
+</ul>]
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style11-p-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style11-p-expected.html b/Editor/tests/formatting/style11-p-expected.html
new file mode 100644
index 0000000..c95b4aa
--- /dev/null
+++ b/Editor/tests/formatting/style11-p-expected.html
@@ -0,0 +1,10 @@
+<html>
+  <head></head>
+  <body>
+    <ul>
+      <li><p class="test">Item one</p></li>
+      <li><p class="test">Item two</p></li>
+      <li><p class="test">Item three</p></li>
+    </ul>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style11-p-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style11-p-input.html b/Editor/tests/formatting/style11-p-input.html
new file mode 100644
index 0000000..7fbe211
--- /dev/null
+++ b/Editor/tests/formatting/style11-p-input.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Formatting_applyFormattingChanges(".test",null);
+}
+</script>
+</head>
+<body>
+[<ul>
+  <li><p>Item one</p></li>
+  <li><p>Item two</p></li>
+  <li><p>Item three</p></li>
+</ul>]
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style12-nop-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style12-nop-expected.html b/Editor/tests/formatting/style12-nop-expected.html
new file mode 100644
index 0000000..119160b
--- /dev/null
+++ b/Editor/tests/formatting/style12-nop-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <ul>
+      <li>Item one</li>
+      <li><p class="test">Item two</p></li>
+      <li><p class="test">Item three</p></li>
+      <li><p class="test">Item four</p></li>
+      <li>Item five</li>
+    </ul>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style12-nop-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style12-nop-input.html b/Editor/tests/formatting/style12-nop-input.html
new file mode 100644
index 0000000..111dc22
--- /dev/null
+++ b/Editor/tests/formatting/style12-nop-input.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Formatting_applyFormattingChanges(".test",null);
+}
+</script>
+</head>
+<body>
+<ul>
+  <li>Item one</li>
+  <li>Item [two</li>
+  <li>Item three</li>
+  <li>Item] four</li>
+  <li>Item five</li>
+</ul>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style12-p-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style12-p-expected.html b/Editor/tests/formatting/style12-p-expected.html
new file mode 100644
index 0000000..6d6b164
--- /dev/null
+++ b/Editor/tests/formatting/style12-p-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <ul>
+      <li><p>Item one</p></li>
+      <li><p class="test">Item two</p></li>
+      <li><p class="test">Item three</p></li>
+      <li><p class="test">Item four</p></li>
+      <li><p>Item five</p></li>
+    </ul>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style12-p-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style12-p-input.html b/Editor/tests/formatting/style12-p-input.html
new file mode 100644
index 0000000..7ced3a3
--- /dev/null
+++ b/Editor/tests/formatting/style12-p-input.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Formatting_applyFormattingChanges(".test",null);
+}
+</script>
+</head>
+<body>
+<ul>
+  <li><p>Item one</p></li>
+  <li><p>Item [two</p></li>
+  <li><p>Item three</p></li>
+  <li><p>Item] four</p></li>
+  <li><p>Item five</p></li>
+</ul>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style13-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style13-expected.html b/Editor/tests/formatting/style13-expected.html
new file mode 100644
index 0000000..a2d6274
--- /dev/null
+++ b/Editor/tests/formatting/style13-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <ul>
+      <li>Item one</li>
+      <li><p class="test">Item two</p></li>
+      <li><p class="test">Item three</p></li>
+      <li><p class="test">Item four</p></li>
+      <li><p class="test">Item five</p></li>
+    </ul>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style13-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style13-input.html b/Editor/tests/formatting/style13-input.html
new file mode 100644
index 0000000..82750ff
--- /dev/null
+++ b/Editor/tests/formatting/style13-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Formatting_applyFormattingChanges(".test",null);
+}
+</script>
+</head>
+<body>
+<ul>
+  <li>Item one</li>
+  <li>Item [two</li>
+  <li>Item three</li>
+  <li>Item four</li>
+  <li>Item five</li>
+</ul>
+]
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style14-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style14-expected.html b/Editor/tests/formatting/style14-expected.html
new file mode 100644
index 0000000..a517d03
--- /dev/null
+++ b/Editor/tests/formatting/style14-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <ul>
+      <li><p class="test">Item one</p></li>
+      <li><p class="test">Item two</p></li>
+      <li><p class="test">Item three</p></li>
+      <li><p class="test">Item four</p></li>
+      <li>Item five</li>
+    </ul>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style14-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style14-input.html b/Editor/tests/formatting/style14-input.html
new file mode 100644
index 0000000..fd56133
--- /dev/null
+++ b/Editor/tests/formatting/style14-input.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Formatting_applyFormattingChanges(".test",null);
+}
+</script>
+</head>
+<body>
+[<ul>
+  <li>Item one</li>
+  <li>Item two</li>
+  <li>Item three</li>
+  <li>Item] four</li>
+  <li>Item five</li>
+</ul>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style15-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style15-expected.html b/Editor/tests/formatting/style15-expected.html
new file mode 100644
index 0000000..119160b
--- /dev/null
+++ b/Editor/tests/formatting/style15-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <ul>
+      <li>Item one</li>
+      <li><p class="test">Item two</p></li>
+      <li><p class="test">Item three</p></li>
+      <li><p class="test">Item four</p></li>
+      <li>Item five</li>
+    </ul>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style15-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style15-input.html b/Editor/tests/formatting/style15-input.html
new file mode 100644
index 0000000..205ac20
--- /dev/null
+++ b/Editor/tests/formatting/style15-input.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Formatting_applyFormattingChanges(".test",null);
+}
+</script>
+</head>
+<body>
+<ul>
+  <li>Item one</li>
+  [<li>Item two</li>
+  <li>Item three</li>
+  <li>Item four</li>]
+  <li>Item five</li>
+</ul>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style16-nop-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style16-nop-expected.html b/Editor/tests/formatting/style16-nop-expected.html
new file mode 100644
index 0000000..884cf6d
--- /dev/null
+++ b/Editor/tests/formatting/style16-nop-expected.html
@@ -0,0 +1,21 @@
+<html>
+  <head></head>
+  <body>
+    <p>Paragraph one</p>
+    <p class="test">Paragraph two</p>
+    <table border="1">
+      <tbody>
+        <tr>
+          <td><p class="test">One</p></td>
+          <td><p class="test">Two</p></td>
+        </tr>
+        <tr>
+          <td><p class="test">Three</p></td>
+          <td><p class="test">Four</p></td>
+        </tr>
+      </tbody>
+    </table>
+    <p class="test">Paragraph three</p>
+    <p>Paragraph four</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style16-nop-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style16-nop-input.html b/Editor/tests/formatting/style16-nop-input.html
new file mode 100644
index 0000000..555bc5a
--- /dev/null
+++ b/Editor/tests/formatting/style16-nop-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Formatting_applyFormattingChanges(".test",null);
+}
+</script>
+</head>
+<body>
+<p>Paragraph one</p>
+[<p>Paragraph two</p>
+<table border="1">
+  <tr>
+    <td>One</td>
+    <td>Two</td>
+  </tr>
+  <tr>
+    <td>Three</td>
+    <td>Four</td>
+  </tr>
+</table>
+<p>Paragraph three</p>]
+<p>Paragraph four</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style16-p-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style16-p-expected.html b/Editor/tests/formatting/style16-p-expected.html
new file mode 100644
index 0000000..884cf6d
--- /dev/null
+++ b/Editor/tests/formatting/style16-p-expected.html
@@ -0,0 +1,21 @@
+<html>
+  <head></head>
+  <body>
+    <p>Paragraph one</p>
+    <p class="test">Paragraph two</p>
+    <table border="1">
+      <tbody>
+        <tr>
+          <td><p class="test">One</p></td>
+          <td><p class="test">Two</p></td>
+        </tr>
+        <tr>
+          <td><p class="test">Three</p></td>
+          <td><p class="test">Four</p></td>
+        </tr>
+      </tbody>
+    </table>
+    <p class="test">Paragraph three</p>
+    <p>Paragraph four</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style16-p-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style16-p-input.html b/Editor/tests/formatting/style16-p-input.html
new file mode 100644
index 0000000..9a9d56c
--- /dev/null
+++ b/Editor/tests/formatting/style16-p-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Formatting_applyFormattingChanges(".test",null);
+}
+</script>
+</head>
+<body>
+<p>Paragraph one</p>
+[<p>Paragraph two</p>
+<table border="1">
+  <tr>
+    <td><p>One</p></td>
+    <td><p>Two</p></td>
+  </tr>
+  <tr>
+    <td><p>Three</p></td>
+    <td><p>Four</p></td>
+  </tr>
+</table>
+<p>Paragraph three</p>]
+<p>Paragraph four</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style17-nop-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style17-nop-expected.html b/Editor/tests/formatting/style17-nop-expected.html
new file mode 100644
index 0000000..c90eca3
--- /dev/null
+++ b/Editor/tests/formatting/style17-nop-expected.html
@@ -0,0 +1,21 @@
+<html>
+  <head></head>
+  <body>
+    <p>Paragraph one</p>
+    <p>Paragraph two</p>
+    <table border="1">
+      <tbody>
+        <tr>
+          <td><p class="test">One</p></td>
+          <td><p class="test">Two</p></td>
+        </tr>
+        <tr>
+          <td><p class="test">Three</p></td>
+          <td><p class="test">Four</p></td>
+        </tr>
+      </tbody>
+    </table>
+    <p>Paragraph three</p>
+    <p>Paragraph four</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style17-nop-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style17-nop-input.html b/Editor/tests/formatting/style17-nop-input.html
new file mode 100644
index 0000000..71f821b
--- /dev/null
+++ b/Editor/tests/formatting/style17-nop-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Formatting_applyFormattingChanges(".test",null);
+}
+</script>
+</head>
+<body>
+<p>Paragraph one</p>
+<p>Paragraph two</p>
+[<table border="1">
+  <tr>
+    <td>One</td>
+    <td>Two</td>
+  </tr>
+  <tr>
+    <td>Three</td>
+    <td>Four</td>
+  </tr>
+</table>]
+<p>Paragraph three</p>
+<p>Paragraph four</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style17-p-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style17-p-expected.html b/Editor/tests/formatting/style17-p-expected.html
new file mode 100644
index 0000000..c90eca3
--- /dev/null
+++ b/Editor/tests/formatting/style17-p-expected.html
@@ -0,0 +1,21 @@
+<html>
+  <head></head>
+  <body>
+    <p>Paragraph one</p>
+    <p>Paragraph two</p>
+    <table border="1">
+      <tbody>
+        <tr>
+          <td><p class="test">One</p></td>
+          <td><p class="test">Two</p></td>
+        </tr>
+        <tr>
+          <td><p class="test">Three</p></td>
+          <td><p class="test">Four</p></td>
+        </tr>
+      </tbody>
+    </table>
+    <p>Paragraph three</p>
+    <p>Paragraph four</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style17-p-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style17-p-input.html b/Editor/tests/formatting/style17-p-input.html
new file mode 100644
index 0000000..1976fc6
--- /dev/null
+++ b/Editor/tests/formatting/style17-p-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Formatting_applyFormattingChanges(".test",null);
+}
+</script>
+</head>
+<body>
+<p>Paragraph one</p>
+<p>Paragraph two</p>
+[<table border="1">
+  <tr>
+    <td><p>One</p></td>
+    <td><p>Two</p></td>
+  </tr>
+  <tr>
+    <td><p>Three</p></td>
+    <td><p>Four</p></td>
+  </tr>
+</table>]
+<p>Paragraph three</p>
+<p>Paragraph four</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style18-nop-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style18-nop-expected.html b/Editor/tests/formatting/style18-nop-expected.html
new file mode 100644
index 0000000..fb6bd1f
--- /dev/null
+++ b/Editor/tests/formatting/style18-nop-expected.html
@@ -0,0 +1,29 @@
+<html>
+  <head></head>
+  <body>
+    <p>Paragraph one</p>
+    <p>Paragraph two</p>
+    <table border="1">
+      <tbody>
+        <tr>
+          <td>One</td>
+          <td>Two</td>
+        </tr>
+        <tr>
+          <td><p class="test">Three</p></td>
+          <td><p class="test">Four</p></td>
+        </tr>
+        <tr>
+          <td><p class="test">Five</p></td>
+          <td><p class="test">Six</p></td>
+        </tr>
+        <tr>
+          <td>Seven</td>
+          <td>Eight</td>
+        </tr>
+      </tbody>
+    </table>
+    <p>Paragraph three</p>
+    <p>Paragraph four</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style18-nop-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style18-nop-input.html b/Editor/tests/formatting/style18-nop-input.html
new file mode 100644
index 0000000..a318f41
--- /dev/null
+++ b/Editor/tests/formatting/style18-nop-input.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    // Have to set the selection manually here, since putting in [ and ] is invalid HTML and
+    // WebKit's parser will move the selection to cover the whole table if we do that
+    var table = document.getElementsByTagName("TABLE")[0];
+    var trs = document.getElementsByTagName("TR");
+    var tr1Offset = DOM_nodeOffset(trs[1]);
+    var tr2Offset = DOM_nodeOffset(trs[2]);
+
+    // The table is not the parent of the TRs - the parser automatically inserts a TBODY
+    // between them
+    Selection_set(trs[1].parentNode,tr1Offset,trs[2].parentNode,tr2Offset+1);
+
+    Formatting_applyFormattingChanges(".test",null);
+}
+</script>
+</head>
+<body>
+<p>Paragraph one</p>
+<p>Paragraph two</p>
+<table border="1">
+  <tr>
+    <td>One</td>
+    <td>Two</td>
+  </tr>
+  <tr>
+    <td>Three</td>
+    <td>Four</td>
+  </tr>
+  <tr>
+    <td>Five</td>
+    <td>Six</td>
+  </tr>
+  <tr>
+    <td>Seven</td>
+    <td>Eight</td>
+  </tr>
+</table>
+<p>Paragraph three</p>
+<p>Paragraph four</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style18-p-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style18-p-expected.html b/Editor/tests/formatting/style18-p-expected.html
new file mode 100644
index 0000000..648bf50
--- /dev/null
+++ b/Editor/tests/formatting/style18-p-expected.html
@@ -0,0 +1,29 @@
+<html>
+  <head></head>
+  <body>
+    <p>Paragraph one</p>
+    <p>Paragraph two</p>
+    <table border="1">
+      <tbody>
+        <tr>
+          <td><p>One</p></td>
+          <td><p>Two</p></td>
+        </tr>
+        <tr>
+          <td><p class="test">Three</p></td>
+          <td><p class="test">Four</p></td>
+        </tr>
+        <tr>
+          <td><p class="test">Five</p></td>
+          <td><p class="test">Six</p></td>
+        </tr>
+        <tr>
+          <td><p>Seven</p></td>
+          <td><p>Eight</p></td>
+        </tr>
+      </tbody>
+    </table>
+    <p>Paragraph three</p>
+    <p>Paragraph four</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style18-p-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style18-p-input.html b/Editor/tests/formatting/style18-p-input.html
new file mode 100644
index 0000000..787b629
--- /dev/null
+++ b/Editor/tests/formatting/style18-p-input.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    // Have to set the selection manually here, since putting in [ and ] is invalid HTML and
+    // WebKit's parser will move the selection to cover the whole table if we do that
+    var table = document.getElementsByTagName("TABLE")[0];
+    var trs = document.getElementsByTagName("TR");
+    var tr1Offset = DOM_nodeOffset(trs[1]);
+    var tr2Offset = DOM_nodeOffset(trs[2]);
+
+    // The table is not the parent of the TRs - the parser automatically inserts a TBODY
+    // between them
+    Selection_set(trs[1].parentNode,tr1Offset,trs[2].parentNode,tr2Offset+1);
+
+    Formatting_applyFormattingChanges(".test",null);
+}
+</script>
+</head>
+<body>
+<p>Paragraph one</p>
+<p>Paragraph two</p>
+<table border="1">
+  <tr>
+    <td><p>One</p></td>
+    <td><p>Two</p></td>
+  </tr>
+  <tr>
+    <td><p>Three</p></td>
+    <td><p>Four</p></td>
+  </tr>
+  <tr>
+    <td><p>Five</p></td>
+    <td><p>Six</p></td>
+  </tr>
+  <tr>
+    <td><p>Seven</p></td>
+    <td><p>Eight</p></td>
+  </tr>
+</table>
+<p>Paragraph three</p>
+<p>Paragraph four</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style19-nop-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style19-nop-expected.html b/Editor/tests/formatting/style19-nop-expected.html
new file mode 100644
index 0000000..525fb2a
--- /dev/null
+++ b/Editor/tests/formatting/style19-nop-expected.html
@@ -0,0 +1,21 @@
+<html>
+  <head></head>
+  <body>
+    <p>Paragraph one</p>
+    <p>Paragraph two</p>
+    <table border="1">
+      <tbody>
+        <tr>
+          <td>One</td>
+          <td><p class="test">Two</p></td>
+        </tr>
+        <tr>
+          <td><p class="test">Three</p></td>
+          <td>Four</td>
+        </tr>
+      </tbody>
+    </table>
+    <p>Paragraph three</p>
+    <p>Paragraph four</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style19-nop-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style19-nop-input.html b/Editor/tests/formatting/style19-nop-input.html
new file mode 100644
index 0000000..9b2818e
--- /dev/null
+++ b/Editor/tests/formatting/style19-nop-input.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    // Have to set the selection manually here, since putting in [ and ] is invalid HTML and
+    // WebKit's parser will move the selection to before the table if we do that
+    var table = document.getElementsByTagName("TABLE")[0];
+    var tds = document.getElementsByTagName("TD");
+    var td1Offset = DOM_nodeOffset(tds[1]);
+    var td2Offset = DOM_nodeOffset(tds[2]);
+
+    Selection_set(tds[1].parentNode,td1Offset,tds[2].parentNode,td2Offset+1);
+
+    Formatting_applyFormattingChanges(".test",null);
+}
+</script>
+</head>
+<body>
+<p>Paragraph one</p>
+<p>Paragraph two</p>
+<table border="1">
+  <tr>
+    <td>One</td>
+    <td>Two</td>
+  </tr>
+  <tr>
+    <td>Three</td>
+    <td>Four</td>
+  </tr>
+</table>
+<p>Paragraph three</p>
+<p>Paragraph four</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style19-p-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style19-p-expected.html b/Editor/tests/formatting/style19-p-expected.html
new file mode 100644
index 0000000..1e5ee8c
--- /dev/null
+++ b/Editor/tests/formatting/style19-p-expected.html
@@ -0,0 +1,21 @@
+<html>
+  <head></head>
+  <body>
+    <p>Paragraph one</p>
+    <p>Paragraph two</p>
+    <table border="1">
+      <tbody>
+        <tr>
+          <td><p>One</p></td>
+          <td><p class="test">Two</p></td>
+        </tr>
+        <tr>
+          <td><p class="test">Three</p></td>
+          <td><p>Four</p></td>
+        </tr>
+      </tbody>
+    </table>
+    <p>Paragraph three</p>
+    <p>Paragraph four</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style19-p-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style19-p-input.html b/Editor/tests/formatting/style19-p-input.html
new file mode 100644
index 0000000..98291ee
--- /dev/null
+++ b/Editor/tests/formatting/style19-p-input.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    // Have to set the selection manually here, since putting in [ and ] is invalid HTML and
+    // WebKit's parser will move the selection to before the table if we do that
+    var table = document.getElementsByTagName("TABLE")[0];
+    var tds = document.getElementsByTagName("TD");
+    var td1Offset = DOM_nodeOffset(tds[1]);
+    var td2Offset = DOM_nodeOffset(tds[2]);
+
+    Selection_set(tds[1].parentNode,td1Offset,tds[2].parentNode,td2Offset+1);
+
+    Formatting_applyFormattingChanges(".test",null);
+}
+</script>
+</head>
+<body>
+<p>Paragraph one</p>
+<p>Paragraph two</p>
+<table border="1">
+  <tr>
+    <td><p>One</p></td>
+    <td><p>Two</p></td>
+  </tr>
+  <tr>
+    <td><p>Three</p></td>
+    <td><p>Four</p></td>
+  </tr>
+</table>
+<p>Paragraph three</p>
+<p>Paragraph four</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style20-nop-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style20-nop-expected.html b/Editor/tests/formatting/style20-nop-expected.html
new file mode 100644
index 0000000..525fb2a
--- /dev/null
+++ b/Editor/tests/formatting/style20-nop-expected.html
@@ -0,0 +1,21 @@
+<html>
+  <head></head>
+  <body>
+    <p>Paragraph one</p>
+    <p>Paragraph two</p>
+    <table border="1">
+      <tbody>
+        <tr>
+          <td>One</td>
+          <td><p class="test">Two</p></td>
+        </tr>
+        <tr>
+          <td><p class="test">Three</p></td>
+          <td>Four</td>
+        </tr>
+      </tbody>
+    </table>
+    <p>Paragraph three</p>
+    <p>Paragraph four</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style20-nop-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style20-nop-input.html b/Editor/tests/formatting/style20-nop-input.html
new file mode 100644
index 0000000..efb5624
--- /dev/null
+++ b/Editor/tests/formatting/style20-nop-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Formatting_applyFormattingChanges(".test",null);
+}
+</script>
+</head>
+<body>
+<p>Paragraph one</p>
+<p>Paragraph two</p>
+<table border="1">
+  <tr>
+    <td>One</td>
+    <td>[Two</td>
+  </tr>
+  <tr>
+    <td>Three]</td>
+    <td>Four</td>
+  </tr>
+</table>
+<p>Paragraph three</p>
+<p>Paragraph four</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style20-p-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style20-p-expected.html b/Editor/tests/formatting/style20-p-expected.html
new file mode 100644
index 0000000..1e5ee8c
--- /dev/null
+++ b/Editor/tests/formatting/style20-p-expected.html
@@ -0,0 +1,21 @@
+<html>
+  <head></head>
+  <body>
+    <p>Paragraph one</p>
+    <p>Paragraph two</p>
+    <table border="1">
+      <tbody>
+        <tr>
+          <td><p>One</p></td>
+          <td><p class="test">Two</p></td>
+        </tr>
+        <tr>
+          <td><p class="test">Three</p></td>
+          <td><p>Four</p></td>
+        </tr>
+      </tbody>
+    </table>
+    <p>Paragraph three</p>
+    <p>Paragraph four</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style20-p-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style20-p-input.html b/Editor/tests/formatting/style20-p-input.html
new file mode 100644
index 0000000..d714523
--- /dev/null
+++ b/Editor/tests/formatting/style20-p-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Formatting_applyFormattingChanges(".test",null);
+}
+</script>
+</head>
+<body>
+<p>Paragraph one</p>
+<p>Paragraph two</p>
+<table border="1">
+  <tr>
+    <td><p>One</p></td>
+    <td>[<p>Two</p></td>
+  </tr>
+  <tr>
+    <td><p>Three</p>]</td>
+    <td><p>Four</p></td>
+  </tr>
+</table>
+<p>Paragraph three</p>
+<p>Paragraph four</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style21-nop-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style21-nop-expected.html b/Editor/tests/formatting/style21-nop-expected.html
new file mode 100644
index 0000000..525fb2a
--- /dev/null
+++ b/Editor/tests/formatting/style21-nop-expected.html
@@ -0,0 +1,21 @@
+<html>
+  <head></head>
+  <body>
+    <p>Paragraph one</p>
+    <p>Paragraph two</p>
+    <table border="1">
+      <tbody>
+        <tr>
+          <td>One</td>
+          <td><p class="test">Two</p></td>
+        </tr>
+        <tr>
+          <td><p class="test">Three</p></td>
+          <td>Four</td>
+        </tr>
+      </tbody>
+    </table>
+    <p>Paragraph three</p>
+    <p>Paragraph four</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style21-nop-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style21-nop-input.html b/Editor/tests/formatting/style21-nop-input.html
new file mode 100644
index 0000000..445a0d7
--- /dev/null
+++ b/Editor/tests/formatting/style21-nop-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Formatting_applyFormattingChanges(".test",null);
+}
+</script>
+</head>
+<body>
+<p>Paragraph one</p>
+<p>Paragraph two</p>
+<table border="1">
+  <tr>
+    <td>One</td>
+    <td>T[wo</td>
+  </tr>
+  <tr>
+    <td>Thr]ee</td>
+    <td>Four</td>
+  </tr>
+</table>
+<p>Paragraph three</p>
+<p>Paragraph four</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style21-p-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style21-p-expected.html b/Editor/tests/formatting/style21-p-expected.html
new file mode 100644
index 0000000..1e5ee8c
--- /dev/null
+++ b/Editor/tests/formatting/style21-p-expected.html
@@ -0,0 +1,21 @@
+<html>
+  <head></head>
+  <body>
+    <p>Paragraph one</p>
+    <p>Paragraph two</p>
+    <table border="1">
+      <tbody>
+        <tr>
+          <td><p>One</p></td>
+          <td><p class="test">Two</p></td>
+        </tr>
+        <tr>
+          <td><p class="test">Three</p></td>
+          <td><p>Four</p></td>
+        </tr>
+      </tbody>
+    </table>
+    <p>Paragraph three</p>
+    <p>Paragraph four</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style21-p-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style21-p-input.html b/Editor/tests/formatting/style21-p-input.html
new file mode 100644
index 0000000..86116e4
--- /dev/null
+++ b/Editor/tests/formatting/style21-p-input.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Formatting_applyFormattingChanges(".test",null);
+}
+</script>
+</head>
+<body>
+<p>Paragraph one</p>
+<p>Paragraph two</p>
+<table border="1">
+  <tr>
+    <td><p>One</p></td>
+    <td><p>T[wo</p></td>
+  </tr>
+  <tr>
+    <td><p>Thr]ee</p></td>
+    <td><p>Four</p></td>
+  </tr>
+</table>
+<p>Paragraph three</p>
+<p>Paragraph four</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style22-nop-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style22-nop-expected.html b/Editor/tests/formatting/style22-nop-expected.html
new file mode 100644
index 0000000..8fd7237
--- /dev/null
+++ b/Editor/tests/formatting/style22-nop-expected.html
@@ -0,0 +1,13 @@
+<html>
+  <head></head>
+  <body>
+    <p>Paragraph one</p>
+    <h1>
+      <i>
+        Paragraph
+        <u>two</u>
+      </i>
+    </h1>
+    <p>Paragraph three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style22-nop-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style22-nop-input.html b/Editor/tests/formatting/style22-nop-input.html
new file mode 100644
index 0000000..fc69997
--- /dev/null
+++ b/Editor/tests/formatting/style22-nop-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Formatting_applyFormattingChanges("h1",null);
+
+    // An unrelated part of the code adds "id" attributes to heading elements to keep track of
+    // sections - we're not testing that functionality here, so we want to ignore them
+    removeIds();
+}
+</script>
+</head>
+<body>
+<p>Paragraph one</p>
+<i>Paragraph <u>t[]wo</u></i>
+<p>Paragraph three</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style22-p-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style22-p-expected.html b/Editor/tests/formatting/style22-p-expected.html
new file mode 100644
index 0000000..8fd7237
--- /dev/null
+++ b/Editor/tests/formatting/style22-p-expected.html
@@ -0,0 +1,13 @@
+<html>
+  <head></head>
+  <body>
+    <p>Paragraph one</p>
+    <h1>
+      <i>
+        Paragraph
+        <u>two</u>
+      </i>
+    </h1>
+    <p>Paragraph three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style22-p-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style22-p-input.html b/Editor/tests/formatting/style22-p-input.html
new file mode 100644
index 0000000..2b60ba3
--- /dev/null
+++ b/Editor/tests/formatting/style22-p-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Formatting_applyFormattingChanges("h1",null);
+
+    // An unrelated part of the code adds "id" attributes to heading elements to keep track of
+    // sections - we're not testing that functionality here, so we want to ignore them
+    removeIds();
+}
+</script>
+</head>
+<body>
+<p>Paragraph one</p>
+<p><i>Paragraph <u>t[]wo</u></i></p>
+<p>Paragraph three</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style23-nop-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style23-nop-expected.html b/Editor/tests/formatting/style23-nop-expected.html
new file mode 100644
index 0000000..0a56f25
--- /dev/null
+++ b/Editor/tests/formatting/style23-nop-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <p>Paragraph one</p>
+    <h1>Paragraph two</h1>
+    <p>Paragraph three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style23-nop-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style23-nop-input.html b/Editor/tests/formatting/style23-nop-input.html
new file mode 100644
index 0000000..561307b
--- /dev/null
+++ b/Editor/tests/formatting/style23-nop-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Formatting_applyFormattingChanges("h1",null);
+
+    // An unrelated part of the code adds "id" attributes to heading elements to keep track of
+    // sections - we're not testing that functionality here, so we want to ignore them
+    removeIds();
+}
+</script>
+</head>
+<body>
+<p>Paragraph one</p>
+Paragraph t[]wo
+<p>Paragraph three</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style23-p-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style23-p-expected.html b/Editor/tests/formatting/style23-p-expected.html
new file mode 100644
index 0000000..0a56f25
--- /dev/null
+++ b/Editor/tests/formatting/style23-p-expected.html
@@ -0,0 +1,8 @@
+<html>
+  <head></head>
+  <body>
+    <p>Paragraph one</p>
+    <h1>Paragraph two</h1>
+    <p>Paragraph three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style23-p-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style23-p-input.html b/Editor/tests/formatting/style23-p-input.html
new file mode 100644
index 0000000..7242cbb
--- /dev/null
+++ b/Editor/tests/formatting/style23-p-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+    Formatting_applyFormattingChanges("h1",null);
+
+    // An unrelated part of the code adds "id" attributes to heading elements to keep track of
+    // sections - we're not testing that functionality here, so we want to ignore them
+    removeIds();
+}
+</script>
+</head>
+<body>
+<p>Paragraph one</p>
+<p>Paragraph t[]wo</p>
+<p>Paragraph three</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style24-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style24-expected.html b/Editor/tests/formatting/style24-expected.html
new file mode 100644
index 0000000..7de4a92
--- /dev/null
+++ b/Editor/tests/formatting/style24-expected.html
@@ -0,0 +1,10 @@
+<html>
+  <head></head>
+  <body>
+    <h1>
+      One two
+      <i>three</i>
+      four five
+    </h1>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/formatting/style24-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/formatting/style24-input.html b/Editor/tests/formatting/style24-input.html
new file mode 100644
index 0000000..885f283
--- /dev/null
+++ b/Editor/tests/formatting/style24-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    Formatting_applyFormattingChanges("H1",{});
+}
+</script>
+</head>
+<body>
+
+  <p>One [two <i>three</i> four] five</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/generic.css
----------------------------------------------------------------------
diff --git a/Editor/tests/generic.css b/Editor/tests/generic.css
new file mode 100644
index 0000000..5b93e8e
--- /dev/null
+++ b/Editor/tests/generic.css
@@ -0,0 +1,62 @@
+body {
+    counter-reset: h1 h2 h3 h4 h5 h6 figure table;
+}
+
+table {
+    border-collapse: collapse;
+    margin-left: auto;
+    margin-right: auto;
+}
+td > :first-child, th > :first-child {
+    margin-top: 0;
+}
+td > :last-child, th > :last-child {
+    margin-bottom: 0;
+}
+td, th {
+    border: 1px solid black;
+}
+
+figure {
+    margin-left: auto;
+    margin-right: auto;
+    text-align: center;
+}
+
+.toc1 {
+    margin-bottom: 6pt;
+    margin-left: 0pt;
+    margin-top: 12pt;
+}
+.toc2 {
+    margin-bottom: 6pt;
+    margin-left: 24pt;
+    margin-top: 6pt;
+}
+.toc3 {
+    margin-bottom: 6pt;
+    margin-left: 48pt;
+    margin-top: 6pt;
+}
+
+caption {
+  caption-side: bottom;
+  counter-increment: table;
+}
+
+caption::before {
+  content: "Table " counter(table) ": ";
+}
+
+figcaption {
+  counter-increment: figure;
+}
+
+figcaption::before {
+  content: "Figure " counter(figure) ": ";
+}
+
+.uxwrite-autocorrect { background-color: #c0ffc0; }
+.uxwrite-selection { background-color: rgb(201,221,238); }
+.uxwrite-spelling { background-color: rgb(255,128,128); }
+.uxwrite-match { background-color: rgb(255,255,0); }

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/genindex.sh
----------------------------------------------------------------------
diff --git a/Editor/tests/genindex.sh b/Editor/tests/genindex.sh
new file mode 100755
index 0000000..eece866
--- /dev/null
+++ b/Editor/tests/genindex.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+(
+prevdir=""
+echo "// This file was generated by genindex.sh on `date`"
+echo "var tests = [";
+for dir in *; do
+    if [ -d $dir ]; then
+        if [ ! -z "$prevdir" ]; then
+            echo ","
+        fi
+        echo "  { dir: \"$dir\","
+        echo -n "    files: ["
+        prevfile=""
+        for file in $(cd $dir && echo *-input.html); do
+            if [ ! -z "$prevfile" ]; then
+                echo ","
+                echo -n "            "
+            fi
+            shortname=`echo $file | sed -e 's/-input.html//'`
+            echo -n "\"$shortname\""
+            prevfile="$file"
+        done
+        echo -n "] }"
+        prevdir="$dir"
+    fi
+done
+echo
+echo "];"
+) > index.js

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/htmltotext.html
----------------------------------------------------------------------
diff --git a/Editor/tests/htmltotext.html b/Editor/tests/htmltotext.html
new file mode 100644
index 0000000..01fbb41
--- /dev/null
+++ b/Editor/tests/htmltotext.html
@@ -0,0 +1,125 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html> <head>
+<title></title>
+
+<script src="../tests/nulleditor.js"></script>
+<script src="../Clipboard_js"></script>
+<script src="../Cursor_js"></script>
+<script src="../DOM_js"></script>
+<script src="../Formatting_js"></script>
+<script src="../Hierarchy_js"></script>
+<script src="../init.js"></script>
+<script src="../Lists_js"></script>
+<script src="../NodeSet.js"></script>
+<script src="../Outline_js"></script>
+<script src="../Position.js"></script>
+<script src="../PostponedActions_js"></script>
+<script src="../Range.js"></script>
+<script src="../StringBuilder.js"></script>
+<script src="../traversal.js"></script>
+<script src="../types.js"></script>
+<script src="../UndoManager_js"></script>
+<script src="../util.js"></script>
+<script src="../Viewport_js"></script>
+<script src="../Selection_js"></script>
+<script src="../tests/testlib.js"></script>
+<script>
+function debug(str)
+{
+    console.log(str);
+}
+
+function loaded()
+{
+    DOM_assignNodeIds(document);
+    var text = Clipboard_htmlToText(document.body);
+    DOM_deleteAllChildren(document.body);
+    var pre = DOM_createElement(document,"PRE");
+    DOM_setStyleProperties(pre,{"white-space": "pre-wrap"});
+    DOM_appendChild(pre,DOM_createTextNode(document,text));
+    DOM_appendChild(document.body,pre);
+}
+</script>
+
+</head>
+
+<body onload="loaded()">
+
+<blockquote>
+<p>Here is some text in a blockquote. Here is some text in a blockquote.Here is some text in a blockquote.Here is some text in a blockquote.Here is some text in a blockquote.Here is some text in a blockquote.</p>
+
+<p>Here is some text in a blockquote. Here is some text in a blockquote.Here is some text in a blockquote.Here is some text in a blockquote.Here is some text in a blockquote.Here is some text in a blockquote.</p>
+
+<p>Here is some text in a blockquote. Here is some text in a blockquote.Here is some text in a blockquote.Here is some text in a blockquote.Here is some text in a blockquote.Here is some text in a blockquote.</p>
+
+<blockquote>
+This is a nested blockquote. This is a nested blockquote. This is a nested blockquote. This is a nested blockquote. This is a nested blockquote. This is a nested blockquote. This is a nested blockquote. This is a nested blockquote. 
+</blockquote>
+
+<ul>
+    <li>One</li>
+    <li>Two</li>
+    <li>Three</li>
+</ul>
+
+</blockquote>
+
+<p>First paragraph</p>
+<p>Third paragraph</p>
+<h1>Heading 1</h1>
+<h2>Heading 2</h2>
+<h3>Heading 3</h3>
+<h4>Heading 4</h4>
+<h5>Heading 5</h5>
+<h6>Heading 6</h6>
+<div><div><div>Content inside nested div</div></div></div>
+<p>One <b>Two</b> <i>Three</i></p>
+<ul><li>Item one</li><li>Item two</li><li>Item three</li><li>Item four<ul><li>AAAAA</li><li>BBBBB</li><li>CCCCC</li></ul></li><li><p>Item five para 1</p><p>Item five para 2</p><p>Item five para 3</p></li>
+</ul>
+<p>Fourth paragraph</p>
+<p>Fifth paragraph</p>
+
+
+Some text that is not in a paragraph. Some text that is not in a paragraph. Some text that is not in a paragraph. Some text that is not in a paragraph. Some text that is not in a paragraph. Some text that is not in a paragraph. Some text that is not in a paragraph. Some text that is not in a paragraph. Some text that is not in a paragraph. Some text that is not in a paragraph. Some text that is not in a paragraph. Some text that is not in a paragraph. Some text that is not in a paragraph. Some text that is not in a paragraph.
+
+<i>italic</i> <b>bold</b> <em>emphasis</em> <strong>strong</strong>
+
+<p><u>one</u><u>two</u><u>three</u></p>
+
+<p><u>one </u> <u> two </u> <u> three</u></p>
+
+Here is a link to the <a href="http://daringfireball.net/projects/markdown/syntax">Markdown syntax</a> (a good reference)
+
+<p>First paragraph</p>
+
+<p>Third paragraph</p>
+<p>One <b>Two</b> <i>Three</i></p>
+
+<ol>
+  <li>Item one</li>
+  <li>Item two</li>
+  <li>Item three</li>
+  <li>Item four
+    <ol>
+      <li>AAAAA</li>
+      <li>BBBBB<p>BBBBB</p>BBBBB<p>BBBBB</p>BBBBB<ul><li>one<p>x</p></li><li>two</li></ul></li>
+      <li>CCCCC</li>
+    </ol>
+  </li>
+  <li>Item five</li>
+  <li>Item</li>
+  <li>Item</li>
+  <li>Item</li>
+  <li>Item</li>
+  <li>Item<h1>Heading 1</h1><h2>Heading 2</h2>Rest of item</li>
+  <li>Item</li>
+  <li>Item</li>
+  <li>Item</li>
+</ol>
+
+<p>Fourth paragraph</p>
+
+<p>Fifth paragraph</p>
+
+</body>
+</html>


Mime
View raw message