You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@corinthia.apache.org by ja...@apache.org on 2015/08/14 18:10:35 UTC
[28/51] [abbrv] [partial] incubator-corinthia git commit: added js
test files
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/pushDownInlineProperties19-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/pushDownInlineProperties19-input.html b/experiments/editorFramework/test/Layer0/formatting/pushDownInlineProperties19-input.html
new file mode 100644
index 0000000..030e9fd
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/pushDownInlineProperties19-input.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+ Selection_preserveWhileExecuting(function() {
+ var range = Selection_get();
+ Range_trackWhileExecuting(range,function() {
+ removeWhitespaceAndCommentNodes(document.body);
+ });
+ var outermost = Range_getOutermostNodes(range);
+ Formatting_pushDownInlineProperties(outermost);
+ });
+}
+</script>
+</head>
+<body>
+<div style="color: red; margin-left: 20%">
+ <p style="color: green; margin-right: 15%">
+ <s style="color: blue">
+ <s>
+ <s>One</s>
+ <s>Two</s>
+ <s>Three</s>
+ </s>
+ <s style="color: yellow">
+ <s>Four</s>
+ [<s style="color: black">Five</s>]
+ <s>Six</s>
+ </s>
+ </s>
+ <s>
+ <s>Seven</s>
+ <s>Eight</s>
+ <s>Nine</s>
+ </s>
+ </p>
+ <p>Ten</p>
+</div>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/splitTextAfter01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/splitTextAfter01-expected.html b/experiments/editorFramework/test/Layer0/formatting/splitTextAfter01-expected.html
new file mode 100644
index 0000000..a48249c
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/splitTextAfter01-expected.html
@@ -0,0 +1,19 @@
+"|one two three four" -> "|one t" -> "|one two three four"
+"o|ne two three four" -> "o|ne t" -> "o|ne two three four"
+"on|e two three four" -> "on|e t" -> "on|e two three four"
+"one| two three four" -> "one| t" -> "one| two three four"
+"one |two three four" -> "one |t" -> "one |two three four"
+"one t|wo three four" -> "one t|" -> "one t|wo three four"
+"one tw|o three four" -> "w|o three four" -> "one tw|o three four"
+"one two| three four" -> "wo| three four" -> "one two| three four"
+"one two |three four" -> "wo |three four" -> "one two |three four"
+"one two t|hree four" -> "wo t|hree four" -> "one two t|hree four"
+"one two th|ree four" -> "wo th|ree four" -> "one two th|ree four"
+"one two thr|ee four" -> "wo thr|ee four" -> "one two thr|ee four"
+"one two thre|e four" -> "wo thre|e four" -> "one two thre|e four"
+"one two three| four" -> "wo three| four" -> "one two three| four"
+"one two three |four" -> "wo three |four" -> "one two three |four"
+"one two three f|our" -> "wo three f|our" -> "one two three f|our"
+"one two three fo|ur" -> "wo three fo|ur" -> "one two three fo|ur"
+"one two three fou|r" -> "wo three fou|r" -> "one two three fou|r"
+"one two three four|" -> "wo three four|" -> "one two three four|"
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/splitTextAfter01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/splitTextAfter01-input.html b/experiments/editorFramework/test/Layer0/formatting/splitTextAfter01-input.html
new file mode 100644
index 0000000..aa6d29f
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/splitTextAfter01-input.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function pad(str,length)
+{
+ str = ""+str;
+ while (str.length < length)
+ str += " ";
+ return str;
+}
+
+function performTest()
+{
+ var ps = document.getElementsByTagName("P");
+ var text1 = ps[0].firstChild;
+
+ var positions = new Array();
+ for (var i = 0; i <= text1.nodeValue.length; i++)
+ positions.push(new Position(text1,i));
+
+ var origStrings = new Array();
+ for (var i = 0; i < positions.length; i++)
+ origStrings.push(positions[i].toString());
+
+ Position_trackWhileExecuting(positions,function() {
+ Formatting_splitTextAfter(new Position(text1,5));
+ });
+
+ var movedStrings = new Array();
+ for (var i = 0; i < positions.length; i++)
+ movedStrings.push(positions[i].toString());
+
+ Position_trackWhileExecuting(positions,function() {
+ UndoManager_undo();
+ });
+ var undoneStrings = new Array();
+ for (var i = 0; i < positions.length; i++)
+ undoneStrings.push(positions[i].toString());
+
+ var lines = new Array();
+ for (var i = 0; i < positions.length; i++) {
+ var extra = "";
+ if (undoneStrings[i] != origStrings[i])
+ extra += " ***";
+ lines.push(origStrings[i]+" -> "+
+ pad(movedStrings[i],16)+" -> "+
+ undoneStrings[i]+extra+"\n");
+ }
+ return lines.join("");
+}
+</script>
+</head>
+<body>
+<p>one two three four</p>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/splitTextBefore01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/splitTextBefore01-expected.html b/experiments/editorFramework/test/Layer0/formatting/splitTextBefore01-expected.html
new file mode 100644
index 0000000..eef78e1
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/splitTextBefore01-expected.html
@@ -0,0 +1,19 @@
+"|one two three four" -> "|one t" -> "|one two three four"
+"o|ne two three four" -> "o|ne t" -> "o|ne two three four"
+"on|e two three four" -> "on|e t" -> "on|e two three four"
+"one| two three four" -> "one| t" -> "one| two three four"
+"one |two three four" -> "one |t" -> "one |two three four"
+"one t|wo three four" -> "|wo three four" -> "one t|wo three four"
+"one tw|o three four" -> "w|o three four" -> "one tw|o three four"
+"one two| three four" -> "wo| three four" -> "one two| three four"
+"one two |three four" -> "wo |three four" -> "one two |three four"
+"one two t|hree four" -> "wo t|hree four" -> "one two t|hree four"
+"one two th|ree four" -> "wo th|ree four" -> "one two th|ree four"
+"one two thr|ee four" -> "wo thr|ee four" -> "one two thr|ee four"
+"one two thre|e four" -> "wo thre|e four" -> "one two thre|e four"
+"one two three| four" -> "wo three| four" -> "one two three| four"
+"one two three |four" -> "wo three |four" -> "one two three |four"
+"one two three f|our" -> "wo three f|our" -> "one two three f|our"
+"one two three fo|ur" -> "wo three fo|ur" -> "one two three fo|ur"
+"one two three fou|r" -> "wo three fou|r" -> "one two three fou|r"
+"one two three four|" -> "wo three four|" -> "one two three four|"
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/splitTextBefore01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/splitTextBefore01-input.html b/experiments/editorFramework/test/Layer0/formatting/splitTextBefore01-input.html
new file mode 100644
index 0000000..8802956
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/splitTextBefore01-input.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function pad(str,length)
+{
+ str = ""+str;
+ while (str.length < length)
+ str += " ";
+ return str;
+}
+
+function performTest()
+{
+ var ps = document.getElementsByTagName("P");
+ var text1 = ps[0].firstChild;
+
+ var positions = new Array();
+ for (var i = 0; i <= text1.nodeValue.length; i++)
+ positions.push(new Position(text1,i));
+
+ var origStrings = new Array();
+ for (var i = 0; i < positions.length; i++)
+ origStrings.push(positions[i].toString());
+
+ Position_trackWhileExecuting(positions,function() {
+ Formatting_splitTextBefore(new Position(text1,5));
+ });
+
+ var movedStrings = new Array();
+ for (var i = 0; i < positions.length; i++)
+ movedStrings.push(positions[i].toString());
+
+ Position_trackWhileExecuting(positions,function() {
+ UndoManager_undo();
+ });
+ var undoneStrings = new Array();
+ for (var i = 0; i < positions.length; i++)
+ undoneStrings.push(positions[i].toString());
+
+ var lines = new Array();
+ for (var i = 0; i < positions.length; i++) {
+ var extra = "";
+ if (undoneStrings[i] != origStrings[i])
+ extra += " ***";
+ lines.push(origStrings[i]+" -> "+
+ pad(movedStrings[i],16)+" -> "+
+ undoneStrings[i]+extra+"\n");
+ }
+ return lines.join("");
+}
+</script>
+</head>
+<body>
+<p>one two three four</p>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop01-expected.html b/experiments/editorFramework/test/Layer0/formatting/style-nop01-expected.html
new file mode 100644
index 0000000..f2a7521
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop01-expected.html
@@ -0,0 +1,6 @@
+<html>
+ <head></head>
+ <body>
+ <p><br/></p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop01-input.html b/experiments/editorFramework/test/Layer0/formatting/style-nop01-input.html
new file mode 100644
index 0000000..72bae88
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop01-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+ Formatting_applyFormattingChanges("",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>[]</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop01a-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop01a-expected.html b/experiments/editorFramework/test/Layer0/formatting/style-nop01a-expected.html
new file mode 100644
index 0000000..a341e6e
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop01a-expected.html
@@ -0,0 +1,6 @@
+<html>
+ <head></head>
+ <body>
+ <h1><br/></h1>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop01a-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop01a-input.html b/experiments/editorFramework/test/Layer0/formatting/style-nop01a-input.html
new file mode 100644
index 0000000..9250221
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop01a-input.html
@@ -0,0 +1,17 @@
+<!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>[]</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop02-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop02-expected.html b/experiments/editorFramework/test/Layer0/formatting/style-nop02-expected.html
new file mode 100644
index 0000000..9ef2a3e
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop02-expected.html
@@ -0,0 +1,6 @@
+<html>
+ <head></head>
+ <body>
+ <p>a</p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop02-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop02-input.html b/experiments/editorFramework/test/Layer0/formatting/style-nop02-input.html
new file mode 100644
index 0000000..c9d3e66
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop02-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+ Formatting_applyFormattingChanges("",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>a[]</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop03-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop03-expected.html b/experiments/editorFramework/test/Layer0/formatting/style-nop03-expected.html
new file mode 100644
index 0000000..9ef2a3e
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop03-expected.html
@@ -0,0 +1,6 @@
+<html>
+ <head></head>
+ <body>
+ <p>a</p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop03-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop03-input.html b/experiments/editorFramework/test/Layer0/formatting/style-nop03-input.html
new file mode 100644
index 0000000..a65975c
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop03-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+ Formatting_applyFormattingChanges("",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>[]a</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop04-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop04-expected.html b/experiments/editorFramework/test/Layer0/formatting/style-nop04-expected.html
new file mode 100644
index 0000000..68f377c
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop04-expected.html
@@ -0,0 +1,6 @@
+<html>
+ <head></head>
+ <body>
+ <p>ab</p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop04-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop04-input.html b/experiments/editorFramework/test/Layer0/formatting/style-nop04-input.html
new file mode 100644
index 0000000..b4bdf7f
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop04-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+ Formatting_applyFormattingChanges("",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>a[]b</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop05-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop05-expected.html b/experiments/editorFramework/test/Layer0/formatting/style-nop05-expected.html
new file mode 100644
index 0000000..9ef2a3e
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop05-expected.html
@@ -0,0 +1,6 @@
+<html>
+ <head></head>
+ <body>
+ <p>a</p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop05-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop05-input.html b/experiments/editorFramework/test/Layer0/formatting/style-nop05-input.html
new file mode 100644
index 0000000..fe55cca
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop05-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+ Formatting_applyFormattingChanges("",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>[a]</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop06-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop06-expected.html b/experiments/editorFramework/test/Layer0/formatting/style-nop06-expected.html
new file mode 100644
index 0000000..53e060d
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop06-expected.html
@@ -0,0 +1,8 @@
+<html>
+ <head></head>
+ <body>
+ <figure>
+ <p><br/></p>
+ </figure>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop06-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop06-input.html b/experiments/editorFramework/test/Layer0/formatting/style-nop06-input.html
new file mode 100644
index 0000000..b7b43e1
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop06-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+ Formatting_applyFormattingChanges("",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><figure>[]</figure></body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop07-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop07-expected.html b/experiments/editorFramework/test/Layer0/formatting/style-nop07-expected.html
new file mode 100644
index 0000000..79c288f
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop07-expected.html
@@ -0,0 +1,8 @@
+<html>
+ <head></head>
+ <body>
+ <figure>
+ <figcaption><p><br/></p></figcaption>
+ </figure>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop07-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop07-input.html b/experiments/editorFramework/test/Layer0/formatting/style-nop07-input.html
new file mode 100644
index 0000000..037ec60
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop07-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+ Formatting_applyFormattingChanges("",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><figure><figcaption>[]</figcaption></figure></body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop08-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop08-expected.html b/experiments/editorFramework/test/Layer0/formatting/style-nop08-expected.html
new file mode 100644
index 0000000..d242935
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop08-expected.html
@@ -0,0 +1,13 @@
+<html>
+ <head></head>
+ <body>
+ <table>
+ <caption><p><br/></p></caption>
+ <tbody>
+ <tr>
+ <td>Cell</td>
+ </tr>
+ </tbody>
+ </table>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop08-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop08-input.html b/experiments/editorFramework/test/Layer0/formatting/style-nop08-input.html
new file mode 100644
index 0000000..17cf3b9
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop08-input.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+ Formatting_applyFormattingChanges("",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>
+ <table>
+ <caption>[]</caption>
+ <tr>
+ <td>Cell</td>
+ </tr>
+ </table>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop09-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop09-expected.html b/experiments/editorFramework/test/Layer0/formatting/style-nop09-expected.html
new file mode 100644
index 0000000..4829db4
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop09-expected.html
@@ -0,0 +1,12 @@
+<html>
+ <head></head>
+ <body>
+ <table>
+ <tbody>
+ <tr>
+ <td><p><br/></p></td>
+ </tr>
+ </tbody>
+ </table>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style-nop09-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style-nop09-input.html b/experiments/editorFramework/test/Layer0/formatting/style-nop09-input.html
new file mode 100644
index 0000000..d9c537b
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style-nop09-input.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+ Formatting_applyFormattingChanges("",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>
+ <table>
+ <tr>
+ <td>[]</td>
+ </tr>
+ </table>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style01-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style01-expected.html b/experiments/editorFramework/test/Layer0/formatting/style01-expected.html
new file mode 100644
index 0000000..a42ee80
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style01-expected.html
@@ -0,0 +1,14 @@
+<html>
+ <head></head>
+ <body>
+ <p>Normal</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>
+ <p class="hello">Class "hello"</p>
+ <p>Unchanged (normal)</p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style01-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style01-input.html b/experiments/editorFramework/test/Layer0/formatting/style01-input.html
new file mode 100644
index 0000000..6f577ac
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style01-input.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+
+ // Need to make a copy of this array, because it is "live" and the P elements will disappear
+ // from it as we apply formatting changes, changing them into heading elements
+ var ps = arrayCopy(document.getElementsByTagName("P"));
+
+ selectNode(ps[0]);
+ Formatting_applyFormattingChanges("",null);
+ selectNode(ps[1]);
+ Formatting_applyFormattingChanges("H1",null);
+ selectNode(ps[2]);
+ Formatting_applyFormattingChanges("H2",null);
+ selectNode(ps[3]);
+ Formatting_applyFormattingChanges("H3",null);
+ selectNode(ps[4]);
+ Formatting_applyFormattingChanges("H4",null);
+ selectNode(ps[5]);
+ Formatting_applyFormattingChanges("H5",null);
+ selectNode(ps[6]);
+ Formatting_applyFormattingChanges("H6",null);
+ selectNode(ps[7]);
+ Formatting_applyFormattingChanges(".hello",null);
+ selectNode(ps[8]);
+ Formatting_applyFormattingChanges(null,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>Normal</p>
+<p>Heading 1</p>
+<p>Heading 2</p>
+<p>Heading 3</p>
+<p>Heading 4</p>
+<p>Heading 5</p>
+<p>Heading 6</p>
+<p>Class "hello"</p>
+<p>Unchanged (normal)</p>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style02-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style02-expected.html b/experiments/editorFramework/test/Layer0/formatting/style02-expected.html
new file mode 100644
index 0000000..840c7f7
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style02-expected.html
@@ -0,0 +1,14 @@
+<html>
+ <head></head>
+ <body>
+ <p>Normal</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>
+ <p class="hello">Class "hello"</p>
+ <h1>Unchanged (heading 1)</h1>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style02-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style02-input.html b/experiments/editorFramework/test/Layer0/formatting/style02-input.html
new file mode 100644
index 0000000..53b955e
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style02-input.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+
+ // Need to make a copy of this array, because it is "live" and the H1 elements will disappear
+ // from it as we apply formatting changes, changing them into heading elements
+ var h1s = arrayCopy(document.getElementsByTagName("H1"));
+
+ selectNode(h1s[0]);
+ Formatting_applyFormattingChanges("",null);
+ selectNode(h1s[1]);
+ Formatting_applyFormattingChanges("H1",null);
+ selectNode(h1s[2]);
+ Formatting_applyFormattingChanges("H2",null);
+ selectNode(h1s[3]);
+ Formatting_applyFormattingChanges("H3",null);
+ selectNode(h1s[4]);
+ Formatting_applyFormattingChanges("H4",null);
+ selectNode(h1s[5]);
+ Formatting_applyFormattingChanges("H5",null);
+ selectNode(h1s[6]);
+ Formatting_applyFormattingChanges("H6",null);
+ selectNode(h1s[7]);
+ Formatting_applyFormattingChanges(".hello",null);
+ selectNode(h1s[8]);
+ Formatting_applyFormattingChanges(null,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>
+<h1>Normal</h1>
+<h1>Heading 1</h1>
+<h1>Heading 2</h1>
+<h1>Heading 3</h1>
+<h1>Heading 4</h1>
+<h1>Heading 5</h1>
+<h1>Heading 6</h1>
+<h1>Class "hello"</h1>
+<h1>Unchanged (heading 1)</h1>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style03-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style03-expected.html b/experiments/editorFramework/test/Layer0/formatting/style03-expected.html
new file mode 100644
index 0000000..97fd91f
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style03-expected.html
@@ -0,0 +1,14 @@
+<html>
+ <head></head>
+ <body>
+ <p>Normal</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>
+ <p class="hello">Class "hello"</p>
+ <p class="other">Unchanged (class "other")</p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style03-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style03-input.html b/experiments/editorFramework/test/Layer0/formatting/style03-input.html
new file mode 100644
index 0000000..4cf5e86
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style03-input.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+
+ // Need to make a copy of this array, because it is "live" and the P elements will disappear
+ // from it as we apply formatting changes, changing them into heading elements
+ var ps = arrayCopy(document.getElementsByTagName("P"));
+
+ selectNode(ps[0]);
+ Formatting_applyFormattingChanges("",null);
+ selectNode(ps[1]);
+ Formatting_applyFormattingChanges("H1",null);
+ selectNode(ps[2]);
+ Formatting_applyFormattingChanges("H2",null);
+ selectNode(ps[3]);
+ Formatting_applyFormattingChanges("H3",null);
+ selectNode(ps[4]);
+ Formatting_applyFormattingChanges("H4",null);
+ selectNode(ps[5]);
+ Formatting_applyFormattingChanges("H5",null);
+ selectNode(ps[6]);
+ Formatting_applyFormattingChanges("H6",null);
+ selectNode(ps[7]);
+ Formatting_applyFormattingChanges(".hello",null);
+ selectNode(ps[8]);
+ Formatting_applyFormattingChanges(null,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 class="other">Normal</p>
+<p class="other">Heading 1</p>
+<p class="other">Heading 2</p>
+<p class="other">Heading 3</p>
+<p class="other">Heading 4</p>
+<p class="other">Heading 5</p>
+<p class="other">Heading 6</p>
+<p class="other">Class "hello"</p>
+<p class="other">Unchanged (class "other")</p>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style04-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style04-expected.html b/experiments/editorFramework/test/Layer0/formatting/style04-expected.html
new file mode 100644
index 0000000..159df8c
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style04-expected.html
@@ -0,0 +1,14 @@
+<html>
+ <head></head>
+ <body>
+ <p align="center" style="color: blue">Normal</p>
+ <h1 align="center" style="color: blue">Heading 1</h1>
+ <h2 align="center" style="color: blue">Heading 2</h2>
+ <h3 align="center" style="color: blue">Heading 3</h3>
+ <h4 align="center" style="color: blue">Heading 4</h4>
+ <h5 align="center" style="color: blue">Heading 5</h5>
+ <h6 align="center" style="color: blue">Heading 6</h6>
+ <p align="center" class="hello" style="color: blue">Class "hello"</p>
+ <p align="center" style="color: blue">Unchanged (normal)</p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style04-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style04-input.html b/experiments/editorFramework/test/Layer0/formatting/style04-input.html
new file mode 100644
index 0000000..6b3e3f5
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style04-input.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+
+function performTest()
+{
+
+ // Need to make a copy of this array, because it is "live" and the P elements will disappear
+ // from it as we apply formatting changes, changing them into heading elements
+ var ps = arrayCopy(document.getElementsByTagName("P"));
+
+ selectNode(ps[0]);
+ Formatting_applyFormattingChanges("",null);
+ selectNode(ps[1]);
+ Formatting_applyFormattingChanges("H1",null);
+ selectNode(ps[2]);
+ Formatting_applyFormattingChanges("H2",null);
+ selectNode(ps[3]);
+ Formatting_applyFormattingChanges("H3",null);
+ selectNode(ps[4]);
+ Formatting_applyFormattingChanges("H4",null);
+ selectNode(ps[5]);
+ Formatting_applyFormattingChanges("H5",null);
+ selectNode(ps[6]);
+ Formatting_applyFormattingChanges("H6",null);
+ selectNode(ps[7]);
+ Formatting_applyFormattingChanges(".hello",null);
+ selectNode(ps[8]);
+ Formatting_applyFormattingChanges(null,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 align="center" style="color: blue">Normal</p>
+<p align="center" style="color: blue">Heading 1</p>
+<p align="center" style="color: blue">Heading 2</p>
+<p align="center" style="color: blue">Heading 3</p>
+<p align="center" style="color: blue">Heading 4</p>
+<p align="center" style="color: blue">Heading 5</p>
+<p align="center" style="color: blue">Heading 6</p>
+<p align="center" style="color: blue">Class "hello"</p>
+<p align="center" style="color: blue">Unchanged (normal)</p>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style05-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style05-expected.html b/experiments/editorFramework/test/Layer0/formatting/style05-expected.html
new file mode 100644
index 0000000..fdb480d
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style05-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/0633908a/experiments/editorFramework/test/Layer0/formatting/style05-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style05-input.html b/experiments/editorFramework/test/Layer0/formatting/style05-input.html
new file mode 100644
index 0000000..f8acf24
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style05-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>Par[agraph two</p>
+<p>Paragraph three</p>
+<p>Paragraph fo]ur</p>
+<p>Paragraph five</p>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style06-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style06-expected.html b/experiments/editorFramework/test/Layer0/formatting/style06-expected.html
new file mode 100644
index 0000000..452ce51
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style06-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/0633908a/experiments/editorFramework/test/Layer0/formatting/style06-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style06-input.html b/experiments/editorFramework/test/Layer0/formatting/style06-input.html
new file mode 100644
index 0000000..ba3422c
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style06-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>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/0633908a/experiments/editorFramework/test/Layer0/formatting/style07-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style07-expected.html b/experiments/editorFramework/test/Layer0/formatting/style07-expected.html
new file mode 100644
index 0000000..def4a40
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/formatting/style07-expected.html
@@ -0,0 +1,10 @@
+<html>
+ <head></head>
+ <body>
+ <h1>Paragraph one</h1>
+ <h1>Paragraph two</h1>
+ <h1>Paragraph three</h1>
+ <h1>Paragraph four</h1>
+ <h1>Paragraph five</h1>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0633908a/experiments/editorFramework/test/Layer0/formatting/style07-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style07-input.html b/experiments/editorFramework/test/Layer0/formatting/style07-input.html
new file mode 100644
index 0000000..a37f865
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style08-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style08-expected.html b/experiments/editorFramework/test/Layer0/formatting/style08-expected.html
new file mode 100644
index 0000000..fdb480d
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style08-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style08-input.html b/experiments/editorFramework/test/Layer0/formatting/style08-input.html
new file mode 100644
index 0000000..0a4d1fe
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style09-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style09-expected.html b/experiments/editorFramework/test/Layer0/formatting/style09-expected.html
new file mode 100644
index 0000000..452ce51
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style09-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style09-input.html b/experiments/editorFramework/test/Layer0/formatting/style09-input.html
new file mode 100644
index 0000000..2570885
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style10-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style10-expected.html b/experiments/editorFramework/test/Layer0/formatting/style10-expected.html
new file mode 100644
index 0000000..452ce51
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style10-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style10-input.html b/experiments/editorFramework/test/Layer0/formatting/style10-input.html
new file mode 100644
index 0000000..bde1e8a
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style11-nop-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style11-nop-expected.html b/experiments/editorFramework/test/Layer0/formatting/style11-nop-expected.html
new file mode 100644
index 0000000..c95b4aa
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style11-nop-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style11-nop-input.html b/experiments/editorFramework/test/Layer0/formatting/style11-nop-input.html
new file mode 100644
index 0000000..a68b915
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style11-p-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style11-p-expected.html b/experiments/editorFramework/test/Layer0/formatting/style11-p-expected.html
new file mode 100644
index 0000000..c95b4aa
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style11-p-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style11-p-input.html b/experiments/editorFramework/test/Layer0/formatting/style11-p-input.html
new file mode 100644
index 0000000..7fbe211
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style12-nop-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style12-nop-expected.html b/experiments/editorFramework/test/Layer0/formatting/style12-nop-expected.html
new file mode 100644
index 0000000..119160b
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style12-nop-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style12-nop-input.html b/experiments/editorFramework/test/Layer0/formatting/style12-nop-input.html
new file mode 100644
index 0000000..111dc22
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style12-p-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style12-p-expected.html b/experiments/editorFramework/test/Layer0/formatting/style12-p-expected.html
new file mode 100644
index 0000000..6d6b164
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style12-p-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style12-p-input.html b/experiments/editorFramework/test/Layer0/formatting/style12-p-input.html
new file mode 100644
index 0000000..7ced3a3
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style13-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style13-expected.html b/experiments/editorFramework/test/Layer0/formatting/style13-expected.html
new file mode 100644
index 0000000..a2d6274
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style13-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style13-input.html b/experiments/editorFramework/test/Layer0/formatting/style13-input.html
new file mode 100644
index 0000000..82750ff
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style14-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style14-expected.html b/experiments/editorFramework/test/Layer0/formatting/style14-expected.html
new file mode 100644
index 0000000..a517d03
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style14-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style14-input.html b/experiments/editorFramework/test/Layer0/formatting/style14-input.html
new file mode 100644
index 0000000..fd56133
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style15-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style15-expected.html b/experiments/editorFramework/test/Layer0/formatting/style15-expected.html
new file mode 100644
index 0000000..119160b
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style15-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style15-input.html b/experiments/editorFramework/test/Layer0/formatting/style15-input.html
new file mode 100644
index 0000000..205ac20
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style16-nop-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style16-nop-expected.html b/experiments/editorFramework/test/Layer0/formatting/style16-nop-expected.html
new file mode 100644
index 0000000..884cf6d
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style16-nop-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style16-nop-input.html b/experiments/editorFramework/test/Layer0/formatting/style16-nop-input.html
new file mode 100644
index 0000000..555bc5a
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style16-p-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style16-p-expected.html b/experiments/editorFramework/test/Layer0/formatting/style16-p-expected.html
new file mode 100644
index 0000000..884cf6d
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style16-p-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style16-p-input.html b/experiments/editorFramework/test/Layer0/formatting/style16-p-input.html
new file mode 100644
index 0000000..9a9d56c
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style17-nop-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style17-nop-expected.html b/experiments/editorFramework/test/Layer0/formatting/style17-nop-expected.html
new file mode 100644
index 0000000..c90eca3
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style17-nop-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style17-nop-input.html b/experiments/editorFramework/test/Layer0/formatting/style17-nop-input.html
new file mode 100644
index 0000000..71f821b
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style17-p-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style17-p-expected.html b/experiments/editorFramework/test/Layer0/formatting/style17-p-expected.html
new file mode 100644
index 0000000..c90eca3
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style17-p-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style17-p-input.html b/experiments/editorFramework/test/Layer0/formatting/style17-p-input.html
new file mode 100644
index 0000000..1976fc6
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style18-nop-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style18-nop-expected.html b/experiments/editorFramework/test/Layer0/formatting/style18-nop-expected.html
new file mode 100644
index 0000000..fb6bd1f
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style18-nop-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style18-nop-input.html b/experiments/editorFramework/test/Layer0/formatting/style18-nop-input.html
new file mode 100644
index 0000000..a318f41
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style18-p-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style18-p-expected.html b/experiments/editorFramework/test/Layer0/formatting/style18-p-expected.html
new file mode 100644
index 0000000..648bf50
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style18-p-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style18-p-input.html b/experiments/editorFramework/test/Layer0/formatting/style18-p-input.html
new file mode 100644
index 0000000..787b629
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style19-nop-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style19-nop-expected.html b/experiments/editorFramework/test/Layer0/formatting/style19-nop-expected.html
new file mode 100644
index 0000000..525fb2a
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style19-nop-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style19-nop-input.html b/experiments/editorFramework/test/Layer0/formatting/style19-nop-input.html
new file mode 100644
index 0000000..9b2818e
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style19-p-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style19-p-expected.html b/experiments/editorFramework/test/Layer0/formatting/style19-p-expected.html
new file mode 100644
index 0000000..1e5ee8c
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style19-p-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style19-p-input.html b/experiments/editorFramework/test/Layer0/formatting/style19-p-input.html
new file mode 100644
index 0000000..98291ee
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style20-nop-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style20-nop-expected.html b/experiments/editorFramework/test/Layer0/formatting/style20-nop-expected.html
new file mode 100644
index 0000000..525fb2a
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style20-nop-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style20-nop-input.html b/experiments/editorFramework/test/Layer0/formatting/style20-nop-input.html
new file mode 100644
index 0000000..efb5624
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style20-p-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style20-p-expected.html b/experiments/editorFramework/test/Layer0/formatting/style20-p-expected.html
new file mode 100644
index 0000000..1e5ee8c
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style20-p-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style20-p-input.html b/experiments/editorFramework/test/Layer0/formatting/style20-p-input.html
new file mode 100644
index 0000000..d714523
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style21-nop-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style21-nop-expected.html b/experiments/editorFramework/test/Layer0/formatting/style21-nop-expected.html
new file mode 100644
index 0000000..525fb2a
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style21-nop-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style21-nop-input.html b/experiments/editorFramework/test/Layer0/formatting/style21-nop-input.html
new file mode 100644
index 0000000..445a0d7
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style21-p-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style21-p-expected.html b/experiments/editorFramework/test/Layer0/formatting/style21-p-expected.html
new file mode 100644
index 0000000..1e5ee8c
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style21-p-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style21-p-input.html b/experiments/editorFramework/test/Layer0/formatting/style21-p-input.html
new file mode 100644
index 0000000..86116e4
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style22-nop-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style22-nop-expected.html b/experiments/editorFramework/test/Layer0/formatting/style22-nop-expected.html
new file mode 100644
index 0000000..8fd7237
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style22-nop-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style22-nop-input.html b/experiments/editorFramework/test/Layer0/formatting/style22-nop-input.html
new file mode 100644
index 0000000..fc69997
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style22-p-expected.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style22-p-expected.html b/experiments/editorFramework/test/Layer0/formatting/style22-p-expected.html
new file mode 100644
index 0000000..8fd7237
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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/0633908a/experiments/editorFramework/test/Layer0/formatting/style22-p-input.html
----------------------------------------------------------------------
diff --git a/experiments/editorFramework/test/Layer0/formatting/style22-p-input.html b/experiments/editorFramework/test/Layer0/formatting/style22-p-input.html
new file mode 100644
index 0000000..2b60ba3
--- /dev/null
+++ b/experiments/editorFramework/test/Layer0/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>