summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/editing
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/editing')
-rw-r--r--testing/web-platform/tests/editing/OWNERS1
-rw-r--r--testing/web-platform/tests/editing/README14
-rw-r--r--testing/web-platform/tests/editing/data/backcolor.js352
-rw-r--r--testing/web-platform/tests/editing/data/bold.js1022
-rw-r--r--testing/web-platform/tests/editing/data/createlink.js242
-rw-r--r--testing/web-platform/tests/editing/data/delete.js2472
-rw-r--r--testing/web-platform/tests/editing/data/fontname.js707
-rw-r--r--testing/web-platform/tests/editing/data/fontsize.js782
-rw-r--r--testing/web-platform/tests/editing/data/forecolor.js737
-rw-r--r--testing/web-platform/tests/editing/data/formatblock.js1782
-rw-r--r--testing/web-platform/tests/editing/data/forwarddelete.js2357
-rw-r--r--testing/web-platform/tests/editing/data/hilitecolor.js412
-rw-r--r--testing/web-platform/tests/editing/data/indent.js717
-rw-r--r--testing/web-platform/tests/editing/data/inserthorizontalrule.js587
-rw-r--r--testing/web-platform/tests/editing/data/inserthtml.js522
-rw-r--r--testing/web-platform/tests/editing/data/insertimage.js352
-rw-r--r--testing/web-platform/tests/editing/data/insertlinebreak.js832
-rw-r--r--testing/web-platform/tests/editing/data/insertorderedlist.js677
-rw-r--r--testing/web-platform/tests/editing/data/insertparagraph.js1602
-rw-r--r--testing/web-platform/tests/editing/data/inserttext.js1192
-rw-r--r--testing/web-platform/tests/editing/data/insertunorderedlist.js742
-rw-r--r--testing/web-platform/tests/editing/data/italic.js717
-rw-r--r--testing/web-platform/tests/editing/data/justifycenter.js1472
-rw-r--r--testing/web-platform/tests/editing/data/justifyfull.js1167
-rw-r--r--testing/web-platform/tests/editing/data/justifyleft.js747
-rw-r--r--testing/web-platform/tests/editing/data/justifyright.js1167
-rw-r--r--testing/web-platform/tests/editing/data/misc.js237
-rw-r--r--testing/web-platform/tests/editing/data/multitest.js2417
-rw-r--r--testing/web-platform/tests/editing/data/outdent.js877
-rw-r--r--testing/web-platform/tests/editing/data/removeformat.js717
-rw-r--r--testing/web-platform/tests/editing/data/strikethrough.js727
-rw-r--r--testing/web-platform/tests/editing/data/subscript.js427
-rw-r--r--testing/web-platform/tests/editing/data/superscript.js437
-rw-r--r--testing/web-platform/tests/editing/data/underline.js727
-rw-r--r--testing/web-platform/tests/editing/data/unlink.js177
-rw-r--r--testing/web-platform/tests/editing/event.html224
-rw-r--r--testing/web-platform/tests/editing/include/implementation.js8526
-rw-r--r--testing/web-platform/tests/editing/include/manualtest.js225
-rw-r--r--testing/web-platform/tests/editing/include/reset.css27
-rw-r--r--testing/web-platform/tests/editing/include/tests.css84
-rw-r--r--testing/web-platform/tests/editing/include/tests.js5716
-rw-r--r--testing/web-platform/tests/editing/manual/delete.manual.html24
-rw-r--r--testing/web-platform/tests/editing/manual/forwarddelete.manual.html24
-rw-r--r--testing/web-platform/tests/editing/manual/insertlinebreak.manual.html24
-rw-r--r--testing/web-platform/tests/editing/manual/insertparagraph.manual.html24
-rw-r--r--testing/web-platform/tests/editing/manual/inserttext.manual.html24
-rw-r--r--testing/web-platform/tests/editing/manual/inserttext2.manual.html25
-rw-r--r--testing/web-platform/tests/editing/other/delete.html149
-rw-r--r--testing/web-platform/tests/editing/other/restoration.html90
-rw-r--r--testing/web-platform/tests/editing/run/backcolor.html51
-rw-r--r--testing/web-platform/tests/editing/run/bold.html51
-rw-r--r--testing/web-platform/tests/editing/run/createlink.html51
-rw-r--r--testing/web-platform/tests/editing/run/delete.html51
-rw-r--r--testing/web-platform/tests/editing/run/fontname.html51
-rw-r--r--testing/web-platform/tests/editing/run/fontsize.html51
-rw-r--r--testing/web-platform/tests/editing/run/forecolor.html51
-rw-r--r--testing/web-platform/tests/editing/run/formatblock.html51
-rw-r--r--testing/web-platform/tests/editing/run/forwarddelete.html51
-rw-r--r--testing/web-platform/tests/editing/run/hilitecolor.html51
-rw-r--r--testing/web-platform/tests/editing/run/indent.html51
-rw-r--r--testing/web-platform/tests/editing/run/inserthorizontalrule.html51
-rw-r--r--testing/web-platform/tests/editing/run/inserthtml.html51
-rw-r--r--testing/web-platform/tests/editing/run/insertimage.html51
-rw-r--r--testing/web-platform/tests/editing/run/insertlinebreak.html51
-rw-r--r--testing/web-platform/tests/editing/run/insertorderedlist.html51
-rw-r--r--testing/web-platform/tests/editing/run/insertparagraph.html51
-rw-r--r--testing/web-platform/tests/editing/run/inserttext.html51
-rw-r--r--testing/web-platform/tests/editing/run/insertunorderedlist.html51
-rw-r--r--testing/web-platform/tests/editing/run/italic.html51
-rw-r--r--testing/web-platform/tests/editing/run/justifycenter.html52
-rw-r--r--testing/web-platform/tests/editing/run/justifyfull.html51
-rw-r--r--testing/web-platform/tests/editing/run/justifyleft.html51
-rw-r--r--testing/web-platform/tests/editing/run/justifyright.html51
-rw-r--r--testing/web-platform/tests/editing/run/misc.html51
-rw-r--r--testing/web-platform/tests/editing/run/multitest.html52
-rw-r--r--testing/web-platform/tests/editing/run/outdent.html51
-rw-r--r--testing/web-platform/tests/editing/run/removeformat.html51
-rw-r--r--testing/web-platform/tests/editing/run/strikethrough.html51
-rw-r--r--testing/web-platform/tests/editing/run/subscript.html51
-rw-r--r--testing/web-platform/tests/editing/run/superscript.html51
-rw-r--r--testing/web-platform/tests/editing/run/underline.html51
-rw-r--r--testing/web-platform/tests/editing/run/unlink.html51
82 files changed, 46987 insertions, 0 deletions
diff --git a/testing/web-platform/tests/editing/OWNERS b/testing/web-platform/tests/editing/OWNERS
new file mode 100644
index 000000000..ce908c45b
--- /dev/null
+++ b/testing/web-platform/tests/editing/OWNERS
@@ -0,0 +1 @@
+@ayg
diff --git a/testing/web-platform/tests/editing/README b/testing/web-platform/tests/editing/README
new file mode 100644
index 000000000..945ce83a0
--- /dev/null
+++ b/testing/web-platform/tests/editing/README
@@ -0,0 +1,14 @@
+Most of this directory tests conformance to the editing spec written long ago
+by Aryeh Gregor. Nobody actually implements the spec, but the tests are still
+useful for regression testing. The files in data/ were generated from a
+JavaScript implementation of the specification using a complex procedure that
+can't actually be replicated right now as-is. Editing them manually is
+possible, but they're not really meant to be human-readable. If anyone is
+interested, it would be possible for Aryeh to get the test generation procedure
+working again. Or you could look into the repository history and figure out
+how to do it yourself, if you're brave.
+
+There is also a directory other/ that contains additional editor-related tests.
+They aren't necessarily based on any specification, but try to specify sensible
+behavior, and are meant to be helpful with regression testing for existing
+implementations and finding bugs in new implementations.
diff --git a/testing/web-platform/tests/editing/data/backcolor.js b/testing/web-platform/tests/editing/data/backcolor.js
new file mode 100644
index 000000000..be8bda01a
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/backcolor.js
@@ -0,0 +1,352 @@
+var browserTests = [
+["foo[]bar",
+ [["backcolor","#00FFFF"]],
+ "foo[]bar",
+ [true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">[foo</span></p> <p><span style=\"background-color:rgb(0, 255, 255)\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">[foo</span></p> <p><span style=\"background-color:rgb(0, 255, 255)\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\"><span>[foo</span> <span>bar]</span></span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\"><span>[foo</span> <span>bar]</span></span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">[foo</span></p><p> <span style=\"background-color:rgb(0, 255, 255)\"><span>bar</span></span> </p><p><span style=\"background-color:rgb(0, 255, 255)\">baz]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">[foo</span></p><p> <span style=\"background-color:rgb(0, 255, 255)\"><span>bar</span></span> </p><p><span style=\"background-color:rgb(0, 255, 255)\">baz]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">[foo</span></p><p><span style=\"background-color:rgb(0, 255, 255)\"><br></span></p><p><span style=\"background-color:rgb(0, 255, 255)\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">[foo</span></p><p><span style=\"background-color:rgb(0, 255, 255)\"><br></span></p><p><span style=\"background-color:rgb(0, 255, 255)\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<b>foo[]bar</b>",
+ [["backcolor","#00FFFF"]],
+ "<b>foo[]bar</b>",
+ [true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<i>foo[]bar</i>",
+ [["backcolor","#00FFFF"]],
+ "<i>foo[]bar</i>",
+ [true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<span>foo</span>{}<span>bar</span>",
+ [["backcolor","#00FFFF"]],
+ "<span>foo</span>{}<span>bar</span>",
+ [true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<span>foo[</span><span>]bar</span>",
+ [["backcolor","#00FFFF"]],
+ "<span>foo[</span><span>]bar</span>",
+ [true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">[bar</span><b><span style=\"background-color:rgb(0, 255, 255)\">baz]</span>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">[bar</span><b><span style=\"background-color:rgb(0, 255, 255)\">baz]</span>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">[bar</span><i><span style=\"background-color:rgb(0, 255, 255)\">baz]</span>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">[bar</span><i><span style=\"background-color:rgb(0, 255, 255)\">baz]</span>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "{<p></p><p> </p><p><span style=\"background-color:rgb(0, 255, 255)\">foo</span></p>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "{<p></p><p> </p><p><span style=\"background-color:rgb(0, 255, 255)\">foo</span></p>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "<table><tbody><tr><td>foo</td><td>b<span style=\"background-color:rgb(0, 255, 255)\">[a]</span>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "<table><tbody><tr><td>foo</td><td>b<span style=\"background-color:rgb(0, 255, 255)\">[a]</span>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "<table><tbody><tr><td>foo</td>{<td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "<table><tbody><tr><td>foo</td>{<td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "<table><tbody><tr>{<td><span style=\"background-color:rgb(0, 255, 255)\">foo</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "<table><tbody><tr>{<td><span style=\"background-color:rgb(0, 255, 255)\">foo</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "<table><tbody>{<tr><td><span style=\"background-color:rgb(0, 255, 255)\">foo</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">baz</span></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "<table><tbody>{<tr><td><span style=\"background-color:rgb(0, 255, 255)\">foo</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">baz</span></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "<table>{<tbody><tr><td><span style=\"background-color:rgb(0, 255, 255)\">foo</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">baz</span></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "<table>{<tbody><tr><td><span style=\"background-color:rgb(0, 255, 255)\">foo</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">baz</span></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "{<table><tbody><tr><td><span style=\"background-color:rgb(0, 255, 255)\">foo</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">baz</span></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "{<table><tbody><tr><td><span style=\"background-color:rgb(0, 255, 255)\">foo</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">baz</span></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<p style=\"background-color: rgb(0, 255, 255)\">foo[bar]baz</p>",
+ [["backcolor","#00FFFF"]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</p>",
+ [true],
+ {"backcolor":[false,false,"rgb(0, 255, 255)",false,false,"rgb(0, 255, 255)"]}],
+["<p style=\"background-color: #00ffff\">foo[bar]baz</p>",
+ [["backcolor","#00FFFF"]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</p>",
+ [true],
+ {"backcolor":[false,false,"rgb(0, 255, 255)",false,false,"rgb(0, 255, 255)"]}],
+["<p style=\"background-color: aqua\">foo[bar]baz</p>",
+ [["backcolor","#00FFFF"]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</p>",
+ [true],
+ {"backcolor":[false,false,"rgb(0, 255, 255)",false,false,"rgb(0, 255, 255)"]}],
+["{<p style=\"background-color: aqua\">foo</p><p>bar</p>}",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "{<p style=\"background-color:rgb(0, 255, 255)\">foo</p><p><span style=\"background-color:rgb(0, 255, 255)\">bar</span></p>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[true,false,"rgb(0, 255, 255)",false,false,"rgb(0, 255, 255)"]}],
+["{<p style=\"background-color: aqua\">foo</p><p>bar</p>}",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "{<p style=\"background-color:rgb(0, 255, 255)\">foo</p><p><span style=\"background-color:rgb(0, 255, 255)\">bar</span></p>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[true,false,"rgb(0, 255, 255)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"background-color: aqua\">foo<span style=\"background-color: tan\">[bar]</span>baz</span>",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"background-color: aqua\">foo<span style=\"background-color: tan\">[bar]</span>baz</span>",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"background-color: #00ffff\">foo<span style=\"background-color: tan\">[bar]</span>baz</span>",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"background-color: #00ffff\">foo<span style=\"background-color: tan\">[bar]</span>baz</span>",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"background-color: #0ff\">foo<span style=\"background-color: tan\">[bar]</span>baz</span>",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"background-color: #0ff\">foo<span style=\"background-color: tan\">[bar]</span>baz</span>",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"background-color: rgb(0, 255, 255)\">foo<span style=\"background-color: tan\">[bar]</span>baz</span>",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"background-color: rgb(0, 255, 255)\">foo<span style=\"background-color: tan\">[bar]</span>baz</span>",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"background-color: aqua\">foo<span style=\"background-color: tan\">b[ar]</span>baz</span>",
+ [["backcolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">foo<span style=\"background-color:rgb(210, 180, 140)\">b</span>[ar]baz</span>",
+ [true],
+ {"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<p style=\"background-color: aqua\">foo<span style=\"background-color: tan\">b[ar]</span>baz</p>",
+ [["backcolor","#00FFFF"]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo<span style=\"background-color:rgb(210, 180, 140)\">b</span>[ar]baz</p>",
+ [true],
+ {"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<div style=\"background-color: aqua\"><p style=\"background-color: tan\">b[ar]</p></div>",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "<div style=\"background-color:rgb(0, 255, 255)\"><p style=\"background-color:rgb(210, 180, 140)\">b<span style=\"background-color:rgb(0, 255, 255)\">[ar]</span></p></div>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<div style=\"background-color: aqua\"><p style=\"background-color: tan\">b[ar]</p></div>",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "<div style=\"background-color:rgb(0, 255, 255)\"><p style=\"background-color:rgb(210, 180, 140)\">b<span style=\"background-color:rgb(0, 255, 255)\">[ar]</span></p></div>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"display: block; background-color: aqua\"><span style=\"display: block; background-color: tan\">b[ar]</span></span>",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "<span style=\"display:block; background-color:rgb(0, 255, 255)\"><span style=\"display:block; background-color:rgb(210, 180, 140)\">b<span style=\"background-color:rgb(0, 255, 255)\">[ar]</span></span></span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"display: block; background-color: aqua\"><span style=\"display: block; background-color: tan\">b[ar]</span></span>",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "<span style=\"display:block; background-color:rgb(0, 255, 255)\"><span style=\"display:block; background-color:rgb(210, 180, 140)\">b<span style=\"background-color:rgb(0, 255, 255)\">[ar]</span></span></span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["fo[o<span style=background-color:tan>b]ar</span>baz",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "fo<span style=\"background-color:rgb(0, 255, 255)\">[o</span><span style=\"background-color:rgb(210, 180, 140)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[true,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["fo[o<span style=background-color:tan>b]ar</span>baz",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "fo<span style=\"background-color:rgb(0, 255, 255)\">[o</span><span style=\"background-color:rgb(210, 180, 140)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[true,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["foo<span style=background-color:tan>ba[r</span>b]az",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(210, 180, 140)\">ba<span style=\"background-color:rgb(0, 255, 255)\">[r</span></span><span style=\"background-color:rgb(0, 255, 255)\">b]</span>az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[true,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["foo<span style=background-color:tan>ba[r</span>b]az",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(210, 180, 140)\">ba<span style=\"background-color:rgb(0, 255, 255)\">[r</span></span><span style=\"background-color:rgb(0, 255, 255)\">b]</span>az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[true,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["fo[o<span style=background-color:tan>bar</span>b]az",
+ [["backcolor","#00FFFF"]],
+ "fo<span style=\"background-color:rgb(0, 255, 255)\">[obarb]</span>az",
+ [true],
+ {"backcolor":[true,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["foo[<span style=background-color:tan>b]ar</span>baz",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "foo[<span style=\"background-color:rgb(210, 180, 140)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["foo[<span style=background-color:tan>b]ar</span>baz",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "foo[<span style=\"background-color:rgb(210, 180, 140)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["foo<span style=background-color:tan>ba[r</span>]baz",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(210, 180, 140)\">ba<span style=\"background-color:rgb(0, 255, 255)\">[r</span></span>]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["foo<span style=background-color:tan>ba[r</span>]baz",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(210, 180, 140)\">ba<span style=\"background-color:rgb(0, 255, 255)\">[r</span></span>]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["foo[<span style=background-color:tan>bar</span>]baz",
+ [["backcolor","#00FFFF"]],
+ "foo[<span style=\"background-color:rgb(0, 255, 255)\">bar</span>]baz",
+ [true],
+ {"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["foo<span style=background-color:tan>[bar]</span>baz",
+ [["backcolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">[bar]</span>baz",
+ [true],
+ {"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["foo{<span style=background-color:tan>bar</span>}baz",
+ [["backcolor","#00FFFF"]],
+ "foo{<span style=\"background-color:rgb(0, 255, 255)\">bar}</span>baz",
+ [true],
+ {"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=background-color:tan>fo[o</span><span style=background-color:yellow>b]ar</span>",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(210, 180, 140)\">fo<span style=\"background-color:rgb(0, 255, 255)\">[o</span></span><span style=\"background-color:rgb(255, 255, 0)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[true,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=background-color:tan>fo[o</span><span style=background-color:yellow>b]ar</span>",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(210, 180, 140)\">fo<span style=\"background-color:rgb(0, 255, 255)\">[o</span></span><span style=\"background-color:rgb(255, 255, 0)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[true,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=background-color:tan>fo[o</span><span style=background-color:tan>b]ar</span>",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(210, 180, 140)\">fo<span style=\"background-color:rgb(0, 255, 255)\">[o</span></span><span style=\"background-color:rgb(210, 180, 140)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=background-color:tan>fo[o</span><span style=background-color:tan>b]ar</span>",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(210, 180, 140)\">fo<span style=\"background-color:rgb(0, 255, 255)\">[o</span></span><span style=\"background-color:rgb(210, 180, 140)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=background-color:tan>fo[o<span style=background-color:transparent>b]ar</span></span>",
+ [["stylewithcss","true"],["backcolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(210, 180, 140)\">fo<span style=\"background-color:rgb(0, 255, 255)\">[o</span><span style=\"background-color:rgba(0, 0, 0, 0)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span></span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=background-color:tan>fo[o<span style=background-color:transparent>b]ar</span></span>",
+ [["stylewithcss","false"],["backcolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(210, 180, 140)\">fo<span style=\"background-color:rgb(0, 255, 255)\">[o</span><span style=\"background-color:rgba(0, 0, 0, 0)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span></span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"backcolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}]
+]
diff --git a/testing/web-platform/tests/editing/data/bold.js b/testing/web-platform/tests/editing/data/bold.js
new file mode 100644
index 000000000..e9f04726b
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/bold.js
@@ -0,0 +1,1022 @@
+var browserTests = [
+["foo[]bar",
+ [["bold",""]],
+ "foo[]bar",
+ [true],
+ {"bold":[false,false,"",false,true,""]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","true"],["bold",""]],
+ "<p><span style=\"font-weight:bold\">[foo</span></p> <p><span style=\"font-weight:bold\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","false"],["bold",""]],
+ "<p><b>[foo</b></p> <p><b>bar]</b></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","true"],["bold",""]],
+ "<span style=\"font-weight:bold\"><span>[foo</span> <span>bar]</span></span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","false"],["bold",""]],
+ "<b><span>[foo</span> <span>bar]</span></b>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","true"],["bold",""]],
+ "<p><span style=\"font-weight:bold\">[foo</span></p><p> <span style=\"font-weight:bold\"><span>bar</span></span> </p><p><span style=\"font-weight:bold\">baz]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","false"],["bold",""]],
+ "<p><b>[foo</b></p><p> <b><span>bar</span></b> </p><p><b>baz]</b></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","true"],["bold",""]],
+ "<p><span style=\"font-weight:bold\">[foo</span></p><p><span style=\"font-weight:bold\"><br></span></p><p><span style=\"font-weight:bold\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","false"],["bold",""]],
+ "<p><b>[foo</b></p><p><b><br></b></p><p><b>bar]</b></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<b>foo[]bar</b>",
+ [["bold",""]],
+ "<b>foo[]bar</b>",
+ [true],
+ {"bold":[false,true,"",false,false,""]}],
+["<i>foo[]bar</i>",
+ [["bold",""]],
+ "<i>foo[]bar</i>",
+ [true],
+ {"bold":[false,false,"",false,true,""]}],
+["<span>foo</span>{}<span>bar</span>",
+ [["bold",""]],
+ "<span>foo</span>{}<span>bar</span>",
+ [true],
+ {"bold":[false,false,"",false,true,""]}],
+["<span>foo[</span><span>]bar</span>",
+ [["bold",""]],
+ "<span>foo[</span><span>]bar</span>",
+ [true],
+ {"bold":[false,false,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo<span style=\"font-weight:bold\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo<b>[bar]</b>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["bold",""]],
+ "foo<b>[barbaz]qoz</b>quz",
+ [true],
+ {"bold":[true,false,"",false,true,""]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo<span style=\"font-weight:bold\">[bar</span><i><span style=\"font-weight:bold\">baz]</span>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo<b>[bar</b><i><b>baz]</b>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","true"],["bold",""]],
+ "{<p></p><p> </p><p><span style=\"font-weight:bold\">foo</span></p>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","false"],["bold",""]],
+ "{<p></p><p> </p><p><b>foo</b></p>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["foo<span contenteditable=false>[bar]</span>baz",
+ [["bold",""]],
+ "foo<span contenteditable=\"false\">[bar]</span>baz",
+ [false],
+ {"bold":[false,false,"",false,false,""]}],
+["fo[o<span contenteditable=false>bar</span>b]az",
+ [["stylewithcss","true"],["bold",""]],
+ "fo<span style=\"font-weight:bold\">[o</span><span contenteditable=\"false\">bar</span><span style=\"font-weight:bold\">b]</span>az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["fo[o<span contenteditable=false>bar</span>b]az",
+ [["stylewithcss","false"],["bold",""]],
+ "fo<b>[o</b><span contenteditable=\"false\">bar</span><b>b]</b>az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["foo<span contenteditable=false>ba[r</span>b]az",
+ [["bold",""]],
+ "foo<span contenteditable=\"false\">ba[r</span>b]az",
+ [false],
+ {"bold":[false,false,"",false,false,""]}],
+["fo[o<span contenteditable=false>b]ar</span>baz",
+ [["bold",""]],
+ "fo[o<span contenteditable=\"false\">b]ar</span>baz",
+ [false],
+ {"bold":[false,false,"",false,false,""]}],
+["fo[<b>o</b><span contenteditable=false>bar</span><b>b</b>]az",
+ [["stylewithcss","true"],["bold",""]],
+ "fo[o<span contenteditable=\"false\">bar</span>b]az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["fo[<b>o</b><span contenteditable=false>bar</span><b>b</b>]az",
+ [["stylewithcss","false"],["bold",""]],
+ "fo[o<span contenteditable=\"false\">bar</span>b]az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["<span contenteditable=false>foo<span contenteditable=true>[bar]</span>baz</span>",
+ [["stylewithcss","true"],["bold",""]],
+ "<span contenteditable=\"false\">foo<span contenteditable=\"true\"><span style=\"font-weight:bold\">[bar]</span></span>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<span contenteditable=false>foo<span contenteditable=true>[bar]</span>baz</span>",
+ [["stylewithcss","false"],["bold",""]],
+ "<span contenteditable=\"false\">foo<span contenteditable=\"true\"><b>[bar]</b></span>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<span contenteditable=false>fo[o<span contenteditable=true>bar</span>b]az</span>",
+ [["bold",""]],
+ "<span contenteditable=\"false\">fo[o<span contenteditable=\"true\">bar</span>b]az</span>",
+ [false],
+ {"bold":[false,false,"",false,false,""]}],
+["<span contenteditable=false>foo<span contenteditable=true>ba[r</span>b]az</span>",
+ [["bold",""]],
+ "<span contenteditable=\"false\">foo<span contenteditable=\"true\">ba[r</span>b]az</span>",
+ [false],
+ {"bold":[false,false,"",false,false,""]}],
+["<span contenteditable=false>fo[o<span contenteditable=true>b]ar</span>baz</span>",
+ [["bold",""]],
+ "<span contenteditable=\"false\">fo[o<span contenteditable=\"true\">b]ar</span>baz</span>",
+ [false],
+ {"bold":[false,false,"",false,false,""]}],
+["<span contenteditable=false>fo[<b>o<span contenteditable=true>bar</span>b</b>]az</span>",
+ [["bold",""]],
+ "<span contenteditable=\"false\">fo[<b>o<span contenteditable=\"true\">bar</span>b</b>]az</span>",
+ [false],
+ {"bold":[false,true,"",false,true,""]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","true"],["bold",""]],
+ "<table><tbody><tr><td>foo</td><td>b<span style=\"font-weight:bold\">[a]</span>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","false"],["bold",""]],
+ "<table><tbody><tr><td>foo</td><td>b<b>[a]</b>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["bold",""]],
+ "<table><tbody><tr><td>foo</td>{<td><span style=\"font-weight:bold\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["bold",""]],
+ "<table><tbody><tr><td>foo</td>{<td><b>bar</b></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["bold",""]],
+ "<table><tbody><tr>{<td><span style=\"font-weight:bold\">foo</span></td><td><span style=\"font-weight:bold\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["bold",""]],
+ "<table><tbody><tr>{<td><b>foo</b></td><td><b>bar</b></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["bold",""]],
+ "<table><tbody>{<tr><td><span style=\"font-weight:bold\">foo</span></td><td><span style=\"font-weight:bold\">bar</span></td><td><span style=\"font-weight:bold\">baz</span></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["bold",""]],
+ "<table><tbody>{<tr><td><b>foo</b></td><td><b>bar</b></td><td><b>baz</b></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["bold",""]],
+ "<table>{<tbody><tr><td><span style=\"font-weight:bold\">foo</span></td><td><span style=\"font-weight:bold\">bar</span></td><td><span style=\"font-weight:bold\">baz</span></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["bold",""]],
+ "<table>{<tbody><tr><td><b>foo</b></td><td><b>bar</b></td><td><b>baz</b></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","true"],["bold",""]],
+ "{<table><tbody><tr><td><span style=\"font-weight:bold\">foo</span></td><td><span style=\"font-weight:bold\">bar</span></td><td><span style=\"font-weight:bold\">baz</span></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","false"],["bold",""]],
+ "{<table><tbody><tr><td><b>foo</b></td><td><b>bar</b></td><td><b>baz</b></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["foo<span style=\"font-weight: bold\">[bar]</span>baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["foo<span style=\"font-weight: bold\">[bar]</span>baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["foo<b>[bar]</b>baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["foo<b>[bar]</b>baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["foo<b>bar</b>[baz]",
+ [["bold",""]],
+ "foo<b>bar[baz]</b>",
+ [true],
+ {"bold":[false,false,"",false,true,""]}],
+["[foo]<b>bar</b>baz",
+ [["bold",""]],
+ "<b>[foo]bar</b>baz",
+ [true],
+ {"bold":[false,false,"",false,true,""]}],
+["<b>foo</b>[bar]<b>baz</b>",
+ [["stylewithcss","true"],["bold",""]],
+ "<b>foo[bar]baz</b>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<b>foo</b>[bar]<b>baz</b>",
+ [["stylewithcss","false"],["bold",""]],
+ "<b>foo[bar]baz</b>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["foo<strong>bar</strong>[baz]",
+ [["bold",""]],
+ "foo<strong>bar[baz]</strong>",
+ [true],
+ {"bold":[false,false,"",false,true,""]}],
+["[foo]<strong>bar</strong>baz",
+ [["bold",""]],
+ "<strong>[foo]bar</strong>baz",
+ [true],
+ {"bold":[false,false,"",false,true,""]}],
+["<strong>foo</strong>[bar]<strong>baz</strong>",
+ [["bold",""]],
+ "<strong>foo[bar]baz</strong>",
+ [true],
+ {"bold":[false,false,"",false,true,""]}],
+["<b>foo</b>[bar]<strong>baz</strong>",
+ [["bold",""]],
+ "<b>foo[bar]baz</b>",
+ [true],
+ {"bold":[false,false,"",false,true,""]}],
+["<strong>foo</strong>[bar]<b>baz</b>",
+ [["stylewithcss","true"],["bold",""]],
+ "<strong>foo[bar]baz</strong>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<strong>foo</strong>[bar]<b>baz</b>",
+ [["stylewithcss","false"],["bold",""]],
+ "<strong>foo[bar]baz</strong>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["foo[<b>bar</b>]baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["foo[<b>bar</b>]baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["foo[<b>bar]</b>baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["foo[<b>bar]</b>baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["foo<b>[bar</b>]baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["foo<b>[bar</b>]baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["foo{<b></b>}baz",
+ [["bold",""]],
+ "foo{<b></b>}baz",
+ [true],
+ {"bold":[false,false,"",false,true,""]}],
+["foo{<i></i>}baz",
+ [["bold",""]],
+ "foo{<i></i>}baz",
+ [true],
+ {"bold":[false,false,"",false,true,""]}],
+["foo{<b><i></i></b>}baz",
+ [["bold",""]],
+ "foo{<b><i></i></b>}baz",
+ [true],
+ {"bold":[false,false,"",false,true,""]}],
+["foo{<i><b></b></i>}baz",
+ [["bold",""]],
+ "foo{<i><b></b></i>}baz",
+ [true],
+ {"bold":[false,false,"",false,true,""]}],
+["foo<strong>[bar]</strong>baz",
+ [["bold",""]],
+ "foo[bar]baz",
+ [true],
+ {"bold":[false,true,"",false,false,""]}],
+["foo[<strong>bar</strong>]baz",
+ [["bold",""]],
+ "foo[bar]baz",
+ [true],
+ {"bold":[false,true,"",false,false,""]}],
+["foo[<strong>bar]</strong>baz",
+ [["bold",""]],
+ "foo[bar]baz",
+ [true],
+ {"bold":[false,true,"",false,false,""]}],
+["foo<strong>[bar</strong>]baz",
+ [["bold",""]],
+ "foo[bar]baz",
+ [true],
+ {"bold":[false,true,"",false,false,""]}],
+["foo[<span style=\"font-weight: bold\">bar</span>]baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["foo[<span style=\"font-weight: bold\">bar</span>]baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["foo[<span style=\"font-weight: bold\">bar]</span>baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["foo[<span style=\"font-weight: bold\">bar]</span>baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["foo<span style=\"font-weight: bold\">[bar</span>]baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["foo<span style=\"font-weight: bold\">[bar</span>]baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["<b>{<p>foo</p><p>bar</p>}<p>baz</p></b>",
+ [["stylewithcss","true"],["bold",""]],
+ "{<p>foo</p><p>bar</p>}<p><span style=\"font-weight:bold\">baz</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["<b>{<p>foo</p><p>bar</p>}<p>baz</p></b>",
+ [["stylewithcss","false"],["bold",""]],
+ "{<p>foo</p><p>bar</p>}<p><b>baz</b></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["<b><p>foo[<i>bar</i>}</p><p>baz</p></b>",
+ [["stylewithcss","true"],["bold",""]],
+ "<p><span style=\"font-weight:bold\">foo[</span><i>bar</i>}</p><p><span style=\"font-weight:bold\">baz</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["<b><p>foo[<i>bar</i>}</p><p>baz</p></b>",
+ [["stylewithcss","false"],["bold",""]],
+ "<p><b>foo[</b><i>bar</i>}</p><p><b>baz</b></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["foo [bar <b>baz] qoz</b> quz sic",
+ [["bold",""]],
+ "foo <b>[bar baz] qoz</b> quz sic",
+ [true],
+ {"bold":[true,false,"",false,true,""]}],
+["foo bar <b>baz [qoz</b> quz] sic",
+ [["bold",""]],
+ "foo bar <b>baz [qoz quz]</b> sic",
+ [true],
+ {"bold":[true,false,"",false,true,""]}],
+["<b id=purple>bar [baz] qoz</b>",
+ [["stylewithcss","true"],["bold",""]],
+ "<span id=\"purple\"><span style=\"font-weight:bold\">bar </span>[baz]<span style=\"font-weight:bold\"> qoz</span></span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["<b id=purple>bar [baz] qoz</b>",
+ [["stylewithcss","false"],["bold",""]],
+ "<span id=\"purple\"><b>bar </b>[baz]<b> qoz</b></span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["foo<span style=\"font-weight: 100\">[bar]</span>baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo<span style=\"font-weight:bold\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["foo<span style=\"font-weight: 100\">[bar]</span>baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo<b>[bar]</b>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["foo<span style=\"font-weight: 200\">[bar]</span>baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo<span style=\"font-weight:bold\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["foo<span style=\"font-weight: 200\">[bar]</span>baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo<b>[bar]</b>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["foo<span style=\"font-weight: 300\">[bar]</span>baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo<span style=\"font-weight:bold\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["foo<span style=\"font-weight: 300\">[bar]</span>baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo<b>[bar]</b>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["foo<span style=\"font-weight: 400\">[bar]</span>baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo<span style=\"font-weight:bold\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["foo<span style=\"font-weight: 400\">[bar]</span>baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo<b>[bar]</b>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["foo<span style=\"font-weight: 500\">[bar]</span>baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo<span style=\"font-weight:bold\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["foo<span style=\"font-weight: 500\">[bar]</span>baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo<b>[bar]</b>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["foo<span style=\"font-weight: 600\">[bar]</span>baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["foo<span style=\"font-weight: 600\">[bar]</span>baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["foo<span style=\"font-weight: 700\">[bar]</span>baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["foo<span style=\"font-weight: 700\">[bar]</span>baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["foo<span style=\"font-weight: 800\">[bar]</span>baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["foo<span style=\"font-weight: 800\">[bar]</span>baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["foo<span style=\"font-weight: 900\">[bar]</span>baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["foo<span style=\"font-weight: 900\">[bar]</span>baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["foo<span style=\"font-weight: 400\">[bar</span>]baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo<span style=\"font-weight:bold\">[bar</span>]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["foo<span style=\"font-weight: 400\">[bar</span>]baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo<b>[bar</b>]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["foo<span style=\"font-weight: 700\">[bar</span>]baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["foo<span style=\"font-weight: 700\">[bar</span>]baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["foo[<span style=\"font-weight: 400\">bar]</span>baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo[<span style=\"font-weight:bold\">bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["foo[<span style=\"font-weight: 400\">bar]</span>baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo[<b>bar]</b>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["foo[<span style=\"font-weight: 700\">bar]</span>baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["foo[<span style=\"font-weight: 700\">bar]</span>baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["foo[<span style=\"font-weight: 400\">bar</span>]baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo[<span style=\"font-weight:bold\">bar</span>]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["foo[<span style=\"font-weight: 400\">bar</span>]baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo[<b>bar</b>]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["foo[<span style=\"font-weight: 700\">bar</span>]baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["foo[<span style=\"font-weight: 700\">bar</span>]baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["<span style=\"font-weight: 100\">foo[bar]baz</span>",
+ [["stylewithcss","true"],["bold",""]],
+ "<span style=\"font-weight:100\">foo<span style=\"font-weight:bold\">[bar]</span>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<span style=\"font-weight: 100\">foo[bar]baz</span>",
+ [["stylewithcss","false"],["bold",""]],
+ "<span style=\"font-weight:100\">foo<b>[bar]</b>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<span style=\"font-weight: 400\">foo[bar]baz</span>",
+ [["stylewithcss","true"],["bold",""]],
+ "<span style=\"font-weight:400\">foo<span style=\"font-weight:bold\">[bar]</span>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<span style=\"font-weight: 400\">foo[bar]baz</span>",
+ [["stylewithcss","false"],["bold",""]],
+ "<span style=\"font-weight:400\">foo<b>[bar]</b>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<span style=\"font-weight: 700\">foo[bar]baz</span>",
+ [["stylewithcss","true"],["bold",""]],
+ "<span style=\"font-weight:700\">foo</span>[bar]<span style=\"font-weight:700\">baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["<span style=\"font-weight: 700\">foo[bar]baz</span>",
+ [["stylewithcss","false"],["bold",""]],
+ "<b>foo</b>[bar]<b>baz</b>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["<span style=\"font-weight: 900\">foo[bar]baz</span>",
+ [["stylewithcss","true"],["bold",""]],
+ "<span style=\"font-weight:900\">foo</span>[bar]<span style=\"font-weight:900\">baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["<span style=\"font-weight: 900\">foo[bar]baz</span>",
+ [["stylewithcss","false"],["bold",""]],
+ "<span style=\"font-weight:900\">foo</span>[bar]<span style=\"font-weight:900\">baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["{<span style=\"font-weight: 100\">foobar]baz</span>",
+ [["stylewithcss","true"],["bold",""]],
+ "{<span style=\"font-weight:100\"><span style=\"font-weight:bold\">foobar]</span>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["{<span style=\"font-weight: 100\">foobar]baz</span>",
+ [["stylewithcss","false"],["bold",""]],
+ "{<span style=\"font-weight:100\"><b>foobar]</b>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["{<span style=\"font-weight: 400\">foobar]baz</span>",
+ [["stylewithcss","true"],["bold",""]],
+ "{<span style=\"font-weight:400\"><span style=\"font-weight:bold\">foobar]</span>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["{<span style=\"font-weight: 400\">foobar]baz</span>",
+ [["stylewithcss","false"],["bold",""]],
+ "{<span style=\"font-weight:400\"><b>foobar]</b>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["{<span style=\"font-weight: 700\">foobar]baz</span>",
+ [["stylewithcss","true"],["bold",""]],
+ "{foobar]<span style=\"font-weight:700\">baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["{<span style=\"font-weight: 700\">foobar]baz</span>",
+ [["stylewithcss","false"],["bold",""]],
+ "{foobar]<b>baz</b>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["{<span style=\"font-weight: 900\">foobar]baz</span>",
+ [["bold",""]],
+ "{foobar]<span style=\"font-weight:900\">baz</span>",
+ [true],
+ {"bold":[false,true,"",false,false,""]}],
+["<span style=\"font-weight: 100\">foo[barbaz</span>}",
+ [["stylewithcss","true"],["bold",""]],
+ "<span style=\"font-weight:100\">foo<span style=\"font-weight:bold\">[barbaz</span></span>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<span style=\"font-weight: 100\">foo[barbaz</span>}",
+ [["stylewithcss","false"],["bold",""]],
+ "<span style=\"font-weight:100\">foo<b>[barbaz</b></span>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<span style=\"font-weight: 400\">foo[barbaz</span>}",
+ [["stylewithcss","true"],["bold",""]],
+ "<span style=\"font-weight:400\">foo<span style=\"font-weight:bold\">[barbaz</span></span>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<span style=\"font-weight: 400\">foo[barbaz</span>}",
+ [["stylewithcss","false"],["bold",""]],
+ "<span style=\"font-weight:400\">foo<b>[barbaz</b></span>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<span style=\"font-weight: 700\">foo[barbaz</span>}",
+ [["stylewithcss","true"],["bold",""]],
+ "<span style=\"font-weight:700\">foo</span>[barbaz}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["<span style=\"font-weight: 700\">foo[barbaz</span>}",
+ [["stylewithcss","false"],["bold",""]],
+ "<b>foo</b>[barbaz}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["<span style=\"font-weight: 900\">foo[barbaz</span>}",
+ [["bold",""]],
+ "<span style=\"font-weight:900\">foo</span>[barbaz}",
+ [true],
+ {"bold":[false,true,"",false,false,""]}],
+["<h3>foo[bar]baz</h3>",
+ [["stylewithcss","true"],["bold",""]],
+ "<h3>foo<span style=\"font-weight:normal\">[bar]</span>baz</h3>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["<h3>foo[bar]baz</h3>",
+ [["stylewithcss","false"],["bold",""]],
+ "<h3>foo<span style=\"font-weight:normal\">[bar]</span>baz</h3>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["{<h3>foobar]baz</h3>",
+ [["stylewithcss","true"],["bold",""]],
+ "{<h3><span style=\"font-weight:normal\">foobar]</span>baz</h3>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["{<h3>foobar]baz</h3>",
+ [["stylewithcss","false"],["bold",""]],
+ "{<h3><span style=\"font-weight:normal\">foobar]</span>baz</h3>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["<h3>foo[barbaz</h3>}",
+ [["stylewithcss","true"],["bold",""]],
+ "<h3>foo<span style=\"font-weight:normal\">[barbaz</span></h3>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["<h3>foo[barbaz</h3>}",
+ [["stylewithcss","false"],["bold",""]],
+ "<h3>foo<span style=\"font-weight:normal\">[barbaz</span></h3>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["<h3>[foobarbaz]</h3>",
+ [["stylewithcss","true"],["bold",""]],
+ "<h3><span style=\"font-weight:normal\">[foobarbaz]</span></h3>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["<h3>[foobarbaz]</h3>",
+ [["stylewithcss","false"],["bold",""]],
+ "<h3><span style=\"font-weight:normal\">[foobarbaz]</span></h3>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["{<h3>foobarbaz]</h3>",
+ [["stylewithcss","true"],["bold",""]],
+ "{<h3><span style=\"font-weight:normal\">foobarbaz]</span></h3>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["{<h3>foobarbaz]</h3>",
+ [["stylewithcss","false"],["bold",""]],
+ "{<h3><span style=\"font-weight:normal\">foobarbaz]</span></h3>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["<h3>[foobarbaz</h3>}",
+ [["stylewithcss","true"],["bold",""]],
+ "<h3><span style=\"font-weight:normal\">[foobarbaz</span></h3>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["<h3>[foobarbaz</h3>}",
+ [["stylewithcss","false"],["bold",""]],
+ "<h3><span style=\"font-weight:normal\">[foobarbaz</span></h3>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["{<h3>foobarbaz</h3>}",
+ [["stylewithcss","true"],["bold",""]],
+ "{<h3><span style=\"font-weight:normal\">foobarbaz</span></h3>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["{<h3>foobarbaz</h3>}",
+ [["stylewithcss","false"],["bold",""]],
+ "{<h3><span style=\"font-weight:normal\">foobarbaz</span></h3>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["<b>foo<span style=\"font-weight: normal\">bar<b>[baz]</b>quz</span>qoz</b>",
+ [["stylewithcss","true"],["bold",""]],
+ "<b>foo<span style=\"font-weight:normal\">bar[baz]quz</span>qoz</b>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["<b>foo<span style=\"font-weight: normal\">bar<b>[baz]</b>quz</span>qoz</b>",
+ [["stylewithcss","false"],["bold",""]],
+ "<b>foo<span style=\"font-weight:normal\">bar[baz]quz</span>qoz</b>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["<b>foo<span style=\"font-weight: normal\">[bar]</span>baz</b>",
+ [["stylewithcss","true"],["bold",""]],
+ "<b>foo[bar]baz</b>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<b>foo<span style=\"font-weight: normal\">[bar]</span>baz</b>",
+ [["stylewithcss","false"],["bold",""]],
+ "<b>foo[bar]baz</b>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["{<b>foo</b> <b>bar</b>}",
+ [["stylewithcss","true"],["bold",""]],
+ "{<span style=\"font-weight:bold\">foo bar}</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[true,false,"",false,true,""]}],
+["{<b>foo</b> <b>bar</b>}",
+ [["stylewithcss","false"],["bold",""]],
+ "{<b>foo bar}</b>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[true,false,"",false,true,""]}],
+["{<h3>foo</h3><b>bar</b>}",
+ [["stylewithcss","true"],["bold",""]],
+ "{<h3><span style=\"font-weight:normal\">foo</span></h3>bar}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["{<h3>foo</h3><b>bar</b>}",
+ [["stylewithcss","false"],["bold",""]],
+ "{<h3><span style=\"font-weight:normal\">foo</span></h3>bar}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["<i><b>foo</b></i>[bar]<i><b>baz</b></i>",
+ [["stylewithcss","true"],["bold",""]],
+ "<b><i>foo</i>[bar]<i>baz</i></b>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<i><b>foo</b></i>[bar]<i><b>baz</b></i>",
+ [["stylewithcss","false"],["bold",""]],
+ "<b><i>foo</i>[bar]<i>baz</i></b>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<i><b>foo</b></i>[bar]<b>baz</b>",
+ [["stylewithcss","true"],["bold",""]],
+ "<b><i>foo</i>[bar]baz</b>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<i><b>foo</b></i>[bar]<b>baz</b>",
+ [["stylewithcss","false"],["bold",""]],
+ "<b><i>foo</i>[bar]baz</b>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<b>foo</b>[bar]<i><b>baz</b></i>",
+ [["stylewithcss","true"],["bold",""]],
+ "<b>foo[bar]<i>baz</i></b>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<b>foo</b>[bar]<i><b>baz</b></i>",
+ [["stylewithcss","false"],["bold",""]],
+ "<b>foo[bar]<i>baz</i></b>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<font color=blue face=monospace><b>foo</b></font>[bar]",
+ [["bold",""]],
+ "<b><font color=\"blue\" face=\"monospace\">foo</font>[bar]</b>",
+ [true],
+ {"bold":[false,false,"",false,true,""]}],
+["foo<span style=\"font-weight: normal\"><b>{bar}</b></span>baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo{bar}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["foo<span style=\"font-weight: normal\"><b>{bar}</b></span>baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo{bar}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["[foo<span class=notbold>bar</span>baz]",
+ [["stylewithcss","true"],["bold",""]],
+ "<span style=\"font-weight:bold\">[foo<span class=\"notbold\"><span style=\"font-weight:bold\">bar</span></span>baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["[foo<span class=notbold>bar</span>baz]",
+ [["stylewithcss","false"],["bold",""]],
+ "<b>[foo<span class=\"notbold\"><b>bar</b></span>baz]</b>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<b><span class=notbold>[foo]</span></b>",
+ [["stylewithcss","true"],["bold",""]],
+ "<span class=\"notbold\"><span style=\"font-weight:bold\">[foo]</span></span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<b><span class=notbold>[foo]</span></b>",
+ [["stylewithcss","false"],["bold",""]],
+ "<span class=\"notbold\"><b>[foo]</b></span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<b><span class=notbold>foo[bar]baz</span></b>",
+ [["stylewithcss","true"],["bold",""]],
+ "<b><span class=\"notbold\">foo<span style=\"font-weight:bold\">[bar]</span>baz</span></b>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<b><span class=notbold>foo[bar]baz</span></b>",
+ [["stylewithcss","false"],["bold",""]],
+ "<b><span class=\"notbold\">foo<b>[bar]</b>baz</span></b>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<p style=\"font-weight: bold\">foo[bar]baz</p>",
+ [["stylewithcss","true"],["bold",""]],
+ "<p><span style=\"font-weight:bold\">foo</span>[bar]<span style=\"font-weight:bold\">baz</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["<p style=\"font-weight: bold\">foo[bar]baz</p>",
+ [["stylewithcss","false"],["bold",""]],
+ "<p><b>foo</b>[bar]<b>baz</b></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["fo[o<b>b]ar</b>baz",
+ [["bold",""]],
+ "fo<b>[ob]ar</b>baz",
+ [true],
+ {"bold":[true,false,"",false,true,""]}],
+["foo<b>ba[r</b>b]az",
+ [["bold",""]],
+ "foo<b>ba[rb]</b>az",
+ [true],
+ {"bold":[true,false,"",false,true,""]}],
+["fo[o<b>bar</b>b]az",
+ [["stylewithcss","true"],["bold",""]],
+ "fo<span style=\"font-weight:bold\">[obarb]</span>az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[true,false,"",false,true,""]}],
+["fo[o<b>bar</b>b]az",
+ [["stylewithcss","false"],["bold",""]],
+ "fo<b>[obarb]</b>az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[true,false,"",false,true,""]}],
+["foo[<b>b]ar</b>baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo[b]<span style=\"font-weight:bold\">ar</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["foo[<b>b]ar</b>baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo[b]<b>ar</b>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["foo<b>ba[r</b>]baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo<span style=\"font-weight:bold\">ba</span>[r]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["foo<b>ba[r</b>]baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo<b>ba</b>[r]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["foo{<b>bar</b>}baz",
+ [["stylewithcss","true"],["bold",""]],
+ "foo{bar}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["foo{<b>bar</b>}baz",
+ [["stylewithcss","false"],["bold",""]],
+ "foo{bar}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["fo[o<span style=font-weight:bold>b]ar</span>baz",
+ [["bold",""]],
+ "fo<span style=\"font-weight:bold\">[ob]ar</span>baz",
+ [true],
+ {"bold":[true,false,"",false,true,""]}],
+["<span style=font-weight:800>fo[o</span><span style=font-weight:900>b]ar</span>",
+ [["bold",""]],
+ "<span style=\"font-weight:800\">fo</span>[ob]<span style=\"font-weight:900\">ar</span>",
+ [true],
+ {"bold":[false,true,"",false,false,""]}],
+["<span style=font-weight:700>fo[o</span><span style=font-weight:800>b]ar</span>",
+ [["stylewithcss","true"],["bold",""]],
+ "<span style=\"font-weight:700\">fo</span>[ob]<span style=\"font-weight:800\">ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["<span style=font-weight:700>fo[o</span><span style=font-weight:800>b]ar</span>",
+ [["stylewithcss","false"],["bold",""]],
+ "<b>fo</b>[ob]<span style=\"font-weight:800\">ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["<span style=font-weight:600>fo[o</span><span style=font-weight:700>b]ar</span>",
+ [["stylewithcss","true"],["bold",""]],
+ "<span style=\"font-weight:600\">fo</span>[ob]<span style=\"font-weight:700\">ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}],
+["<span style=font-weight:600>fo[o</span><span style=font-weight:700>b]ar</span>",
+ [["stylewithcss","false"],["bold",""]],
+ "<span style=\"font-weight:600\">fo</span>[ob]<b>ar</b>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}],
+["<span style=font-weight:500>fo[o</span><span style=font-weight:600>b]ar</span>",
+ [["stylewithcss","true"],["bold",""]],
+ "<span style=\"font-weight:500\">fo<span style=\"font-weight:bold\">[o</span></span><span style=\"font-weight:600\"><span style=\"font-weight:bold\">b]</span>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[true,false,"",false,true,""]}],
+["<span style=font-weight:500>fo[o</span><span style=font-weight:600>b]ar</span>",
+ [["stylewithcss","false"],["bold",""]],
+ "<span style=\"font-weight:500\">fo<b>[o</b></span><span style=\"font-weight:600\"><b>b]</b>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[true,false,"",false,true,""]}],
+["<span style=font-weight:400>fo[o</span><span style=font-weight:500>b]ar</span>",
+ [["stylewithcss","true"],["bold",""]],
+ "<span style=\"font-weight:400\">fo<span style=\"font-weight:bold\">[o</span></span><span style=\"font-weight:500\"><span style=\"font-weight:bold\">b]</span>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<span style=font-weight:400>fo[o</span><span style=font-weight:500>b]ar</span>",
+ [["stylewithcss","false"],["bold",""]],
+ "<span style=\"font-weight:400\">fo<b>[o</b></span><span style=\"font-weight:500\"><b>b]</b>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<span style=font-weight:300>fo[o</span><span style=font-weight:400>b]ar</span>",
+ [["stylewithcss","true"],["bold",""]],
+ "<span style=\"font-weight:300\">fo<span style=\"font-weight:bold\">[o</span></span><span style=\"font-weight:400\"><span style=\"font-weight:bold\">b]</span>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<span style=font-weight:300>fo[o</span><span style=font-weight:400>b]ar</span>",
+ [["stylewithcss","false"],["bold",""]],
+ "<span style=\"font-weight:300\">fo<b>[o</b></span><span style=\"font-weight:400\"><b>b]</b>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<span style=font-weight:200>fo[o</span><span style=font-weight:300>b]ar</span>",
+ [["stylewithcss","true"],["bold",""]],
+ "<span style=\"font-weight:200\">fo<span style=\"font-weight:bold\">[o</span></span><span style=\"font-weight:300\"><span style=\"font-weight:bold\">b]</span>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<span style=font-weight:200>fo[o</span><span style=font-weight:300>b]ar</span>",
+ [["stylewithcss","false"],["bold",""]],
+ "<span style=\"font-weight:200\">fo<b>[o</b></span><span style=\"font-weight:300\"><b>b]</b>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}],
+["<span style=font-weight:100>fo[o</span><span style=font-weight:200>b]ar</span>",
+ [["stylewithcss","true"],["bold",""]],
+ "<span style=\"font-weight:100\">fo<span style=\"font-weight:bold\">[o</span></span><span style=\"font-weight:200\"><span style=\"font-weight:bold\">b]</span>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}],
+["<span style=font-weight:100>fo[o</span><span style=font-weight:200>b]ar</span>",
+ [["stylewithcss","false"],["bold",""]],
+ "<span style=\"font-weight:100\">fo<b>[o</b></span><span style=\"font-weight:200\"><b>b]</b>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/createlink.js b/testing/web-platform/tests/editing/data/createlink.js
new file mode 100644
index 000000000..275fcbd59
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/createlink.js
@@ -0,0 +1,242 @@
+var browserTests = [
+["foo[]bar",
+ [["createlink","http://www.google.com/"]],
+ "foo[]bar",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["createlink","http://www.google.com/"]],
+ "<p><a href=\"http://www.google.com/\">[foo</a></p> <p><a href=\"http://www.google.com/\">bar]</a></p>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["createlink","http://www.google.com/"]],
+ "<a href=\"http://www.google.com/\"><span>[foo</span> <span>bar]</span></a>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["createlink","http://www.google.com/"]],
+ "<p><a href=\"http://www.google.com/\">[foo</a></p><p> <a href=\"http://www.google.com/\"><span>bar</span></a> </p><p><a href=\"http://www.google.com/\">baz]</a></p>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<p>[foo<p><br><p>bar]",
+ [["createlink","http://www.google.com/"]],
+ "<p><a href=\"http://www.google.com/\">[foo</a></p><p><a href=\"http://www.google.com/\"><br></a></p><p><a href=\"http://www.google.com/\">bar]</a></p>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<b>foo[]bar</b>",
+ [["createlink","http://www.google.com/"]],
+ "<b>foo[]bar</b>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<i>foo[]bar</i>",
+ [["createlink","http://www.google.com/"]],
+ "<i>foo[]bar</i>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<span>foo</span>{}<span>bar</span>",
+ [["createlink","http://www.google.com/"]],
+ "<span>foo</span>{}<span>bar</span>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<span>foo[</span><span>]bar</span>",
+ [["createlink","http://www.google.com/"]],
+ "<span>foo[</span><span>]bar</span>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["createlink","http://www.google.com/"]],
+ "foo<a href=\"http://www.google.com/\">[bar]</a>baz",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["createlink","http://www.google.com/"]],
+ "foo<a href=\"http://www.google.com/\">[bar</a><b><a href=\"http://www.google.com/\">baz]</a>qoz</b>quz",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["createlink","http://www.google.com/"]],
+ "foo<a href=\"http://www.google.com/\">[bar</a><i><a href=\"http://www.google.com/\">baz]</a>qoz</i>quz",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["{<p><p> <p>foo</p>}",
+ [["createlink","http://www.google.com/"]],
+ "{<p></p><p> </p><p><a href=\"http://www.google.com/\">foo</a></p>}",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["createlink","http://www.google.com/"]],
+ "<table><tbody><tr><td>foo</td><td>b<a href=\"http://www.google.com/\">[a]</a>r</td><td>baz</td></tr></tbody></table>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["createlink","http://www.google.com/"]],
+ "<table><tbody><tr><td>foo</td>{<td><a href=\"http://www.google.com/\">bar</a></td>}<td>baz</td></tr></tbody></table>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["createlink","http://www.google.com/"]],
+ "<table><tbody><tr>{<td><a href=\"http://www.google.com/\">foo</a></td><td><a href=\"http://www.google.com/\">bar</a></td>}<td>baz</td></tr></tbody></table>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["createlink","http://www.google.com/"]],
+ "<table><tbody>{<tr><td><a href=\"http://www.google.com/\">foo</a></td><td><a href=\"http://www.google.com/\">bar</a></td><td><a href=\"http://www.google.com/\">baz</a></td></tr>}</tbody></table>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["createlink","http://www.google.com/"]],
+ "<table>{<tbody><tr><td><a href=\"http://www.google.com/\">foo</a></td><td><a href=\"http://www.google.com/\">bar</a></td><td><a href=\"http://www.google.com/\">baz</a></td></tr></tbody>}</table>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["createlink","http://www.google.com/"]],
+ "{<table><tbody><tr><td><a href=\"http://www.google.com/\">foo</a></td><td><a href=\"http://www.google.com/\">bar</a></td><td><a href=\"http://www.google.com/\">baz</a></td></tr></tbody></table>}",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<a href=http://www.google.com/>foo[bar]baz</a>",
+ [["createlink","http://www.google.com/"]],
+ "<a href=\"http://www.google.com/\">foo[bar]baz</a>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<a href=http://www.google.com/>foo[barbaz</a>}",
+ [["createlink","http://www.google.com/"]],
+ "<a href=\"http://www.google.com/\">foo[barbaz</a>}",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["{<a href=http://www.google.com/>foobar]baz</a>",
+ [["createlink","http://www.google.com/"]],
+ "{<a href=\"http://www.google.com/\">foobar]baz</a>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["{<a href=http://www.google.com/>foobarbaz</a>}",
+ [["createlink","http://www.google.com/"]],
+ "{<a href=\"http://www.google.com/\">foobarbaz}</a>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<a href=http://www.google.com/>[foobarbaz]</a>",
+ [["createlink","http://www.google.com/"]],
+ "<a href=\"http://www.google.com/\">[foobarbaz]</a>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com/>[bar]</a>baz",
+ [["createlink","http://www.google.com/"]],
+ "foo<a href=\"http://www.google.com/\">[bar]</a>baz",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["[foo]<a href=http://www.google.com/>bar</a>baz",
+ [["createlink","http://www.google.com/"]],
+ "<a href=\"http://www.google.com/\">[foo]bar</a>baz",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com/>bar</a>[baz]",
+ [["createlink","http://www.google.com/"]],
+ "foo<a href=\"http://www.google.com/\">bar[baz]</a>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["foo[<a href=http://www.google.com/>bar</a>]baz",
+ [["createlink","http://www.google.com/"]],
+ "foo[<a href=\"http://www.google.com/\">bar</a>]baz",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com/>[bar</a>baz]",
+ [["createlink","http://www.google.com/"]],
+ "foo<a href=\"http://www.google.com/\">[barbaz]</a>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["[foo<a href=http://www.google.com/>bar]</a>baz",
+ [["createlink","http://www.google.com/"]],
+ "<a href=\"http://www.google.com/\">[foobar]</a>baz",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["[foo<a href=http://www.google.com/>bar</a>baz]",
+ [["createlink","http://www.google.com/"]],
+ "<a href=\"http://www.google.com/\">[foobarbaz]</a>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<a href=otherurl>foo[bar]baz</a>",
+ [["createlink","http://www.google.com/"]],
+ "<a href=\"http://www.google.com/\">foo[bar]baz</a>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<a href=otherurl>foo[barbaz</a>}",
+ [["createlink","http://www.google.com/"]],
+ "<a href=\"http://www.google.com/\">foo[barbaz</a>}",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["{<a href=otherurl>foobar]baz</a>",
+ [["createlink","http://www.google.com/"]],
+ "{<a href=\"http://www.google.com/\">foobar]baz</a>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["{<a href=otherurl>foobarbaz</a>}",
+ [["createlink","http://www.google.com/"]],
+ "{<a href=\"http://www.google.com/\">foobarbaz}</a>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<a href=otherurl>[foobarbaz]</a>",
+ [["createlink","http://www.google.com/"]],
+ "<a href=\"http://www.google.com/\">[foobarbaz]</a>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["foo<a href=otherurl>[bar]</a>baz",
+ [["createlink","http://www.google.com/"]],
+ "foo<a href=\"http://www.google.com/\">[bar]</a>baz",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["foo[<a href=otherurl>bar</a>]baz",
+ [["createlink","http://www.google.com/"]],
+ "foo[<a href=\"http://www.google.com/\">bar</a>]baz",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["foo<a href=otherurl>[bar</a>baz]",
+ [["createlink","http://www.google.com/"]],
+ "foo<a href=\"http://www.google.com/\">[barbaz]</a>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["[foo<a href=otherurl>bar]</a>baz",
+ [["createlink","http://www.google.com/"]],
+ "<a href=\"http://www.google.com/\">[foobar]</a>baz",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["[foo<a href=otherurl>bar</a>baz]",
+ [["createlink","http://www.google.com/"]],
+ "<a href=\"http://www.google.com/\">[foobarbaz]</a>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<a href=otherurl><b>foo[bar]baz</b></a>",
+ [["createlink","http://www.google.com/"]],
+ "<a href=\"http://www.google.com/\"><b>foo[bar]baz</b></a>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<a href=otherurl><b>foo[barbaz</b></a>}",
+ [["createlink","http://www.google.com/"]],
+ "<a href=\"http://www.google.com/\"><b>foo[barbaz</b></a>}",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["{<a href=otherurl><b>foobar]baz</b></a>",
+ [["createlink","http://www.google.com/"]],
+ "{<a href=\"http://www.google.com/\"><b>foobar]baz</b></a>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<a href=otherurl><b>[foobarbaz]</b></a>",
+ [["createlink","http://www.google.com/"]],
+ "<a href=\"http://www.google.com/\"><b>[foobarbaz]</b></a>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<a name=abc>foo[bar]baz</a>",
+ [["createlink","http://www.google.com/"]],
+ "<span name=\"abc\">foo<a href=\"http://www.google.com/\">[bar]</a>baz</span>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["<a name=abc><b>foo[bar]baz</b></a>",
+ [["createlink","http://www.google.com/"]],
+ "<span name=\"abc\"><b>foo<a href=\"http://www.google.com/\">[bar]</a>baz</b></span>",
+ [true],
+ {"createlink":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["createlink",""]],
+ "foo[bar]baz",
+ [false],
+ {"createlink":[false,false,"",false,false,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/delete.js b/testing/web-platform/tests/editing/data/delete.js
new file mode 100644
index 000000000..bfea92831
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/delete.js
@@ -0,0 +1,2472 @@
+var browserTests = [
+["foo[]bar",
+ [["delete",""]],
+ "fo[]bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<span>foo</span>{}<span>bar</span>",
+ [["delete",""]],
+ "<span>fo[]</span><span>bar</span>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<span>foo[</span><span>]bar</span>",
+ [["delete",""]],
+ "<span>foo[]</span><span>bar</span>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<span style=display:none>bar</span>[]baz",
+ [["stylewithcss","true"],["delete",""]],
+ "fo[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["foo<span style=display:none>bar</span>[]baz",
+ [["stylewithcss","false"],["delete",""]],
+ "fo[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["foo<script>bar</script>[]baz",
+ [["delete",""]],
+ "fo[]baz",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["fo&ouml;[]bar",
+ [["delete",""]],
+ "fo[]bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo&#x308;[]bar",
+ [["delete",""]],
+ "foo[]bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo&#x308;&#x327;[]bar",
+ [["delete",""]],
+ "foö[]bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["&ouml;[]bar",
+ [["delete",""]],
+ "{}bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["o&#x308;[]bar",
+ [["delete",""]],
+ "o[]bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["o&#x308;&#x327;[]bar",
+ [["delete",""]],
+ "ö[]bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["&#x5e9;&#x5c1;&#x5b8;[]&#x5dc;&#x5d5;&#x5b9;&#x5dd;",
+ [["delete",""]],
+ "שׁ[]לוֹם",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["&#x5e9;&#x5c1;&#x5b8;&#x5dc;&#x5d5;&#x5b9;[]&#x5dd;",
+ [["delete",""]],
+ "שָׁלו[]ם",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo</p><p>[]bar</p>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo</p><p>[]bar</p>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo</p>[]bar",
+ [["delete",""]],
+ "<p>foo{}bar</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<p>[]bar</p>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<p>[]bar</p>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<br></p><p>[]bar</p>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<br></p><p>[]bar</p>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<br></p>[]bar",
+ [["delete",""]],
+ "<p>foo{}bar</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<br><p>[]bar</p>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<br><p>[]bar</p>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<br><br></p><p>[]bar</p>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo<br>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<br><br></p><p>[]bar</p>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo<br>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<br><br></p>[]bar",
+ [["delete",""]],
+ "<p>foo<br>{}bar</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<br><br><p>[]bar</p>",
+ [["delete",""]],
+ "foo<br><p>{}bar</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div><p>foo</p></div><p>[]bar</p>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<div><p>foo{}bar</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<div><p>foo</p></div><p>[]bar</p>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<div><p>foo{}bar</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo</p><div><p>[]bar</p></div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo</p><div><p>[]bar</p></div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<div><p>foo</p></div><div><p>[]bar</p></div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<div><p>foo{}bar</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<div><p>foo</p></div><div><p>[]bar</p></div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<div><p>foo{}bar</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<div><p>foo</p></div>[]bar",
+ [["delete",""]],
+ "<div><p>foo{}bar</p></div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<div><p>[]bar</p></div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<div><p>[]bar</p></div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<div>foo</div><div>[]bar</div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<div>foo{}bar</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<div>foo</div><div>[]bar</div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<div>foo{}bar</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<pre>foo</pre>[]bar",
+ [["delete",""]],
+ "<pre>foo{}bar</pre>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<br>[]bar",
+ [["delete",""]],
+ "foo{}bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<br><b>[]bar</b>",
+ [["delete",""]],
+ "foo{}<b>bar</b>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<hr>[]bar",
+ [["delete",""]],
+ "foo{}bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo<hr><p>[]bar",
+ [["delete",""]],
+ "<p>foo</p><p>{}bar</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo</p><br><p>[]bar</p>",
+ [["delete",""]],
+ "<p>foo</p><p>{}bar</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo</p><br><br><p>[]bar</p>",
+ [["delete",""]],
+ "<p>foo</p><br><p>{}bar</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo</p><img src=/img/lion.svg><p>[]bar",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo</p><img src=\"/img/lion.svg\">{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo</p><img src=/img/lion.svg><p>[]bar",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo</p><img src=\"/img/lion.svg\">{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo<img src=/img/lion.svg>[]bar",
+ [["delete",""]],
+ "foo{}bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<a>foo</a>[]bar",
+ [["delete",""]],
+ "foo[]bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<a href=/>foo</a>[]bar",
+ [["delete",""]],
+ "foo[]bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<a name=abc>foo</a>[]bar",
+ [["delete",""]],
+ "foo[]bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<a href=/ name=abc>foo</a>[]bar",
+ [["delete",""]],
+ "foo[]bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<span><a>foo</a></span>[]bar",
+ [["delete",""]],
+ "<span>foo</span>[]bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<span><a href=/>foo</a></span>[]bar",
+ [["delete",""]],
+ "<span>foo</span>[]bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<span><a name=abc>foo</a></span>[]bar",
+ [["delete",""]],
+ "<span>foo</span>[]bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<span><a href=/ name=abc>foo</a></span>[]bar",
+ [["delete",""]],
+ "<span>foo</span>[]bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<a>[]bar</a>",
+ [["delete",""]],
+ "fo[]<a>bar</a>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<a href=/>[]bar</a>",
+ [["delete",""]],
+ "fo[]<a href=\"/\">bar</a>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<a name=abc>[]bar</a>",
+ [["delete",""]],
+ "fo[]<a name=\"abc\">bar</a>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<a href=/ name=abc>[]bar</a>",
+ [["delete",""]],
+ "fo[]<a href=\"/\" name=\"abc\">bar</a>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo &nbsp;[]",
+ [["delete",""]],
+ "foo&nbsp;[]",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["&nbsp;[] foo",
+ [["delete",""]],
+ "{}&nbsp;foo",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo &nbsp;[]bar",
+ [["delete",""]],
+ "foo []bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo&nbsp; []bar",
+ [["delete",""]],
+ "foo []bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo&nbsp;&nbsp;[]bar",
+ [["delete",""]],
+ "foo []bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo []bar",
+ [["delete",""]],
+ "foo[]bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo []&nbsp; bar",
+ [["delete",""]],
+ "foo[]&nbsp; bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo &nbsp;[] bar",
+ [["delete",""]],
+ "foo&nbsp;[] bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo &nbsp; []bar",
+ [["delete",""]],
+ "foo&nbsp; []bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo []<span>&nbsp;</span> bar",
+ [["delete",""]],
+ "foo[]<span>&nbsp;</span> bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo <span>&nbsp;</span>[] bar",
+ [["delete",""]],
+ "foo&nbsp;{} bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo <span>&nbsp;</span> []bar",
+ [["delete",""]],
+ "foo&nbsp;<span> </span>{}bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<b>foo </b>&nbsp;[]bar",
+ [["delete",""]],
+ "<b>foo </b>{}bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<b>foo&nbsp;</b> []bar",
+ [["delete",""]],
+ "<b>foo </b>{}bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<b>foo&nbsp;</b>&nbsp;[]bar",
+ [["delete",""]],
+ "<b>foo </b>{}bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<b>foo </b> []bar",
+ [["delete",""]],
+ "<b>foo[]</b>bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo </p><p>[] bar</p>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo </p><p>[] bar</p>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<pre>foo &nbsp;[]</pre>",
+ [["delete",""]],
+ "<pre>foo []</pre>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<pre>&nbsp;[] foo</pre>",
+ [["delete",""]],
+ "<pre>{} foo</pre>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<pre>foo &nbsp;[]bar</pre>",
+ [["delete",""]],
+ "<pre>foo []bar</pre>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<pre>foo&nbsp; []bar</pre>",
+ [["delete",""]],
+ "<pre>foo&nbsp;[]bar</pre>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<pre>foo []bar</pre>",
+ [["delete",""]],
+ "<pre>foo []bar</pre>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre>foo &nbsp;[]</div>",
+ [["delete",""]],
+ "<div style=\"white-space:pre\">foo []</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre>&nbsp;[] foo</div>",
+ [["delete",""]],
+ "<div style=\"white-space:pre\">{} foo</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre>foo &nbsp;[]bar</div>",
+ [["delete",""]],
+ "<div style=\"white-space:pre\">foo []bar</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre>foo&nbsp; []bar</div>",
+ [["delete",""]],
+ "<div style=\"white-space:pre\">foo&nbsp;[]bar</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre>foo []bar</div>",
+ [["delete",""]],
+ "<div style=\"white-space:pre\">foo []bar</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-wrap>foo &nbsp;[]</div>",
+ [["delete",""]],
+ "<div style=\"white-space:pre-wrap\">foo []</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-wrap>&nbsp;[] foo</div>",
+ [["delete",""]],
+ "<div style=\"white-space:pre-wrap\">{} foo</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-wrap>foo &nbsp;[]bar</div>",
+ [["delete",""]],
+ "<div style=\"white-space:pre-wrap\">foo []bar</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-wrap>foo&nbsp; []bar</div>",
+ [["delete",""]],
+ "<div style=\"white-space:pre-wrap\">foo&nbsp;[]bar</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-wrap>foo []bar</div>",
+ [["delete",""]],
+ "<div style=\"white-space:pre-wrap\">foo []bar</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-line>foo &nbsp;[]</div>",
+ [["delete",""]],
+ "<div style=\"white-space:pre-line\">foo&nbsp;[]</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-line>&nbsp;[] foo</div>",
+ [["delete",""]],
+ "<div style=\"white-space:pre-line\">{}&nbsp;foo</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-line>foo &nbsp;[]bar</div>",
+ [["delete",""]],
+ "<div style=\"white-space:pre-line\">foo []bar</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-line>foo&nbsp; []bar</div>",
+ [["delete",""]],
+ "<div style=\"white-space:pre-line\">foo []bar</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-line>foo []bar</div>",
+ [["delete",""]],
+ "<div style=\"white-space:pre-line\">foo[]bar</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:nowrap>foo &nbsp;[]</div>",
+ [["delete",""]],
+ "<div style=\"white-space:nowrap\">foo&nbsp;[]</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:nowrap>&nbsp;[] foo</div>",
+ [["delete",""]],
+ "<div style=\"white-space:nowrap\">{}&nbsp;foo</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:nowrap>foo &nbsp;[]bar</div>",
+ [["delete",""]],
+ "<div style=\"white-space:nowrap\">foo []bar</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:nowrap>foo&nbsp; []bar</div>",
+ [["delete",""]],
+ "<div style=\"white-space:nowrap\">foo []bar</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div style=white-space:nowrap>foo []bar</div>",
+ [["delete",""]],
+ "<div style=\"white-space:nowrap\">foo[]bar</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<table><tr><td>[]bar</table>baz",
+ [["delete",""]],
+ "foo<table><tbody><tr><td>[]bar</td></tr></tbody></table>baz",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<table><tr><td>bar</table>[]baz",
+ [["delete",""]],
+ "foo{<table><tbody><tr><td>bar</td></tr></tbody></table>}baz",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo<table><tr><td>[]bar</table><p>baz",
+ [["delete",""]],
+ "<p>foo</p><table><tbody><tr><td>[]bar</td></tr></tbody></table><p>baz</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo<table><tr><td>bar</table><p>[]baz",
+ [["delete",""]],
+ "<p>foo</p>{<table><tbody><tr><td>bar</td></tr></tbody></table>}<p>baz</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<table><tr><td>foo<td>[]bar</table>",
+ [["delete",""]],
+ "<table><tbody><tr><td>foo</td><td>{}bar</td></tr></tbody></table>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<table><tr><td>foo<tr><td>[]bar</table>",
+ [["delete",""]],
+ "<table><tbody><tr><td>foo</td></tr><tr><td>{}bar</td></tr></tbody></table>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<br><table><tr><td>[]bar</table>baz",
+ [["delete",""]],
+ "foo<table><tbody><tr><td>[]bar</td></tr></tbody></table>baz",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<table><tr><td>bar<br></table>[]baz",
+ [["delete",""]],
+ "foo{<table><tbody><tr><td>bar<br></td></tr></tbody></table>}baz",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo<br><table><tr><td>[]bar</table><p>baz",
+ [["delete",""]],
+ "<p>foo<br></p><table><tbody><tr><td>[]bar</td></tr></tbody></table><p>baz</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo<table><tr><td>bar<br></table><p>[]baz",
+ [["delete",""]],
+ "<p>foo</p>{<table><tbody><tr><td>bar<br></td></tr></tbody></table>}<p>baz</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<table><tr><td>foo<br><td>[]bar</table>",
+ [["delete",""]],
+ "<table><tbody><tr><td>foo</td><td>{}bar</td></tr></tbody></table>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<table><tr><td>foo<br><tr><td>[]bar</table>",
+ [["delete",""]],
+ "<table><tbody><tr><td>foo</td></tr><tr><td>{}bar</td></tr></tbody></table>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<br><br><table><tr><td>[]bar</table>baz",
+ [["delete",""]],
+ "foo<br><br><table><tbody><tr><td>[]bar</td></tr></tbody></table>baz",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<table><tr><td>bar<br><br></table>[]baz",
+ [["delete",""]],
+ "foo{<table><tbody><tr><td>bar<br><br></td></tr></tbody></table>}baz",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo<br><br><table><tr><td>[]bar</table><p>baz",
+ [["delete",""]],
+ "<p>foo<br><br></p><table><tbody><tr><td>[]bar</td></tr></tbody></table><p>baz</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo<table><tr><td>bar<br><br></table><p>[]baz",
+ [["delete",""]],
+ "<p>foo</p>{<table><tbody><tr><td>bar<br><br></td></tr></tbody></table>}<p>baz</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<table><tr><td>foo<br><br><td>[]bar</table>",
+ [["delete",""]],
+ "<table><tbody><tr><td>foo<br><br></td><td>{}bar</td></tr></tbody></table>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<table><tr><td>foo<br><br><tr><td>[]bar</table>",
+ [["delete",""]],
+ "<table><tbody><tr><td>foo<br><br></td></tr><tr><td>{}bar</td></tr></tbody></table>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<hr><table><tr><td>[]bar</table>baz",
+ [["delete",""]],
+ "foo<hr><table><tbody><tr><td>[]bar</td></tr></tbody></table>baz",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<table><tr><td>bar<hr></table>[]baz",
+ [["delete",""]],
+ "foo{<table><tbody><tr><td>bar<hr></td></tr></tbody></table>}baz",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<table><tr><td>foo<hr><td>[]bar</table>",
+ [["delete",""]],
+ "<table><tbody><tr><td>foo<hr></td><td>{}bar</td></tr></tbody></table>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<table><tr><td>foo<hr><tr><td>[]bar</table>",
+ [["delete",""]],
+ "<table><tbody><tr><td>foo<hr></td></tr><tr><td>{}bar</td></tr></tbody></table>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<ol><li>[]bar<li>baz</ol>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo<div>[]bar</div><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<ol><li>[]bar<li>baz</ol>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo<p>[]bar</p><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo<br><ol><li>[]bar<li>baz</ol>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo<div>[]bar</div><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<br><ol><li>[]bar<li>baz</ol>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo<p>[]bar</p><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo<br><br><ol><li>[]bar<li>baz</ol>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo<br><br><div>[]bar</div><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<br><br><ol><li>[]bar<li>baz</ol>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo<br><br><p>[]bar</p><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>[]bar</ol>",
+ [["delete",""]],
+ "<ol><li>foo<br>[]bar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<br><li>[]bar</ol>",
+ [["delete",""]],
+ "<ol><li>foo<br>[]bar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<br><br><li>[]bar</ol>",
+ [["delete",""]],
+ "<ol><li>foo<br><br>[]bar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>[]bar<br>baz</ol>",
+ [["delete",""]],
+ "<ol><li>foo<br>[]bar<br>baz</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<br>bar<li>[]baz</ol>",
+ [["delete",""]],
+ "<ol><li>foo<br>bar<br>[]baz</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo</p>{}bar</ol>",
+ [["delete",""]],
+ "<ol><li><p>foo{}bar</p></li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo<li>[]bar</ol>",
+ [["delete",""]],
+ "<ol><li><p>foo</p>[]bar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<li><p>[]bar</ol>",
+ [["delete",""]],
+ "<ol><li>foo<p>[]bar</p></li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo<li><p>[]bar</ol>",
+ [["delete",""]],
+ "<ol><li><p>foo</p><p>[]bar</p></li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<ul><li>[]bar</ul></ol>",
+ [["delete",""]],
+ "<ol><li>foo</li><li>[]bar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<ol><ol><li>[]bar</ol></ol>",
+ [["delete",""]],
+ "foo<ol><li>[]bar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<div><ol><li>[]bar</ol></div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo<div><div>[]bar</div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<div><ol><li>[]bar</ol></div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo<div><p>[]bar</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo<dl><dt>[]bar<dd>baz</dl>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo<div>[]bar</div><dl><dd>baz</dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<dl><dt>[]bar<dd>baz</dl>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo<p>[]bar</p><dl><dd>baz</dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo<dl><dd>[]bar</dl>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo<div>[]bar</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<dl><dd>[]bar</dl>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo<p>[]bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>[]bar</dl>",
+ [["delete",""]],
+ "<dl><dt>foo<br>[]bar</dt></dl>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dt>[]bar<dd>baz</dl>",
+ [["delete",""]],
+ "<dl><dt>foo<br>[]bar</dt><dd>baz</dd></dl>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>bar<dd>[]baz</dl>",
+ [["delete",""]],
+ "<dl><dt>foo</dt><dd>bar<br>[]baz</dd></dl>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>[]bar",
+ [["delete",""]],
+ "<ol><li>foo{}bar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<br></ol>[]bar",
+ [["delete",""]],
+ "<ol><li>foo{}bar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<br><br></ol>[]bar",
+ [["delete",""]],
+ "<ol><li>foo<br>{}bar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li><br></ol>[]bar",
+ [["delete",""]],
+ "<ol><li>{}bar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<li><br></ol>[]bar",
+ [["delete",""]],
+ "<ol><li>foo</li><li>{}bar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>[]bar",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<ol><li>foo{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>[]bar",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<ol><li>foo{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<br></ol><p>[]bar",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<ol><li>foo{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<br></ol><p>[]bar",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<ol><li>foo{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<br><br></ol><p>[]bar",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<ol><li>foo<br>{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<br><br></ol><p>[]bar",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<ol><li>foo<br>{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<ol><li><br></ol><p>[]bar",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<ol><li>{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<ol><li><br></ol><p>[]bar",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<ol><li>{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<li><br></ol><p>[]bar",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<ol><li>foo</li><li>{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<li><br></ol><p>[]bar",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<ol><li>foo</li><li>{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>{}<br>",
+ [["delete",""]],
+ "<ol><li>foo{}</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<br></ol>{}<br>",
+ [["delete",""]],
+ "<ol><li>foo{}</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<br><br></ol>{}<br>",
+ [["delete",""]],
+ "<ol><li>foo<br>{}<br></li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li><br></ol>{}<br>",
+ [["delete",""]],
+ "<ol><li>{}<br></li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<li><br></ol>{}<br>",
+ [["delete",""]],
+ "<ol><li>foo</li><li>{}<br></li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>{}<br>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<ol><li>foo{}</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>{}<br>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<ol><li>foo{}</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<br></ol><p>{}<br>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<ol><li>foo{}</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<br></ol><p>{}<br>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<ol><li>foo{}</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<br><br></ol><p>{}<br>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<ol><li>foo<br>{}<br></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<br><br></ol><p>{}<br>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<ol><li>foo<br>{}<br></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<ol><li><br></ol><p>{}<br>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<ol><li>{}<br></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<ol><li><br></ol><p>{}<br>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<ol><li>{}<br></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<li><br></ol><p>{}<br>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<ol><li>foo</li><li>{}<br></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo<li><br></ol><p>{}<br>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<ol><li>foo</li><li>{}<br></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo<blockquote>[]bar</blockquote>",
+ [["delete",""]],
+ "foo<br>[]bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<blockquote><blockquote>[]bar</blockquote></blockquote>",
+ [["delete",""]],
+ "foo<blockquote>[]bar</blockquote>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<blockquote><div>[]bar</div></blockquote>",
+ [["delete",""]],
+ "foo<div>[]bar</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<blockquote style=\"color: blue\">[]bar</blockquote>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo<div style=\"color:rgb(0, 0, 255)\">[]bar</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<blockquote style=\"color: blue\">[]bar</blockquote>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo<div style=\"color:rgb(0, 0, 255)\">[]bar</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo<blockquote><blockquote><p>[]bar<p>baz</blockquote></blockquote>",
+ [["delete",""]],
+ "foo<blockquote><p>[]bar</p><blockquote><p>baz</p></blockquote></blockquote>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<blockquote><div><p>[]bar<p>baz</div></blockquote>",
+ [["delete",""]],
+ "foo<div><p>[]bar</p><blockquote><p>baz</p></blockquote></div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<blockquote style=\"color: blue\"><p>[]bar<p>baz</blockquote>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo<div style=\"color:rgb(0, 0, 255)\"><p>[]bar</p><blockquote><p>baz</p></blockquote></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<blockquote style=\"color: blue\"><p>[]bar<p>baz</blockquote>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo<div style=\"color:rgb(0, 0, 255)\"><p>[]bar</p><blockquote><p>baz</p></blockquote></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo<blockquote><p><b>[]bar</b><p>baz</blockquote>",
+ [["delete",""]],
+ "foo<p><b>[]bar</b></p><blockquote><p>baz</p></blockquote>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<blockquote><p><strong>[]bar</strong><p>baz</blockquote>",
+ [["delete",""]],
+ "foo<p><strong>[]bar</strong></p><blockquote><p>baz</p></blockquote>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<blockquote><p><span>[]bar</span><p>baz</blockquote>",
+ [["delete",""]],
+ "foo<p><span>[]bar</span></p><blockquote><p>baz</p></blockquote>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<blockquote><ol><li>[]bar</ol></blockquote><p>extra",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo<blockquote><div>[]bar</div></blockquote><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<blockquote><ol><li>[]bar</ol></blockquote><p>extra",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo<blockquote><p>[]bar</p></blockquote><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo<blockquote>bar<ol><li>[]baz</ol>quz</blockquote><p>extra",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo<blockquote>bar<div>[]baz</div>quz</blockquote><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<blockquote>bar<ol><li>[]baz</ol>quz</blockquote><p>extra",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo<blockquote>bar<p>[]baz</p>quz</blockquote><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo<blockquote><ol><li>bar</li><ol><li>[]baz</ol><li>quz</ol></blockquote><p>extra",
+ [["delete",""]],
+ "foo<blockquote><ol><li>bar</li><li>[]baz</li><li>quz</li></ol></blockquote><p>extra</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<span></span>[]bar",
+ [["delete",""]],
+ "fo[]bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<span><span></span></span>[]bar",
+ [["delete",""]],
+ "fo[]bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<quasit></quasit>[]bar",
+ [["delete",""]],
+ "fo[]bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<br><span></span>[]bar",
+ [["delete",""]],
+ "foo{}bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<span>foo<span></span></span>[]bar",
+ [["delete",""]],
+ "<span>fo[]</span>bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<span></span><span>[]bar</span>",
+ [["delete",""]],
+ "fo[]<span>bar</span>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<div><div><p>[]bar</div></div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<div><div><p>[]bar</div></div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo<div><div><p><!--abc-->[]bar</div></div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<div><div><p><!--abc-->[]bar</div></div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo<div><div><!--abc--><p>[]bar</div></div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<div><div><!--abc--><p>[]bar</div></div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo<div><!--abc--><div><p>[]bar</div></div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<div><!--abc--><div><p>[]bar</div></div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo<!--abc--><div><div><p>[]bar</div></div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<!--abc--><div><div><p>[]bar</div></div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo</div></div>[]bar",
+ [["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo</div></div><!--abc-->[]bar",
+ [["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo</div><!--abc--></div>[]bar",
+ [["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo</p><!--abc--></div></div>[]bar",
+ [["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo<!--abc--></div></div>[]bar",
+ [["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo</p></div></div><div><div><div>[]bar</div></div></div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo</p></div></div><div><div><div>[]bar</div></div></div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo<!--abc--></p></div></div><div><div><div>[]bar</div></div></div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo<!--abc--></p></div></div><div><div><div>[]bar</div></div></div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo</p><!--abc--></div></div><div><div><div>[]bar</div></div></div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo</p><!--abc--></div></div><div><div><div>[]bar</div></div></div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo</p></div><!--abc--></div><div><div><div>[]bar</div></div></div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo</p></div><!--abc--></div><div><div><div>[]bar</div></div></div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo</p></div></div><!--abc--><div><div><div>[]bar</div></div></div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo</p></div></div><!--abc--><div><div><div>[]bar</div></div></div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo</p></div></div><div><!--abc--><div><div>[]bar</div></div></div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo</p></div></div><div><!--abc--><div><div>[]bar</div></div></div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo</p></div></div><div><div><!--abc--><div>[]bar</div></div></div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo</p></div></div><div><div><!--abc--><div>[]bar</div></div></div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo</p></div></div><div><div><div><!--abc-->[]bar</div></div></div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<div><div><p>foo</p></div></div><div><div><div><!--abc-->[]bar</div></div></div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo<p>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p><span style=\"color:rgb(0, 0, 255)\">foo{}</span>bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo<p>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p><font color=\"#0000ff\">foo{}</font>bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo<p>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p><span style=\"color:rgb(0, 0, 255)\">foo{}</span>bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo<p>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p><font color=\"#0000ff\">foo{}</font>bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo<p style=color:brown>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo<p style=color:brown>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}<font color=\"#a52a2a\">bar</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo<p style=color:brown>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo<p style=color:brown>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}<font color=\"#a52a2a\">bar</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo<p style=color:rgba(0,0,255,1)>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo<p style=color:rgba(0,0,255,1)>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo<p style=color:rgba(0,0,255,1)>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo<p style=color:rgba(0,0,255,1)>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:transparent>foo<p style=color:rgba(0,0,0,0)>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p style=\"color:rgba(0, 0, 0, 0)\">foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:transparent>foo<p style=color:rgba(0,0,0,0)>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p style=\"color:rgba(0, 0, 0, 0)\">foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:transparent>foo<p style=color:rgba(0,0,0,0)>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p style=\"color:rgba(0, 0, 0, 0)\">foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:transparent>foo<p style=color:rgba(0,0,0,0)>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p style=\"color:rgba(0, 0, 0, 0)\">foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p style=color:brown>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p style=color:brown>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}<font color=\"#a52a2a\">bar</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p style=color:brown>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p style=color:brown>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}<font color=\"#a52a2a\">bar</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p><font color=blue>foo</font><p>[]bar",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p><font color=\"blue\">foo</font>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p><font color=blue>foo</font><p>[]bar",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p><font color=\"blue\">foo</font>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p><font color=blue>foo</font><p><font color=brown>[]bar</font>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p><font color=\"blue\">foo</font>{}<font color=\"brown\">bar</font></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p><font color=blue>foo</font><p><font color=brown>[]bar</font>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p><font color=\"blue\">foo</font>{}<font color=\"brown\">bar</font></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p><font color=brown>[]bar</font>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}<font color=\"brown\">bar</font></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p><font color=brown>[]bar</font>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}<font color=\"brown\">bar</font></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p><span style=color:blue>foo</font><p>[]bar",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p><span style=\"color:rgb(0, 0, 255)\">foo</span>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p><span style=color:blue>foo</font><p>[]bar",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p><span style=\"color:rgb(0, 0, 255)\">foo</span>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p><span style=color:blue>foo</font><p><span style=color:brown>[]bar</font>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p><span style=\"color:rgb(0, 0, 255)\">foo</span>{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p><span style=color:blue>foo</font><p><span style=color:brown>[]bar</font>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p><span style=\"color:rgb(0, 0, 255)\">foo</span>{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p><span style=color:brown>[]bar</font>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p><span style=color:brown>[]bar</font>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p style=background-color:aqua>foo<p>[]bar",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p style=background-color:aqua>foo<p>[]bar",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p style=background-color:aqua>foo<p style=background-color:tan>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p style=background-color:aqua>foo<p style=background-color:tan>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p style=background-color:aqua>foo<p style=background-color:tan>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p style=background-color:aqua>foo<p style=background-color:tan>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p style=background-color:tan>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p style=background-color:tan>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p style=background-color:tan>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p style=background-color:tan>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p><span style=background-color:aqua>foo</font><p>[]bar",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">foo</span>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p><span style=background-color:aqua>foo</font><p>[]bar",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">foo</span>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p><span style=background-color:aqua>foo</font><p><span style=background-color:tan>[]bar</font>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">foo</span>{}<span style=\"background-color:rgb(210, 180, 140)\">bar</span></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p><span style=background-color:aqua>foo</font><p><span style=background-color:tan>[]bar</font>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">foo</span>{}<span style=\"background-color:rgb(210, 180, 140)\">bar</span></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p><span style=background-color:tan>[]bar</font>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}<span style=\"background-color:rgb(210, 180, 140)\">bar</span></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p><span style=background-color:tan>[]bar</font>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}<span style=\"background-color:rgb(210, 180, 140)\">bar</span></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p style=text-decoration:underline>foo<p>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p><span style=\"text-decoration:underline\">foo{}</span>bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p style=text-decoration:underline>foo<p>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p><u>foo{}</u>bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p style=text-decoration:underline>foo<p>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p><span style=\"text-decoration:underline\">foo{}</span>bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p style=text-decoration:underline>foo<p>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p><u>foo{}</u>bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p style=text-decoration:underline>foo<p style=text-decoration:line-through>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p><span style=\"text-decoration:underline\">foo{}</span><span style=\"text-decoration:line-through\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p style=text-decoration:underline>foo<p style=text-decoration:line-through>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p><u>foo{}</u><s>bar</s></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p style=text-decoration:underline>foo<p style=text-decoration:line-through>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p><span style=\"text-decoration:underline\">foo{}</span><span style=\"text-decoration:line-through\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p style=text-decoration:underline>foo<p style=text-decoration:line-through>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p><u>foo{}</u><s>bar</s></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p style=text-decoration:line-through>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}<span style=\"text-decoration:line-through\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p style=text-decoration:line-through>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}<s>bar</s></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p style=text-decoration:line-through>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}<span style=\"text-decoration:line-through\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p style=text-decoration:line-through>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}<s>bar</s></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p><u>foo</u><p>[]bar",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p><u>foo</u>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p><u>foo</u><p>[]bar",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p><u>foo</u>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p><u>foo</u><p><s>[]bar</s>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p><u>foo</u>{}<s>bar</s></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p><u>foo</u><p><s>[]bar</s>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p><u>foo</u>{}<s>bar</s></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p><s>[]bar</s>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}<s>bar</s></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<p><s>[]bar</s>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}<s>bar</s></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo</p>[]bar",
+ [["stylewithcss","true"],["delete",""]],
+ "<p><span style=\"color:rgb(0, 0, 255)\">foo{}</span>bar</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo</p>[]bar",
+ [["stylewithcss","false"],["delete",""]],
+ "<p><font color=\"#0000ff\">foo{}</font>bar</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["foo<p style=color:brown>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["delete",""]],
+ "foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<p style=color:brown>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["delete",""]],
+ "foo{}<font color=\"#a52a2a\">bar</font>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<p style=color:brown>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["delete",""]],
+ "foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo<p style=color:brown>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["delete",""]],
+ "foo{}<font color=\"#a52a2a\">bar</font>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<div style=color:blue><p style=color:green>foo</div>[]bar",
+ [["stylewithcss","true"],["delete",""]],
+ "<div><p><span style=\"color:rgb(0, 128, 0)\">foo{}</span>bar</p></div>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<div style=color:blue><p style=color:green>foo</div>[]bar",
+ [["stylewithcss","false"],["delete",""]],
+ "<div><p><font color=\"#008000\">foo{}</font>bar</p></div>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<div style=color:blue><p style=color:green>foo</div><p style=color:brown>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["delete",""]],
+ "<div style=\"color:rgb(0, 0, 255)\"><p style=\"color:rgb(0, 128, 0)\">foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<div style=color:blue><p style=color:green>foo</div><p style=color:brown>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["delete",""]],
+ "<div style=\"color:rgb(0, 0, 255)\"><p style=\"color:rgb(0, 128, 0)\">foo{}<font color=\"#a52a2a\">bar</font></p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<div style=color:blue><p style=color:green>foo</div><p style=color:brown>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["delete",""]],
+ "<div style=\"color:rgb(0, 0, 255)\"><p style=\"color:rgb(0, 128, 0)\">foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<div style=color:blue><p style=color:green>foo</div><p style=color:brown>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["delete",""]],
+ "<div style=\"color:rgb(0, 0, 255)\"><p style=\"color:rgb(0, 128, 0)\">foo{}<font color=\"#a52a2a\">bar</font></p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo<div style=color:brown><p style=color:green>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}<span style=\"color:rgb(0, 128, 0)\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo<div style=color:brown><p style=color:green>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}<font color=\"#008000\">bar</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo<div style=color:brown><p style=color:green>[]bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}<span style=\"color:rgb(0, 128, 0)\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo<div style=color:brown><p style=color:green>[]bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}<font color=\"#008000\">bar</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["delete",""]],
+ "foo[]baz",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar]</span>baz",
+ [["stylewithcss","true"],["delete",""]],
+ "<p>foo{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar]</span>baz",
+ [["stylewithcss","false"],["delete",""]],
+ "<p>foo{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar}</span>baz",
+ [["stylewithcss","true"],["delete",""]],
+ "<p>foo{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar}</span>baz",
+ [["stylewithcss","false"],["delete",""]],
+ "<p>foo{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<p>foo{<span style=color:#aBcDeF>bar</span>}baz",
+ [["stylewithcss","true"],["delete",""]],
+ "<p>foo{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<p>foo{<span style=color:#aBcDeF>bar</span>}baz",
+ [["stylewithcss","false"],["delete",""]],
+ "<p>foo{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<p>[foo<span style=color:#aBcDeF>bar]</span>baz",
+ [["stylewithcss","true"],["delete",""]],
+ "<p>{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<p>[foo<span style=color:#aBcDeF>bar]</span>baz",
+ [["stylewithcss","false"],["delete",""]],
+ "<p>{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<p>{foo<span style=color:#aBcDeF>bar}</span>baz",
+ [["stylewithcss","true"],["delete",""]],
+ "<p>{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<p>{foo<span style=color:#aBcDeF>bar}</span>baz",
+ [["stylewithcss","false"],["delete",""]],
+ "<p>{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span>baz]",
+ [["stylewithcss","true"],["delete",""]],
+ "<p>foo{}</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span>baz]",
+ [["stylewithcss","false"],["delete",""]],
+ "<p>foo{}</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar</span>baz}",
+ [["stylewithcss","true"],["delete",""]],
+ "<p>foo{}</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar</span>baz}",
+ [["stylewithcss","false"],["delete",""]],
+ "<p>foo{}</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz",
+ [["stylewithcss","true"],["delete",""]],
+ "<p>foo{}quz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz",
+ [["stylewithcss","false"],["delete",""]],
+ "<p>foo{}quz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["foo<b>[bar]</b>baz",
+ [["stylewithcss","true"],["delete",""]],
+ "foo{}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["foo<b>[bar]</b>baz",
+ [["stylewithcss","false"],["delete",""]],
+ "foo{}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["foo<b>{bar}</b>baz",
+ [["stylewithcss","true"],["delete",""]],
+ "foo{}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["foo<b>{bar}</b>baz",
+ [["stylewithcss","false"],["delete",""]],
+ "foo{}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["foo{<b>bar</b>}baz",
+ [["stylewithcss","true"],["delete",""]],
+ "foo{}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["foo{<b>bar</b>}baz",
+ [["stylewithcss","false"],["delete",""]],
+ "foo{}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["foo<span>[bar]</span>baz",
+ [["delete",""]],
+ "foo{}baz",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<span>{bar}</span>baz",
+ [["delete",""]],
+ "foo{}baz",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo{<span>bar</span>}baz",
+ [["delete",""]],
+ "foo{}baz",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<b>foo[bar</b><i>baz]quz</i>",
+ [["delete",""]],
+ "<b>foo[]</b><i>quz</i>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo</p><p>[bar]</p><p>baz</p>",
+ [["delete",""]],
+ "<p>foo</p><p>{}<br></p><p>baz</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo</p><p>{bar}</p><p>baz</p>",
+ [["delete",""]],
+ "<p>foo</p><p>{}<br></p><p>baz</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo</p><p>{bar</p>}<p>baz</p>",
+ [["delete",""]],
+ "<p>foo</p><p>{}<br></p><p>baz</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo</p>{<p>bar}</p><p>baz</p>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo</p>{}<br><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo</p>{<p>bar}</p><p>baz</p>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo</p>{}<br><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo</p>{<p>bar</p>}<p>baz</p>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo</p>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo</p>{<p>bar</p>}<p>baz</p>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo</p>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo[bar<p>baz]quz",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo[bar<p>baz]quz",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo[bar<div>baz]quz</div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo[bar<div>baz]quz</div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo[bar<h1>baz]quz</h1>",
+ [["delete",""]],
+ "<p>foo{}quz</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div>foo[bar</div><p>baz]quz",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<div>foo{}quz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<div>foo[bar</div><p>baz]quz",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<div>foo{}quz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<blockquote>foo[bar</blockquote><pre>baz]quz</pre>",
+ [["delete",""]],
+ "<blockquote>foo{}quz</blockquote>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p><b>foo[bar</b><p>baz]quz",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p><b>foo</b>{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p><b>foo[bar</b><p>baz]quz",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p><b>foo</b>{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<div><p>foo[bar</div><p>baz]quz",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<div><p>foo{}quz</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<div><p>foo[bar</div><p>baz]quz",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<div><p>foo{}quz</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo[bar<blockquote><p>baz]quz<p>qoz</blockquote",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}quz</p><blockquote><p>qoz</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo[bar<blockquote><p>baz]quz<p>qoz</blockquote",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}quz</p><blockquote><p>qoz</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo[bar<p style=color:blue>baz]quz",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}<span style=\"color:rgb(0, 0, 255)\">quz</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo[bar<p style=color:blue>baz]quz",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}<font color=\"#0000ff\">quz</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo[bar<p style=color:blue>baz]quz",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}<span style=\"color:rgb(0, 0, 255)\">quz</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo[bar<p style=color:blue>baz]quz",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}<font color=\"#0000ff\">quz</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo[bar<p><b>baz]quz</b>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}<b>quz</b></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo[bar<p><b>baz]quz</b>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}<b>quz</b></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<div><p>foo<p>[bar<p>baz]</div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<div><p>foo</p><p>{}<br></p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<div><p>foo<p>[bar<p>baz]</div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<div><p>foo</p><p>{}<br></p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo[<br>]bar",
+ [["delete",""]],
+ "foo{}bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo[</p><p>]bar</p>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo[</p><p>]bar</p>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo[</p><p>]bar<br>baz</p>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}bar<br>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo[</p><p>]bar<br>baz</p>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}bar<br>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo[<p>]bar</p>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo[<p>]bar</p>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo{<p>}bar</p>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo{<p>}bar</p>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo[<p>]bar<br>baz</p>",
+ [["delete",""]],
+ "foo{}bar<p>baz</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo[<p>]bar</p>baz",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo{}bar<br>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo[<p>]bar</p>baz",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo{}bar<br>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo{<p>bar</p>}baz",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo{}baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo{<p>bar</p>}baz",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo{}baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo<p>{bar</p>}baz",
+ [["delete",""]],
+ "foo<p>{}baz</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo{<p>bar}</p>baz",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo{}<br>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo{<p>bar}</p>baz",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo{}<br>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo[</p>]bar",
+ [["delete",""]],
+ "<p>foo{}bar</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo{</p>}bar",
+ [["delete",""]],
+ "<p>foo{}bar</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo[</p>]bar<br>baz",
+ [["delete",""]],
+ "<p>foo{}bar</p>baz",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo[</p>]bar<p>baz</p>",
+ [["delete",""]],
+ "<p>foo{}bar</p><p>baz</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo[<div><p>]bar</div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo[<div><p>]bar</div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<div><p>foo[</p></div>]bar",
+ [["delete",""]],
+ "<div><p>foo{}bar</p></div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo[<div><p>]bar</p>baz</div>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo{}bar<div>baz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo[<div><p>]bar</p>baz</div>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo{}bar<div>baz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo[<div>]bar<p>baz</p></div>",
+ [["delete",""]],
+ "foo{}bar<div><p>baz</p></div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div><p>foo</p>bar[</div>]baz",
+ [["delete",""]],
+ "<div><p>foo</p>bar{}baz</div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div>foo<p>bar[</p></div>]baz",
+ [["delete",""]],
+ "<div>foo<p>bar{}baz</p></div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo<br>{</p>]bar",
+ [["delete",""]],
+ "<p>foo{}bar</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo<br><br>{</p>]bar",
+ [["delete",""]],
+ "<p>foo<br>{}bar</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<br>{<p>]bar</p>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<br>{<p>]bar</p>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["foo<br><br>{<p>]bar</p>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "foo<br>{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["foo<br><br>{<p>]bar</p>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "foo<br>{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<br>{</p><p>}bar</p>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<br>{</p><p>}bar</p>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<br><br>{</p><p>}bar</p>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo<br>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<br><br>{</p><p>}bar</p>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo<br>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<table><tbody><tr><th>foo<th>[bar]<th>baz<tr><td>quz<td>qoz<td>qiz</table>",
+ [["delete",""]],
+ "<table><tbody><tr><th>foo</th><th>{}<br></th><th>baz</th></tr><tr><td>quz</td><td>qoz</td><td>qiz</td></tr></tbody></table>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<table><tbody><tr><th>foo<th>ba[r<th>b]az<tr><td>quz<td>qoz<td>qiz</table>",
+ [["delete",""]],
+ "<table><tbody><tr><th>foo</th><th>ba[]</th><th>az</th></tr><tr><td>quz</td><td>qoz</td><td>qiz</td></tr></tbody></table>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<table><tbody><tr><th>fo[o<th>bar<th>b]az<tr><td>quz<td>qoz<td>qiz</table>",
+ [["delete",""]],
+ "<table><tbody><tr><th>fo[]</th><th><br></th><th>az</th></tr><tr><td>quz</td><td>qoz</td><td>qiz</td></tr></tbody></table>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<table><tbody><tr><th>foo<th>bar<th>ba[z<tr><td>q]uz<td>qoz<td>qiz</table>",
+ [["delete",""]],
+ "<table><tbody><tr><th>foo</th><th>bar</th><th>ba[]</th></tr><tr><td>uz</td><td>qoz</td><td>qiz</td></tr></tbody></table>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<table><tbody><tr><th>[foo<th>bar<th>baz]<tr><td>quz<td>qoz<td>qiz</table>",
+ [["delete",""]],
+ "<table><tbody><tr><th>{}<br></th><th><br></th><th><br></th></tr><tr><td>quz</td><td>qoz</td><td>qiz</td></tr></tbody></table>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<table><tbody><tr><th>[foo<th>bar<th>baz<tr><td>quz<td>qoz<td>qiz]</table>",
+ [["delete",""]],
+ "<table><tbody><tr><th>{}<br></th><th><br></th><th><br></th></tr><tr><td><br></td><td><br></td><td><br></td></tr></tbody></table>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["{<table><tbody><tr><th>foo<th>bar<th>baz<tr><td>quz<td>qoz<td>qiz</table>}",
+ [["delete",""]],
+ "{}<br>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<table><tbody><tr><td>foo<td>ba[r<tr><td>baz<td>quz<tr><td>q]oz<td>qiz</table>",
+ [["delete",""]],
+ "<table><tbody><tr><td>foo</td><td>ba[]</td></tr><tr><td><br></td><td><br></td></tr><tr><td>oz</td><td>qiz</td></tr></tbody></table>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>fo[o<table><tr><td>b]ar</table><p>baz",
+ [["delete",""]],
+ "<p>fo[]</p><table><tbody><tr><td>ar</td></tr></tbody></table><p>baz</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo<table><tr><td>ba[r</table><p>b]az",
+ [["delete",""]],
+ "<p>foo</p><table><tbody><tr><td>ba[]</td></tr></tbody></table><p>az</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>fo[o<table><tr><td>bar</table><p>b]az",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>fo{}az</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>fo[o<table><tr><td>bar</table><p>b]az",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>fo{}az</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<ol><li>ba[r<li>b]az</ol><p>quz",
+ [["delete",""]],
+ "<p>foo</p><ol><li>ba{}az</li></ol><p>quz</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo<ol><li>bar<li>[baz]</ol><p>quz",
+ [["delete",""]],
+ "<p>foo</p><ol><li>bar</li><li>{}<br></li></ol><p>quz</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>fo[o<ol><li>b]ar<li>baz</ol><p>quz",
+ [["delete",""]],
+ "<p>fo{}ar</p><ol><li>baz</li></ol><p>quz</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>foo<ol><li>bar<li>ba[z</ol><p>q]uz",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>foo</p><ol><li>bar</li><li>ba{}uz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>foo<ol><li>bar<li>ba[z</ol><p>q]uz",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>foo</p><ol><li>bar</li><li>ba{}uz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p>fo[o<ol><li>bar<li>b]az</ol><p>quz",
+ [["delete",""]],
+ "<p>fo{}az</p><p>quz</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>fo[o<ol><li>bar<li>baz</ol><p>q]uz",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<p>fo{}uz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<p>fo[o<ol><li>bar<li>baz</ol><p>q]uz",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<p>fo{}uz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>fo[o</ol><ol><li>b]ar</ol>",
+ [["delete",""]],
+ "<ol><li>fo{}ar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>fo[o</ol><ul><li>b]ar</ul>",
+ [["delete",""]],
+ "<ol><li>fo{}ar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo[<ol><li>]bar</ol>",
+ [["delete",""]],
+ "foo{}bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo[<li>]bar</ol>",
+ [["delete",""]],
+ "<ol><li>foo{}bar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo[<dl><dt>]bar<dd>baz</dl>",
+ [["delete",""]],
+ "foo{}bar<dl><dd>baz</dd></dl>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo[<dl><dd>]bar</dl>",
+ [["delete",""]],
+ "foo{}bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<dl><dt>foo[<dd>]bar</dl>",
+ [["delete",""]],
+ "<dl><dt>foo{}bar</dt></dl>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<dl><dt>foo[<dt>]bar<dd>baz</dl>",
+ [["delete",""]],
+ "<dl><dt>foo{}bar</dt><dd>baz</dd></dl>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>bar[<dd>]baz</dl>",
+ [["delete",""]],
+ "<dl><dt>foo</dt><dd>bar{}baz</dd></dl>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<b>foo [&nbsp;</b>bar]",
+ [["delete",""]],
+ "<b>foo&nbsp;[]</b>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["foo<b> [&nbsp;bar]</b>",
+ [["delete",""]],
+ "foo<b>&nbsp;[]</b>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<b>[foo&nbsp;] </b>bar",
+ [["delete",""]],
+ "<b>{}&nbsp;</b>bar",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["[foo<b>&nbsp;] bar</b>",
+ [["delete",""]],
+ "{}<b>&nbsp;bar</b>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p style=display:inline>fo[o<p style=display:inline>b]ar",
+ [["delete",""]],
+ "<p style=\"display:inline\">fo[]</p><p style=\"display:inline\">ar</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<span style=display:block>fo[o</span><span style=display:block>b]ar</span>",
+ [["stylewithcss","true"],["delete",""]],
+ "<span style=\"display:block\">fo{}ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<span style=display:block>fo[o</span><span style=display:block>b]ar</span>",
+ [["stylewithcss","false"],["delete",""]],
+ "<span style=\"display:block\">fo{}ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<span style=display:inline-block>fo[o</span><span style=display:inline-block>b]ar</span>",
+ [["delete",""]],
+ "<span style=\"display:inline-block\">fo[]</span><span style=\"display:inline-block\">ar</span>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<span style=display:inline-table>fo[o</span><span style=display:inline-table>b]ar</span>",
+ [["delete",""]],
+ "<span style=\"display:inline-table\">fo[]</span><span style=\"display:inline-table\">ar</span>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<span style=display:none>fo[o</span><span style=display:none>b]ar</span>",
+ [["delete",""]],
+ "<span style=\"display:none\">fo[]</span><span style=\"display:none\">ar</span>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<quasit style=display:block>fo[o</quasit><quasit style=display:block>b]ar</quasit>",
+ [["stylewithcss","true"],["delete",""]],
+ "<quasit style=\"display:block\">fo{}ar</quasit>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<quasit style=display:block>fo[o</quasit><quasit style=display:block>b]ar</quasit>",
+ [["stylewithcss","false"],["delete",""]],
+ "<quasit style=\"display:block\">fo{}ar</quasit>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>{}<br><ol><li>bar</ol>",
+ [["delete",""]],
+ "<ol><li>foo{}</li><li>bar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>{}<br></p><ol><li>bar</ol>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<ol><li>foo{}</li><li>bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>{}<br></p><ol><li>bar</ol>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<ol><li>foo{}</li><li>bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo</ol><p>{}<br></p><ol><li>bar</ol>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<ol><li><p>foo{}</p></li><li>bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo</ol><p>{}<br></p><ol><li>bar</ol>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<ol><li><p>foo{}</p></li><li>bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<ol id=a><li>foo</ol>{}<br><ol><li>bar</ol>",
+ [["delete",""]],
+ "<ol id=\"a\"><li>foo{}</li><li>bar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>{}<br><ol id=b><li>bar</ol>",
+ [["delete",""]],
+ "<ol><li>foo{}</li><li>bar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol id=a><li>foo</ol>{}<br><ol id=b><li>bar</ol>",
+ [["delete",""]],
+ "<ol id=\"a\"><li>foo{}</li><li>bar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol class=a><li>foo</ol>{}<br><ol class=b><li>bar</ol>",
+ [["delete",""]],
+ "<ol class=\"a\"><li>foo{}</li><li>bar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><ol><li>foo</ol><li>{}<br></li><ol><li>bar</ol></ol>",
+ [["delete",""]],
+ "<ol><ol><li>foo{}</li><li>bar</li></ol></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo[</ol>bar]<ol><li>baz</ol>",
+ [["delete",""]],
+ "<ol><li>foo{}</li><li>baz</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo[</ol><p>bar]<ol><li>baz</ol>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<ol><li>foo{}</li><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo[</ol><p>bar]<ol><li>baz</ol>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<ol><li>foo{}</li><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo[</ol><p>bar]<ol><li>baz</ol>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<ol><li><p>foo{}</p></li><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo[</ol><p>bar]<ol><li>baz</ol>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<ol><li><p>foo{}</p></li><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]</ol><ol><li>bar</ol>",
+ [["delete",""]],
+ "<ol><li>fo[]</li></ol><ol><li>bar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>[bar<ol><li>]baz</ol>",
+ [["delete",""]],
+ "<ol><li>foo</li></ol>{}baz",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>[bar<ol><li>]baz</ol>",
+ [["delete",""]],
+ "<ol><li>foo</li></ol><p>{}baz</p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>[bar<ol><li><p>]baz</ol>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<ol><li>foo</li></ol><p>{}baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>[bar<ol><li><p>]baz</ol>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<ol><li>foo</li></ol><p>{}baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><ol><li>b[]ar</ol>",
+ [["delete",""]],
+ "<ol><li>foo</li></ol><ol><li>{}ar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><ol><li>foo[</ol><li>bar</ol>baz]<ol><li>quz</ol>",
+ [["delete",""]],
+ "<ol><ol><li>foo{}</li></ol><li>quz</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul>{}<br><ul><li>bar</ul>",
+ [["delete",""]],
+ "<ul><li>foo{}</li><li>bar</li></ul>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul><p>{}<br></p><ul><li>bar</ul>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<ul><li>foo{}</li><li>bar</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul><p>{}<br></p><ul><li>bar</ul>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<ul><li>foo{}</li><li>bar</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo[<li>bar]</ol><ol><li>baz</ol><ol><li>quz</ol>",
+ [["delete",""]],
+ "<ol><li>foo{}</li><li>baz</li><li>quz</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>{}<br><ul><li>bar</ul>",
+ [["delete",""]],
+ "<ol><li>foo{}</li></ol><ul><li>bar</li></ul>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>{}<br></p><ul><li>bar</ul>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<ol><li>foo{}</li></ol><ul><li>bar</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>{}<br></p><ul><li>bar</ul>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<ol><li>foo{}</li></ol><ul><li>bar</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul>{}<br><ol><li>bar</ol>",
+ [["delete",""]],
+ "<ul><li>foo{}</li></ul><ol><li>bar</li></ol>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul><p>{}<br></p><ol><li>bar</ol>",
+ [["defaultparagraphseparator","div"],["delete",""]],
+ "<ul><li>foo{}</li></ul><ol><li>bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"delete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul><p>{}<br></p><ol><li>bar</ol>",
+ [["defaultparagraphseparator","p"],["delete",""]],
+ "<ul><li>foo{}</li></ul><ol><li>bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"delete":[false,false,"",false,false,""]}],
+["<p><b>[foo]</b>",
+ [["delete",""]],
+ "<p><b>{}<br></b></p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p><quasit>[foo]</quasit>",
+ [["delete",""]],
+ "<p><quasit>{}<br></quasit></p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p><b><i>[foo]</i></b>",
+ [["delete",""]],
+ "<p><b><i>{}<br></i></b></p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p><b>{foo}</b>",
+ [["delete",""]],
+ "<p><b>{}<br></b></p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p>{<b>foo</b>}",
+ [["delete",""]],
+ "<p><b>{}<br></b></p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<p><b>f[]</b>",
+ [["delete",""]],
+ "<p><b>{}<br></b></p>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<b>[foo]</b>",
+ [["delete",""]],
+ "<b>{}<br></b>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}],
+["<div><b>[foo]</b></div>",
+ [["delete",""]],
+ "<div><b>{}<br></b></div>",
+ [true],
+ {"delete":[false,false,"",false,false,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/fontname.js b/testing/web-platform/tests/editing/data/fontname.js
new file mode 100644
index 000000000..9f0cebd3e
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/fontname.js
@@ -0,0 +1,707 @@
+var browserTests = [
+["foo[]bar",
+ [["fontname","sans-serif"]],
+ "foo[]bar",
+ [true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<p><span style=\"font-family:sans-serif\">[foo</span></p> <p><span style=\"font-family:sans-serif\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<p><font face=\"sans-serif\">[foo</font></p> <p><font face=\"sans-serif\">bar]</font></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<span style=\"font-family:sans-serif\"><span>[foo</span> <span>bar]</span></span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<font face=\"sans-serif\"><span>[foo</span> <span>bar]</span></font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<p><span style=\"font-family:sans-serif\">[foo</span></p><p> <span style=\"font-family:sans-serif\"><span>bar</span></span> </p><p><span style=\"font-family:sans-serif\">baz]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<p><font face=\"sans-serif\">[foo</font></p><p> <font face=\"sans-serif\"><span>bar</span></font> </p><p><font face=\"sans-serif\">baz]</font></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<p><span style=\"font-family:sans-serif\">[foo</span></p><p><span style=\"font-family:sans-serif\"><br></span></p><p><span style=\"font-family:sans-serif\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<p><font face=\"sans-serif\">[foo</font></p><p><font face=\"sans-serif\"><br></font></p><p><font face=\"sans-serif\">bar]</font></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<b>foo[]bar</b>",
+ [["fontname","sans-serif"]],
+ "<b>foo[]bar</b>",
+ [true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<i>foo[]bar</i>",
+ [["fontname","sans-serif"]],
+ "<i>foo[]bar</i>",
+ [true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<span>foo</span>{}<span>bar</span>",
+ [["fontname","sans-serif"]],
+ "<span>foo</span>{}<span>bar</span>",
+ [true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<span>foo[</span><span>]bar</span>",
+ [["fontname","sans-serif"]],
+ "<span>foo[</span><span>]bar</span>",
+ [true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<span style=\"font-family:sans-serif\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<font face=\"sans-serif\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<span style=\"font-family:sans-serif\">[bar</span><b><span style=\"font-family:sans-serif\">baz]</span>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<font face=\"sans-serif\">[bar</font><b><font face=\"sans-serif\">baz]</font>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<span style=\"font-family:sans-serif\">[bar</span><i><span style=\"font-family:sans-serif\">baz]</span>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<font face=\"sans-serif\">[bar</font><i><font face=\"sans-serif\">baz]</font>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "{<p></p><p> </p><p><span style=\"font-family:sans-serif\">foo</span></p>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "{<p></p><p> </p><p><font face=\"sans-serif\">foo</font></p>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<table><tbody><tr><td>foo</td><td>b<span style=\"font-family:sans-serif\">[a]</span>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<table><tbody><tr><td>foo</td><td>b<font face=\"sans-serif\">[a]</font>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<table><tbody><tr><td>foo</td>{<td><span style=\"font-family:sans-serif\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<table><tbody><tr><td>foo</td>{<td><font face=\"sans-serif\">bar</font></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<table><tbody><tr>{<td><span style=\"font-family:sans-serif\">foo</span></td><td><span style=\"font-family:sans-serif\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<table><tbody><tr>{<td><font face=\"sans-serif\">foo</font></td><td><font face=\"sans-serif\">bar</font></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<table><tbody>{<tr><td><span style=\"font-family:sans-serif\">foo</span></td><td><span style=\"font-family:sans-serif\">bar</span></td><td><span style=\"font-family:sans-serif\">baz</span></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<table><tbody>{<tr><td><font face=\"sans-serif\">foo</font></td><td><font face=\"sans-serif\">bar</font></td><td><font face=\"sans-serif\">baz</font></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<table>{<tbody><tr><td><span style=\"font-family:sans-serif\">foo</span></td><td><span style=\"font-family:sans-serif\">bar</span></td><td><span style=\"font-family:sans-serif\">baz</span></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<table>{<tbody><tr><td><font face=\"sans-serif\">foo</font></td><td><font face=\"sans-serif\">bar</font></td><td><font face=\"sans-serif\">baz</font></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "{<table><tbody><tr><td><span style=\"font-family:sans-serif\">foo</span></td><td><span style=\"font-family:sans-serif\">bar</span></td><td><span style=\"font-family:sans-serif\">baz</span></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "{<table><tbody><tr><td><font face=\"sans-serif\">foo</font></td><td><font face=\"sans-serif\">bar</font></td><td><font face=\"sans-serif\">baz</font></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"serif",false,false,"sans-serif"]}],
+["foo<code>[bar]</code>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<code><span style=\"font-family:sans-serif\">[bar]</span></code>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<code>[bar]</code>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<code><font face=\"sans-serif\">[bar]</font></code>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<kbd>[bar]</kbd>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<kbd><span style=\"font-family:sans-serif\">[bar]</span></kbd>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<kbd>[bar]</kbd>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<kbd><font face=\"sans-serif\">[bar]</font></kbd>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<listing>[bar]</listing>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<listing><span style=\"font-family:sans-serif\">[bar]</span></listing>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<listing>[bar]</listing>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<listing><font face=\"sans-serif\">[bar]</font></listing>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<pre>[bar]</pre>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<pre><span style=\"font-family:sans-serif\">[bar]</span></pre>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<pre>[bar]</pre>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<pre><font face=\"sans-serif\">[bar]</font></pre>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<samp>[bar]</samp>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<samp><span style=\"font-family:sans-serif\">[bar]</span></samp>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<samp>[bar]</samp>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<samp><font face=\"sans-serif\">[bar]</font></samp>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<tt>[bar]</tt>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<tt><span style=\"font-family:sans-serif\">[bar]</span></tt>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<tt>[bar]</tt>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<tt><font face=\"sans-serif\">[bar]</font></tt>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<code>b[a]r</code>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<code>b<span style=\"font-family:sans-serif\">[a]</span>r</code>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<code>b[a]r</code>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<code>b<font face=\"sans-serif\">[a]</font>r</code>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<kbd>b[a]r</kbd>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<kbd>b<span style=\"font-family:sans-serif\">[a]</span>r</kbd>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<kbd>b[a]r</kbd>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<kbd>b<font face=\"sans-serif\">[a]</font>r</kbd>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<listing>b[a]r</listing>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<listing>b<span style=\"font-family:sans-serif\">[a]</span>r</listing>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<listing>b[a]r</listing>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<listing>b<font face=\"sans-serif\">[a]</font>r</listing>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<pre>b[a]r</pre>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<pre>b<span style=\"font-family:sans-serif\">[a]</span>r</pre>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<pre>b[a]r</pre>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<pre>b<font face=\"sans-serif\">[a]</font>r</pre>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<samp>b[a]r</samp>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<samp>b<span style=\"font-family:sans-serif\">[a]</span>r</samp>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<samp>b[a]r</samp>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<samp>b<font face=\"sans-serif\">[a]</font>r</samp>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<tt>b[a]r</tt>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<tt>b<span style=\"font-family:sans-serif\">[a]</span>r</tt>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<tt>b[a]r</tt>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<tt>b<font face=\"sans-serif\">[a]</font>r</tt>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["[foo<code>bar</code>baz]",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<span style=\"font-family:sans-serif\">[foo<code><span style=\"font-family:sans-serif\">bar</span></code>baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<code>bar</code>baz]",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<font face=\"sans-serif\">[foo<code><font face=\"sans-serif\">bar</font></code>baz]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<kbd>bar</kbd>baz]",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<span style=\"font-family:sans-serif\">[foo<kbd><span style=\"font-family:sans-serif\">bar</span></kbd>baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<kbd>bar</kbd>baz]",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<font face=\"sans-serif\">[foo<kbd><font face=\"sans-serif\">bar</font></kbd>baz]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<listing>bar</listing>baz]",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<span style=\"font-family:sans-serif\">[foo</span><listing><span style=\"font-family:sans-serif\">bar</span></listing><span style=\"font-family:sans-serif\">baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<listing>bar</listing>baz]",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<font face=\"sans-serif\">[foo</font><listing><font face=\"sans-serif\">bar</font></listing><font face=\"sans-serif\">baz]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<pre>bar</pre>baz]",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<span style=\"font-family:sans-serif\">[foo</span><pre><span style=\"font-family:sans-serif\">bar</span></pre><span style=\"font-family:sans-serif\">baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<pre>bar</pre>baz]",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<font face=\"sans-serif\">[foo</font><pre><font face=\"sans-serif\">bar</font></pre><font face=\"sans-serif\">baz]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<samp>bar</samp>baz]",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<span style=\"font-family:sans-serif\">[foo<samp><span style=\"font-family:sans-serif\">bar</span></samp>baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<samp>bar</samp>baz]",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<font face=\"sans-serif\">[foo<samp><font face=\"sans-serif\">bar</font></samp>baz]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<tt>bar</tt>baz]",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<span style=\"font-family:sans-serif\">[foo<tt><span style=\"font-family:sans-serif\">bar</span></tt>baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<tt>bar</tt>baz]",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<font face=\"sans-serif\">[foo<tt><font face=\"sans-serif\">bar</font></tt>baz]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<code>ba]r</code>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<span style=\"font-family:sans-serif\">[foo</span><code><span style=\"font-family:sans-serif\">ba]</span>r</code>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<code>ba]r</code>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<font face=\"sans-serif\">[foo</font><code><font face=\"sans-serif\">ba]</font>r</code>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<kbd>ba]r</kbd>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<span style=\"font-family:sans-serif\">[foo</span><kbd><span style=\"font-family:sans-serif\">ba]</span>r</kbd>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<kbd>ba]r</kbd>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<font face=\"sans-serif\">[foo</font><kbd><font face=\"sans-serif\">ba]</font>r</kbd>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<listing>ba]r</listing>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<span style=\"font-family:sans-serif\">[foo</span><listing><span style=\"font-family:sans-serif\">ba]</span>r</listing>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<listing>ba]r</listing>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<font face=\"sans-serif\">[foo</font><listing><font face=\"sans-serif\">ba]</font>r</listing>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<pre>ba]r</pre>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<span style=\"font-family:sans-serif\">[foo</span><pre><span style=\"font-family:sans-serif\">ba]</span>r</pre>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<pre>ba]r</pre>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<font face=\"sans-serif\">[foo</font><pre><font face=\"sans-serif\">ba]</font>r</pre>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<samp>ba]r</samp>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<span style=\"font-family:sans-serif\">[foo</span><samp><span style=\"font-family:sans-serif\">ba]</span>r</samp>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<samp>ba]r</samp>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<font face=\"sans-serif\">[foo</font><samp><font face=\"sans-serif\">ba]</font>r</samp>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<tt>ba]r</tt>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<span style=\"font-family:sans-serif\">[foo</span><tt><span style=\"font-family:sans-serif\">ba]</span>r</tt>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["[foo<tt>ba]r</tt>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<font face=\"sans-serif\">[foo</font><tt><font face=\"sans-serif\">ba]</font>r</tt>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["foo<code>b[ar</code>baz]",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<code>b<span style=\"font-family:sans-serif\">[ar</span></code><span style=\"font-family:sans-serif\">baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"monospace",false,false,"sans-serif"]}],
+["foo<code>b[ar</code>baz]",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<code>b<font face=\"sans-serif\">[ar</font></code><font face=\"sans-serif\">baz]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"monospace",false,false,"sans-serif"]}],
+["foo<kbd>b[ar</kbd>baz]",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<kbd>b<span style=\"font-family:sans-serif\">[ar</span></kbd><span style=\"font-family:sans-serif\">baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"monospace",false,false,"sans-serif"]}],
+["foo<kbd>b[ar</kbd>baz]",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<kbd>b<font face=\"sans-serif\">[ar</font></kbd><font face=\"sans-serif\">baz]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"monospace",false,false,"sans-serif"]}],
+["foo<listing>b[ar</listing>baz]",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<listing>b<span style=\"font-family:sans-serif\">[ar</span></listing><span style=\"font-family:sans-serif\">baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"monospace",false,false,"sans-serif"]}],
+["foo<listing>b[ar</listing>baz]",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<listing>b<font face=\"sans-serif\">[ar</font></listing><font face=\"sans-serif\">baz]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"monospace",false,false,"sans-serif"]}],
+["foo<pre>b[ar</pre>baz]",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<pre>b<span style=\"font-family:sans-serif\">[ar</span></pre><span style=\"font-family:sans-serif\">baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"monospace",false,false,"sans-serif"]}],
+["foo<pre>b[ar</pre>baz]",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<pre>b<font face=\"sans-serif\">[ar</font></pre><font face=\"sans-serif\">baz]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"monospace",false,false,"sans-serif"]}],
+["foo<samp>b[ar</samp>baz]",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<samp>b<span style=\"font-family:sans-serif\">[ar</span></samp><span style=\"font-family:sans-serif\">baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"monospace",false,false,"sans-serif"]}],
+["foo<samp>b[ar</samp>baz]",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<samp>b<font face=\"sans-serif\">[ar</font></samp><font face=\"sans-serif\">baz]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"monospace",false,false,"sans-serif"]}],
+["foo<tt>b[ar</tt>baz]",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<tt>b<span style=\"font-family:sans-serif\">[ar</span></tt><span style=\"font-family:sans-serif\">baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"monospace",false,false,"sans-serif"]}],
+["foo<tt>b[ar</tt>baz]",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<tt>b<font face=\"sans-serif\">[ar</font></tt><font face=\"sans-serif\">baz]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"monospace",false,false,"sans-serif"]}],
+["foo<span style=\"font-family: sans-serif\">[bar]</span>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<span style=\"font-family:sans-serif\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"sans-serif",false,false,"sans-serif"]}],
+["foo<span style=\"font-family: sans-serif\">[bar]</span>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<font face=\"sans-serif\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"sans-serif",false,false,"sans-serif"]}],
+["foo<span style=\"font-family: sans-serif\">b[a]r</span>baz",
+ [["fontname","sans-serif"]],
+ "foo<span style=\"font-family:sans-serif\">b[a]r</span>baz",
+ [true],
+ {"fontname":[false,false,"sans-serif",false,false,"sans-serif"]}],
+["foo<span style=\"font-family: monospace\">[bar]</span>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<span style=\"font-family:sans-serif\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<span style=\"font-family: monospace\">[bar]</span>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<font face=\"sans-serif\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<span style=\"font-family: monospace\">b[a]r</span>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<span style=\"font-family:monospace\">b<span style=\"font-family:sans-serif\">[a]</span>r</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<span style=\"font-family: monospace\">b[a]r</span>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<span style=\"font-family:monospace\">b<font face=\"sans-serif\">[a]</font>r</span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<tt contenteditable=false>ba[r</tt>b]az",
+ [["fontname","sans-serif"]],
+ "foo<tt contenteditable=\"false\">ba[r</tt>b]az",
+ [false],
+ {"fontname":[false,false,"serif",false,false,"serif"]}],
+["fo[o<tt contenteditable=false>b]ar</tt>baz",
+ [["fontname","sans-serif"]],
+ "fo[o<tt contenteditable=\"false\">b]ar</tt>baz",
+ [false],
+ {"fontname":[false,false,"serif",false,false,"serif"]}],
+["foo<tt>{}<br></tt>bar",
+ [["fontname","sans-serif"]],
+ "foo<tt>{}<br></tt>bar",
+ [true],
+ {"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<tt>{<br></tt>}bar",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<tt>{<span style=\"font-family:sans-serif\"><br></span></tt>}bar",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<tt>{<br></tt>}bar",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<tt>{<font face=\"sans-serif\"><br></font></tt>}bar",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<tt>{<br></tt>b]ar",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<tt>{<span style=\"font-family:sans-serif\"><br></span></tt><span style=\"font-family:sans-serif\">b]</span>ar",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"monospace",false,false,"sans-serif"]}],
+["foo<tt>{<br></tt>b]ar",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<tt>{<font face=\"sans-serif\"><br></font></tt><font face=\"sans-serif\">b]</font>ar",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"monospace",false,false,"sans-serif"]}],
+["fo[o<span style=font-family:monospace>b]ar</span>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "fo<span style=\"font-family:sans-serif\">[o</span><span style=\"font-family:monospace\"><span style=\"font-family:sans-serif\">b]</span>ar</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["fo[o<span style=font-family:monospace>b]ar</span>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "fo<font face=\"sans-serif\">[o</font><span style=\"font-family:monospace\"><font face=\"sans-serif\">b]</font>ar</span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["foo<span style=font-family:monospace>ba[r</span>b]az",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<span style=\"font-family:monospace\">ba<span style=\"font-family:sans-serif\">[r</span></span><span style=\"font-family:sans-serif\">b]</span>az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"monospace",false,false,"sans-serif"]}],
+["foo<span style=font-family:monospace>ba[r</span>b]az",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<span style=\"font-family:monospace\">ba<font face=\"sans-serif\">[r</font></span><font face=\"sans-serif\">b]</font>az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"monospace",false,false,"sans-serif"]}],
+["fo[o<span style=font-family:monospace>bar</span>b]az",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "fo<span style=\"font-family:sans-serif\">[obarb]</span>az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["fo[o<span style=font-family:monospace>bar</span>b]az",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "fo<font face=\"sans-serif\">[obarb]</font>az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["foo[<span style=font-family:monospace>b]ar</span>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo[<span style=\"font-family:monospace\"><span style=\"font-family:sans-serif\">b]</span>ar</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo[<span style=font-family:monospace>b]ar</span>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo[<span style=\"font-family:monospace\"><font face=\"sans-serif\">b]</font>ar</span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<span style=font-family:monospace>ba[r</span>]baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<span style=\"font-family:monospace\">ba<span style=\"font-family:sans-serif\">[r</span></span>]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<span style=font-family:monospace>ba[r</span>]baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<span style=\"font-family:monospace\">ba<font face=\"sans-serif\">[r</font></span>]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo[<span style=font-family:monospace>bar</span>]baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo[<span style=\"font-family:sans-serif\">bar</span>]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo[<span style=font-family:monospace>bar</span>]baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo[<font face=\"sans-serif\">bar</font>]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<span style=font-family:monospace>[bar]</span>baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo<span style=\"font-family:sans-serif\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo<span style=font-family:monospace>[bar]</span>baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo<font face=\"sans-serif\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo{<span style=font-family:monospace>bar</span>}baz",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "foo{<span style=\"font-family:sans-serif\">bar}</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["foo{<span style=font-family:monospace>bar</span>}baz",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "foo{<font face=\"sans-serif\">bar}</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["fo[o<code>b]ar</code>",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "fo<span style=\"font-family:sans-serif\">[o</span><code><span style=\"font-family:sans-serif\">b]</span>ar</code>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["fo[o<code>b]ar</code>",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "fo<font face=\"sans-serif\">[o</font><code><font face=\"sans-serif\">b]</font>ar</code>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["fo[o<kbd>b]ar</kbd>",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "fo<span style=\"font-family:sans-serif\">[o</span><kbd><span style=\"font-family:sans-serif\">b]</span>ar</kbd>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["fo[o<kbd>b]ar</kbd>",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "fo<font face=\"sans-serif\">[o</font><kbd><font face=\"sans-serif\">b]</font>ar</kbd>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["fo[o<listing>b]ar</listing>",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "fo<span style=\"font-family:sans-serif\">[o</span><listing><span style=\"font-family:sans-serif\">b]</span>ar</listing>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["fo[o<listing>b]ar</listing>",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "fo<font face=\"sans-serif\">[o</font><listing><font face=\"sans-serif\">b]</font>ar</listing>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["fo[o<pre>b]ar</pre>",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "fo<span style=\"font-family:sans-serif\">[o</span><pre><span style=\"font-family:sans-serif\">b]</span>ar</pre>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["fo[o<pre>b]ar</pre>",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "fo<font face=\"sans-serif\">[o</font><pre><font face=\"sans-serif\">b]</font>ar</pre>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["fo[o<samp>b]ar</samp>",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "fo<span style=\"font-family:sans-serif\">[o</span><samp><span style=\"font-family:sans-serif\">b]</span>ar</samp>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["fo[o<samp>b]ar</samp>",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "fo<font face=\"sans-serif\">[o</font><samp><font face=\"sans-serif\">b]</font>ar</samp>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["fo[o<tt>b]ar</tt>",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "fo<span style=\"font-family:sans-serif\">[o</span><tt><span style=\"font-family:sans-serif\">b]</span>ar</tt>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["fo[o<tt>b]ar</tt>",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "fo<font face=\"sans-serif\">[o</font><tt><font face=\"sans-serif\">b]</font>ar</tt>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[true,false,"serif",false,false,"sans-serif"]}],
+["<tt>fo[o</tt><code>b]ar</code>",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<tt>fo<span style=\"font-family:sans-serif\">[o</span></tt><code><span style=\"font-family:sans-serif\">b]</span>ar</code>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["<tt>fo[o</tt><code>b]ar</code>",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<tt>fo<font face=\"sans-serif\">[o</font></tt><code><font face=\"sans-serif\">b]</font>ar</code>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["<pre>fo[o</pre><samp>b]ar</samp>",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<pre>fo<span style=\"font-family:sans-serif\">[o</span></pre><samp><span style=\"font-family:sans-serif\">b]</span>ar</samp>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["<pre>fo[o</pre><samp>b]ar</samp>",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<pre>fo<font face=\"sans-serif\">[o</font></pre><samp><font face=\"sans-serif\">b]</font>ar</samp>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["<span style=font-family:monospace>fo[o</span><kbd>b]ar</kbd>",
+ [["stylewithcss","true"],["fontname","sans-serif"]],
+ "<span style=\"font-family:monospace\">fo<span style=\"font-family:sans-serif\">[o</span></span><kbd><span style=\"font-family:sans-serif\">b]</span>ar</kbd>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}],
+["<span style=font-family:monospace>fo[o</span><kbd>b]ar</kbd>",
+ [["stylewithcss","false"],["fontname","sans-serif"]],
+ "<span style=\"font-family:monospace\">fo<font face=\"sans-serif\">[o</font></span><kbd><font face=\"sans-serif\">b]</font>ar</kbd>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontname":[false,false,"monospace",false,false,"sans-serif"]}]
+]
diff --git a/testing/web-platform/tests/editing/data/fontsize.js b/testing/web-platform/tests/editing/data/fontsize.js
new file mode 100644
index 000000000..8ab0f24c2
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/fontsize.js
@@ -0,0 +1,782 @@
+var browserTests = [
+["foo[]bar",
+ [["fontsize","4"]],
+ "foo[]bar",
+ [true],
+ {"fontsize":[false,false,"3",false,false,"4"]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<p><span style=\"font-size:large\">[foo</span></p> <p><span style=\"font-size:large\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<p><font size=\"4\">[foo</font></p> <p><font size=\"4\">bar]</font></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<span style=\"font-size:large\"><span>[foo</span> <span>bar]</span></span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<font size=\"4\"><span>[foo</span> <span>bar]</span></font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<p><span style=\"font-size:large\">[foo</span></p><p> <span style=\"font-size:large\"><span>bar</span></span> </p><p><span style=\"font-size:large\">baz]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<p><font size=\"4\">[foo</font></p><p> <font size=\"4\"><span>bar</span></font> </p><p><font size=\"4\">baz]</font></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<p><span style=\"font-size:large\">[foo</span></p><p><br></p><p><span style=\"font-size:large\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",true,false,"4"]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<p><font size=\"4\">[foo</font></p><p><br></p><p><font size=\"4\">bar]</font></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",true,false,"4"]}],
+["<b>foo[]bar</b>",
+ [["fontsize","4"]],
+ "<b>foo[]bar</b>",
+ [true],
+ {"fontsize":[false,false,"3",false,false,"4"]}],
+["<i>foo[]bar</i>",
+ [["fontsize","4"]],
+ "<i>foo[]bar</i>",
+ [true],
+ {"fontsize":[false,false,"3",false,false,"4"]}],
+["<span>foo</span>{}<span>bar</span>",
+ [["fontsize","4"]],
+ "<span>foo</span>{}<span>bar</span>",
+ [true],
+ {"fontsize":[false,false,"3",false,false,"4"]}],
+["<span>foo[</span><span>]bar</span>",
+ [["fontsize","4"]],
+ "<span>foo[</span><span>]bar</span>",
+ [true],
+ {"fontsize":[false,false,"3",false,false,"4"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "foo<span style=\"font-size:large\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "foo<font size=\"4\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "foo<span style=\"font-size:large\">[bar</span><b><span style=\"font-size:large\">baz]</span>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "foo<font size=\"4\">[bar</font><b><font size=\"4\">baz]</font>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "foo<span style=\"font-size:large\">[bar</span><i><span style=\"font-size:large\">baz]</span>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "foo<font size=\"4\">[bar</font><i><font size=\"4\">baz]</font>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "{<p></p><p> </p><p><span style=\"font-size:large\">foo</span></p>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "{<p></p><p> </p><p><font size=\"4\">foo</font></p>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["fontsize","1"]],
+ "foo<span style=\"font-size:x-small\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"1"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["fontsize","1"]],
+ "foo<font size=\"1\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"1"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["fontsize","0"]],
+ "foo<span style=\"font-size:x-small\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"1"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["fontsize","0"]],
+ "foo<font size=\"1\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"1"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["fontsize","-5"]],
+ "foo<span style=\"font-size:x-small\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"1"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["fontsize","-5"]],
+ "foo<font size=\"1\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"1"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["fontsize","6"]],
+ "foo<span style=\"font-size:xx-large\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"6"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["fontsize","6"]],
+ "foo<font size=\"6\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"6"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["fontsize","7"]],
+ "foo<font size=\"7\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"7"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["fontsize","7"]],
+ "foo<font size=\"7\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"7"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["fontsize","8"]],
+ "foo<font size=\"7\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"7"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["fontsize","8"]],
+ "foo<font size=\"7\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"7"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["fontsize","100"]],
+ "foo<font size=\"7\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"7"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["fontsize","100"]],
+ "foo<font size=\"7\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"7"]}],
+["foo[bar]baz",
+ [["fontsize","2em"]],
+ "foo[bar]baz",
+ [false],
+ {"fontsize":[false,false,"3",false,false,"3"]}],
+["foo[bar]baz",
+ [["fontsize","20pt"]],
+ "foo[bar]baz",
+ [false],
+ {"fontsize":[false,false,"3",false,false,"3"]}],
+["foo[bar]baz",
+ [["fontsize","xx-large"]],
+ "foo[bar]baz",
+ [false],
+ {"fontsize":[false,false,"3",false,false,"3"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["fontsize"," 1 "]],
+ "foo<span style=\"font-size:x-small\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"1"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["fontsize"," 1 "]],
+ "foo<font size=\"1\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"1"]}],
+["foo[bar]baz",
+ [["fontsize","1."]],
+ "foo[bar]baz",
+ [false],
+ {"fontsize":[false,false,"3",false,false,"3"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["fontsize","1.0"]],
+ "foo<span style=\"font-size:x-small\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"1"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["fontsize","1.0"]],
+ "foo<font size=\"1\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"1"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["fontsize","1.0e2"]],
+ "foo<span style=\"font-size:x-small\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"1"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["fontsize","1.0e2"]],
+ "foo<font size=\"1\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"1"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["fontsize","1.1"]],
+ "foo<span style=\"font-size:x-small\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"1"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["fontsize","1.1"]],
+ "foo<font size=\"1\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"1"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["fontsize","1.9"]],
+ "foo<span style=\"font-size:x-small\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"1"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["fontsize","1.9"]],
+ "foo<font size=\"1\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"1"]}],
+["foo[bar]baz",
+ [["fontsize","+0"]],
+ "foo[bar]baz",
+ [true],
+ {"fontsize":[false,false,"3",false,false,"3"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["fontsize","+1"]],
+ "foo<span style=\"font-size:large\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["fontsize","+1"]],
+ "foo<font size=\"4\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["fontsize","+9"]],
+ "foo<font size=\"7\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"7"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["fontsize","+9"]],
+ "foo<font size=\"7\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"7"]}],
+["foo[bar]baz",
+ [["fontsize","-0"]],
+ "foo[bar]baz",
+ [true],
+ {"fontsize":[false,false,"3",false,false,"3"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["fontsize","-1"]],
+ "foo<span style=\"font-size:small\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"2"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["fontsize","-1"]],
+ "foo<font size=\"2\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"2"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["fontsize","-9"]],
+ "foo<span style=\"font-size:x-small\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"1"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["fontsize","-9"]],
+ "foo<font size=\"1\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"1"]}],
+["foo[bar]baz",
+ [["fontsize",""]],
+ "foo[bar]baz",
+ [false],
+ {"fontsize":[false,false,"3",false,false,"3"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<table><tbody><tr><td>foo</td><td>b<span style=\"font-size:large\">[a]</span>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<table><tbody><tr><td>foo</td><td>b<font size=\"4\">[a]</font>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<table><tbody><tr><td>foo</td>{<td><span style=\"font-size:large\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<table><tbody><tr><td>foo</td>{<td><font size=\"4\">bar</font></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<table><tbody><tr>{<td><span style=\"font-size:large\">foo</span></td><td><span style=\"font-size:large\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<table><tbody><tr>{<td><font size=\"4\">foo</font></td><td><font size=\"4\">bar</font></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<table><tbody>{<tr><td><span style=\"font-size:large\">foo</span></td><td><span style=\"font-size:large\">bar</span></td><td><span style=\"font-size:large\">baz</span></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<table><tbody>{<tr><td><font size=\"4\">foo</font></td><td><font size=\"4\">bar</font></td><td><font size=\"4\">baz</font></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<table>{<tbody><tr><td><span style=\"font-size:large\">foo</span></td><td><span style=\"font-size:large\">bar</span></td><td><span style=\"font-size:large\">baz</span></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<table>{<tbody><tr><td><font size=\"4\">foo</font></td><td><font size=\"4\">bar</font></td><td><font size=\"4\">baz</font></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "{<table><tbody><tr><td><span style=\"font-size:large\">foo</span></td><td><span style=\"font-size:large\">bar</span></td><td><span style=\"font-size:large\">baz</span></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "{<table><tbody><tr><td><font size=\"4\">foo</font></td><td><font size=\"4\">bar</font></td><td><font size=\"4\">baz</font></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["foo<font size=1>[bar]</font>baz",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "foo<span style=\"font-size:large\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"1",false,false,"4"]}],
+["foo<font size=1>[bar]</font>baz",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "foo<font size=\"4\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"1",false,false,"4"]}],
+["<font size=1>foo[bar]baz</font>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<font size=\"1\">foo<span style=\"font-size:large\">[bar]</span>baz</font>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"1",false,false,"4"]}],
+["<font size=1>foo[bar]baz</font>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<font size=\"1\">foo<font size=\"4\">[bar]</font>baz</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"1",false,false,"4"]}],
+["foo<font size=3>[bar]</font>baz",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "foo<span style=\"font-size:large\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["foo<font size=3>[bar]</font>baz",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "foo<font size=\"4\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<font size=3>foo[bar]baz</font>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<font size=\"3\">foo<span style=\"font-size:large\">[bar]</span>baz</font>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<font size=3>foo[bar]baz</font>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<font size=\"3\">foo<font size=\"4\">[bar]</font>baz</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["foo<font size=4>[bar]</font>baz",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "foo<span style=\"font-size:large\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"4",false,false,"4"]}],
+["foo<font size=4>[bar]</font>baz",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "foo<font size=\"4\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"4",false,false,"4"]}],
+["<font size=4>foo[bar]baz</font>",
+ [["fontsize","4"]],
+ "<font size=\"4\">foo[bar]baz</font>",
+ [true],
+ {"fontsize":[false,false,"4",false,false,"4"]}],
+["foo<font size=+1>[bar]</font>baz",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "foo<span style=\"font-size:large\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"4",false,false,"4"]}],
+["foo<font size=+1>[bar]</font>baz",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "foo<font size=\"4\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"4",false,false,"4"]}],
+["<font size=+1>foo[bar]baz</font>",
+ [["fontsize","4"]],
+ "<font size=\"+1\">foo[bar]baz</font>",
+ [true],
+ {"fontsize":[false,false,"4",false,false,"4"]}],
+["<font size=4>foo<font size=1>b[a]r</font>baz</font>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<font size=\"4\">foo<span style=\"font-size:x-small\">b</span>[a]<span style=\"font-size:x-small\">r</span>baz</font>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"1",false,false,"4"]}],
+["<font size=4>foo<font size=1>b[a]r</font>baz</font>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<font size=\"4\">foo<font size=\"1\">b</font>[a]<font size=\"1\">r</font>baz</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"1",false,false,"4"]}],
+["foo<span style=\"font-size: xx-small\">[bar]</span>baz",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "foo<span style=\"font-size:large\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"1",false,false,"4"]}],
+["foo<span style=\"font-size: xx-small\">[bar]</span>baz",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "foo<font size=\"4\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"1",false,false,"4"]}],
+["<span style=\"font-size: xx-small\">foo[bar]baz</span>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<span style=\"font-size:xx-small\">foo<span style=\"font-size:large\">[bar]</span>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"1",false,false,"4"]}],
+["<span style=\"font-size: xx-small\">foo[bar]baz</span>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<span style=\"font-size:xx-small\">foo<font size=\"4\">[bar]</font>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"1",false,false,"4"]}],
+["foo<span style=\"font-size: medium\">[bar]</span>baz",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "foo<span style=\"font-size:large\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["foo<span style=\"font-size: medium\">[bar]</span>baz",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "foo<font size=\"4\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<span style=\"font-size: medium\">foo[bar]baz</span>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<span style=\"font-size:medium\">foo<span style=\"font-size:large\">[bar]</span>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<span style=\"font-size: medium\">foo[bar]baz</span>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<span style=\"font-size:medium\">foo<font size=\"4\">[bar]</font>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["foo<span style=\"font-size: large\">[bar]</span>baz",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "foo<span style=\"font-size:large\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"4",false,false,"4"]}],
+["foo<span style=\"font-size: large\">[bar]</span>baz",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "foo<font size=\"4\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"4",false,false,"4"]}],
+["<span style=\"font-size: large\">foo[bar]baz</span>",
+ [["fontsize","4"]],
+ "<span style=\"font-size:large\">foo[bar]baz</span>",
+ [true],
+ {"fontsize":[false,false,"4",false,false,"4"]}],
+["<span style=\"font-size: large\">foo<span style=\"font-size: xx-small\">b[a]r</span>baz</span>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<span style=\"font-size:large\">foo<span style=\"font-size:xx-small\">b</span>[a]<span style=\"font-size:xx-small\">r</span>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"1",false,false,"4"]}],
+["<span style=\"font-size: large\">foo<span style=\"font-size: xx-small\">b[a]r</span>baz</span>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<span style=\"font-size:large\">foo<span style=\"font-size:xx-small\">b</span>[a]<span style=\"font-size:xx-small\">r</span>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"1",false,false,"4"]}],
+["foo<span style=\"font-size: 2em\">[bar]</span>baz",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "foo<span style=\"font-size:large\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"6",false,false,"4"]}],
+["foo<span style=\"font-size: 2em\">[bar]</span>baz",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "foo<font size=\"4\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"6",false,false,"4"]}],
+["<span style=\"font-size: 2em\">foo[bar]baz</span>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<span style=\"font-size:2em\">foo<span style=\"font-size:large\">[bar]</span>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"6",false,false,"4"]}],
+["<span style=\"font-size: 2em\">foo[bar]baz</span>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<span style=\"font-size:2em\">foo<font size=\"4\">[bar]</font>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"6",false,false,"4"]}],
+["<p style=\"font-size: xx-small\">foo[bar]baz</p>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<p style=\"font-size:xx-small\">foo<span style=\"font-size:large\">[bar]</span>baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"1",false,false,"4"]}],
+["<p style=\"font-size: xx-small\">foo[bar]baz</p>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<p style=\"font-size:xx-small\">foo<font size=\"4\">[bar]</font>baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"1",false,false,"4"]}],
+["<p style=\"font-size: medium\">foo[bar]baz</p>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<p style=\"font-size:medium\">foo<span style=\"font-size:large\">[bar]</span>baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<p style=\"font-size: medium\">foo[bar]baz</p>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<p style=\"font-size:medium\">foo<font size=\"4\">[bar]</font>baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<p style=\"font-size: large\">foo[bar]baz</p>",
+ [["fontsize","4"]],
+ "<p style=\"font-size:large\">foo[bar]baz</p>",
+ [true],
+ {"fontsize":[false,false,"4",false,false,"4"]}],
+["<p style=\"font-size: 2em\">foo[bar]baz</p>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<p style=\"font-size:2em\">foo<span style=\"font-size:large\">[bar]</span>baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"6",false,false,"4"]}],
+["<p style=\"font-size: 2em\">foo[bar]baz</p>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<p style=\"font-size:2em\">foo<font size=\"4\">[bar]</font>baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"6",false,false,"4"]}],
+["<p style=\"font-size: xx-small\">foo[bar]baz</p>",
+ [["stylewithcss","true"],["fontsize","3"]],
+ "<p><span style=\"font-size:xx-small\">foo</span>[bar]<span style=\"font-size:xx-small\">baz</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"1",false,false,"3"]}],
+["<p style=\"font-size: xx-small\">foo[bar]baz</p>",
+ [["stylewithcss","false"],["fontsize","3"]],
+ "<p><span style=\"font-size:xx-small\">foo</span>[bar]<span style=\"font-size:xx-small\">baz</span></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"1",false,false,"3"]}],
+["<p style=\"font-size: medium\">foo[bar]baz</p>",
+ [["fontsize","3"]],
+ "<p style=\"font-size:medium\">foo[bar]baz</p>",
+ [true],
+ {"fontsize":[false,false,"3",false,false,"3"]}],
+["<p style=\"font-size: large\">foo[bar]baz</p>",
+ [["stylewithcss","true"],["fontsize","3"]],
+ "<p><span style=\"font-size:large\">foo</span>[bar]<span style=\"font-size:large\">baz</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"4",false,false,"3"]}],
+["<p style=\"font-size: large\">foo[bar]baz</p>",
+ [["stylewithcss","false"],["fontsize","3"]],
+ "<p><font size=\"4\">foo</font>[bar]<font size=\"4\">baz</font></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"4",false,false,"3"]}],
+["<p style=\"font-size: 2em\">foo[bar]baz</p>",
+ [["stylewithcss","true"],["fontsize","3"]],
+ "<p><span style=\"font-size:2em\">foo</span>[bar]<span style=\"font-size:2em\">baz</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"6",false,false,"3"]}],
+["<p style=\"font-size: 2em\">foo[bar]baz</p>",
+ [["stylewithcss","false"],["fontsize","3"]],
+ "<p><span style=\"font-size:2em\">foo</span>[bar]<span style=\"font-size:2em\">baz</span></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"6",false,false,"3"]}],
+["<font size=6>foo <span style=\"font-size: 2em\">b[a]r</span> baz</font>",
+ [["stylewithcss","true"],["fontsize","3"]],
+ "<span style=\"font-size:xx-large\">foo </span><span style=\"font-size:2em\">b</span>[a]<span style=\"font-size:2em\">r</span><span style=\"font-size:xx-large\"> baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"7",false,false,"3"]}],
+["<font size=6>foo <span style=\"font-size: 2em\">b[a]r</span> baz</font>",
+ [["stylewithcss","false"],["fontsize","3"]],
+ "<font size=\"6\">foo </font><span style=\"font-size:2em\">b</span>[a]<span style=\"font-size:2em\">r</span><font size=\"6\"> baz</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"7",false,false,"3"]}],
+["foo<big>[bar]</big>baz",
+ [["stylewithcss","true"],["fontsize","3"]],
+ "foo<big><span style=\"font-size:medium\">[bar]</span></big>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"4",false,false,"3"]}],
+["foo<big>[bar]</big>baz",
+ [["stylewithcss","false"],["fontsize","3"]],
+ "foo<big><font size=\"3\">[bar]</font></big>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"4",false,false,"3"]}],
+["foo<big>b[a]r</big>baz",
+ [["stylewithcss","true"],["fontsize","3"]],
+ "foo<big>b<span style=\"font-size:medium\">[a]</span>r</big>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"4",false,false,"3"]}],
+["foo<big>b[a]r</big>baz",
+ [["stylewithcss","false"],["fontsize","3"]],
+ "foo<big>b<font size=\"3\">[a]</font>r</big>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"4",false,false,"3"]}],
+["foo<small>[bar]</small>baz",
+ [["stylewithcss","true"],["fontsize","3"]],
+ "foo<small><span style=\"font-size:medium\">[bar]</span></small>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"2",false,false,"3"]}],
+["foo<small>[bar]</small>baz",
+ [["stylewithcss","false"],["fontsize","3"]],
+ "foo<small><font size=\"3\">[bar]</font></small>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"2",false,false,"3"]}],
+["foo<small>b[a]r</small>baz",
+ [["stylewithcss","true"],["fontsize","3"]],
+ "foo<small>b<span style=\"font-size:medium\">[a]</span>r</small>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"2",false,false,"3"]}],
+["foo<small>b[a]r</small>baz",
+ [["stylewithcss","false"],["fontsize","3"]],
+ "foo<small>b<font size=\"3\">[a]</font>r</small>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"2",false,false,"3"]}],
+["fo[o<font size=2>b]ar</font>baz",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "fo<span style=\"font-size:large\">[o</span><font size=\"2\"><span style=\"font-size:large\">b]</span>ar</font>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[true,false,"3",false,false,"4"]}],
+["fo[o<font size=2>b]ar</font>baz",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "fo<font size=\"4\">[o</font><font size=\"2\"><font size=\"4\">b]</font>ar</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[true,false,"3",false,false,"4"]}],
+["foo<font size=2>ba[r</font>b]az",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "foo<font size=\"2\">ba<span style=\"font-size:large\">[r</span></font><span style=\"font-size:large\">b]</span>az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[true,false,"2",false,false,"4"]}],
+["foo<font size=2>ba[r</font>b]az",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "foo<font size=\"2\">ba<font size=\"4\">[r</font></font><font size=\"4\">b]</font>az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[true,false,"2",false,false,"4"]}],
+["fo[o<font size=2>bar</font>b]az",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "fo<span style=\"font-size:large\">[obarb]</span>az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[true,false,"3",false,false,"4"]}],
+["fo[o<font size=2>bar</font>b]az",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "fo<font size=\"4\">[obarb]</font>az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[true,false,"3",false,false,"4"]}],
+["foo[<font size=2>b]ar</font>baz",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "foo[<font size=\"2\"><span style=\"font-size:large\">b]</span>ar</font>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"2",false,false,"4"]}],
+["foo[<font size=2>b]ar</font>baz",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "foo[<font size=\"2\"><font size=\"4\">b]</font>ar</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"2",false,false,"4"]}],
+["foo<font size=2>ba[r</font>]baz",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "foo<font size=\"2\">ba<span style=\"font-size:large\">[r</span></font>]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"2",false,false,"4"]}],
+["foo<font size=2>ba[r</font>]baz",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "foo<font size=\"2\">ba<font size=\"4\">[r</font></font>]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"2",false,false,"4"]}],
+["foo[<font size=2>bar</font>]baz",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "foo[<span style=\"font-size:large\">bar</span>]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"2",false,false,"4"]}],
+["foo[<font size=2>bar</font>]baz",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "foo[<font size=\"4\">bar</font>]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"2",false,false,"4"]}],
+["foo<font size=2>[bar]</font>baz",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "foo<span style=\"font-size:large\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"2",false,false,"4"]}],
+["foo<font size=2>[bar]</font>baz",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "foo<font size=\"4\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"2",false,false,"4"]}],
+["foo{<font size=2>bar</font>}baz",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "foo{<span style=\"font-size:large\">bar}</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"2",false,false,"4"]}],
+["foo{<font size=2>bar</font>}baz",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "foo{<font size=\"4\">bar}</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"2",false,false,"4"]}],
+["<font size=1>fo[o</font><span style=font-size:xx-small>b]ar</span>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<font size=\"1\">fo<span style=\"font-size:large\">[o</span></font><span style=\"font-size:xx-small\"><span style=\"font-size:large\">b]</span>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[true,false,"1",false,false,"4"]}],
+["<font size=1>fo[o</font><span style=font-size:xx-small>b]ar</span>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<font size=\"1\">fo<font size=\"4\">[o</font></font><span style=\"font-size:xx-small\"><font size=\"4\">b]</font>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[true,false,"1",false,false,"4"]}],
+["<font size=2>fo[o</font><span style=font-size:small>b]ar</span>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<font size=\"2\">fo<span style=\"font-size:large\">[o</span></font><span style=\"font-size:small\"><span style=\"font-size:large\">b]</span>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"2",false,false,"4"]}],
+["<font size=2>fo[o</font><span style=font-size:small>b]ar</span>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<font size=\"2\">fo<font size=\"4\">[o</font></font><span style=\"font-size:small\"><font size=\"4\">b]</font>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"2",false,false,"4"]}],
+["<font size=3>fo[o</font><span style=font-size:medium>b]ar</span>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<font size=\"3\">fo<span style=\"font-size:large\">[o</span></font><span style=\"font-size:medium\"><span style=\"font-size:large\">b]</span>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<font size=3>fo[o</font><span style=font-size:medium>b]ar</span>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<font size=\"3\">fo<font size=\"4\">[o</font></font><span style=\"font-size:medium\"><font size=\"4\">b]</font>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"3",false,false,"4"]}],
+["<font size=4>fo[o</font><span style=font-size:large>b]ar</span>",
+ [["fontsize","4"]],
+ "<font size=\"4\">fo[o</font><span style=\"font-size:large\">b]ar</span>",
+ [true],
+ {"fontsize":[false,false,"4",false,false,"4"]}],
+["<font size=5>fo[o</font><span style=font-size:x-large>b]ar</span>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<font size=\"5\">fo<span style=\"font-size:large\">[o</span></font><span style=\"font-size:x-large\"><span style=\"font-size:large\">b]</span>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"5",false,false,"4"]}],
+["<font size=5>fo[o</font><span style=font-size:x-large>b]ar</span>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<font size=\"5\">fo<font size=\"4\">[o</font></font><span style=\"font-size:x-large\"><font size=\"4\">b]</font>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"5",false,false,"4"]}],
+["<font size=6>fo[o</font><span style=font-size:xx-large>b]ar</span>",
+ [["stylewithcss","true"],["fontsize","4"]],
+ "<font size=\"6\">fo<span style=\"font-size:large\">[o</span></font><span style=\"font-size:xx-large\"><span style=\"font-size:large\">b]</span>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"fontsize":[false,false,"6",false,false,"4"]}],
+["<font size=6>fo[o</font><span style=font-size:xx-large>b]ar</span>",
+ [["stylewithcss","false"],["fontsize","4"]],
+ "<font size=\"6\">fo<font size=\"4\">[o</font></font><span style=\"font-size:xx-large\"><font size=\"4\">b]</font>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"fontsize":[false,false,"6",false,false,"4"]}]
+]
diff --git a/testing/web-platform/tests/editing/data/forecolor.js b/testing/web-platform/tests/editing/data/forecolor.js
new file mode 100644
index 000000000..5278f0953
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/forecolor.js
@@ -0,0 +1,737 @@
+var browserTests = [
+["foo[]bar",
+ [["forecolor","#0000FF"]],
+ "foo[]bar",
+ [true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<p><span style=\"color:rgb(0, 0, 255)\">[foo</span></p> <p><span style=\"color:rgb(0, 0, 255)\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<p><font color=\"#0000ff\">[foo</font></p> <p><font color=\"#0000ff\">bar]</font></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\"><span>[foo</span> <span>bar]</span></span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"#0000ff\"><span>[foo</span> <span>bar]</span></font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<p><span style=\"color:rgb(0, 0, 255)\">[foo</span></p><p> <span style=\"color:rgb(0, 0, 255)\"><span>bar</span></span> </p><p><span style=\"color:rgb(0, 0, 255)\">baz]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<p><font color=\"#0000ff\">[foo</font></p><p> <font color=\"#0000ff\"><span>bar</span></font> </p><p><font color=\"#0000ff\">baz]</font></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<p><span style=\"color:rgb(0, 0, 255)\">[foo</span></p><p><span style=\"color:rgb(0, 0, 255)\"><br></span></p><p><span style=\"color:rgb(0, 0, 255)\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<p><font color=\"#0000ff\">[foo</font></p><p><font color=\"#0000ff\"><br></font></p><p><font color=\"#0000ff\">bar]</font></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<b>foo[]bar</b>",
+ [["forecolor","#0000FF"]],
+ "<b>foo[]bar</b>",
+ [true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<i>foo[]bar</i>",
+ [["forecolor","#0000FF"]],
+ "<i>foo[]bar</i>",
+ [true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<span>foo</span>{}<span>bar</span>",
+ [["forecolor","#0000FF"]],
+ "<span>foo</span>{}<span>bar</span>",
+ [true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<span>foo[</span><span>]bar</span>",
+ [["forecolor","#0000FF"]],
+ "<span>foo[</span><span>]bar</span>",
+ [true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "foo<span style=\"color:rgb(0, 0, 255)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "foo<font color=\"#0000ff\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "foo<span style=\"color:rgb(0, 0, 255)\">[bar</span><b><span style=\"color:rgb(0, 0, 255)\">baz]</span>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "foo<font color=\"#0000ff\">[bar</font><b><font color=\"#0000ff\">baz]</font>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "foo<span style=\"color:rgb(0, 0, 255)\">[bar</span><i><span style=\"color:rgb(0, 0, 255)\">baz]</span>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "foo<font color=\"#0000ff\">[bar</font><i><font color=\"#0000ff\">baz]</font>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "{<p></p><p> </p><p><span style=\"color:rgb(0, 0, 255)\">foo</span></p>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "{<p></p><p> </p><p><font color=\"#0000ff\">foo</font></p>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["forecolor","blue"]],
+ "foo<span style=\"color:rgb(0, 0, 255)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["forecolor","blue"]],
+ "foo<font color=\"#0000ff\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["forecolor","f"]],
+ "foo[bar]baz",
+ [true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"]}],
+["foo[bar]baz",
+ [["forecolor","#f"]],
+ "foo[bar]baz",
+ [true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["forecolor","00f"]],
+ "foo<span style=\"color:rgb(0, 0, 255)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["forecolor","00f"]],
+ "foo<font color=\"#0000ff\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["forecolor","#00f"]],
+ "foo<span style=\"color:rgb(0, 0, 255)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["forecolor","#00f"]],
+ "foo<font color=\"#0000ff\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["forecolor","0000ff"]],
+ "foo<span style=\"color:rgb(0, 0, 255)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["forecolor","0000ff"]],
+ "foo<font color=\"#0000ff\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["forecolor","#0000ff"]],
+ "foo<span style=\"color:rgb(0, 0, 255)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["forecolor","#0000ff"]],
+ "foo<font color=\"#0000ff\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["forecolor","000000fff"]],
+ "foo[bar]baz",
+ [true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"]}],
+["foo[bar]baz",
+ [["forecolor","#000000fff"]],
+ "foo[bar]baz",
+ [true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["forecolor","rgb(0, 0, 255)"]],
+ "foo<span style=\"color:rgb(0, 0, 255)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["forecolor","rgb(0, 0, 255)"]],
+ "foo<font color=\"#0000ff\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["forecolor","rgb(0%, 0%, 100%)"]],
+ "foo<span style=\"color:rgb(0, 0, 255)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["forecolor","rgb(0%, 0%, 100%)"]],
+ "foo<font color=\"#0000ff\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["forecolor","rgb( 0 ,0 ,255)"]],
+ "foo<span style=\"color:rgb(0, 0, 255)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["forecolor","rgb( 0 ,0 ,255)"]],
+ "foo<font color=\"#0000ff\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["forecolor","rgba(0, 0, 255, 0.0)"]],
+ "foo<span style=\"color:rgba(0, 0, 0, 0)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgba(0, 0, 255, 0)"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["forecolor","rgba(0, 0, 255, 0.0)"]],
+ "foo<span style=\"color:rgba(0, 0, 0, 0)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgba(0, 0, 255, 0)"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["forecolor","rgb(15, -10, 375)"]],
+ "foo<span style=\"color:rgb(15, 0, 255)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(15, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["forecolor","rgb(15, -10, 375)"]],
+ "foo<font color=\"#0f00ff\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(15, 0, 255)"]}],
+["foo[bar]baz",
+ [["forecolor","rgba(0, 0, 0, 1)"]],
+ "foo[bar]baz",
+ [true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["forecolor","rgba(255, 255, 255, 1)"]],
+ "foo<span style=\"color:rgb(255, 255, 255)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(255, 255, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["forecolor","rgba(255, 255, 255, 1)"]],
+ "foo<font color=\"#ffffff\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(255, 255, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["forecolor","rgba(0, 0, 255, 0.5)"]],
+ "foo<span style=\"color:rgba(0, 0, 255, 0.5)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgba(0, 0, 255, 0.5)"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["forecolor","rgba(0, 0, 255, 0.5)"]],
+ "foo<span style=\"color:rgba(0, 0, 255, 0.5)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgba(0, 0, 255, 0.5)"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["forecolor","hsl(240, 100%, 50%)"]],
+ "foo<span style=\"color:rgb(0, 0, 255)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["forecolor","hsl(240, 100%, 50%)"]],
+ "foo<font color=\"#0000ff\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["forecolor","cornsilk"]],
+ "foo<span style=\"color:rgb(255, 248, 220)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(255, 248, 220)"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["forecolor","cornsilk"]],
+ "foo<font color=\"#fff8dc\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(255, 248, 220)"]}],
+["foo[bar]baz",
+ [["forecolor","potato quiche"]],
+ "foo[bar]baz",
+ [true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["forecolor","transparent"]],
+ "foo<span style=\"color:rgba(0, 0, 0, 0)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgba(0, 0, 0, 0)"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["forecolor","transparent"]],
+ "foo<span style=\"color:rgba(0, 0, 0, 0)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgba(0, 0, 0, 0)"]}],
+["foo[bar]baz",
+ [["forecolor","currentColor"]],
+ "foo[bar]baz",
+ [false],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<table><tbody><tr><td>foo</td><td>b<span style=\"color:rgb(0, 0, 255)\">[a]</span>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<table><tbody><tr><td>foo</td><td>b<font color=\"#0000ff\">[a]</font>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<table><tbody><tr><td>foo</td>{<td><span style=\"color:rgb(0, 0, 255)\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<table><tbody><tr><td>foo</td>{<td><font color=\"#0000ff\">bar</font></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<table><tbody><tr>{<td><span style=\"color:rgb(0, 0, 255)\">foo</span></td><td><span style=\"color:rgb(0, 0, 255)\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<table><tbody><tr>{<td><font color=\"#0000ff\">foo</font></td><td><font color=\"#0000ff\">bar</font></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<table><tbody>{<tr><td><span style=\"color:rgb(0, 0, 255)\">foo</span></td><td><span style=\"color:rgb(0, 0, 255)\">bar</span></td><td><span style=\"color:rgb(0, 0, 255)\">baz</span></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<table><tbody>{<tr><td><font color=\"#0000ff\">foo</font></td><td><font color=\"#0000ff\">bar</font></td><td><font color=\"#0000ff\">baz</font></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<table>{<tbody><tr><td><span style=\"color:rgb(0, 0, 255)\">foo</span></td><td><span style=\"color:rgb(0, 0, 255)\">bar</span></td><td><span style=\"color:rgb(0, 0, 255)\">baz</span></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<table>{<tbody><tr><td><font color=\"#0000ff\">foo</font></td><td><font color=\"#0000ff\">bar</font></td><td><font color=\"#0000ff\">baz</font></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "{<table><tbody><tr><td><span style=\"color:rgb(0, 0, 255)\">foo</span></td><td><span style=\"color:rgb(0, 0, 255)\">bar</span></td><td><span style=\"color:rgb(0, 0, 255)\">baz</span></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "{<table><tbody><tr><td><font color=\"#0000ff\">foo</font></td><td><font color=\"#0000ff\">bar</font></td><td><font color=\"#0000ff\">baz</font></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo<font color=blue>[bar]</font>baz",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "foo<span style=\"color:rgb(0, 0, 255)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["foo<font color=blue>[bar]</font>baz",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "foo<font color=\"#0000ff\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["foo{<font color=blue>bar</font>}baz",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "foo{<span style=\"color:rgb(0, 0, 255)\">bar}</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["foo{<font color=blue>bar</font>}baz",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "foo{<font color=\"#0000ff\">bar}</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: blue\">foo<span style=\"color: brown\">[bar]</span>baz</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: blue\">foo<span style=\"color: brown\">[bar]</span>baz</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: #00f\">foo<span style=\"color: brown\">[bar]</span>baz</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: #00f\">foo<span style=\"color: brown\">[bar]</span>baz</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: #0000ff\">foo<span style=\"color: brown\">[bar]</span>baz</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: #0000ff\">foo<span style=\"color: brown\">[bar]</span>baz</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgb(0, 0, 255)\">foo<span style=\"color: brown\">[bar]</span>baz</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgb(0, 0, 255)\">foo<span style=\"color: brown\">[bar]</span>baz</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["<font color=blue>foo<font color=brown>[bar]</font>baz</font>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<font color=\"blue\">foo[bar]baz</font>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["<font color=blue>foo<font color=brown>[bar]</font>baz</font>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"blue\">foo[bar]baz</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgb(0, 0, 255)\">foo<span style=\"color: brown\">b[ar]</span>baz</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">foo<span style=\"color:rgb(165, 42, 42)\">b</span>[ar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgb(0, 0, 255)\">foo<span style=\"color: brown\">b[ar]</span>baz</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">foo<font color=\"#a52a2a\">b</font>[ar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["foo<span id=purple>ba[r</span>ba]z",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "foo<span id=\"purple\">ba<span style=\"color:rgb(0, 0, 255)\">[r</span></span><span style=\"color:rgb(0, 0, 255)\">ba]</span>z",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[true,false,"rgb(128, 0, 128)",false,false,"rgb(0, 0, 255)"]}],
+["foo<span id=purple>ba[r</span>ba]z",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "foo<span id=\"purple\">ba<font color=\"#0000ff\">[r</font></span><font color=\"#0000ff\">ba]</font>z",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[true,false,"rgb(128, 0, 128)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgb(0, 0, 255)\">foo<span id=purple>b[a]r</span>baz</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">foo<span id=\"purple\">b<span style=\"color:rgb(0, 0, 255)\">[a]</span>r</span>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(128, 0, 128)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgb(0, 0, 255)\">foo<span id=purple>b[a]r</span>baz</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">foo<span id=\"purple\">b<font color=\"#0000ff\">[a]</font>r</span>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(128, 0, 128)",false,false,"rgb(0, 0, 255)"]}],
+["<a href=http://www.google.com>foo[bar]baz</a>",
+ [["forecolor","blue"]],
+ "<a href=\"http://www.google.com\">foo[bar]baz</a>",
+ [true],
+ {"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<a href=http://www.google.com>foo[bar]baz</a>",
+ [["forecolor","#0000ff"]],
+ "<a href=\"http://www.google.com\">foo[bar]baz</a>",
+ [true],
+ {"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<a href=http://www.google.com>foo[bar]baz</a>",
+ [["forecolor","rgb(0,0,255)"]],
+ "<a href=\"http://www.google.com\">foo[bar]baz</a>",
+ [true],
+ {"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<font color=\"blue\">[foo]</font>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">[foo]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<font color=\"blue\">[foo]</font>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"#0000ff\">[foo]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<font color=\"0000ff\">[foo]</font>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">[foo]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<font color=\"0000ff\">[foo]</font>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"#0000ff\">[foo]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<font color=\"#0000ff\">[foo]</font>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">[foo]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<font color=\"#0000ff\">[foo]</font>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"#0000ff\">[foo]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: blue\">[foo]</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">[foo]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: blue\">[foo]</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"#0000ff\">[foo]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: #0000ff\">[foo]</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">[foo]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: #0000ff\">[foo]</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"#0000ff\">[foo]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgb(0, 0, 255)\">[foo]</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">[foo]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgb(0, 0, 255)\">[foo]</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"#0000ff\">[foo]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgb(0%, 0%, 100%)\">[foo]</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">[foo]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgb(0%, 0%, 100%)\">[foo]</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"#0000ff\">[foo]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgb( 0 ,0 ,255)\">[foo]</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">[foo]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgb( 0 ,0 ,255)\">[foo]</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"#0000ff\">[foo]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgba(0, 0, 255, 0.0)\">[foo]</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">[foo]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgba(0, 0, 255, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgba(0, 0, 255, 0.0)\">[foo]</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"#0000ff\">[foo]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgba(0, 0, 255, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgb(15, -10, 375)\">[foo]</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">[foo]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(15, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgb(15, -10, 375)\">[foo]</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"#0000ff\">[foo]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(15, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgba(0, 0, 0, 1)\">[foo]</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">[foo]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgba(0, 0, 0, 1)\">[foo]</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"#0000ff\">[foo]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgba(255, 255, 255, 1)\">[foo]</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">[foo]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(255, 255, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgba(255, 255, 255, 1)\">[foo]</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"#0000ff\">[foo]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(255, 255, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgba(0, 0, 255, 0.5)\">[foo]</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">[foo]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgba(0, 0, 255, 0.5)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: rgba(0, 0, 255, 0.5)\">[foo]</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"#0000ff\">[foo]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgba(0, 0, 255, 0.5)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: hsl(240, 100%, 50%)\">[foo]</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">[foo]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: hsl(240, 100%, 50%)\">[foo]</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"#0000ff\">[foo]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 255)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: cornsilk\">[foo]</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">[foo]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(255, 248, 220)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: cornsilk\">[foo]</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"#0000ff\">[foo]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(255, 248, 220)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: transparent\">[foo]</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">[foo]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: transparent\">[foo]</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"#0000ff\">[foo]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: currentColor\">[foo]</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(0, 0, 255)\">[foo]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=\"color: currentColor\">[foo]</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"#0000ff\">[foo]</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["fo[o<font color=brown>b]ar</font>baz",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "fo<span style=\"color:rgb(0, 0, 255)\">[o</span><font color=\"brown\"><span style=\"color:rgb(0, 0, 255)\">b]</span>ar</font>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[true,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["fo[o<font color=brown>b]ar</font>baz",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "fo<font color=\"#0000ff\">[o</font><font color=\"brown\"><font color=\"#0000ff\">b]</font>ar</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[true,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo<font color=brown>ba[r</font>b]az",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "foo<font color=\"brown\">ba<span style=\"color:rgb(0, 0, 255)\">[r</span></font><span style=\"color:rgb(0, 0, 255)\">b]</span>az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[true,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["foo<font color=brown>ba[r</font>b]az",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "foo<font color=\"brown\">ba<font color=\"#0000ff\">[r</font></font><font color=\"#0000ff\">b]</font>az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[true,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["fo[o<font color=brown>bar</font>b]az",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "fo<span style=\"color:rgb(0, 0, 255)\">[obarb]</span>az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[true,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["fo[o<font color=brown>bar</font>b]az",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "fo<font color=\"#0000ff\">[obarb]</font>az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[true,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"]}],
+["foo[<font color=brown>b]ar</font>baz",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "foo[<font color=\"brown\"><span style=\"color:rgb(0, 0, 255)\">b]</span>ar</font>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["foo[<font color=brown>b]ar</font>baz",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "foo[<font color=\"brown\"><font color=\"#0000ff\">b]</font>ar</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["foo<font color=brown>ba[r</font>]baz",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "foo<font color=\"brown\">ba<span style=\"color:rgb(0, 0, 255)\">[r</span></font>]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["foo<font color=brown>ba[r</font>]baz",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "foo<font color=\"brown\">ba<font color=\"#0000ff\">[r</font></font>]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["foo[<font color=brown>bar</font>]baz",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "foo[<span style=\"color:rgb(0, 0, 255)\">bar</span>]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["foo[<font color=brown>bar</font>]baz",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "foo[<font color=\"#0000ff\">bar</font>]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["foo<font color=brown>[bar]</font>baz",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "foo<span style=\"color:rgb(0, 0, 255)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["foo<font color=brown>[bar]</font>baz",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "foo<font color=\"#0000ff\">[bar]</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["foo{<font color=brown>bar</font>}baz",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "foo{<span style=\"color:rgb(0, 0, 255)\">bar}</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["foo{<font color=brown>bar</font>}baz",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "foo{<font color=\"#0000ff\">bar}</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["<font color=brown>fo[o</font><span style=color:brown>b]ar</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<font color=\"brown\">fo<span style=\"color:rgb(0, 0, 255)\">[o</span></font><span style=\"color:rgb(165, 42, 42)\"><span style=\"color:rgb(0, 0, 255)\">b]</span>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["<font color=brown>fo[o</font><span style=color:brown>b]ar</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<font color=\"brown\">fo<font color=\"#0000ff\">[o</font></font><span style=\"color:rgb(165, 42, 42)\"><font color=\"#0000ff\">b]</font>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[false,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=color:brown>fo[o</span><span style=color:#0000ff>b]ar</span>",
+ [["stylewithcss","true"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(165, 42, 42)\">fo<span style=\"color:rgb(0, 0, 255)\">[o</span></span><span style=\"color:rgb(0, 0, 255)\">b]ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forecolor":[true,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}],
+["<span style=color:brown>fo[o</span><span style=color:#0000ff>b]ar</span>",
+ [["stylewithcss","false"],["forecolor","#0000FF"]],
+ "<span style=\"color:rgb(165, 42, 42)\">fo<font color=\"#0000ff\">[o</font></span><span style=\"color:rgb(0, 0, 255)\">b]ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forecolor":[true,false,"rgb(165, 42, 42)",false,false,"rgb(0, 0, 255)"]}]
+]
diff --git a/testing/web-platform/tests/editing/data/formatblock.js b/testing/web-platform/tests/editing/data/formatblock.js
new file mode 100644
index 000000000..39c20e268
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/formatblock.js
@@ -0,0 +1,1782 @@
+var browserTests = [
+["foo[]bar<p>extra",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>foo[]bar</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["foo[]bar<p>extra",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>foo[]bar</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["<span>foo</span>{}<span>bar</span><p>extra",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div><span>foo</span>{}<span>bar</span></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["<span>foo</span>{}<span>bar</span><p>extra",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div><span>foo</span>{}<span>bar</span></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["<span>foo[</span><span>]bar</span><p>extra",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div><span>foo[</span><span>]bar</span></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["<span>foo[</span><span>]bar</span><p>extra",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div><span>foo[</span><span>]bar</span></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["foo[bar]baz<p>extra",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>foo[bar]baz</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["foo[bar]baz<p>extra",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>foo[bar]baz</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["foo]bar[baz<p>extra",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>foo[bar]baz</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["foo]bar[baz<p>extra",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>foo[bar]baz</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["{<p><p> <p>foo</p>}",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>{ foo}</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"div"]}],
+["{<p><p> <p>foo</p>}",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>{ foo}</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"div"]}],
+["foo[bar<i>baz]qoz</i>quz<p>extra",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>foo[bar<i>baz]qoz</i>quz</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["foo[bar<i>baz]qoz</i>quz<p>extra",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>foo[bar<i>baz]qoz</i>quz</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<table><tbody><tr><td>foo</td><td><div>b[a]r</div></td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<table><tbody><tr><td>foo</td><td><div>b[a]r</div></td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<table><tbody><tr><td>foo</td>{<td><div>bar</div></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<table><tbody><tr><td>foo</td>{<td><div>bar</div></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<table><tbody><tr>{<td><div>foo</div></td><td><div>bar</div></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<table><tbody><tr>{<td><div>foo</div></td><td><div>bar</div></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<table><tbody>{<tr><td><div>foo</div></td><td><div>bar</div></td><td><div>baz</div></td></tr>}</tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<table><tbody>{<tr><td><div>foo</div></td><td><div>bar</div></td><td><div>baz</div></td></tr>}</tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<table>{<tbody><tr><td><div>foo</div></td><td><div>bar</div></td><td><div>baz</div></td></tr></tbody>}</table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<table>{<tbody><tr><td><div>foo</div></td><td><div>bar</div></td><td><div>baz</div></td></tr></tbody>}</table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "{<table><tbody><tr><td><div>foo</div></td><td><div>bar</div></td><td><div>baz</div></td></tr></tbody></table>}",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "{<table><tbody><tr><td><div>foo</div></td><td><div>bar</div></td><td><div>baz</div></td></tr></tbody></table>}",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["<div>[foobar]</div>",
+ [["formatblock","<div>"]],
+ "<div>[foobar]</div>",
+ [true],
+ {"formatblock":[false,false,"div",false,false,"div"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>[foobar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"div"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>[foobar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"div"]}],
+["<blockquote>[foobar]</blockquote>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<blockquote><div>[foobar]</div></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["<blockquote>[foobar]</blockquote>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<blockquote><div>[foobar]</div></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["<h1>[foobar]</h1>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>[foobar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"h1",false,false,"div"]}],
+["<h1>[foobar]</h1>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>[foobar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"h1",false,false,"div"]}],
+["<h2>[foobar]</h2>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>[foobar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"h2",false,false,"div"]}],
+["<h2>[foobar]</h2>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>[foobar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"h2",false,false,"div"]}],
+["<h3>[foobar]</h3>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>[foobar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"h3",false,false,"div"]}],
+["<h3>[foobar]</h3>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>[foobar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"h3",false,false,"div"]}],
+["<h4>[foobar]</h4>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>[foobar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"h4",false,false,"div"]}],
+["<h4>[foobar]</h4>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>[foobar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"h4",false,false,"div"]}],
+["<h5>[foobar]</h5>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>[foobar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"h5",false,false,"div"]}],
+["<h5>[foobar]</h5>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>[foobar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"h5",false,false,"div"]}],
+["<h6>[foobar]</h6>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>[foobar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"h6",false,false,"div"]}],
+["<h6>[foobar]</h6>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>[foobar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"h6",false,false,"div"]}],
+["<dl><dt>[foo]<dd>bar</dl>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>[foo]</div><dl><dd>bar</dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"dt",false,false,"div"]}],
+["<dl><dt>[foo]<dd>bar</dl>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>[foo]</div><dl><dd>bar</dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"dt",false,false,"div"]}],
+["<dl><dt>foo<dd>[bar]</dl>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<dl><dt>foo</dt></dl><div>[bar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"dd",false,false,"div"]}],
+["<dl><dt>foo<dd>[bar]</dl>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<dl><dt>foo</dt></dl><div>[bar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"dd",false,false,"div"]}],
+["<dl><dt>[foo<dd>bar]</dl>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>[foo</div><div>bar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[true,false,"dt",false,false,"div"]}],
+["<dl><dt>[foo<dd>bar]</dl>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>[foo</div><div>bar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[true,false,"dt",false,false,"div"]}],
+["<ol><li>[foobar]</ol>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<ol><li><div>[foobar]</div></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["<ol><li>[foobar]</ol>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<ol><li><div>[foobar]</div></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["<ul><li>[foobar]</ul>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<ul><li><div>[foobar]</div></li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["<ul><li>[foobar]</ul>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<ul><li><div>[foobar]</div></li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["<address>[foobar]</address>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>[foobar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"address",false,false,"div"]}],
+["<address>[foobar]</address>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>[foobar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"address",false,false,"div"]}],
+["<pre>[foobar]</pre>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>[foobar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"pre",false,false,"div"]}],
+["<pre>[foobar]</pre>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>[foobar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"pre",false,false,"div"]}],
+["<article>[foobar]</article>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<article><div>[foobar]</div></article>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["<article>[foobar]</article>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<article><div>[foobar]</div></article>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["<ins>[foobar]</ins>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div><ins>[foobar]</ins></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["<ins>[foobar]</ins>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div><ins>[foobar]</ins></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["<del>[foobar]</del>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div><del>[foobar]</del></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["<del>[foobar]</del>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div><del>[foobar]</del></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["<quasit>[foobar]</quasit>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div><quasit>[foobar]</quasit></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["<quasit>[foobar]</quasit>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div><quasit>[foobar]</quasit></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["<quasit style=\"display: block\">[foobar]</quasit>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div><quasit style=\"display:block\">[foobar]</quasit></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["<quasit style=\"display: block\">[foobar]</quasit>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div><quasit style=\"display:block\">[foobar]</quasit></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["foo[]bar<p>extra",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>foo[]bar</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["foo[]bar<p>extra",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>foo[]bar</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["<span>foo</span>{}<span>bar</span><p>extra",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p><span>foo</span>{}<span>bar</span></p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["<span>foo</span>{}<span>bar</span><p>extra",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p><span>foo</span>{}<span>bar</span></p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["<span>foo[</span><span>]bar</span><p>extra",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p><span>foo[</span><span>]bar</span></p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["<span>foo[</span><span>]bar</span><p>extra",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p><span>foo[</span><span>]bar</span></p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["foo[bar]baz<p>extra",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>foo[bar]baz</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["foo[bar]baz<p>extra",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>foo[bar]baz</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["foo]bar[baz<p>extra",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>foo[bar]baz</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["foo]bar[baz<p>extra",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>foo[bar]baz</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["{<p><p> <p>foo</p>}",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>{ foo}</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"p"]}],
+["{<p><p> <p>foo</p>}",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>{ foo}</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"p"]}],
+["foo[bar<i>baz]qoz</i>quz<p>extra",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>foo[bar<i>baz]qoz</i>quz</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["foo[bar<i>baz]qoz</i>quz<p>extra",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>foo[bar<i>baz]qoz</i>quz</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<table><tbody><tr><td>foo</td><td><p>b[a]r</p></td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<table><tbody><tr><td>foo</td><td><p>b[a]r</p></td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<table><tbody><tr><td>foo</td>{<td><p>bar</p></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<table><tbody><tr><td>foo</td>{<td><p>bar</p></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<table><tbody><tr>{<td><p>foo</p></td><td><p>bar</p></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<table><tbody><tr>{<td><p>foo</p></td><td><p>bar</p></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<table><tbody>{<tr><td><p>foo</p></td><td><p>bar</p></td><td><p>baz</p></td></tr>}</tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<table><tbody>{<tr><td><p>foo</p></td><td><p>bar</p></td><td><p>baz</p></td></tr>}</tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<table>{<tbody><tr><td><p>foo</p></td><td><p>bar</p></td><td><p>baz</p></td></tr></tbody>}</table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<table>{<tbody><tr><td><p>foo</p></td><td><p>bar</p></td><td><p>baz</p></td></tr></tbody>}</table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "{<table><tbody><tr><td><p>foo</p></td><td><p>bar</p></td><td><p>baz</p></td></tr></tbody></table>}",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "{<table><tbody><tr><td><p>foo</p></td><td><p>bar</p></td><td><p>baz</p></td></tr></tbody></table>}",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"div",false,false,"p"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"div",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<blockquote>[foobar]</blockquote>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<blockquote><p>[foobar]</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["<blockquote>[foobar]</blockquote>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<blockquote><p>[foobar]</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["<h1>[foobar]</h1>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"h1",false,false,"p"]}],
+["<h1>[foobar]</h1>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"h1",false,false,"p"]}],
+["<h2>[foobar]</h2>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"h2",false,false,"p"]}],
+["<h2>[foobar]</h2>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"h2",false,false,"p"]}],
+["<h3>[foobar]</h3>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"h3",false,false,"p"]}],
+["<h3>[foobar]</h3>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"h3",false,false,"p"]}],
+["<h4>[foobar]</h4>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"h4",false,false,"p"]}],
+["<h4>[foobar]</h4>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"h4",false,false,"p"]}],
+["<h5>[foobar]</h5>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"h5",false,false,"p"]}],
+["<h5>[foobar]</h5>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"h5",false,false,"p"]}],
+["<h6>[foobar]</h6>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"h6",false,false,"p"]}],
+["<h6>[foobar]</h6>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"h6",false,false,"p"]}],
+["<dl><dt>[foo]<dd>bar</dl>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foo]</p><dl><dd>bar</dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"dt",false,false,"p"]}],
+["<dl><dt>[foo]<dd>bar</dl>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foo]</p><dl><dd>bar</dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"dt",false,false,"p"]}],
+["<dl><dt>foo<dd>[bar]</dl>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<dl><dt>foo</dt></dl><p>[bar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"dd",false,false,"p"]}],
+["<dl><dt>foo<dd>[bar]</dl>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<dl><dt>foo</dt></dl><p>[bar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"dd",false,false,"p"]}],
+["<dl><dt>[foo<dd>bar]</dl>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[true,false,"dt",false,false,"p"]}],
+["<dl><dt>[foo<dd>bar]</dl>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[true,false,"dt",false,false,"p"]}],
+["<ol><li>[foobar]</ol>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<ol><li><p>[foobar]</p></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["<ol><li>[foobar]</ol>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<ol><li><p>[foobar]</p></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["<ul><li>[foobar]</ul>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<ul><li><p>[foobar]</p></li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["<ul><li>[foobar]</ul>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<ul><li><p>[foobar]</p></li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["<address>[foobar]</address>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"address",false,false,"p"]}],
+["<address>[foobar]</address>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"address",false,false,"p"]}],
+["<pre>[foobar]</pre>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"pre",false,false,"p"]}],
+["<pre>[foobar]</pre>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"pre",false,false,"p"]}],
+["<listing>[foobar]</listing>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["<listing>[foobar]</listing>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["<xmp>[foobar]</xmp>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["<xmp>[foobar]</xmp>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["<article>[foobar]</article>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<article><p>[foobar]</p></article>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["<article>[foobar]</article>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<article><p>[foobar]</p></article>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["<ins>[foobar]</ins>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p><ins>[foobar]</ins></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["<ins>[foobar]</ins>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p><ins>[foobar]</ins></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["<del>[foobar]</del>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p><del>[foobar]</del></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["<del>[foobar]</del>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p><del>[foobar]</del></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["<quasit>[foobar]</quasit>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p><quasit>[foobar]</quasit></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["<quasit>[foobar]</quasit>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p><quasit>[foobar]</quasit></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["<quasit style=\"display: block\">[foobar]</quasit>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p><quasit style=\"display:block\">[foobar]</quasit></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["<quasit style=\"display: block\">[foobar]</quasit>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p><quasit style=\"display:block\">[foobar]</quasit></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["<blockquote>[foo]</blockquote><p>extra",
+ [["formatblock","<blockquote>"]],
+ "<blockquote>[foo]</blockquote><p>extra</p>",
+ [false],
+ {"formatblock":[false,false,"",false,false,""]}],
+["<blockquote><p>[foo]<p>bar</blockquote><p>extra",
+ [["formatblock","<blockquote>"]],
+ "<blockquote><p>[foo]</p><p>bar</p></blockquote><p>extra</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["[foo]<blockquote>bar</blockquote><p>extra",
+ [["formatblock","<blockquote>"]],
+ "[foo]<blockquote>bar</blockquote><p>extra</p>",
+ [false],
+ {"formatblock":[false,false,"",false,false,""]}],
+["<p>[foo<p>bar]<p>baz",
+ [["formatblock","<blockquote>"]],
+ "<p>[foo</p><p>bar]</p><p>baz</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<section>[foo]</section>",
+ [["formatblock","<blockquote>"]],
+ "<section>[foo]</section>",
+ [false],
+ {"formatblock":[false,false,"",false,false,""]}],
+["<section><p>[foo]</section>",
+ [["formatblock","<blockquote>"]],
+ "<section><p>[foo]</p></section>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<section><hgroup><h1>[foo]</h1><h2>bar</h2></hgroup><p>baz</section>",
+ [["formatblock","<blockquote>"]],
+ "<section><hgroup><h1>[foo]</h1><h2>bar</h2></hgroup><p>baz</p></section>",
+ [false],
+ {"formatblock":[false,false,"h1",false,false,"h1"]}],
+["<section>[foo]</section>",
+ [["formatblock","<article>"]],
+ "<section>[foo]</section>",
+ [false],
+ {"formatblock":[false,false,"",false,false,""]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","div"],["formatblock","<address>"]],
+ "<address>[foobar]</address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"div",false,false,"address"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","p"],["formatblock","<address>"]],
+ "<address>[foobar]</address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"div",false,false,"address"]}],
+["<div>[foobar]</div>",
+ [["formatblock","<article>"]],
+ "<div>[foobar]</div>",
+ [false],
+ {"formatblock":[false,false,"div",false,false,"div"]}],
+["<div>[foobar]</div>",
+ [["formatblock","<blockquote>"]],
+ "<div>[foobar]</div>",
+ [false],
+ {"formatblock":[false,false,"div",false,false,"div"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","div"],["formatblock","<dd>"]],
+ "<dl><dd>[foobar]</dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"div",false,false,"dd"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","p"],["formatblock","<dd>"]],
+ "<dl><dd>[foobar]</dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"div",false,false,"dd"]}],
+["<div>[foobar]</div>",
+ [["formatblock","<del>"]],
+ "<div>[foobar]</div>",
+ [false],
+ {"formatblock":[false,false,"div",false,false,"div"]}],
+["<div>[foobar]</div>",
+ [["formatblock","<dl>"]],
+ "<div>[foobar]</div>",
+ [false],
+ {"formatblock":[false,false,"div",false,false,"div"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","div"],["formatblock","<dt>"]],
+ "<dl><dt>[foobar]</dt></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"div",false,false,"dt"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","p"],["formatblock","<dt>"]],
+ "<dl><dt>[foobar]</dt></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"div",false,false,"dt"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","div"],["formatblock","<h1>"]],
+ "<h1>[foobar]</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"div",false,false,"h1"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","p"],["formatblock","<h1>"]],
+ "<h1>[foobar]</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"div",false,false,"h1"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","div"],["formatblock","<h2>"]],
+ "<h2>[foobar]</h2>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"div",false,false,"h2"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","p"],["formatblock","<h2>"]],
+ "<h2>[foobar]</h2>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"div",false,false,"h2"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","div"],["formatblock","<h3>"]],
+ "<h3>[foobar]</h3>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"div",false,false,"h3"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","p"],["formatblock","<h3>"]],
+ "<h3>[foobar]</h3>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"div",false,false,"h3"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","div"],["formatblock","<h4>"]],
+ "<h4>[foobar]</h4>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"div",false,false,"h4"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","p"],["formatblock","<h4>"]],
+ "<h4>[foobar]</h4>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"div",false,false,"h4"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","div"],["formatblock","<h5>"]],
+ "<h5>[foobar]</h5>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"div",false,false,"h5"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","p"],["formatblock","<h5>"]],
+ "<h5>[foobar]</h5>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"div",false,false,"h5"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","div"],["formatblock","<h6>"]],
+ "<h6>[foobar]</h6>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"div",false,false,"h6"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","p"],["formatblock","<h6>"]],
+ "<h6>[foobar]</h6>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"div",false,false,"h6"]}],
+["<div>[foobar]</div>",
+ [["formatblock","<ins>"]],
+ "<div>[foobar]</div>",
+ [false],
+ {"formatblock":[false,false,"div",false,false,"div"]}],
+["<div>[foobar]</div>",
+ [["formatblock","<li>"]],
+ "<div>[foobar]</div>",
+ [false],
+ {"formatblock":[false,false,"div",false,false,"div"]}],
+["<div>[foobar]</div>",
+ [["formatblock","<ol>"]],
+ "<div>[foobar]</div>",
+ [false],
+ {"formatblock":[false,false,"div",false,false,"div"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","p"],["formatblock","<pre>"]],
+ "<pre>[foobar]</pre>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"div",false,false,"pre"]}],
+["<div>[foobar]</div>",
+ [["formatblock","<ul>"]],
+ "<div>[foobar]</div>",
+ [false],
+ {"formatblock":[false,false,"div",false,false,"div"]}],
+["<div>[foobar]</div>",
+ [["formatblock","<quasit>"]],
+ "<div>[foobar]</div>",
+ [false],
+ {"formatblock":[false,false,"div",false,false,"div"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","div"],["formatblock","<address>"]],
+ "<address>[foobar]</address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"address"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","p"],["formatblock","<address>"]],
+ "<address>[foobar]</address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"address"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<article>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<aside>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<blockquote>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<body>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","div"],["formatblock","<dd>"]],
+ "<dl><dd>[foobar]</dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"dd"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","p"],["formatblock","<dd>"]],
+ "<dl><dd>[foobar]</dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"dd"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<del>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<details>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<dir>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<dl>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","div"],["formatblock","<dt>"]],
+ "<dl><dt>[foobar]</dt></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"dt"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","p"],["formatblock","<dt>"]],
+ "<dl><dt>[foobar]</dt></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"dt"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<fieldset>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<figcaption>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<figure>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<footer>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<form>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","div"],["formatblock","<h1>"]],
+ "<h1>[foobar]</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"h1"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","p"],["formatblock","<h1>"]],
+ "<h1>[foobar]</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"h1"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","div"],["formatblock","<h2>"]],
+ "<h2>[foobar]</h2>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"h2"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","p"],["formatblock","<h2>"]],
+ "<h2>[foobar]</h2>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"h2"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","div"],["formatblock","<h3>"]],
+ "<h3>[foobar]</h3>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"h3"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","p"],["formatblock","<h3>"]],
+ "<h3>[foobar]</h3>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"h3"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","div"],["formatblock","<h4>"]],
+ "<h4>[foobar]</h4>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"h4"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","p"],["formatblock","<h4>"]],
+ "<h4>[foobar]</h4>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"h4"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","div"],["formatblock","<h5>"]],
+ "<h5>[foobar]</h5>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"h5"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","p"],["formatblock","<h5>"]],
+ "<h5>[foobar]</h5>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"h5"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","div"],["formatblock","<h6>"]],
+ "<h6>[foobar]</h6>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"h6"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","p"],["formatblock","<h6>"]],
+ "<h6>[foobar]</h6>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"h6"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<header>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<head>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<hgroup>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<hr>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<html>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<ins>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<li>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<listing>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<menu>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<nav>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<ol>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<plaintext>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","div"],["formatblock","<pre>"]],
+ "<pre>[foobar]</pre>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"pre"]}],
+["<p>[foobar]</p>",
+ [["defaultparagraphseparator","p"],["formatblock","<pre>"]],
+ "<pre>[foobar]</pre>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"pre"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<section>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<ul>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<xmp>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foobar]</p>",
+ [["formatblock","<quasit>"]],
+ "<p>[foobar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","div"],["formatblock","<address>"]],
+ "<address>[foo<br>bar]</address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"address"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","p"],["formatblock","<address>"]],
+ "<address>[foo<br>bar]</address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"address"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<article>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<aside>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<blockquote>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<body>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","div"],["formatblock","<dd>"]],
+ "<dl><dd>[foo</dd><dd>bar]</dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"dd"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","p"],["formatblock","<dd>"]],
+ "<dl><dd>[foo</dd><dd>bar]</dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"dd"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<del>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<details>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<dir>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>[foo</div><div>bar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"div"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>[foo</div><div>bar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"div"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<dl>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","div"],["formatblock","<dt>"]],
+ "<dl><dt>[foo</dt><dt>bar]</dt></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"dt"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","p"],["formatblock","<dt>"]],
+ "<dl><dt>[foo</dt><dt>bar]</dt></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"dt"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<fieldset>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<figcaption>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<figure>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<footer>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<form>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","div"],["formatblock","<h1>"]],
+ "<h1>[foo<br>bar]</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"h1"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","p"],["formatblock","<h1>"]],
+ "<h1>[foo<br>bar]</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"h1"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","div"],["formatblock","<h2>"]],
+ "<h2>[foo<br>bar]</h2>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"h2"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","p"],["formatblock","<h2>"]],
+ "<h2>[foo<br>bar]</h2>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"h2"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","div"],["formatblock","<h3>"]],
+ "<h3>[foo<br>bar]</h3>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"h3"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","p"],["formatblock","<h3>"]],
+ "<h3>[foo<br>bar]</h3>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"h3"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","div"],["formatblock","<h4>"]],
+ "<h4>[foo<br>bar]</h4>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"h4"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","p"],["formatblock","<h4>"]],
+ "<h4>[foo<br>bar]</h4>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"h4"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","div"],["formatblock","<h5>"]],
+ "<h5>[foo<br>bar]</h5>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"h5"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","p"],["formatblock","<h5>"]],
+ "<h5>[foo<br>bar]</h5>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"h5"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","div"],["formatblock","<h6>"]],
+ "<h6>[foo<br>bar]</h6>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"h6"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","p"],["formatblock","<h6>"]],
+ "<h6>[foo<br>bar]</h6>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"h6"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<header>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<head>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<hgroup>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<hr>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<html>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<ins>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<li>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<listing>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<menu>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<nav>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<ol>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<p>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [true],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<plaintext>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","div"],["formatblock","<pre>"]],
+ "<pre>[foo<br>bar]</pre>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"pre"]}],
+["<p>[foo<p>bar]",
+ [["defaultparagraphseparator","p"],["formatblock","<pre>"]],
+ "<pre>[foo<br>bar]</pre>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"pre"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<section>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<ul>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<xmp>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<p>[foo<p>bar]",
+ [["formatblock","<quasit>"]],
+ "<p>[foo</p><p>bar]</p>",
+ [false],
+ {"formatblock":[false,false,"p",false,false,"p"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","div"],["formatblock","p"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"div",false,false,"p"]}],
+["<div>[foobar]</div>",
+ [["defaultparagraphseparator","p"],["formatblock","p"]],
+ "<p>[foobar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"div",false,false,"p"]}],
+["<ol><li>[foo]<li>bar</ol>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<ol><li><div>[foo]</div></li><li>bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["<ol><li>[foo]<li>bar</ol>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<ol><li><div>[foo]</div></li><li>bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["<h1>[foo]<br>bar</h1>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foo]</p><h1>bar</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"h1",false,false,"p"]}],
+["<h1>[foo]<br>bar</h1>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foo]</p><h1>bar</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"h1",false,false,"p"]}],
+["<h1>foo<br>[bar]</h1>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<h1>foo</h1><p>[bar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"h1",false,false,"p"]}],
+["<h1>foo<br>[bar]</h1>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<h1>foo</h1><p>[bar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"h1",false,false,"p"]}],
+["<h1>[foo<br>bar]</h1>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foo<br>bar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"h1",false,false,"p"]}],
+["<h1>[foo<br>bar]</h1>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foo<br>bar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"h1",false,false,"p"]}],
+["<h1>[foo]<br>bar</h1>",
+ [["formatblock","<address>"]],
+ "<address>[foo]</address><h1>bar</h1>",
+ [true],
+ {"formatblock":[false,false,"h1",false,false,"address"]}],
+["<h1>foo<br>[bar]</h1>",
+ [["formatblock","<address>"]],
+ "<h1>foo</h1><address>[bar]</address>",
+ [true],
+ {"formatblock":[false,false,"h1",false,false,"address"]}],
+["<h1>[foo<br>bar]</h1>",
+ [["formatblock","<address>"]],
+ "<address>[foo<br>bar]</address>",
+ [true],
+ {"formatblock":[false,false,"h1",false,false,"address"]}],
+["<h1>[foo]<br>bar</h1>",
+ [["formatblock","<pre>"]],
+ "<pre>[foo]</pre><h1>bar</h1>",
+ [true],
+ {"formatblock":[false,false,"h1",false,false,"pre"]}],
+["<h1>foo<br>[bar]</h1>",
+ [["formatblock","<pre>"]],
+ "<h1>foo</h1><pre>[bar]</pre>",
+ [true],
+ {"formatblock":[false,false,"h1",false,false,"pre"]}],
+["<h1>[foo<br>bar]</h1>",
+ [["formatblock","<pre>"]],
+ "<pre>[foo<br>bar]</pre>",
+ [true],
+ {"formatblock":[false,false,"h1",false,false,"pre"]}],
+["<h1>[foo]<br>bar</h1>",
+ [["formatblock","<h2>"]],
+ "<h2>[foo]</h2><h1>bar</h1>",
+ [true],
+ {"formatblock":[false,false,"h1",false,false,"h2"]}],
+["<h1>foo<br>[bar]</h1>",
+ [["formatblock","<h2>"]],
+ "<h1>foo</h1><h2>[bar]</h2>",
+ [true],
+ {"formatblock":[false,false,"h1",false,false,"h2"]}],
+["<h1>[foo<br>bar]</h1>",
+ [["formatblock","<h2>"]],
+ "<h2>[foo<br>bar]</h2>",
+ [true],
+ {"formatblock":[false,false,"h1",false,false,"h2"]}],
+["<p>[foo]<br>bar</p>",
+ [["formatblock","<h1>"]],
+ "<h1>[foo]</h1><p>bar</p>",
+ [true],
+ {"formatblock":[false,false,"p",false,false,"h1"]}],
+["<p>foo<br>[bar]</p>",
+ [["formatblock","<h1>"]],
+ "<p>foo</p><h1>[bar]</h1>",
+ [true],
+ {"formatblock":[false,false,"p",false,false,"h1"]}],
+["<p>[foo<br>bar]</p>",
+ [["defaultparagraphseparator","div"],["formatblock","<h1>"]],
+ "<h1>[foo<br>bar]</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"h1"]}],
+["<p>[foo<br>bar]</p>",
+ [["defaultparagraphseparator","p"],["formatblock","<h1>"]],
+ "<h1>[foo<br>bar]</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"h1"]}],
+["<p>[foo]<br>bar</p>",
+ [["formatblock","<address>"]],
+ "<address>[foo]</address><p>bar</p>",
+ [true],
+ {"formatblock":[false,false,"p",false,false,"address"]}],
+["<p>foo<br>[bar]</p>",
+ [["formatblock","<address>"]],
+ "<p>foo</p><address>[bar]</address>",
+ [true],
+ {"formatblock":[false,false,"p",false,false,"address"]}],
+["<p>[foo<br>bar]</p>",
+ [["defaultparagraphseparator","div"],["formatblock","<address>"]],
+ "<address>[foo<br>bar]</address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"address"]}],
+["<p>[foo<br>bar]</p>",
+ [["defaultparagraphseparator","p"],["formatblock","<address>"]],
+ "<address>[foo<br>bar]</address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"address"]}],
+["<p>[foo]<br>bar</p>",
+ [["formatblock","<pre>"]],
+ "<pre>[foo]</pre><p>bar</p>",
+ [true],
+ {"formatblock":[false,false,"p",false,false,"pre"]}],
+["<p>foo<br>[bar]</p>",
+ [["formatblock","<pre>"]],
+ "<p>foo</p><pre>[bar]</pre>",
+ [true],
+ {"formatblock":[false,false,"p",false,false,"pre"]}],
+["<p>[foo<br>bar]</p>",
+ [["defaultparagraphseparator","div"],["formatblock","<pre>"]],
+ "<pre>[foo<br>bar]</pre>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"p",false,false,"pre"]}],
+["<p>[foo<br>bar]</p>",
+ [["defaultparagraphseparator","p"],["formatblock","<pre>"]],
+ "<pre>[foo<br>bar]</pre>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"p",false,false,"pre"]}],
+["<address>[foo]<br>bar</address>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foo]</p><address>bar</address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"address",false,false,"p"]}],
+["<address>[foo]<br>bar</address>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foo]</p><address>bar</address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"address",false,false,"p"]}],
+["<address>foo<br>[bar]</address>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<address>foo</address><p>[bar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"address",false,false,"p"]}],
+["<address>foo<br>[bar]</address>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<address>foo</address><p>[bar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"address",false,false,"p"]}],
+["<address>[foo<br>bar]</address>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foo<br>bar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"address",false,false,"p"]}],
+["<address>[foo<br>bar]</address>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foo<br>bar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"address",false,false,"p"]}],
+["<address>[foo]<br>bar</address>",
+ [["formatblock","<pre>"]],
+ "<pre>[foo]</pre><address>bar</address>",
+ [true],
+ {"formatblock":[false,false,"address",false,false,"pre"]}],
+["<address>foo<br>[bar]</address>",
+ [["formatblock","<pre>"]],
+ "<address>foo</address><pre>[bar]</pre>",
+ [true],
+ {"formatblock":[false,false,"address",false,false,"pre"]}],
+["<address>[foo<br>bar]</address>",
+ [["formatblock","<pre>"]],
+ "<pre>[foo<br>bar]</pre>",
+ [true],
+ {"formatblock":[false,false,"address",false,false,"pre"]}],
+["<address>[foo]<br>bar</address>",
+ [["formatblock","<h1>"]],
+ "<h1>[foo]</h1><address>bar</address>",
+ [true],
+ {"formatblock":[false,false,"address",false,false,"h1"]}],
+["<address>foo<br>[bar]</address>",
+ [["formatblock","<h1>"]],
+ "<address>foo</address><h1>[bar]</h1>",
+ [true],
+ {"formatblock":[false,false,"address",false,false,"h1"]}],
+["<address>[foo<br>bar]</address>",
+ [["formatblock","<h1>"]],
+ "<h1>[foo<br>bar]</h1>",
+ [true],
+ {"formatblock":[false,false,"address",false,false,"h1"]}],
+["<pre>[foo]<br>bar</pre>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foo]</p><pre>bar</pre>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"pre",false,false,"p"]}],
+["<pre>[foo]<br>bar</pre>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foo]</p><pre>bar</pre>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"pre",false,false,"p"]}],
+["<pre>foo<br>[bar]</pre>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<pre>foo</pre><p>[bar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"pre",false,false,"p"]}],
+["<pre>foo<br>[bar]</pre>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<pre>foo</pre><p>[bar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"pre",false,false,"p"]}],
+["<pre>[foo<br>bar]</pre>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foo<br>bar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"pre",false,false,"p"]}],
+["<pre>[foo<br>bar]</pre>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foo<br>bar]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"pre",false,false,"p"]}],
+["<pre>[foo]<br>bar</pre>",
+ [["formatblock","<address>"]],
+ "<address>[foo]</address><pre>bar</pre>",
+ [true],
+ {"formatblock":[false,false,"pre",false,false,"address"]}],
+["<pre>foo<br>[bar]</pre>",
+ [["formatblock","<address>"]],
+ "<pre>foo</pre><address>[bar]</address>",
+ [true],
+ {"formatblock":[false,false,"pre",false,false,"address"]}],
+["<pre>[foo<br>bar]</pre>",
+ [["formatblock","<address>"]],
+ "<address>[foo<br>bar]</address>",
+ [true],
+ {"formatblock":[false,false,"pre",false,false,"address"]}],
+["<pre>[foo]<br>bar</pre>",
+ [["formatblock","<h1>"]],
+ "<h1>[foo]</h1><pre>bar</pre>",
+ [true],
+ {"formatblock":[false,false,"pre",false,false,"h1"]}],
+["<pre>foo<br>[bar]</pre>",
+ [["formatblock","<h1>"]],
+ "<pre>foo</pre><h1>[bar]</h1>",
+ [true],
+ {"formatblock":[false,false,"pre",false,false,"h1"]}],
+["<pre>[foo<br>bar]</pre>",
+ [["formatblock","<h1>"]],
+ "<h1>[foo<br>bar]</h1>",
+ [true],
+ {"formatblock":[false,false,"pre",false,false,"h1"]}],
+["<p>[foo</p>bar]",
+ [["defaultparagraphseparator","div"],["formatblock","<h1>"]],
+ "<h1>[foo<br>bar]</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[true,false,"p",false,false,"h1"]}],
+["<p>[foo</p>bar]",
+ [["defaultparagraphseparator","p"],["formatblock","<h1>"]],
+ "<h1>[foo<br>bar]</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[true,false,"p",false,false,"h1"]}],
+["[foo<p>bar]</p>",
+ [["defaultparagraphseparator","div"],["formatblock","<h1>"]],
+ "<h1>[foo<br>bar]</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[true,false,"",false,false,"h1"]}],
+["[foo<p>bar]</p>",
+ [["defaultparagraphseparator","p"],["formatblock","<h1>"]],
+ "<h1>[foo<br>bar]</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[true,false,"",false,false,"h1"]}],
+["<div>[foo<p>bar]</p></div>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<div><p>[foo</p><p>bar]</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[true,false,"",false,false,"p"]}],
+["<div>[foo<p>bar]</p></div>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<div><p>[foo</p><p>bar]</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[true,false,"",false,false,"p"]}],
+["<xmp>[foo]</xmp>",
+ [["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p>[foo]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"p"]}],
+["<xmp>[foo]</xmp>",
+ [["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p>[foo]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"p"]}],
+["<xmp>[foo]</xmp>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>[foo]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["<xmp>[foo]</xmp>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>[foo]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["<div><ol><li>[foo]</ol></div>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div><ol><li><div>[foo]</div></li></ol></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["<div><ol><li>[foo]</ol></div>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div><ol><li><div>[foo]</div></li></ol></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["<div><table><tr><td>[foo]</table></div>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div><table><tbody><tr><td><div>[foo]</div></td></tr></tbody></table></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"",false,false,"div"]}],
+["<div><table><tr><td>[foo]</table></div>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div><table><tbody><tr><td><div>[foo]</div></td></tr></tbody></table></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"",false,false,"div"]}],
+["<p>[foo<h1>bar]</h1>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>[foo</div><div>bar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[true,false,"p",false,false,"div"]}],
+["<p>[foo<h1>bar]</h1>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>[foo</div><div>bar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[true,false,"p",false,false,"div"]}],
+["<h1>[foo</h1><h2>bar]</h2>",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>[foo</div><div>bar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[true,false,"h1",false,false,"div"]}],
+["<h1>[foo</h1><h2>bar]</h2>",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>[foo</div><div>bar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[true,false,"h1",false,false,"div"]}],
+["<div>[foo</div>bar]",
+ [["defaultparagraphseparator","div"],["formatblock","<div>"]],
+ "<div>[foo</div><div>bar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[true,false,"div",false,false,"div"]}],
+["<div>[foo</div>bar]",
+ [["defaultparagraphseparator","p"],["formatblock","<div>"]],
+ "<div>[foo</div><div>bar]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[true,false,"div",false,false,"div"]}],
+["<div style=color:blue>[foo]</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p><span style=\"color:rgb(0, 0, 255)\">[foo]</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[false,false,"div",false,false,"p"]}],
+["<div style=color:blue>[foo]</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["formatblock","<p>"]],
+ "<p><font color=\"#0000ff\">[foo]</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"formatblock":[false,false,"div",false,false,"p"]}],
+["<div style=color:blue>[foo]</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p><span style=\"color:rgb(0, 0, 255)\">[foo]</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[false,false,"div",false,false,"p"]}],
+["<div style=color:blue>[foo]</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["formatblock","<p>"]],
+ "<p><font color=\"#0000ff\">[foo]</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"formatblock":[false,false,"div",false,false,"p"]}],
+["{<p>foo</p>ba]r",
+ [["defaultparagraphseparator","div"],["formatblock","<h1>"]],
+ "<h1>{foo<br>ba]r</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"formatblock":[true,false,"p",false,false,"h1"]}],
+["{<p>foo</p>ba]r",
+ [["defaultparagraphseparator","p"],["formatblock","<h1>"]],
+ "<h1>{foo<br>ba]r</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"formatblock":[true,false,"p",false,false,"h1"]}]
+]
diff --git a/testing/web-platform/tests/editing/data/forwarddelete.js b/testing/web-platform/tests/editing/data/forwarddelete.js
new file mode 100644
index 000000000..66cf6cf33
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/forwarddelete.js
@@ -0,0 +1,2357 @@
+var browserTests = [
+["foo[]",
+ [["forwarddelete",""]],
+ "foo{}",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<span>foo[]</span>",
+ [["forwarddelete",""]],
+ "<span>foo</span>{}",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]</p>",
+ [["forwarddelete",""]],
+ "<p>foo{}</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forwarddelete",""]],
+ "foo[]ar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<span>foo</span>{}<span>bar</span>",
+ [["forwarddelete",""]],
+ "<span>foo</span><span>{}ar</span>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<span>foo[</span><span>]bar</span>",
+ [["forwarddelete",""]],
+ "<span>foo[]</span><span>bar</span>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<span style=display:none>bar</span>baz",
+ [["stylewithcss","true"],["forwarddelete",""]],
+ "foo{}az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<span style=display:none>bar</span>baz",
+ [["stylewithcss","false"],["forwarddelete",""]],
+ "foo{}az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<script>bar</script>baz",
+ [["forwarddelete",""]],
+ "foo{}az",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["fo[]&ouml;bar",
+ [["forwarddelete",""]],
+ "fo[]bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["fo[]o&#x308;bar",
+ [["forwarddelete",""]],
+ "fo[]bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["fo[]o&#x308;&#x327;bar",
+ [["forwarddelete",""]],
+ "fo[]bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["[]&ouml;bar",
+ [["forwarddelete",""]],
+ "{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["[]o&#x308;bar",
+ [["forwarddelete",""]],
+ "{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["[]o&#x308;&#x327;bar",
+ [["forwarddelete",""]],
+ "{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["[]&#x5e9;&#x5c1;&#x5b8;&#x5dc;&#x5d5;&#x5b9;&#x5dd;",
+ [["forwarddelete",""]],
+ "{}לוֹם",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["&#x5e9;&#x5c1;&#x5b8;&#x5dc;[]&#x5d5;&#x5b9;&#x5dd;",
+ [["forwarddelete",""]],
+ "שָׁל[]ם",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]</p><p>bar</p>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]</p><p>bar</p>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]</p>bar",
+ [["forwarddelete",""]],
+ "<p>foo{}bar</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<p>bar</p>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<p>bar</p>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<br></p><p>bar</p>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<br></p><p>bar</p>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<br></p>bar",
+ [["forwarddelete",""]],
+ "<p>foo{}bar</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<br><p>bar</p>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<br><p>bar</p>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>{}<br></p>foo",
+ [["forwarddelete",""]],
+ "<p>{}foo</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>{}<span><br></span></p>foo",
+ [["forwarddelete",""]],
+ "<p>{}foo</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo{}<p><br>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{}<p><br>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{}<p><span><br></span>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{}<p><span><br></span>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{}<br><p><br>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{}<br><p><br>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{}<span><br></span><p><br>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{}<span><br></span><p><br>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{}<br><p><span><br></span>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{}<br><p><span><br></span>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{}<span><br></span><p><span><br></span>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{}<span><br></span><p><span><br></span>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{}<p>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{}<p>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<table><tr><td>{}</table>foo",
+ [["forwarddelete",""]],
+ "<table><tbody><tr><td>{}</td></tr></tbody></table>foo",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<table><tr><td>{}<br></table>foo",
+ [["forwarddelete",""]],
+ "<table><tbody><tr><td>{}<br></td></tr></tbody></table>foo",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<table><tr><td>{}<span><br></span></table>foo",
+ [["forwarddelete",""]],
+ "<table><tbody><tr><td>{}<span><br></span></td></tr></tbody></table>foo",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div><p>foo[]</p></div><p>bar</p>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<div><p>foo{}bar</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><p>foo[]</p></div><p>bar</p>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<div><p>foo{}bar</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]</p><div><p>bar</p></div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]</p><div><p>bar</p></div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><p>foo[]</p></div><div><p>bar</p></div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<div><p>foo{}bar</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><p>foo[]</p></div><div><p>bar</p></div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<div><p>foo{}bar</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><p>foo[]</p></div>bar",
+ [["forwarddelete",""]],
+ "<div><p>foo{}bar</p></div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<div><p>bar</p></div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<div><p>bar</p></div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div>foo[]</div><div>bar</div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<div>foo{}bar</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div>foo[]</div><div>bar</div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<div>foo{}bar</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<pre>foo[]</pre>bar",
+ [["forwarddelete",""]],
+ "<pre>foo{}bar</pre>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<br>bar",
+ [["forwarddelete",""]],
+ "foo{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<b>foo[]</b><br>bar",
+ [["forwarddelete",""]],
+ "<b>foo</b>{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<hr>bar",
+ [["forwarddelete",""]],
+ "foo{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<hr><p>bar",
+ [["forwarddelete",""]],
+ "<p>foo{}</p><p>bar</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]</p><br><p>bar</p>",
+ [["forwarddelete",""]],
+ "<p>foo{}</p><p>bar</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]</p><br><br><p>bar</p>",
+ [["forwarddelete",""]],
+ "<p>foo{}</p><br><p>bar</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]</p><img src=/img/lion.svg><p>bar",
+ [["forwarddelete",""]],
+ "<p>foo{}<img src=\"/img/lion.svg\"></p><p>bar</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<img src=/img/lion.svg>bar",
+ [["forwarddelete",""]],
+ "foo{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<a>bar</a>",
+ [["forwarddelete",""]],
+ "foo<a>{}ar</a>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<a href=/>bar</a>",
+ [["forwarddelete",""]],
+ "foo<a href=\"/\">{}ar</a>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<a name=abc>bar</a>",
+ [["forwarddelete",""]],
+ "foo<a name=\"abc\">{}ar</a>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<a href=/ name=abc>bar</a>",
+ [["forwarddelete",""]],
+ "foo<a href=\"/\" name=\"abc\">{}ar</a>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<span><a>bar</a></span>",
+ [["forwarddelete",""]],
+ "foo<span><a>{}ar</a></span>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<span><a href=/>bar</a></span>",
+ [["forwarddelete",""]],
+ "foo<span><a href=\"/\">{}ar</a></span>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<span><a name=abc>bar</a></span>",
+ [["forwarddelete",""]],
+ "foo<span><a name=\"abc\">{}ar</a></span>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<span><a href=/ name=abc>bar</a></span>",
+ [["forwarddelete",""]],
+ "foo<span><a href=\"/\" name=\"abc\">{}ar</a></span>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<a>foo[]</a>bar",
+ [["forwarddelete",""]],
+ "<a>foo</a>{}ar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<a href=/>foo[]</a>bar",
+ [["forwarddelete",""]],
+ "<a href=\"/\">foo</a>{}ar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<a name=abc>foo[]</a>bar",
+ [["forwarddelete",""]],
+ "<a name=\"abc\">foo</a>{}ar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<a href=/ name=abc>foo[]</a>bar",
+ [["forwarddelete",""]],
+ "<a href=\"/\" name=\"abc\">foo</a>{}ar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo []&nbsp;",
+ [["forwarddelete",""]],
+ "foo&nbsp;[]",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["[]&nbsp; foo",
+ [["forwarddelete",""]],
+ "{}&nbsp;foo",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[] &nbsp;bar",
+ [["forwarddelete",""]],
+ "foo[] bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]&nbsp; bar",
+ [["forwarddelete",""]],
+ "foo[] bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]&nbsp;&nbsp;bar",
+ [["forwarddelete",""]],
+ "foo[] bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[] bar",
+ [["forwarddelete",""]],
+ "foo[]bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[] &nbsp; bar",
+ [["forwarddelete",""]],
+ "foo[]&nbsp; bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo []&nbsp; bar",
+ [["forwarddelete",""]],
+ "foo&nbsp;[] bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo &nbsp;[] bar",
+ [["forwarddelete",""]],
+ "foo&nbsp; []bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[] <span>&nbsp;</span> bar",
+ [["forwarddelete",""]],
+ "foo[]<span>&nbsp;</span> bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo []<span>&nbsp;</span> bar",
+ [["forwarddelete",""]],
+ "foo&nbsp;{} bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo <span>&nbsp;</span>[] bar",
+ [["forwarddelete",""]],
+ "foo&nbsp;<span> </span>{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<b>foo[] </b>&nbsp;bar",
+ [["forwarddelete",""]],
+ "<b>foo[]</b> bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<b>foo[]&nbsp;</b> bar",
+ [["forwarddelete",""]],
+ "<b>foo[]</b> bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<b>foo[]&nbsp;</b>&nbsp;bar",
+ [["forwarddelete",""]],
+ "<b>foo[]</b> bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<b>foo[] </b> bar",
+ [["forwarddelete",""]],
+ "<b>foo[]</b>bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<pre>foo []&nbsp;</pre>",
+ [["forwarddelete",""]],
+ "<pre>foo []</pre>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<pre>[]&nbsp; foo</pre>",
+ [["forwarddelete",""]],
+ "<pre>{} foo</pre>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<pre>foo[] &nbsp;bar</pre>",
+ [["forwarddelete",""]],
+ "<pre>foo[]&nbsp;bar</pre>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<pre>foo[]&nbsp; bar</pre>",
+ [["forwarddelete",""]],
+ "<pre>foo[] bar</pre>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<pre>foo[] bar</pre>",
+ [["forwarddelete",""]],
+ "<pre>foo[] bar</pre>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre>foo []&nbsp;</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:pre\">foo []</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre>[]&nbsp; foo</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:pre\">{} foo</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre>foo[] &nbsp;bar</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:pre\">foo[]&nbsp;bar</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre>foo[]&nbsp; bar</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:pre\">foo[] bar</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre>foo[] bar</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:pre\">foo[] bar</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-wrap>foo []&nbsp;</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:pre-wrap\">foo []</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-wrap>[]&nbsp; foo</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:pre-wrap\">{} foo</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-wrap>foo[] &nbsp;bar</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:pre-wrap\">foo[]&nbsp;bar</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-wrap>foo[]&nbsp; bar</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:pre-wrap\">foo[] bar</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-wrap>foo[] bar</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:pre-wrap\">foo[] bar</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-line>foo []&nbsp;</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:pre-line\">foo&nbsp;[]</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-line>[]&nbsp; foo</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:pre-line\">{}&nbsp;foo</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-line>foo[] &nbsp;bar</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:pre-line\">foo[] bar</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-line>foo[]&nbsp; bar</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:pre-line\">foo[] bar</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-line>foo[] bar</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:pre-line\">foo[]bar</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:nowrap>foo []&nbsp;</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:nowrap\">foo&nbsp;[]</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:nowrap>[]&nbsp; foo</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:nowrap\">{}&nbsp;foo</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:nowrap>foo[] &nbsp;bar</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:nowrap\">foo[] bar</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:nowrap>foo[]&nbsp; bar</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:nowrap\">foo[] bar</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=white-space:nowrap>foo[] bar</div>",
+ [["forwarddelete",""]],
+ "<div style=\"white-space:nowrap\">foo[]bar</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<table><tr><td>bar</table>baz",
+ [["forwarddelete",""]],
+ "foo{<table><tbody><tr><td>bar</td></tr></tbody></table>}baz",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo<table><tr><td>bar[]</table>baz",
+ [["forwarddelete",""]],
+ "foo<table><tbody><tr><td>bar[]</td></tr></tbody></table>baz",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<table><tr><td>bar</table><p>baz",
+ [["forwarddelete",""]],
+ "<p>foo</p>{<table><tbody><tr><td>bar</td></tr></tbody></table>}<p>baz</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<table><tr><td>foo[]<td>bar</table>",
+ [["forwarddelete",""]],
+ "<table><tbody><tr><td>foo{}</td><td>bar</td></tr></tbody></table>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<table><tr><td>foo[]<tr><td>bar</table>",
+ [["forwarddelete",""]],
+ "<table><tbody><tr><td>foo{}</td></tr><tr><td>bar</td></tr></tbody></table>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<br><table><tr><td>bar</table>baz",
+ [["forwarddelete",""]],
+ "foo{<table><tbody><tr><td>bar</td></tr></tbody></table>}baz",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo<table><tr><td>bar[]<br></table>baz",
+ [["forwarddelete",""]],
+ "foo<table><tbody><tr><td>bar[]</td></tr></tbody></table>baz",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<br><table><tr><td>bar</table><p>baz",
+ [["forwarddelete",""]],
+ "<p>foo</p>{<table><tbody><tr><td>bar</td></tr></tbody></table>}<p>baz</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<table><tr><td>bar[]<br></table><p>baz",
+ [["forwarddelete",""]],
+ "<p>foo</p><table><tbody><tr><td>bar[]</td></tr></tbody></table><p>baz</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<table><tr><td>foo[]<br><td>bar</table>",
+ [["forwarddelete",""]],
+ "<table><tbody><tr><td>foo{}</td><td>bar</td></tr></tbody></table>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<table><tr><td>foo[]<br><tr><td>bar</table>",
+ [["forwarddelete",""]],
+ "<table><tbody><tr><td>foo{}</td></tr><tr><td>bar</td></tr></tbody></table>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo<table><tr><td>bar[]</table><br>baz",
+ [["forwarddelete",""]],
+ "foo<table><tbody><tr><td>bar[]</td></tr></tbody></table><br>baz",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<table><tr><td><hr>bar</table>baz",
+ [["forwarddelete",""]],
+ "foo{<table><tbody><tr><td><hr>bar</td></tr></tbody></table>}baz",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<table><tr><td>foo[]<td><hr>bar</table>",
+ [["forwarddelete",""]],
+ "<table><tbody><tr><td>foo{}</td><td><hr>bar</td></tr></tbody></table>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<table><tr><td>foo[]<tr><td><hr>bar</table>",
+ [["forwarddelete",""]],
+ "<table><tbody><tr><td>foo{}</td></tr><tr><td><hr>bar</td></tr></tbody></table>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<ol><li>bar<li>baz</ol>",
+ [["forwarddelete",""]],
+ "foo{}bar<ol><li>baz</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<br><ol><li>bar<li>baz</ol>",
+ [["forwarddelete",""]],
+ "foo{}bar<ol><li>baz</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]<li>bar</ol>",
+ [["forwarddelete",""]],
+ "<ol><li>foo{}bar</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]<br><li>bar</ol>",
+ [["forwarddelete",""]],
+ "<ol><li>foo{}bar</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]<li>bar<br>baz</ol>",
+ [["forwarddelete",""]],
+ "<ol><li>foo{}bar<br>baz</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo[]<li>bar</ol>",
+ [["forwarddelete",""]],
+ "<ol><li><p>foo{}bar</p></li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]<li><p>bar</ol>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<ol><li>foo{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]<li><p>bar</ol>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<ol><li>foo{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo[]<li><p>bar</ol>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<ol><li><p>foo{}bar</p></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo[]<li><p>bar</ol>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<ol><li><p>foo{}bar</p></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]<ul><li>bar</ul></ol>",
+ [["forwarddelete",""]],
+ "<ol><li>foo{}bar</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<ol><ol><li>bar</ol></ol>",
+ [["forwarddelete",""]],
+ "foo{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<div><ol><li>bar</ol></div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<div><ol><li>bar</ol></div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<dl><dt>bar<dd>baz</dl>",
+ [["forwarddelete",""]],
+ "foo{}bar<dl><dd>baz</dd></dl>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<dl><dd>bar</dl>",
+ [["forwarddelete",""]],
+ "foo{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<dl><dt>foo[]<dd>bar</dl>",
+ [["forwarddelete",""]],
+ "<dl><dt>foo{}bar</dt></dl>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<dl><dt>foo[]<dt>bar<dd>baz</dl>",
+ [["forwarddelete",""]],
+ "<dl><dt>foo{}bar</dt><dd>baz</dd></dl>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>bar[]<dd>baz</dl>",
+ [["forwarddelete",""]],
+ "<dl><dt>foo</dt><dd>bar{}baz</dd></dl>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]</ol>bar",
+ [["forwarddelete",""]],
+ "<ol><li>foo{}bar</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]<br></ol>bar",
+ [["forwarddelete",""]],
+ "<ol><li>foo{}bar</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>{}<br></ol>bar",
+ [["forwarddelete",""]],
+ "<ol><li>{}bar</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>{}<br></ol>bar",
+ [["forwarddelete",""]],
+ "<ol><li>foo</li><li>{}bar</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]</ol><p>bar",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<ol><li>foo{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]</ol><p>bar",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<ol><li>foo{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]<br></ol><p>bar",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<ol><li>foo{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]<br></ol><p>bar",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<ol><li>foo{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>{}<br></ol><p>bar",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<ol><li>{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>{}<br></ol><p>bar",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<ol><li>{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>{}<br></ol><p>bar",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<ol><li>foo</li><li>{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>{}<br></ol><p>bar",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<ol><li>foo</li><li>{}bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]</ol><br>",
+ [["forwarddelete",""]],
+ "<ol><li>foo{}</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]<br></ol><br>",
+ [["forwarddelete",""]],
+ "<ol><li>foo{}</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>{}<br></ol><br>",
+ [["forwarddelete",""]],
+ "<ol><li>{}<br></li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>{}<br></ol><br>",
+ [["forwarddelete",""]],
+ "<ol><li>foo</li><li>{}<br></li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]</ol><p><br>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<ol><li>foo{}</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]</ol><p><br>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<ol><li>foo{}</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]<br></ol><p><br>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<ol><li>foo{}</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]<br></ol><p><br>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<ol><li>foo{}</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>{}<br></ol><p><br>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<ol><li>{}<br></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>{}<br></ol><p><br>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<ol><li>{}<br></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>{}<br></ol><p><br>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<ol><li>foo</li><li>{}<br></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>{}<br></ol><p><br>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<ol><li>foo</li><li>{}<br></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote>bar</blockquote>",
+ [["forwarddelete",""]],
+ "foo{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote><blockquote>bar</blockquote></blockquote>",
+ [["forwarddelete",""]],
+ "foo{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote><div>bar</div></blockquote>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote><div>bar</div></blockquote>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote style=\"color: blue\">bar</blockquote>",
+ [["stylewithcss","true"],["forwarddelete",""]],
+ "foo{}<span style=\"color:rgb(0, 0, 255)\">bar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote style=\"color: blue\">bar</blockquote>",
+ [["stylewithcss","false"],["forwarddelete",""]],
+ "foo{}<font color=\"#0000ff\">bar</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote><blockquote><p>bar<p>baz</blockquote></blockquote>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}bar<blockquote><blockquote><p>baz</p></blockquote></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote><blockquote><p>bar<p>baz</blockquote></blockquote>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}bar<blockquote><blockquote><p>baz</p></blockquote></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote><div><p>bar<p>baz</div></blockquote>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}bar<blockquote><div><p>baz</p></div></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote><div><p>bar<p>baz</div></blockquote>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}bar<blockquote><div><p>baz</p></div></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote style=\"color: blue\"><p>bar<p>baz</blockquote>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}<span style=\"color:rgb(0, 0, 255)\">bar</span><blockquote style=\"color:rgb(0, 0, 255)\"><p>baz</p></blockquote>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote style=\"color: blue\"><p>bar<p>baz</blockquote>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}<font color=\"#0000ff\">bar</font><blockquote style=\"color:rgb(0, 0, 255)\"><p>baz</p></blockquote>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote style=\"color: blue\"><p>bar<p>baz</blockquote>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}<span style=\"color:rgb(0, 0, 255)\">bar</span><blockquote style=\"color:rgb(0, 0, 255)\"><p>baz</p></blockquote>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote style=\"color: blue\"><p>bar<p>baz</blockquote>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}<font color=\"#0000ff\">bar</font><blockquote style=\"color:rgb(0, 0, 255)\"><p>baz</p></blockquote>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote><p><b>bar</b><p>baz</blockquote>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}<b>bar</b><blockquote><p>baz</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote><p><b>bar</b><p>baz</blockquote>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}<b>bar</b><blockquote><p>baz</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote><p><strong>bar</strong><p>baz</blockquote>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}<strong>bar</strong><blockquote><p>baz</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote><p><strong>bar</strong><p>baz</blockquote>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}<strong>bar</strong><blockquote><p>baz</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote><p><span>bar</span><p>baz</blockquote>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}<span>bar</span><blockquote><p>baz</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote><p><span>bar</span><p>baz</blockquote>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}<span>bar</span><blockquote><p>baz</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote><ol><li>bar</ol></blockquote><p>extra",
+ [["forwarddelete",""]],
+ "foo{}bar<p>extra</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<blockquote>bar<ol><li>baz</ol>quz</blockquote><p>extra",
+ [["forwarddelete",""]],
+ "foo{}bar<blockquote><ol><li>baz</li></ol>quz</blockquote><p>extra</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo<blockquote><ol><li>bar[]</li><ol><li>baz</ol><li>quz</ol></blockquote><p>extra",
+ [["forwarddelete",""]],
+ "foo<blockquote><ol><li>bar{}baz</li><li>quz</li></ol></blockquote><p>extra</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<span></span>bar",
+ [["forwarddelete",""]],
+ "foo{}ar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<span><span></span></span>bar",
+ [["forwarddelete",""]],
+ "foo{}ar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<quasit></quasit>bar",
+ [["forwarddelete",""]],
+ "foo{}ar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<span></span><br>bar",
+ [["forwarddelete",""]],
+ "foo{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<span>foo[]<span></span></span>bar",
+ [["forwarddelete",""]],
+ "<span>foo</span>{}ar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<span></span><span>bar</span>",
+ [["forwarddelete",""]],
+ "foo<span>{}ar</span>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<div><div><p>bar</div></div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<div><div><p>bar</div></div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<div><div><p><!--abc-->bar</div></div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<div><div><p><!--abc-->bar</div></div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<div><div><!--abc--><p>bar</div></div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<div><div><!--abc--><p>bar</div></div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<div><!--abc--><div><p>bar</div></div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<div><!--abc--><div><p>bar</div></div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<!--abc--><div><div><p>bar</div></div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<!--abc--><div><div><p>bar</div></div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]</div></div>bar",
+ [["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]</div></div><!--abc-->bar",
+ [["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]</div><!--abc--></div>bar",
+ [["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]</p><!--abc--></div></div>bar",
+ [["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]<!--abc--></div></div>bar",
+ [["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]</p></div></div><div><div><div>bar</div></div></div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]</p></div></div><div><div><div>bar</div></div></div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]<!--abc--></p></div></div><div><div><div>bar</div></div></div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]<!--abc--></p></div></div><div><div><div>bar</div></div></div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]</p><!--abc--></div></div><div><div><div>bar</div></div></div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]</p><!--abc--></div></div><div><div><div>bar</div></div></div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]</p></div><!--abc--></div><div><div><div>bar</div></div></div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]</p></div><!--abc--></div><div><div><div>bar</div></div></div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]</p></div></div><!--abc--><div><div><div>bar</div></div></div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]</p></div></div><!--abc--><div><div><div>bar</div></div></div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]</p></div></div><div><!--abc--><div><div>bar</div></div></div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]</p></div></div><div><!--abc--><div><div>bar</div></div></div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]</p></div></div><div><div><!--abc--><div>bar</div></div></div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]</p></div></div><div><div><!--abc--><div>bar</div></div></div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]</p></div></div><div><div><div><!--abc-->bar</div></div></div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><div><p>foo[]</p></div></div><div><div><div><!--abc-->bar</div></div></div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<div><div><p>foo{}bar</p></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo[]<p>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p><span style=\"color:rgb(0, 0, 255)\">foo{}</span>bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo[]<p>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p><font color=\"#0000ff\">foo{}</font>bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo[]<p>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p><span style=\"color:rgb(0, 0, 255)\">foo{}</span>bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo[]<p>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p><font color=\"#0000ff\">foo{}</font>bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo[]<p style=color:brown>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo[]<p style=color:brown>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}<font color=\"#a52a2a\">bar</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo[]<p style=color:brown>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo[]<p style=color:brown>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}<font color=\"#a52a2a\">bar</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p style=color:brown>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p style=color:brown>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}<font color=\"#a52a2a\">bar</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p style=color:brown>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p style=color:brown>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}<font color=\"#a52a2a\">bar</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p><font color=blue>foo[]</font><p>bar",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p><font color=\"blue\">foo</font>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p><font color=blue>foo[]</font><p>bar",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p><font color=\"blue\">foo</font>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p><font color=blue>foo[]</font><p><font color=brown>bar</font>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p><font color=\"blue\">foo</font>{}<font color=\"brown\">bar</font></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p><font color=blue>foo[]</font><p><font color=brown>bar</font>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p><font color=\"blue\">foo</font>{}<font color=\"brown\">bar</font></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p><font color=brown>bar</font>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}<font color=\"brown\">bar</font></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p><font color=brown>bar</font>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}<font color=\"brown\">bar</font></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p><span style=color:blue>foo[]</font><p>bar",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p><span style=\"color:rgb(0, 0, 255)\">foo</span>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p><span style=color:blue>foo[]</font><p>bar",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p><span style=\"color:rgb(0, 0, 255)\">foo</span>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p><span style=color:blue>foo[]</font><p><span style=color:brown>bar</font>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p><span style=\"color:rgb(0, 0, 255)\">foo</span>{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p><span style=color:blue>foo[]</font><p><span style=color:brown>bar</font>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p><span style=\"color:rgb(0, 0, 255)\">foo</span>{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p><span style=color:brown>bar</font>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p><span style=color:brown>bar</font>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=background-color:aqua>foo[]<p>bar",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=background-color:aqua>foo[]<p>bar",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=background-color:aqua>foo[]<p style=background-color:tan>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=background-color:aqua>foo[]<p style=background-color:tan>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=background-color:aqua>foo[]<p style=background-color:tan>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=background-color:aqua>foo[]<p style=background-color:tan>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p style=background-color:tan>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p style=background-color:tan>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p style=background-color:tan>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p style=background-color:tan>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p><span style=background-color:aqua>foo[]</font><p>bar",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">foo</span>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p><span style=background-color:aqua>foo[]</font><p>bar",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">foo</span>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p><span style=background-color:aqua>foo[]</font><p><span style=background-color:tan>bar</font>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">foo</span>{}<span style=\"background-color:rgb(210, 180, 140)\">bar</span></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p><span style=background-color:aqua>foo[]</font><p><span style=background-color:tan>bar</font>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">foo</span>{}<span style=\"background-color:rgb(210, 180, 140)\">bar</span></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p><span style=background-color:tan>bar</font>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}<span style=\"background-color:rgb(210, 180, 140)\">bar</span></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p><span style=background-color:tan>bar</font>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}<span style=\"background-color:rgb(210, 180, 140)\">bar</span></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=text-decoration:underline>foo[]<p>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p><span style=\"text-decoration:underline\">foo{}</span>bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=text-decoration:underline>foo[]<p>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p><u>foo{}</u>bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=text-decoration:underline>foo[]<p>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p><span style=\"text-decoration:underline\">foo{}</span>bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=text-decoration:underline>foo[]<p>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p><u>foo{}</u>bar</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=text-decoration:underline>foo[]<p style=text-decoration:line-through>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p><span style=\"text-decoration:underline\">foo{}</span><span style=\"text-decoration:line-through\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=text-decoration:underline>foo[]<p style=text-decoration:line-through>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p><u>foo{}</u><s>bar</s></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=text-decoration:underline>foo[]<p style=text-decoration:line-through>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p><span style=\"text-decoration:underline\">foo{}</span><span style=\"text-decoration:line-through\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=text-decoration:underline>foo[]<p style=text-decoration:line-through>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p><u>foo{}</u><s>bar</s></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p style=text-decoration:line-through>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}<span style=\"text-decoration:line-through\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p style=text-decoration:line-through>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}<s>bar</s></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p style=text-decoration:line-through>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}<span style=\"text-decoration:line-through\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p style=text-decoration:line-through>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}<s>bar</s></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p><u>foo[]</u><p>bar",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p><u>foo</u>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p><u>foo[]</u><p>bar",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p><u>foo</u>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p><u>foo[]</u><p><s>bar</s>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p><u>foo</u>{}<s>bar</s></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p><u>foo[]</u><p><s>bar</s>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p><u>foo</u>{}<s>bar</s></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p><s>bar</s>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}<s>bar</s></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[]<p><s>bar</s>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}<s>bar</s></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo[]</p>bar",
+ [["stylewithcss","true"],["forwarddelete",""]],
+ "<p><span style=\"color:rgb(0, 0, 255)\">foo{}</span>bar</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo[]</p>bar",
+ [["stylewithcss","false"],["forwarddelete",""]],
+ "<p><font color=\"#0000ff\">foo{}</font>bar</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<p style=color:brown>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<p style=color:brown>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}<font color=\"#a52a2a\">bar</font>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<p style=color:brown>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]<p style=color:brown>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}<font color=\"#a52a2a\">bar</font>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=color:blue><p style=color:green>foo[]</div>bar",
+ [["stylewithcss","true"],["forwarddelete",""]],
+ "<div><p><span style=\"color:rgb(0, 128, 0)\">foo{}</span>bar</p></div>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=color:blue><p style=color:green>foo[]</div>bar",
+ [["stylewithcss","false"],["forwarddelete",""]],
+ "<div><p><font color=\"#008000\">foo{}</font>bar</p></div>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=color:blue><p style=color:green>foo[]</div><p style=color:brown>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<div style=\"color:rgb(0, 0, 255)\"><p style=\"color:rgb(0, 128, 0)\">foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=color:blue><p style=color:green>foo[]</div><p style=color:brown>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<div style=\"color:rgb(0, 0, 255)\"><p style=\"color:rgb(0, 128, 0)\">foo{}<font color=\"#a52a2a\">bar</font></p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=color:blue><p style=color:green>foo[]</div><p style=color:brown>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<div style=\"color:rgb(0, 0, 255)\"><p style=\"color:rgb(0, 128, 0)\">foo{}<span style=\"color:rgb(165, 42, 42)\">bar</span></p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div style=color:blue><p style=color:green>foo[]</div><p style=color:brown>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<div style=\"color:rgb(0, 0, 255)\"><p style=\"color:rgb(0, 128, 0)\">foo{}<font color=\"#a52a2a\">bar</font></p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo[]<div style=color:brown><p style=color:green>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}<span style=\"color:rgb(0, 128, 0)\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo[]<div style=color:brown><p style=color:green>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}<font color=\"#008000\">bar</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo[]<div style=color:brown><p style=color:green>bar",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}<span style=\"color:rgb(0, 128, 0)\">bar</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p style=color:blue>foo[]<div style=color:brown><p style=color:green>bar",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p style=\"color:rgb(0, 0, 255)\">foo{}<font color=\"#008000\">bar</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["forwarddelete",""]],
+ "foo[]baz",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar]</span>baz",
+ [["stylewithcss","true"],["forwarddelete",""]],
+ "<p>foo{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar]</span>baz",
+ [["stylewithcss","false"],["forwarddelete",""]],
+ "<p>foo{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar}</span>baz",
+ [["stylewithcss","true"],["forwarddelete",""]],
+ "<p>foo{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar}</span>baz",
+ [["stylewithcss","false"],["forwarddelete",""]],
+ "<p>foo{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo{<span style=color:#aBcDeF>bar</span>}baz",
+ [["stylewithcss","true"],["forwarddelete",""]],
+ "<p>foo{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo{<span style=color:#aBcDeF>bar</span>}baz",
+ [["stylewithcss","false"],["forwarddelete",""]],
+ "<p>foo{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>[foo<span style=color:#aBcDeF>bar]</span>baz",
+ [["stylewithcss","true"],["forwarddelete",""]],
+ "<p>{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>[foo<span style=color:#aBcDeF>bar]</span>baz",
+ [["stylewithcss","false"],["forwarddelete",""]],
+ "<p>{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>{foo<span style=color:#aBcDeF>bar}</span>baz",
+ [["stylewithcss","true"],["forwarddelete",""]],
+ "<p>{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>{foo<span style=color:#aBcDeF>bar}</span>baz",
+ [["stylewithcss","false"],["forwarddelete",""]],
+ "<p>{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span>baz]",
+ [["stylewithcss","true"],["forwarddelete",""]],
+ "<p>foo{}</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span>baz]",
+ [["stylewithcss","false"],["forwarddelete",""]],
+ "<p>foo{}</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar</span>baz}",
+ [["stylewithcss","true"],["forwarddelete",""]],
+ "<p>foo{}</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar</span>baz}",
+ [["stylewithcss","false"],["forwarddelete",""]],
+ "<p>foo{}</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz",
+ [["stylewithcss","true"],["forwarddelete",""]],
+ "<p>foo{}quz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz",
+ [["stylewithcss","false"],["forwarddelete",""]],
+ "<p>foo{}quz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["foo<b>[bar]</b>baz",
+ [["stylewithcss","true"],["forwarddelete",""]],
+ "foo{}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["foo<b>[bar]</b>baz",
+ [["stylewithcss","false"],["forwarddelete",""]],
+ "foo{}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["foo<b>{bar}</b>baz",
+ [["stylewithcss","true"],["forwarddelete",""]],
+ "foo{}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["foo<b>{bar}</b>baz",
+ [["stylewithcss","false"],["forwarddelete",""]],
+ "foo{}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{<b>bar</b>}baz",
+ [["stylewithcss","true"],["forwarddelete",""]],
+ "foo{}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{<b>bar</b>}baz",
+ [["stylewithcss","false"],["forwarddelete",""]],
+ "foo{}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["foo<span>[bar]</span>baz",
+ [["forwarddelete",""]],
+ "foo{}baz",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo<span>{bar}</span>baz",
+ [["forwarddelete",""]],
+ "foo{}baz",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo{<span>bar</span>}baz",
+ [["forwarddelete",""]],
+ "foo{}baz",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<b>foo[bar</b><i>baz]quz</i>",
+ [["forwarddelete",""]],
+ "<b>foo[]</b><i>quz</i>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo</p><p>[bar]</p><p>baz</p>",
+ [["forwarddelete",""]],
+ "<p>foo</p><p>{}<br></p><p>baz</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo</p><p>{bar}</p><p>baz</p>",
+ [["forwarddelete",""]],
+ "<p>foo</p><p>{}<br></p><p>baz</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo</p><p>{bar</p>}<p>baz</p>",
+ [["forwarddelete",""]],
+ "<p>foo</p><p>{}<br></p><p>baz</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo</p>{<p>bar}</p><p>baz</p>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo</p>{}<br><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo</p>{<p>bar}</p><p>baz</p>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo</p>{}<br><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo</p>{<p>bar</p>}<p>baz</p>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo</p>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo</p>{<p>bar</p>}<p>baz</p>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo</p>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[bar<p>baz]quz",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[bar<p>baz]quz",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[bar<div>baz]quz</div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[bar<div>baz]quz</div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[bar<h1>baz]quz</h1>",
+ [["forwarddelete",""]],
+ "<p>foo{}quz</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div>foo[bar</div><p>baz]quz",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<div>foo{}quz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div>foo[bar</div><p>baz]quz",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<div>foo{}quz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<blockquote>foo[bar</blockquote><pre>baz]quz</pre>",
+ [["forwarddelete",""]],
+ "<blockquote>foo{}quz</blockquote>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p><b>foo[bar</b><p>baz]quz",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p><b>foo</b>{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p><b>foo[bar</b><p>baz]quz",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p><b>foo</b>{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><p>foo[bar</div><p>baz]quz",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<div><p>foo{}quz</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><p>foo[bar</div><p>baz]quz",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<div><p>foo{}quz</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[bar<blockquote><p>baz]quz<p>qoz</blockquote",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}quz</p><blockquote><p>qoz</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[bar<blockquote><p>baz]quz<p>qoz</blockquote",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}quz</p><blockquote><p>qoz</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[bar<p style=color:blue>baz]quz",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}<span style=\"color:rgb(0, 0, 255)\">quz</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[bar<p style=color:blue>baz]quz",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}<font color=\"#0000ff\">quz</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[bar<p style=color:blue>baz]quz",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}<span style=\"color:rgb(0, 0, 255)\">quz</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[bar<p style=color:blue>baz]quz",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}<font color=\"#0000ff\">quz</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[bar<p><b>baz]quz</b>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}<b>quz</b></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[bar<p><b>baz]quz</b>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}<b>quz</b></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><p>foo<p>[bar<p>baz]</div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<div><p>foo</p><p>{}<br></p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><p>foo<p>[bar<p>baz]</div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<div><p>foo</p><p>{}<br></p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[<br>]bar",
+ [["forwarddelete",""]],
+ "foo{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[</p><p>]bar</p>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[</p><p>]bar</p>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[</p><p>]bar<br>baz</p>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}bar<br>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[</p><p>]bar<br>baz</p>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}bar<br>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[<p>]bar</p>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[<p>]bar</p>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{<p>}bar</p>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{<p>}bar</p>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[<p>]bar<br>baz</p>",
+ [["forwarddelete",""]],
+ "foo{}bar<p>baz</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[<p>]bar</p>baz",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}bar<br>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[<p>]bar</p>baz",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}bar<br>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{<p>bar</p>}baz",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{<p>bar</p>}baz",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo<p>{bar</p>}baz",
+ [["forwarddelete",""]],
+ "foo<p>{}baz</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo{<p>bar}</p>baz",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}<br>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo{<p>bar}</p>baz",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}<br>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[</p>]bar",
+ [["forwarddelete",""]],
+ "<p>foo{}bar</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo{</p>}bar",
+ [["forwarddelete",""]],
+ "<p>foo{}bar</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[</p>]bar<br>baz",
+ [["forwarddelete",""]],
+ "<p>foo{}bar</p>baz",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo[</p>]bar<p>baz</p>",
+ [["forwarddelete",""]],
+ "<p>foo{}bar</p><p>baz</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[<div><p>]bar</div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[<div><p>]bar</div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<div><p>foo[</p></div>]bar",
+ [["forwarddelete",""]],
+ "<div><p>foo{}bar</p></div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[<div><p>]bar</p>baz</div>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}bar<div>baz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[<div><p>]bar</p>baz</div>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}bar<div>baz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[<div>]bar<p>baz</p></div>",
+ [["forwarddelete",""]],
+ "foo{}bar<div><p>baz</p></div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div><p>foo</p>bar[</div>]baz",
+ [["forwarddelete",""]],
+ "<div><p>foo</p>bar{}baz</div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div>foo<p>bar[</p></div>]baz",
+ [["forwarddelete",""]],
+ "<div>foo<p>bar{}baz</p></div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<br>{</p>]bar",
+ [["forwarddelete",""]],
+ "<p>foo{}bar</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<br><br>{</p>]bar",
+ [["forwarddelete",""]],
+ "<p>foo<br>{}bar</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo<br>{<p>]bar</p>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo<br>{<p>]bar</p>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo<br><br>{<p>]bar</p>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "foo<br>{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo<br><br>{<p>]bar</p>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "foo<br>{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<br>{</p><p>}bar</p>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<br>{</p><p>}bar</p>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<br><br>{</p><p>}bar</p>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo<br>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<br><br>{</p><p>}bar</p>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo<br>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<table><tbody><tr><th>foo<th>[bar]<th>baz<tr><td>quz<td>qoz<td>qiz</table>",
+ [["forwarddelete",""]],
+ "<table><tbody><tr><th>foo</th><th>{}<br></th><th>baz</th></tr><tr><td>quz</td><td>qoz</td><td>qiz</td></tr></tbody></table>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<table><tbody><tr><th>foo<th>ba[r<th>b]az<tr><td>quz<td>qoz<td>qiz</table>",
+ [["forwarddelete",""]],
+ "<table><tbody><tr><th>foo</th><th>ba[]</th><th>az</th></tr><tr><td>quz</td><td>qoz</td><td>qiz</td></tr></tbody></table>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<table><tbody><tr><th>fo[o<th>bar<th>b]az<tr><td>quz<td>qoz<td>qiz</table>",
+ [["forwarddelete",""]],
+ "<table><tbody><tr><th>fo[]</th><th><br></th><th>az</th></tr><tr><td>quz</td><td>qoz</td><td>qiz</td></tr></tbody></table>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<table><tbody><tr><th>foo<th>bar<th>ba[z<tr><td>q]uz<td>qoz<td>qiz</table>",
+ [["forwarddelete",""]],
+ "<table><tbody><tr><th>foo</th><th>bar</th><th>ba[]</th></tr><tr><td>uz</td><td>qoz</td><td>qiz</td></tr></tbody></table>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<table><tbody><tr><th>[foo<th>bar<th>baz]<tr><td>quz<td>qoz<td>qiz</table>",
+ [["forwarddelete",""]],
+ "<table><tbody><tr><th>{}<br></th><th><br></th><th><br></th></tr><tr><td>quz</td><td>qoz</td><td>qiz</td></tr></tbody></table>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<table><tbody><tr><th>[foo<th>bar<th>baz<tr><td>quz<td>qoz<td>qiz]</table>",
+ [["forwarddelete",""]],
+ "<table><tbody><tr><th>{}<br></th><th><br></th><th><br></th></tr><tr><td><br></td><td><br></td><td><br></td></tr></tbody></table>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["{<table><tbody><tr><th>foo<th>bar<th>baz<tr><td>quz<td>qoz<td>qiz</table>}",
+ [["forwarddelete",""]],
+ "{}<br>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<table><tbody><tr><td>foo<td>ba[r<tr><td>baz<td>quz<tr><td>q]oz<td>qiz</table>",
+ [["forwarddelete",""]],
+ "<table><tbody><tr><td>foo</td><td>ba[]</td></tr><tr><td><br></td><td><br></td></tr><tr><td>oz</td><td>qiz</td></tr></tbody></table>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>fo[o<table><tr><td>b]ar</table><p>baz",
+ [["forwarddelete",""]],
+ "<p>fo[]</p><table><tbody><tr><td>ar</td></tr></tbody></table><p>baz</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<table><tr><td>ba[r</table><p>b]az",
+ [["forwarddelete",""]],
+ "<p>foo</p><table><tbody><tr><td>ba[]</td></tr></tbody></table><p>az</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>fo[o<table><tr><td>bar</table><p>b]az",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>fo{}az</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>fo[o<table><tr><td>bar</table><p>b]az",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>fo{}az</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<ol><li>ba[r<li>b]az</ol><p>quz",
+ [["forwarddelete",""]],
+ "<p>foo</p><ol><li>ba{}az</li></ol><p>quz</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<ol><li>bar<li>[baz]</ol><p>quz",
+ [["forwarddelete",""]],
+ "<p>foo</p><ol><li>bar</li><li>{}<br></li></ol><p>quz</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>fo[o<ol><li>b]ar<li>baz</ol><p>quz",
+ [["forwarddelete",""]],
+ "<p>fo{}ar</p><ol><li>baz</li></ol><p>quz</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<ol><li>bar<li>ba[z</ol><p>q]uz",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>foo</p><ol><li>bar</li><li>ba{}uz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>foo<ol><li>bar<li>ba[z</ol><p>q]uz",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>foo</p><ol><li>bar</li><li>ba{}uz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>fo[o<ol><li>bar<li>b]az</ol><p>quz",
+ [["forwarddelete",""]],
+ "<p>fo{}az</p><p>quz</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>fo[o<ol><li>bar<li>baz</ol><p>q]uz",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<p>fo{}uz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<p>fo[o<ol><li>bar<li>baz</ol><p>q]uz",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<p>fo{}uz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>fo[o</ol><ol><li>b]ar</ol>",
+ [["forwarddelete",""]],
+ "<ol><li>fo{}ar</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>fo[o</ol><ul><li>b]ar</ul>",
+ [["forwarddelete",""]],
+ "<ol><li>fo{}ar</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[<ol><li>]bar</ol>",
+ [["forwarddelete",""]],
+ "foo{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[<li>]bar</ol>",
+ [["forwarddelete",""]],
+ "<ol><li>foo{}bar</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[<dl><dt>]bar<dd>baz</dl>",
+ [["forwarddelete",""]],
+ "foo{}bar<dl><dd>baz</dd></dl>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["foo[<dl><dd>]bar</dl>",
+ [["forwarddelete",""]],
+ "foo{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<dl><dt>foo[<dd>]bar</dl>",
+ [["forwarddelete",""]],
+ "<dl><dt>foo{}bar</dt></dl>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<dl><dt>foo[<dt>]bar<dd>baz</dl>",
+ [["forwarddelete",""]],
+ "<dl><dt>foo{}bar</dt><dd>baz</dd></dl>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>bar[<dd>]baz</dl>",
+ [["forwarddelete",""]],
+ "<dl><dt>foo</dt><dd>bar{}baz</dd></dl>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>{}<br><ol><li>bar</ol>",
+ [["forwarddelete",""]],
+ "<ol><li>foo</li></ol>{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>{}<br></p><ol><li>bar</ol>",
+ [["forwarddelete",""]],
+ "<ol><li>foo</li></ol><p>{}bar</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo</ol><p>{}<br></p><ol><li>bar</ol>",
+ [["forwarddelete",""]],
+ "<ol><li><p>foo</p></li></ol><p>{}bar</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol id=a><li>foo</ol>{}<br><ol><li>bar</ol>",
+ [["forwarddelete",""]],
+ "<ol id=\"a\"><li>foo</li></ol>{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>{}<br><ol id=b><li>bar</ol>",
+ [["forwarddelete",""]],
+ "<ol><li>foo</li></ol>{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol id=a><li>foo</ol>{}<br><ol id=b><li>bar</ol>",
+ [["forwarddelete",""]],
+ "<ol id=\"a\"><li>foo</li></ol>{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol class=a><li>foo</ol>{}<br><ol class=b><li>bar</ol>",
+ [["forwarddelete",""]],
+ "<ol class=\"a\"><li>foo</li></ol>{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><ol><li>foo</ol><li>{}<br><ol><li>bar</ol></ol>",
+ [["forwarddelete",""]],
+ "<ol><ol><li>foo</li></ol><li>{}bar</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><ol><li>foo</ol><li>{}<br></li><ol><li>bar</ol></ol>",
+ [["forwarddelete",""]],
+ "<ol><ol><li>foo</li></ol><li>{}bar</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[</ol>bar]<ol><li>baz</ol>",
+ [["forwarddelete",""]],
+ "<ol><li>foo{}</li><li>baz</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[</ol><p>bar]<ol><li>baz</ol>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<ol><li>foo{}</li><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[</ol><p>bar]<ol><li>baz</ol>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<ol><li>foo{}</li><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo[</ol><p>bar]<ol><li>baz</ol>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<ol><li><p>foo{}</p></li><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo[</ol><p>bar]<ol><li>baz</ol>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<ol><li><p>foo{}</p></li><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>fo[]o</ol><ol><li>bar</ol>",
+ [["forwarddelete",""]],
+ "<ol><li>fo[]</li></ol><ol><li>bar</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>[bar<ol><li>]baz</ol>",
+ [["forwarddelete",""]],
+ "<ol><li>foo</li></ol>{}baz",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>[bar<ol><li>]baz</ol>",
+ [["forwarddelete",""]],
+ "<ol><li>foo</li></ol><p>{}baz</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>[bar<ol><li><p>]baz</ol>",
+ [["defaultparagraphseparator","div"],["forwarddelete",""]],
+ "<ol><li>foo</li></ol><p>{}baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>[bar<ol><li><p>]baz</ol>",
+ [["defaultparagraphseparator","p"],["forwarddelete",""]],
+ "<ol><li>foo</li></ol><p>{}baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><ol><li>[]bar</ol>",
+ [["forwarddelete",""]],
+ "<ol><li>foo</li></ol><ol><li>{}ar</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><ol><li>foo[</ol><li>bar</ol>baz]<ol><li>quz</ol>",
+ [["forwarddelete",""]],
+ "<ol><ol><li>foo{}</li></ol><li>quz</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul>{}<br><ul><li>bar</ul>",
+ [["forwarddelete",""]],
+ "<ul><li>foo</li></ul>{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul><p>{}<br></p><ul><li>bar</ul>",
+ [["forwarddelete",""]],
+ "<ul><li>foo</li></ul><p>{}bar</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[<li>bar]</ol><ol><li>baz</ol><ol><li>quz</ol>",
+ [["forwarddelete",""]],
+ "<ol><li>foo{}</li><li>baz</li><li>quz</li></ol>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>{}<br><ul><li>bar</ul>",
+ [["forwarddelete",""]],
+ "<ol><li>foo</li></ol>{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>{}<br></p><ul><li>bar</ul>",
+ [["forwarddelete",""]],
+ "<ol><li>foo</li></ol><p>{}bar</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul>{}<br><ol><li>bar</ol>",
+ [["forwarddelete",""]],
+ "<ul><li>foo</li></ul>{}bar",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul><p>{}<br></p><ol><li>bar</ol>",
+ [["forwarddelete",""]],
+ "<ul><li>foo</li></ul><p>{}bar</p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p><b>[foo]</b>",
+ [["forwarddelete",""]],
+ "<p><b>{}<br></b></p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p><quasit>[foo]</quasit>",
+ [["forwarddelete",""]],
+ "<p><quasit>{}<br></quasit></p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p><b><i>[foo]</i></b>",
+ [["forwarddelete",""]],
+ "<p><b><i>{}<br></i></b></p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p><b>{foo}</b>",
+ [["forwarddelete",""]],
+ "<p><b>{}<br></b></p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p>{<b>foo</b>}",
+ [["forwarddelete",""]],
+ "<p><b>{}<br></b></p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<p><b>[]f</b>",
+ [["forwarddelete",""]],
+ "<p><b>{}<br></b></p>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<b>[foo]</b>",
+ [["forwarddelete",""]],
+ "<b>{}<br></b>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}],
+["<div><b>[foo]</b></div>",
+ [["forwarddelete",""]],
+ "<div><b>{}<br></b></div>",
+ [true],
+ {"forwarddelete":[false,false,"",false,false,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/hilitecolor.js b/testing/web-platform/tests/editing/data/hilitecolor.js
new file mode 100644
index 000000000..e1f561d8f
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/hilitecolor.js
@@ -0,0 +1,412 @@
+var browserTests = [
+["foo[]bar",
+ [["hilitecolor","#00FFFF"]],
+ "foo[]bar",
+ [true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">[foo</span></p> <p><span style=\"background-color:rgb(0, 255, 255)\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">[foo</span></p> <p><span style=\"background-color:rgb(0, 255, 255)\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\"><span>[foo</span> <span>bar]</span></span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\"><span>[foo</span> <span>bar]</span></span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">[foo</span></p><p> <span style=\"background-color:rgb(0, 255, 255)\"><span>bar</span></span> </p><p><span style=\"background-color:rgb(0, 255, 255)\">baz]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">[foo</span></p><p> <span style=\"background-color:rgb(0, 255, 255)\"><span>bar</span></span> </p><p><span style=\"background-color:rgb(0, 255, 255)\">baz]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">[foo</span></p><p><span style=\"background-color:rgb(0, 255, 255)\"><br></span></p><p><span style=\"background-color:rgb(0, 255, 255)\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">[foo</span></p><p><span style=\"background-color:rgb(0, 255, 255)\"><br></span></p><p><span style=\"background-color:rgb(0, 255, 255)\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<b>foo[]bar</b>",
+ [["hilitecolor","#00FFFF"]],
+ "<b>foo[]bar</b>",
+ [true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<i>foo[]bar</i>",
+ [["hilitecolor","#00FFFF"]],
+ "<i>foo[]bar</i>",
+ [true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<span>foo</span>{}<span>bar</span>",
+ [["hilitecolor","#00FFFF"]],
+ "<span>foo</span>{}<span>bar</span>",
+ [true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<span>foo[</span><span>]bar</span>",
+ [["hilitecolor","#00FFFF"]],
+ "<span>foo[</span><span>]bar</span>",
+ [true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">[bar</span><b><span style=\"background-color:rgb(0, 255, 255)\">baz]</span>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">[bar</span><b><span style=\"background-color:rgb(0, 255, 255)\">baz]</span>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">[bar</span><i><span style=\"background-color:rgb(0, 255, 255)\">baz]</span>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">[bar</span><i><span style=\"background-color:rgb(0, 255, 255)\">baz]</span>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "{<p></p><p> </p><p><span style=\"background-color:rgb(0, 255, 255)\">foo</span></p>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "{<p></p><p> </p><p><span style=\"background-color:rgb(0, 255, 255)\">foo</span></p>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<table><tbody><tr><td>foo</td><td>b<span style=\"background-color:rgb(0, 255, 255)\">[a]</span>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<table><tbody><tr><td>foo</td><td>b<span style=\"background-color:rgb(0, 255, 255)\">[a]</span>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<table><tbody><tr><td>foo</td>{<td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<table><tbody><tr><td>foo</td>{<td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<table><tbody><tr>{<td><span style=\"background-color:rgb(0, 255, 255)\">foo</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<table><tbody><tr>{<td><span style=\"background-color:rgb(0, 255, 255)\">foo</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<table><tbody>{<tr><td><span style=\"background-color:rgb(0, 255, 255)\">foo</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">baz</span></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<table><tbody>{<tr><td><span style=\"background-color:rgb(0, 255, 255)\">foo</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">baz</span></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<table>{<tbody><tr><td><span style=\"background-color:rgb(0, 255, 255)\">foo</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">baz</span></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<table>{<tbody><tr><td><span style=\"background-color:rgb(0, 255, 255)\">foo</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">baz</span></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "{<table><tbody><tr><td><span style=\"background-color:rgb(0, 255, 255)\">foo</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">baz</span></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "{<table><tbody><tr><td><span style=\"background-color:rgb(0, 255, 255)\">foo</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">bar</span></td><td><span style=\"background-color:rgb(0, 255, 255)\">baz</span></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<p style=\"background-color: rgb(0, 255, 255)\">foo[bar]baz</p>",
+ [["hilitecolor","#00FFFF"]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</p>",
+ [true],
+ {"hilitecolor":[false,false,"rgb(0, 255, 255)",false,false,"rgb(0, 255, 255)"]}],
+["<p style=\"background-color: #00ffff\">foo[bar]baz</p>",
+ [["hilitecolor","#00FFFF"]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</p>",
+ [true],
+ {"hilitecolor":[false,false,"rgb(0, 255, 255)",false,false,"rgb(0, 255, 255)"]}],
+["<p style=\"background-color: aqua\">foo[bar]baz</p>",
+ [["hilitecolor","#00FFFF"]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</p>",
+ [true],
+ {"hilitecolor":[false,false,"rgb(0, 255, 255)",false,false,"rgb(0, 255, 255)"]}],
+["{<p style=\"background-color: aqua\">foo</p><p>bar</p>}",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "{<p style=\"background-color:rgb(0, 255, 255)\">foo</p><p><span style=\"background-color:rgb(0, 255, 255)\">bar</span></p>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[true,false,"rgb(0, 255, 255)",false,false,"rgb(0, 255, 255)"]}],
+["{<p style=\"background-color: aqua\">foo</p><p>bar</p>}",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "{<p style=\"background-color:rgb(0, 255, 255)\">foo</p><p><span style=\"background-color:rgb(0, 255, 255)\">bar</span></p>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[true,false,"rgb(0, 255, 255)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"background-color: aqua\">foo<span style=\"background-color: tan\">[bar]</span>baz</span>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"background-color: aqua\">foo<span style=\"background-color: tan\">[bar]</span>baz</span>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"background-color: #00ffff\">foo<span style=\"background-color: tan\">[bar]</span>baz</span>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"background-color: #00ffff\">foo<span style=\"background-color: tan\">[bar]</span>baz</span>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"background-color: #0ff\">foo<span style=\"background-color: tan\">[bar]</span>baz</span>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"background-color: #0ff\">foo<span style=\"background-color: tan\">[bar]</span>baz</span>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"background-color: rgb(0, 255, 255)\">foo<span style=\"background-color: tan\">[bar]</span>baz</span>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"background-color: rgb(0, 255, 255)\">foo<span style=\"background-color: tan\">[bar]</span>baz</span>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"background-color: aqua\">foo<span style=\"background-color: tan\">b[ar]</span>baz</span>",
+ [["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">foo<span style=\"background-color:rgb(210, 180, 140)\">b</span>[ar]baz</span>",
+ [true],
+ {"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<p style=\"background-color: aqua\">foo<span style=\"background-color: tan\">b[ar]</span>baz</p>",
+ [["hilitecolor","#00FFFF"]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo<span style=\"background-color:rgb(210, 180, 140)\">b</span>[ar]baz</p>",
+ [true],
+ {"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<div style=\"background-color: aqua\"><p style=\"background-color: tan\">b[ar]</p></div>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<div style=\"background-color:rgb(0, 255, 255)\"><p style=\"background-color:rgb(210, 180, 140)\">b<span style=\"background-color:rgb(0, 255, 255)\">[ar]</span></p></div>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<div style=\"background-color: aqua\"><p style=\"background-color: tan\">b[ar]</p></div>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<div style=\"background-color:rgb(0, 255, 255)\"><p style=\"background-color:rgb(210, 180, 140)\">b<span style=\"background-color:rgb(0, 255, 255)\">[ar]</span></p></div>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"display: block; background-color: aqua\"><span style=\"display: block; background-color: tan\">b[ar]</span></span>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<span style=\"display:block; background-color:rgb(0, 255, 255)\"><span style=\"display:block; background-color:rgb(210, 180, 140)\">b<span style=\"background-color:rgb(0, 255, 255)\">[ar]</span></span></span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=\"display: block; background-color: aqua\"><span style=\"display: block; background-color: tan\">b[ar]</span></span>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<span style=\"display:block; background-color:rgb(0, 255, 255)\"><span style=\"display:block; background-color:rgb(210, 180, 140)\">b<span style=\"background-color:rgb(0, 255, 255)\">[ar]</span></span></span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["fo[o<span style=background-color:tan>b]ar</span>baz",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "fo<span style=\"background-color:rgb(0, 255, 255)\">[o</span><span style=\"background-color:rgb(210, 180, 140)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[true,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["fo[o<span style=background-color:tan>b]ar</span>baz",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "fo<span style=\"background-color:rgb(0, 255, 255)\">[o</span><span style=\"background-color:rgb(210, 180, 140)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[true,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["foo<span style=background-color:tan>ba[r</span>b]az",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(210, 180, 140)\">ba<span style=\"background-color:rgb(0, 255, 255)\">[r</span></span><span style=\"background-color:rgb(0, 255, 255)\">b]</span>az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[true,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["foo<span style=background-color:tan>ba[r</span>b]az",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(210, 180, 140)\">ba<span style=\"background-color:rgb(0, 255, 255)\">[r</span></span><span style=\"background-color:rgb(0, 255, 255)\">b]</span>az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[true,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["fo[o<span style=background-color:tan>bar</span>b]az",
+ [["hilitecolor","#00FFFF"]],
+ "fo<span style=\"background-color:rgb(0, 255, 255)\">[obarb]</span>az",
+ [true],
+ {"hilitecolor":[true,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["foo[<span style=background-color:tan>b]ar</span>baz",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "foo[<span style=\"background-color:rgb(210, 180, 140)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["foo[<span style=background-color:tan>b]ar</span>baz",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "foo[<span style=\"background-color:rgb(210, 180, 140)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["foo<span style=background-color:tan>ba[r</span>]baz",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(210, 180, 140)\">ba<span style=\"background-color:rgb(0, 255, 255)\">[r</span></span>]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["foo<span style=background-color:tan>ba[r</span>]baz",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(210, 180, 140)\">ba<span style=\"background-color:rgb(0, 255, 255)\">[r</span></span>]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["foo[<span style=background-color:tan>bar</span>]baz",
+ [["hilitecolor","#00FFFF"]],
+ "foo[<span style=\"background-color:rgb(0, 255, 255)\">bar</span>]baz",
+ [true],
+ {"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["foo<span style=background-color:tan>[bar]</span>baz",
+ [["hilitecolor","#00FFFF"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">[bar]</span>baz",
+ [true],
+ {"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["foo{<span style=background-color:tan>bar</span>}baz",
+ [["hilitecolor","#00FFFF"]],
+ "foo{<span style=\"background-color:rgb(0, 255, 255)\">bar}</span>baz",
+ [true],
+ {"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=background-color:tan>fo[o</span><span style=background-color:yellow>b]ar</span>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(210, 180, 140)\">fo<span style=\"background-color:rgb(0, 255, 255)\">[o</span></span><span style=\"background-color:rgb(255, 255, 0)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[true,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=background-color:tan>fo[o</span><span style=background-color:yellow>b]ar</span>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(210, 180, 140)\">fo<span style=\"background-color:rgb(0, 255, 255)\">[o</span></span><span style=\"background-color:rgb(255, 255, 0)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[true,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=background-color:tan>fo[o</span><span style=background-color:tan>b]ar</span>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(210, 180, 140)\">fo<span style=\"background-color:rgb(0, 255, 255)\">[o</span></span><span style=\"background-color:rgb(210, 180, 140)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=background-color:tan>fo[o</span><span style=background-color:tan>b]ar</span>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(210, 180, 140)\">fo<span style=\"background-color:rgb(0, 255, 255)\">[o</span></span><span style=\"background-color:rgb(210, 180, 140)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=background-color:tan>fo[o<span style=background-color:transparent>b]ar</span></span>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(210, 180, 140)\">fo<span style=\"background-color:rgb(0, 255, 255)\">[o</span><span style=\"background-color:rgba(0, 0, 0, 0)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span></span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=background-color:tan>fo[o<span style=background-color:transparent>b]ar</span></span>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(210, 180, 140)\">fo<span style=\"background-color:rgb(0, 255, 255)\">[o</span><span style=\"background-color:rgba(0, 0, 0, 0)\"><span style=\"background-color:rgb(0, 255, 255)\">b]</span>ar</span></span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgb(210, 180, 140)",false,false,"rgb(0, 255, 255)"]}],
+["<font size=6>[foo]</font>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\"><font size=\"6\">[foo]</font></span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<font size=6>[foo]</font>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\"><font size=\"6\">[foo]</font></span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=font-size:xx-large>[foo]</span>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\"><span style=\"font-size:xx-large\">[foo]</span></span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=font-size:xx-large>[foo]</span>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\"><span style=\"font-size:xx-large\">[foo]</span></span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<font size=6>foo[bar]baz</font>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<font size=\"6\">foo<span style=\"background-color:rgb(0, 255, 255)\">[bar]</span>baz</font>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<font size=6>foo[bar]baz</font>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<font size=\"6\">foo<span style=\"background-color:rgb(0, 255, 255)\">[bar]</span>baz</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=font-size:xx-large>foo[bar]baz</span>",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<span style=\"font-size:xx-large\">foo<span style=\"background-color:rgb(0, 255, 255)\">[bar]</span>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["<span style=font-size:xx-large>foo[bar]baz</span>",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<span style=\"font-size:xx-large\">foo<span style=\"background-color:rgb(0, 255, 255)\">[bar]</span>baz</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["[foo<font size=6>bar</font>baz]",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">[foo<font size=\"6\">bar</font>baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["[foo<font size=6>bar</font>baz]",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">[foo<font size=\"6\">bar</font>baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["[foo<span style=font-size:xx-large>bar</span>baz]",
+ [["stylewithcss","true"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">[foo<span style=\"font-size:xx-large\">bar</span>baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}],
+["[foo<span style=font-size:xx-large>bar</span>baz]",
+ [["stylewithcss","false"],["hilitecolor","#00FFFF"]],
+ "<span style=\"background-color:rgb(0, 255, 255)\">[foo<span style=\"font-size:xx-large\">bar</span>baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"]}]
+]
diff --git a/testing/web-platform/tests/editing/data/indent.js b/testing/web-platform/tests/editing/data/indent.js
new file mode 100644
index 000000000..283271630
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/indent.js
@@ -0,0 +1,717 @@
+var browserTests = [
+["foo[]bar<p>extra",
+ [["indent",""]],
+ "<blockquote>foo[]bar</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<span>foo</span>{}<span>bar</span><p>extra",
+ [["indent",""]],
+ "<blockquote><span>foo</span>{}<span>bar</span></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<span>foo[</span><span>]bar</span><p>extra",
+ [["indent",""]],
+ "<blockquote><span>foo[</span><span>]bar</span></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["foo[bar]baz<p>extra",
+ [["indent",""]],
+ "<blockquote>foo[bar]baz</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p dir=rtl>פו[בר]בז<p dir=rtl>נוםף",
+ [["indent",""]],
+ "<blockquote><p dir=\"rtl\">פו[בר]בז</p></blockquote><p dir=\"rtl\">נוםף</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p dir=rtl>פו[ברבז<p>Foobar]baz<p>Extra",
+ [["indent",""]],
+ "<blockquote><p dir=\"rtl\">פו[ברבז</p><p>Foobar]baz</p></blockquote><p>Extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>Foo[barbaz<p dir=rtl>פובר]בז<p>Extra",
+ [["indent",""]],
+ "<blockquote><p>Foo[barbaz</p><p dir=\"rtl\">פובר]בז</p></blockquote><p>Extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<div><p>Foo[barbaz<p dir=rtl>פובר]בז</div><p>Extra",
+ [["indent",""]],
+ "<blockquote><div><p>Foo[barbaz</p><p dir=\"rtl\">פובר]בז</p></div></blockquote><p>Extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["foo]bar[baz<p>extra",
+ [["indent",""]],
+ "<blockquote>foo[bar]baz</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["{<p><p> <p>foo</p>}<p>extra",
+ [["indent",""]],
+ "<blockquote>{<p></p><p> </p><p>foo</p>}</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["foo[bar<i>baz]qoz</i>quz<p>extra",
+ [["indent",""]],
+ "<blockquote>foo[bar<i>baz]qoz</i>quz</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["[]foo<p>extra",
+ [["indent",""]],
+ "<blockquote>[]foo</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["foo[]<p>extra",
+ [["indent",""]],
+ "<blockquote>foo[]</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>[]foo<p>extra",
+ [["indent",""]],
+ "<blockquote><p>[]foo</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>foo[]<p>extra",
+ [["indent",""]],
+ "<blockquote><p>foo[]</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>{}<br>foo</p><p>extra",
+ [["indent",""]],
+ "<blockquote>{}<br></blockquote><p>foo</p><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>foo<br>{}</p><p>extra",
+ [["indent",""]],
+ "<blockquote><p>foo{}</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<span>{}<br>foo</span>bar<p>extra",
+ [["indent",""]],
+ "<blockquote>{}<br></blockquote><span>foo</span>bar<p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<span>foo<br>{}</span>bar<p>extra",
+ [["indent",""]],
+ "<span>foo{}</span><blockquote>bar</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>foo</p>{}<p>bar</p>",
+ [["indent",""]],
+ "<p>foo</p>{}<p>bar</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["indent",""]],
+ "<table><tbody><tr><td>foo</td><td><blockquote>b[a]r</blockquote></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["indent",""]],
+ "<table><tbody><tr><td>foo</td>{<td><blockquote>bar</blockquote></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["indent",""]],
+ "<table><tbody><tr>{<td><blockquote>foo</blockquote></td><td><blockquote>bar</blockquote></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["indent",""]],
+ "<blockquote><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["indent",""]],
+ "<blockquote><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["indent",""]],
+ "<blockquote>{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>foo[bar]</p><p>baz</p><p>extra",
+ [["indent",""]],
+ "<blockquote><p>foo[bar]</p></blockquote><p>baz</p><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>[foobar</p><p>ba]z</p><p>extra",
+ [["indent",""]],
+ "<blockquote><p>[foobar</p><p>ba]z</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["foo[bar]<br>baz<p>extra",
+ [["indent",""]],
+ "<blockquote>foo[bar]</blockquote>baz<p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["foo[bar]<br><br><br><br>baz<p>extra",
+ [["indent",""]],
+ "<blockquote>foo[bar]</blockquote><br><br><br>baz<p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["foobar<br>[ba]z<p>extra",
+ [["indent",""]],
+ "foobar<blockquote>[ba]z</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["foobar<br><br><br><br>[ba]z<p>extra",
+ [["indent",""]],
+ "foobar<br><br><br><br><blockquote>[ba]z</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["foo[bar<br>ba]z<p>extra",
+ [["indent",""]],
+ "<blockquote>foo[bar<br>ba]z</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<div>foo<p>[bar]</p>baz</div><p>extra",
+ [["indent",""]],
+ "<div>foo<blockquote><p>[bar]</p></blockquote>baz</div><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote><p>foo[bar]</p><p>baz</p></blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote><blockquote><p>foo[bar]</p></blockquote><p>baz</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote><p>foo[bar</p><p>b]az</p></blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote><blockquote><p>foo[bar</p><p>b]az</p></blockquote></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote><p>foo[bar]</p></blockquote><p>baz</p><p>extra",
+ [["indent",""]],
+ "<blockquote><blockquote><p>foo[bar]</p></blockquote></blockquote><p>baz</p><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote><p>foo[bar</p></blockquote><p>b]az</p><p>extra",
+ [["indent",""]],
+ "<blockquote><blockquote><p>foo[bar</p></blockquote><p>b]az</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>[foo]<blockquote><p>bar</blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote><p>[foo]</p><p>bar</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>[foo<blockquote><p>b]ar</blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote><p>[foo</p><blockquote><p>b]ar</p></blockquote></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>foo<blockquote><p>bar</blockquote><p>[baz]<p>extra",
+ [["indent",""]],
+ "<p>foo</p><blockquote><p>bar</p><p>[baz]</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>foo<blockquote><p>[bar</blockquote><p>baz]<p>extra",
+ [["indent",""]],
+ "<p>foo</p><blockquote><blockquote><p>[bar</p></blockquote><p>baz]</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>[foo<blockquote><p>bar</blockquote><p>baz]<p>extra",
+ [["indent",""]],
+ "<blockquote><p>[foo</p><blockquote><p>bar</p></blockquote><p>baz]</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote><p>foo</blockquote><p>[bar]<blockquote><p>baz</blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote><p>foo</p><p>[bar]</p><p>baz</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote>foo[bar]<br>baz</blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote><blockquote>foo[bar]</blockquote>baz</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote>foo[bar<br>b]az</blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote><blockquote>foo[bar<br>b]az</blockquote></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote>foo[bar]</blockquote>baz<p>extra",
+ [["indent",""]],
+ "<blockquote><blockquote>foo[bar]</blockquote></blockquote>baz<p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote>foo[bar</blockquote>b]az<p>extra",
+ [["indent",""]],
+ "<blockquote><blockquote>foo[bar</blockquote>b]az</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["[foo]<blockquote>bar</blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote>[foo]<br>bar</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["[foo<blockquote>b]ar</blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote>[foo<blockquote>b]ar</blockquote></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["foo<blockquote>bar</blockquote>[baz]<p>extra",
+ [["indent",""]],
+ "foo<blockquote>bar<br>[baz]</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["[foo<blockquote>bar</blockquote>baz]<p>extra",
+ [["indent",""]],
+ "<blockquote>[foo<blockquote>bar</blockquote>baz]</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote>foo</blockquote>[bar]<blockquote>baz</blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote>foo<br>[bar]<br>baz</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote style=\"margin-right: 0\" dir=\"ltr\"><p>foo[bar]</p><p>baz</p></blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote style=\"margin-right:0\" dir=\"ltr\"><blockquote><p>foo[bar]</p></blockquote><p>baz</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote style=\"margin-right: 0\" dir=\"ltr\"><p>foo[bar</p><p>b]az</p></blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote><blockquote style=\"margin-right:0\" dir=\"ltr\"><p>foo[bar</p><p>b]az</p></blockquote></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote style=\"margin-right: 0\" dir=\"ltr\"><p>foo[bar]</p></blockquote><p>baz</p><p>extra",
+ [["indent",""]],
+ "<blockquote><blockquote style=\"margin-right:0\" dir=\"ltr\"><p>foo[bar]</p></blockquote></blockquote><p>baz</p><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote style=\"margin-right: 0\" dir=\"ltr\"><p>foo[bar</p></blockquote><p>b]az</p><p>extra",
+ [["indent",""]],
+ "<blockquote><blockquote style=\"margin-right:0\" dir=\"ltr\"><p>foo[bar</p></blockquote><p>b]az</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>[foo]<blockquote style=\"margin-right: 0\" dir=\"ltr\"><p>bar</blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote style=\"margin-right:0\" dir=\"ltr\"><p>[foo]</p><p>bar</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>[foo<blockquote style=\"margin-right: 0\" dir=\"ltr\"><p>b]ar</blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote><p>[foo</p><blockquote style=\"margin-right:0\" dir=\"ltr\"><p>b]ar</p></blockquote></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>foo<blockquote style=\"margin-right: 0\" dir=\"ltr\"><p>bar</blockquote><p>[baz]<p>extra",
+ [["indent",""]],
+ "<p>foo</p><blockquote style=\"margin-right:0\" dir=\"ltr\"><p>bar</p><p>[baz]</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>foo<blockquote style=\"margin-right: 0\" dir=\"ltr\"><p>[bar</blockquote><p>baz]<p>extra",
+ [["indent",""]],
+ "<p>foo</p><blockquote><blockquote style=\"margin-right:0\" dir=\"ltr\"><p>[bar</p></blockquote><p>baz]</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>[foo<blockquote style=\"margin-right: 0\" dir=\"ltr\"><p>bar</blockquote><p>baz]<p>extra",
+ [["indent",""]],
+ "<blockquote><p>[foo</p><blockquote style=\"margin-right:0\" dir=\"ltr\"><p>bar</p></blockquote><p>baz]</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote style=\"margin-right: 0\" dir=\"ltr\"><p>foo</blockquote><p>[bar]<blockquote style=\"margin-right: 0\" dir=\"ltr\"><p>baz</blockquote><p>extra",
+ [["stylewithcss","true"],["indent",""]],
+ "<blockquote style=\"margin-right:0\" dir=\"ltr\"><p>foo</p><p>[bar]</p><p>baz</p></blockquote><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"indent":[false,false,"",false,false,""]}],
+["<blockquote style=\"margin-right: 0\" dir=\"ltr\"><p>foo</blockquote><p>[bar]<blockquote style=\"margin-right: 0\" dir=\"ltr\"><p>baz</blockquote><p>extra",
+ [["stylewithcss","false"],["indent",""]],
+ "<blockquote style=\"margin-right:0\" dir=\"ltr\"><p>foo</p><p>[bar]</p><p>baz</p></blockquote><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"indent":[false,false,"",false,false,""]}],
+["<p style=\"margin-left: 40px\">foo[bar]</p><p style=\"margin-left: 40px\">baz</p><p>extra",
+ [["indent",""]],
+ "<blockquote><p style=\"margin-left:40px\">foo[bar]</p></blockquote><p style=\"margin-left:40px\">baz</p><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p style=\"margin-left: 40px\">foo[bar</p><p style=\"margin-left: 40px\">b]az</p><p>extra",
+ [["indent",""]],
+ "<blockquote><p style=\"margin-left:40px\">foo[bar</p><p style=\"margin-left:40px\">b]az</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p style=\"margin-left: 40px\">foo[bar]</p><p>baz</p><p>extra",
+ [["indent",""]],
+ "<blockquote><p style=\"margin-left:40px\">foo[bar]</p></blockquote><p>baz</p><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p style=\"margin-left: 40px\">foo[bar</p><p>b]az</p><p>extra",
+ [["indent",""]],
+ "<blockquote><p style=\"margin-left:40px\">foo[bar</p><p>b]az</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>[foo]<p style=\"margin-left: 40px\">bar<p>extra",
+ [["indent",""]],
+ "<blockquote><p>[foo]</p></blockquote><p style=\"margin-left:40px\">bar</p><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>[foo<p style=\"margin-left: 40px\">b]ar<p>extra",
+ [["indent",""]],
+ "<blockquote><p>[foo</p><p style=\"margin-left:40px\">b]ar</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>foo<p style=\"margin-left: 40px\">bar<p>[baz]<p>extra",
+ [["indent",""]],
+ "<p>foo</p><p style=\"margin-left:40px\">bar</p><blockquote><p>[baz]</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>foo<p style=\"margin-left: 40px\">[bar<p>baz]<p>extra",
+ [["indent",""]],
+ "<p>foo</p><blockquote><p style=\"margin-left:40px\">[bar</p><p>baz]</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>[foo<p style=\"margin-left: 40px\">bar<p>baz]<p>extra",
+ [["indent",""]],
+ "<blockquote><p>[foo</p><p style=\"margin-left:40px\">bar</p><p>baz]</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p style=\"margin-left: 40px\">foo<p>[bar]<p style=\"margin-left: 40px\">baz<p>extra",
+ [["indent",""]],
+ "<p style=\"margin-left:40px\">foo</p><blockquote><p>[bar]</p></blockquote><p style=\"margin-left:40px\">baz</p><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px\"><p>foo[bar]</p><p>baz</p></blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote class=\"webkit-indent-blockquote\" style=\"margin:0 0 0 40px; border:none; padding:0px\"><blockquote><p>foo[bar]</p></blockquote><p>baz</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px\"><p>foo[bar</p><p>b]az</p></blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote><blockquote class=\"webkit-indent-blockquote\" style=\"margin:0 0 0 40px; border:none; padding:0px\"><p>foo[bar</p><p>b]az</p></blockquote></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px\"><p>foo[bar]</p></blockquote><p>baz</p><p>extra",
+ [["indent",""]],
+ "<blockquote><blockquote class=\"webkit-indent-blockquote\" style=\"margin:0 0 0 40px; border:none; padding:0px\"><p>foo[bar]</p></blockquote></blockquote><p>baz</p><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px\"><p>foo[bar</p></blockquote><p>b]az</p><p>extra",
+ [["indent",""]],
+ "<blockquote><blockquote class=\"webkit-indent-blockquote\" style=\"margin:0 0 0 40px; border:none; padding:0px\"><p>foo[bar</p></blockquote><p>b]az</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>[foo]<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px\"><p>bar</blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote><p>[foo]</p></blockquote><blockquote class=\"webkit-indent-blockquote\" style=\"margin:0 0 0 40px; border:none; padding:0px\"><p>bar</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>[foo<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px\"><p>b]ar</blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote><p>[foo</p><blockquote class=\"webkit-indent-blockquote\" style=\"margin:0 0 0 40px; border:none; padding:0px\"><p>b]ar</p></blockquote></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>foo<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px\"><p>bar</blockquote><p>[baz]<p>extra",
+ [["indent",""]],
+ "<p>foo</p><blockquote class=\"webkit-indent-blockquote\" style=\"margin:0 0 0 40px; border:none; padding:0px\"><p>bar</p></blockquote><blockquote><p>[baz]</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>foo<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px\"><p>[bar</blockquote><p>baz]<p>extra",
+ [["indent",""]],
+ "<p>foo</p><blockquote><blockquote class=\"webkit-indent-blockquote\" style=\"margin:0 0 0 40px; border:none; padding:0px\"><p>[bar</p></blockquote><p>baz]</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>[foo<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px\"><p>bar</blockquote><p>baz]<p>extra",
+ [["indent",""]],
+ "<blockquote><p>[foo</p><blockquote class=\"webkit-indent-blockquote\" style=\"margin:0 0 0 40px; border:none; padding:0px\"><p>bar</p></blockquote><p>baz]</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px\"><p>foo</blockquote><p>[bar]<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px\"><p>baz</blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote class=\"webkit-indent-blockquote\" style=\"margin:0 0 0 40px; border:none; padding:0px\"><p>foo</p></blockquote><blockquote><p>[bar]</p></blockquote><blockquote class=\"webkit-indent-blockquote\" style=\"margin:0 0 0 40px; border:none; padding:0px\"><p>baz</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote>f[oo<blockquote>b]ar</blockquote></blockquote><p>extra",
+ [["indent",""]],
+ "<blockquote><blockquote>f[oo<blockquote>b]ar</blockquote></blockquote></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>[bar]<li>baz</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>[bar]</li></ol><li>baz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol data-start=1 data-end=2><li>foo<li>bar<li>baz</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol>{<li>bar</li>}</ol><li>baz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>[bar]",
+ [["indent",""]],
+ "<ol><li>foo</li></ol><blockquote>[bar]</blockquote>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>[foo]<br>bar<li>baz</ol>",
+ [["indent",""]],
+ "<ol><ol><li>[foo]<br>bar</li></ol><li>baz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<br>[bar]<li>baz</ol>",
+ [["indent",""]],
+ "<ol><ol><li>foo<br>[bar]</li></ol><li>baz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li><div>[foo]</div>bar<li>baz</ol>",
+ [["indent",""]],
+ "<ol><ol><li><div>[foo]</div>bar</li></ol><li>baz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>[bar]<li>baz</ol><li>quz</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><ol><li>[bar]</li></ol><li>baz</li></ol><li>quz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>bar<li>[baz]</ol><li>quz</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>bar</li><ol><li>[baz]</li></ol></ol><li>quz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol><li>[bar]<li>baz</ol><li>quz</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><ol><li>[bar]</li></ol><li>baz</li></ol><li>quz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol data-start=0 data-end=1><li>bar<li>baz</ol><li>quz</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><ol>{<li>bar</li>}</ol><li>baz</li></ol><li>quz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol><li>bar<li>[baz]</ol><li>quz</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>bar</li><ol><li>[baz]</li></ol></ol><li>quz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol data-start=1 data-end=2><li>bar<li>baz</ol><li>quz</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>bar</li><ol>{<li>baz</li>}</ol></ol><li>quz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>b[a]r</ol><li>baz</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><ol><li>b[a]r</li></ol></ol><li>baz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol><li>b[a]r</ol><li>baz</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><ol><li>b[a]r</li></ol></ol><li>baz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo{<ol><li>bar</ol>}<li>baz</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol>{<ol><li>bar</li></ol>}</ol><li>baz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li>{<ol><li>bar</ol>}<li>baz</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol>{<ol><li>bar</li></ol>}</ol><li>baz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>[foo]<ol><li>bar</ol><li>baz</ol>",
+ [["indent",""]],
+ "<ol><ol><li>[foo]</li><li>bar</li></ol><li>baz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>[foo]</li><ol><li>bar</ol><li>baz</ol>",
+ [["indent",""]],
+ "<ol><ol><li>[foo]</li><li>bar</li></ol><li>baz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>[bar]<ol><li>baz</ol><li>quz</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>[bar]</li><li>baz</li></ol><li>quz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>[bar]</li><ol><li>baz</ol><li>quz</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>[bar]</li><li>baz</li></ol><li>quz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>bar<li>baz</ol><li>[quz]</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>bar</li><li>baz</li><li>[quz]</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol><li>bar<li>baz</ol><li>[quz]</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>bar</li><li>baz</li><li>[quz]</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><ol id=u1><li id=i1>foo</ol><li id=i2>[bar]</li><ol id=u3><li id=i3>baz</ol></ol>",
+ [["indent",""]],
+ "<ol><ol id=\"u1\"><li id=\"i1\">foo</li><li id=\"i2\">[bar]</li><li id=\"i3\">baz</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><ol><li id=i1>foo</ol><li id=i2>[bar]</li><ol id=u3><li id=i3>baz</ol></ol>",
+ [["indent",""]],
+ "<ol><ol><li id=\"i1\">foo</li><li id=\"i2\">[bar]</li><li id=\"i3\">baz</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><ol id=u1><li id=i1>foo</ol><li id=i2>[bar]</li><ol><li id=i3>baz</ol></ol>",
+ [["indent",""]],
+ "<ol><ol id=\"u1\"><li id=\"i1\">foo</li><li id=\"i2\">[bar]</li><li id=\"i3\">baz</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li id=i2>[bar]</li><ol id=u3><li id=i3>baz</ol></ol>",
+ [["indent",""]],
+ "<ol><ol id=\"u3\"><li id=\"i2\">[bar]</li><li id=\"i3\">baz</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><ol id=u1><li id=i1>foo</ol><li id=i2>[bar]</ol>",
+ [["indent",""]],
+ "<ol><ol id=\"u1\"><li id=\"i1\">foo</li><li id=\"i2\">[bar]</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>b[ar<li>baz]</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>b[ar</li><li>baz]</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>[foo<ol><li>bar]</ol><li>baz</ol>",
+ [["indent",""]],
+ "<ol><ol><li>[foo</li><ol><li>bar]</li></ol></ol><li>baz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>[foo</li><ol><li>bar]</ol><li>baz</ol>",
+ [["indent",""]],
+ "<ol><ol><li>[foo</li><ol><li>bar]</li></ol></ol><li>baz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>b[ar</ol><li>b]az</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><ol><li>b[ar</li></ol><li>b]az</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol><li>b[ar</ol><li>b]az</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><ol><li>b[ar</li></ol><li>b]az</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>[foo<ol><li>bar</ol><li>baz]</ol><p>extra",
+ [["indent",""]],
+ "<blockquote><ol><li>[foo</li><ol><li>bar</li></ol><li>baz]</li></ol></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>[foo</li><ol><li>bar</ol><li>baz]</ol><p>extra",
+ [["indent",""]],
+ "<blockquote><ol><li>[foo</li><ol><li>bar</li></ol><li>baz]</li></ol></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>[foo]<ol><li>bar</ol>baz</ol>",
+ [["indent",""]],
+ "<ol><ol><li>[foo]</li><li>bar</li></ol><li>baz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>[bar]</ol>baz</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><ol><li>[bar]</li></ol></ol><li>baz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>bar</ol>[baz]</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>bar</li><li>[baz]</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>[foo<ol><li>bar]</ol>baz</ol>",
+ [["indent",""]],
+ "<ol><ol><li>[foo</li><ol><li>bar]</li></ol></ol><li>baz</li></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["foo<!--bar-->[baz]<p>extra",
+ [["indent",""]],
+ "<blockquote>foo<!--bar-->[baz]</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["[foo]<!--bar-->baz<p>extra",
+ [["indent",""]],
+ "<blockquote>[foo]<!--bar-->baz</blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>foo<!--bar-->{}<p>extra",
+ [["indent",""]],
+ "<blockquote><p>foo<!--bar-->{}</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>{}<!--foo-->bar<p>extra",
+ [["indent",""]],
+ "<blockquote><p>{}<!--foo-->bar</p></blockquote><p>extra</p>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote><p>foo</blockquote> <p>[bar]",
+ [["indent",""]],
+ "<blockquote><p>foo</p> <p>[bar]</p></blockquote>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<p>[foo]</p> <blockquote><p>bar</blockquote>",
+ [["indent",""]],
+ "<blockquote><p>[foo]</p> <p>bar</p></blockquote>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<blockquote><p>foo</blockquote> <p>[bar]</p> <blockquote><p>baz</blockquote>",
+ [["indent",""]],
+ "<blockquote><p>foo</p> <p>[bar]</p> <p>baz</p></blockquote>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol><li>bar</li> </ol><li>[baz]</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>bar</li> <li>[baz]</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol><li>bar</li></ol> <li>[baz]</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>bar</li> <li>[baz]</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol><li>bar</li> </ol> <li>[baz]</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>bar</li> <li>[baz]</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>bar</li> </ol></li><li>[baz]</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>bar</li> <li>[baz]</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>bar</li></ol></li> <li>[baz]</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>bar</li> <li>[baz]</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>bar</li> </ol></li> <li>[baz]</ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>bar</li> <li>[baz]</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>[bar]</li> <ol><li>baz</ol></ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>[bar]</li> <li>baz</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>[bar]</li><ol> <li>baz</ol></ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>[bar]</li> <li>baz</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>[bar]</li> <ol> <li>baz</ol></ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>[bar]</li> <li>baz</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>[bar] <ol><li>baz</ol></ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>[bar] </li><li>baz</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>[bar]<ol> <li>baz</ol></ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>[bar]</li> <li>baz</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>[bar] <ol> <li>baz</ol></ol>",
+ [["indent",""]],
+ "<ol><li>foo</li><ol><li>[bar] </li> <li>baz</li></ol></ol>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}],
+["<ul><li>a<br>{<br>}</li><li>b</li></ul>",
+ [["indent",""]],
+ "<ul><ul><li>a<br>{<br>}</li></ul><li>b</li></ul>",
+ [true],
+ {"indent":[false,false,"",false,false,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/inserthorizontalrule.js b/testing/web-platform/tests/editing/data/inserthorizontalrule.js
new file mode 100644
index 000000000..6f0cdba33
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/inserthorizontalrule.js
@@ -0,0 +1,587 @@
+var browserTests = [
+["foo[]bar",
+ [["inserthorizontalrule",""]],
+ "foo<hr>{}bar",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<span>foo</span>{}<span>bar</span>",
+ [["inserthorizontalrule",""]],
+ "<span>foo</span><hr>{}<span>bar</span>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<span>foo[</span><span>]bar</span>",
+ [["inserthorizontalrule",""]],
+ "<span>foo</span><hr>{}<span>bar</span>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<p>foo[bar<p>baz]quz",
+ [["inserthorizontalrule",""]],
+ "<p>foo</p><hr>{}<p>quz</p>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<div><b>foo</b>{}<b>bar</b></div>",
+ [["inserthorizontalrule",""]],
+ "<div><b>foo</b><hr>{}<b>bar</b></div>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<div><b>foo[</b><b>]bar</b></div>",
+ [["inserthorizontalrule",""]],
+ "<div><b>foo</b><hr>{}<b>bar</b></div>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<div><b>foo</b>{<b>bar</b>}<b>baz</b></div>",
+ [["stylewithcss","true"],["inserthorizontalrule",""]],
+ "<div><b>foo</b><hr>{}<b>baz</b></div>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<div><b>foo</b>{<b>bar</b>}<b>baz</b></div>",
+ [["stylewithcss","false"],["inserthorizontalrule",""]],
+ "<div><b>foo</b><hr>{}<b>baz</b></div>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<b>foo[]bar</b>",
+ [["stylewithcss","true"],["inserthorizontalrule",""]],
+ "<b>foo</b><hr>{}<b>bar</b>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<b>foo[]bar</b>",
+ [["stylewithcss","false"],["inserthorizontalrule",""]],
+ "<b>foo</b><hr>{}<b>bar</b>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<b id=abc>foo[]bar</b>",
+ [["stylewithcss","true"],["inserthorizontalrule",""]],
+ "<b id=\"abc\">foo</b><hr>{}<b>bar</b>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<b id=abc>foo[]bar</b>",
+ [["stylewithcss","false"],["inserthorizontalrule",""]],
+ "<b id=\"abc\">foo</b><hr>{}<b>bar</b>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["inserthorizontalrule","abc"]],
+ "foo<hr>{}baz",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["inserthorizontalrule",""]],
+ "foo<hr>{}baz",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo<b>[bar]</b>baz",
+ [["stylewithcss","true"],["inserthorizontalrule",""]],
+ "foo<hr>{}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo<b>[bar]</b>baz",
+ [["stylewithcss","false"],["inserthorizontalrule",""]],
+ "foo<hr>{}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo<b>{bar}</b>baz",
+ [["stylewithcss","true"],["inserthorizontalrule",""]],
+ "foo<hr>{}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo<b>{bar}</b>baz",
+ [["stylewithcss","false"],["inserthorizontalrule",""]],
+ "foo<hr>{}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo{<b>bar</b>}baz",
+ [["stylewithcss","true"],["inserthorizontalrule",""]],
+ "foo<hr>{}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo{<b>bar</b>}baz",
+ [["stylewithcss","false"],["inserthorizontalrule",""]],
+ "foo<hr>{}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<p>foo<p>[bar]<p>baz",
+ [["defaultparagraphseparator","div"],["inserthorizontalrule",""]],
+ "<p>foo</p><hr>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"div"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<p>foo<p>[bar]<p>baz",
+ [["defaultparagraphseparator","p"],["inserthorizontalrule",""]],
+ "<p>foo</p><hr>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<p>foo<p>{bar}<p>baz",
+ [["defaultparagraphseparator","div"],["inserthorizontalrule",""]],
+ "<p>foo</p><hr>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<p>foo<p>{bar}<p>baz",
+ [["defaultparagraphseparator","p"],["inserthorizontalrule",""]],
+ "<p>foo</p><hr>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<p>foo{<p>bar</p>}<p>baz",
+ [["defaultparagraphseparator","div"],["inserthorizontalrule",""]],
+ "<p>foo</p><hr>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<p>foo{<p>bar</p>}<p>baz",
+ [["defaultparagraphseparator","p"],["inserthorizontalrule",""]],
+ "<p>foo</p><hr>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<p>foo[bar]baz</p>",
+ [["defaultparagraphseparator","div"],["inserthorizontalrule",""]],
+ "<p>foo</p><hr>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<p>foo[bar]baz</p>",
+ [["defaultparagraphseparator","p"],["inserthorizontalrule",""]],
+ "<p>foo</p><hr>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<p id=abc>foo[bar]baz</p>",
+ [["defaultparagraphseparator","div"],["inserthorizontalrule",""]],
+ "<p id=\"abc\">foo</p><hr>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<p id=abc>foo[bar]baz</p>",
+ [["defaultparagraphseparator","p"],["inserthorizontalrule",""]],
+ "<p id=\"abc\">foo</p><hr>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<h1>foo[bar]baz</h1>",
+ [["inserthorizontalrule",""]],
+ "<h1>foo</h1><hr>{}<h1>baz</h1>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<p>foo<b>b[a]r</b>baz</p>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["inserthorizontalrule",""]],
+ "<p>foo<b>b</b></p><hr>{}<p><b>r</b>baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<p>foo<b>b[a]r</b>baz</p>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["inserthorizontalrule",""]],
+ "<p>foo<b>b</b></p><hr>{}<p><b>r</b>baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<p>foo<b>b[a]r</b>baz</p>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["inserthorizontalrule",""]],
+ "<p>foo<b>b</b></p><hr>{}<p><b>r</b>baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<p>foo<b>b[a]r</b>baz</p>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["inserthorizontalrule",""]],
+ "<p>foo<b>b</b></p><hr>{}<p><b>r</b>baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<a>foo[bar]baz</a>",
+ [["inserthorizontalrule",""]],
+ "<a>foo</a><hr>{}<a>baz</a>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<a href=/>foo[bar]baz</a>",
+ [["inserthorizontalrule",""]],
+ "<a href=\"/\">foo</a><hr>{}<a href=\"/\">baz</a>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<abbr>foo[bar]baz</abbr>",
+ [["inserthorizontalrule",""]],
+ "<abbr>foo</abbr><hr>{}<abbr>baz</abbr>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<address>foo[bar]baz</address>",
+ [["inserthorizontalrule",""]],
+ "<address>foo<hr>{}baz</address>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<article>foo[bar]baz</article>",
+ [["inserthorizontalrule",""]],
+ "<article>foo<hr>{}baz</article>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<aside>foo[bar]baz</aside>",
+ [["inserthorizontalrule",""]],
+ "<aside>foo<hr>{}baz</aside>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<b>foo[bar]baz</b>",
+ [["stylewithcss","true"],["inserthorizontalrule",""]],
+ "<b>foo</b><hr>{}<b>baz</b>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<b>foo[bar]baz</b>",
+ [["stylewithcss","false"],["inserthorizontalrule",""]],
+ "<b>foo</b><hr>{}<b>baz</b>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<bdi>foo[bar]baz</bdi>",
+ [["inserthorizontalrule",""]],
+ "<bdi>foo</bdi><hr>{}<bdi>baz</bdi>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<bdo dir=rtl>foo[bar]baz</bdo>",
+ [["inserthorizontalrule",""]],
+ "<bdo dir=\"rtl\">foo</bdo><hr>{}<bdo dir=\"rtl\">baz</bdo>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<blockquote>foo[bar]baz</blockquote>",
+ [["inserthorizontalrule",""]],
+ "<blockquote>foo<hr>{}baz</blockquote>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<table><caption>foo[bar]baz</caption><tr><td>quz</table>",
+ [["inserthorizontalrule",""]],
+ "<table><caption>foo<hr>{}baz</caption><tbody><tr><td>quz</td></tr></tbody></table>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<cite>foo[bar]baz</cite>",
+ [["inserthorizontalrule",""]],
+ "<cite>foo</cite><hr>{}<cite>baz</cite>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<code>foo[bar]baz</code>",
+ [["inserthorizontalrule",""]],
+ "<code>foo</code><hr>{}<code>baz</code>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<dl><dd>foo[bar]baz</dd></dl>",
+ [["inserthorizontalrule",""]],
+ "<dl><dd>foo<hr>{}baz</dd></dl>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<del>foo[bar]baz</del>",
+ [["inserthorizontalrule",""]],
+ "<del>foo<hr>{}baz</del>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<details>foo[bar]baz</details>",
+ [["inserthorizontalrule",""]],
+ "<details>foo<hr>{}baz</details>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<dfn>foo[bar]baz</dfn>",
+ [["inserthorizontalrule",""]],
+ "<dfn>foo</dfn><hr>{}<dfn>baz</dfn>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<div>foo[bar]baz</div>",
+ [["inserthorizontalrule",""]],
+ "<div>foo<hr>{}baz</div>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<dl><dt>foo[bar]baz</dt></dl>",
+ [["inserthorizontalrule",""]],
+ "<dl><dt>foo<hr>{}baz</dt></dl>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<em>foo[bar]baz</em>",
+ [["inserthorizontalrule",""]],
+ "<em>foo</em><hr>{}<em>baz</em>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<figure><figcaption>foo[bar]baz</figcaption>quz</figure>",
+ [["inserthorizontalrule",""]],
+ "<figure><figcaption>foo<hr>{}baz</figcaption>quz</figure>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<figure>foo[bar]baz</figure>",
+ [["inserthorizontalrule",""]],
+ "<figure>foo<hr>{}baz</figure>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<footer>foo[bar]baz</footer>",
+ [["inserthorizontalrule",""]],
+ "<footer>foo<hr>{}baz</footer>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<h1>foo[bar]baz</h1>",
+ [["inserthorizontalrule",""]],
+ "<h1>foo</h1><hr>{}<h1>baz</h1>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<h2>foo[bar]baz</h2>",
+ [["inserthorizontalrule",""]],
+ "<h2>foo</h2><hr>{}<h2>baz</h2>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<h3>foo[bar]baz</h3>",
+ [["inserthorizontalrule",""]],
+ "<h3>foo</h3><hr>{}<h3>baz</h3>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<h4>foo[bar]baz</h4>",
+ [["inserthorizontalrule",""]],
+ "<h4>foo</h4><hr>{}<h4>baz</h4>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<h5>foo[bar]baz</h5>",
+ [["inserthorizontalrule",""]],
+ "<h5>foo</h5><hr>{}<h5>baz</h5>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<h6>foo[bar]baz</h6>",
+ [["inserthorizontalrule",""]],
+ "<h6>foo</h6><hr>{}<h6>baz</h6>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<header>foo[bar]baz</header>",
+ [["inserthorizontalrule",""]],
+ "<header>foo<hr>{}baz</header>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<hgroup>foo[bar]baz</hgroup>",
+ [["inserthorizontalrule",""]],
+ "<hgroup>foo</hgroup><hr>{}<hgroup>baz</hgroup>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<hgroup><h1>foo[bar]baz</h1></hgroup>",
+ [["inserthorizontalrule",""]],
+ "<hgroup><h1>foo</h1></hgroup><hr>{}<hgroup><h1>baz</h1></hgroup>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<i>foo[bar]baz</i>",
+ [["stylewithcss","true"],["inserthorizontalrule",""]],
+ "<i>foo</i><hr>{}<i>baz</i>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<i>foo[bar]baz</i>",
+ [["stylewithcss","false"],["inserthorizontalrule",""]],
+ "<i>foo</i><hr>{}<i>baz</i>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<ins>foo[bar]baz</ins>",
+ [["inserthorizontalrule",""]],
+ "<ins>foo<hr>{}baz</ins>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<kbd>foo[bar]baz</kbd>",
+ [["inserthorizontalrule",""]],
+ "<kbd>foo</kbd><hr>{}<kbd>baz</kbd>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<mark>foo[bar]baz</mark>",
+ [["inserthorizontalrule",""]],
+ "<mark>foo</mark><hr>{}<mark>baz</mark>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<nav>foo[bar]baz</nav>",
+ [["inserthorizontalrule",""]],
+ "<nav>foo<hr>{}baz</nav>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<ol><li>foo[bar]baz</li></ol>",
+ [["inserthorizontalrule",""]],
+ "<ol><li>foo<hr>{}baz</li></ol>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<p>foo[bar]baz</p>",
+ [["defaultparagraphseparator","div"],["inserthorizontalrule",""]],
+ "<p>foo</p><hr>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<p>foo[bar]baz</p>",
+ [["defaultparagraphseparator","p"],["inserthorizontalrule",""]],
+ "<p>foo</p><hr>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<pre>foo[bar]baz</pre>",
+ [["inserthorizontalrule",""]],
+ "<pre>foo</pre><hr>{}<pre>baz</pre>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<q>foo[bar]baz</q>",
+ [["inserthorizontalrule",""]],
+ "<q>foo</q><hr>{}<q>baz</q>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<ruby>foo[bar]baz<rt>quz</rt></ruby>",
+ [["inserthorizontalrule",""]],
+ "<ruby>foo</ruby><hr>{}<ruby>baz<rt>quz</rt></ruby>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<ruby>foo<rt>bar[baz]quz</rt></ruby>",
+ [["inserthorizontalrule",""]],
+ "<ruby>foo<rt>bar</rt></ruby><hr>{}<ruby><rt>quz</rt></ruby>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<ruby>foo<rp>bar[baz]quz</rp><rt>qoz</rt><rp>qiz</rp></ruby>",
+ [["inserthorizontalrule",""]],
+ "<ruby>foo<rp>bar</rp></ruby><hr>{}<ruby><rp>quz</rp><rt>qoz</rt><rp>qiz</rp></ruby>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<s>foo[bar]baz</s>",
+ [["stylewithcss","true"],["inserthorizontalrule",""]],
+ "<s>foo</s><hr>{}<s>baz</s>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<s>foo[bar]baz</s>",
+ [["stylewithcss","false"],["inserthorizontalrule",""]],
+ "<s>foo</s><hr>{}<s>baz</s>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<samp>foo[bar]baz</samp>",
+ [["inserthorizontalrule",""]],
+ "<samp>foo</samp><hr>{}<samp>baz</samp>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<section>foo[bar]baz</section>",
+ [["inserthorizontalrule",""]],
+ "<section>foo<hr>{}baz</section>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<small>foo[bar]baz</small>",
+ [["inserthorizontalrule",""]],
+ "<small>foo</small><hr>{}<small>baz</small>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<span>foo[bar]baz</span>",
+ [["inserthorizontalrule",""]],
+ "<span>foo</span><hr>{}<span>baz</span>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<strong>foo[bar]baz</strong>",
+ [["inserthorizontalrule",""]],
+ "<strong>foo</strong><hr>{}<strong>baz</strong>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<sub>foo[bar]baz</sub>",
+ [["stylewithcss","true"],["inserthorizontalrule",""]],
+ "<sub>foo</sub><hr>{}<sub>baz</sub>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<sub>foo[bar]baz</sub>",
+ [["stylewithcss","false"],["inserthorizontalrule",""]],
+ "<sub>foo</sub><hr>{}<sub>baz</sub>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<sup>foo[bar]baz</sup>",
+ [["stylewithcss","true"],["inserthorizontalrule",""]],
+ "<sup>foo</sup><hr>{}<sup>baz</sup>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<sup>foo[bar]baz</sup>",
+ [["stylewithcss","false"],["inserthorizontalrule",""]],
+ "<sup>foo</sup><hr>{}<sup>baz</sup>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<table><tr><td>foo[bar]baz</td></table>",
+ [["inserthorizontalrule",""]],
+ "<table><tbody><tr><td>foo<hr>{}baz</td></tr></tbody></table>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<table><tr><th>foo[bar]baz</th></table>",
+ [["inserthorizontalrule",""]],
+ "<table><tbody><tr><th>foo<hr>{}baz</th></tr></tbody></table>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<u>foo[bar]baz</u>",
+ [["stylewithcss","true"],["inserthorizontalrule",""]],
+ "<u>foo</u><hr>{}<u>baz</u>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<u>foo[bar]baz</u>",
+ [["stylewithcss","false"],["inserthorizontalrule",""]],
+ "<u>foo</u><hr>{}<u>baz</u>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<ul><li>foo[bar]baz</li></ul>",
+ [["inserthorizontalrule",""]],
+ "<ul><li>foo<hr>{}baz</li></ul>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<var>foo[bar]baz</var>",
+ [["inserthorizontalrule",""]],
+ "<var>foo</var><hr>{}<var>baz</var>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<acronym>foo[bar]baz</acronym>",
+ [["inserthorizontalrule",""]],
+ "<acronym>foo</acronym><hr>{}<acronym>baz</acronym>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<big>foo[bar]baz</big>",
+ [["inserthorizontalrule",""]],
+ "<big>foo</big><hr>{}<big>baz</big>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<blink>foo[bar]baz</blink>",
+ [["inserthorizontalrule",""]],
+ "<blink>foo</blink><hr>{}<blink>baz</blink>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<center>foo[bar]baz</center>",
+ [["inserthorizontalrule",""]],
+ "<center>foo<hr>{}baz</center>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<dir>foo[bar]baz</dir>",
+ [["inserthorizontalrule",""]],
+ "<dir>foo</dir><hr>{}<dir>baz</dir>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<dir><li>foo[bar]baz</li></dir>",
+ [["inserthorizontalrule",""]],
+ "<dir><li>foo<hr>{}baz</li></dir>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<font>foo[bar]baz</font>",
+ [["stylewithcss","true"],["inserthorizontalrule",""]],
+ "<font>foo</font><hr>{}<font>baz</font>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<font>foo[bar]baz</font>",
+ [["stylewithcss","false"],["inserthorizontalrule",""]],
+ "<font>foo</font><hr>{}<font>baz</font>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<listing>foo[bar]baz</listing>",
+ [["inserthorizontalrule",""]],
+ "<listing>foo</listing><hr>{}<listing>baz</listing>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<marquee>foo[bar]baz</marquee>",
+ [["inserthorizontalrule",""]],
+ "<marquee>foo</marquee><hr>{}<marquee>baz</marquee>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<nobr>foo[bar]baz</nobr>",
+ [["inserthorizontalrule",""]],
+ "<nobr>foo</nobr><hr>{}<nobr>baz</nobr>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<strike>foo[bar]baz</strike>",
+ [["stylewithcss","true"],["inserthorizontalrule",""]],
+ "<strike>foo</strike><hr>{}<strike>baz</strike>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<strike>foo[bar]baz</strike>",
+ [["stylewithcss","false"],["inserthorizontalrule",""]],
+ "<strike>foo</strike><hr>{}<strike>baz</strike>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<tt>foo[bar]baz</tt>",
+ [["inserthorizontalrule",""]],
+ "<tt>foo</tt><hr>{}<tt>baz</tt>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<xmp>foo[bar]baz</xmp>",
+ [["inserthorizontalrule",""]],
+ "<xmp>foo</xmp><hr>{}<xmp>baz</xmp>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<quasit>foo[bar]baz</quasit>",
+ [["inserthorizontalrule",""]],
+ "<quasit>foo<hr>{}baz</quasit>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["<table><tr><td>fo[o<td>b]ar</table>",
+ [["inserthorizontalrule",""]],
+ "<table><tbody><tr><td>fo<hr>{}</td><td>ar</td></tr></tbody></table>",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}],
+["fo[o<span contenteditable=false>bar</span>b]az",
+ [["inserthorizontalrule",""]],
+ "fo<hr>{}<span contenteditable=\"false\">bar</span>az",
+ [true],
+ {"inserthorizontalrule":[false,false,"",false,false,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/inserthtml.js b/testing/web-platform/tests/editing/data/inserthtml.js
new file mode 100644
index 000000000..78581bf53
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/inserthtml.js
@@ -0,0 +1,522 @@
+var browserTests = [
+["foo[]bar",
+ [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}bar",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}bar",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo<span style=color:#aBcDeF>[bar]</span>baz",
+ [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo<span style=color:#aBcDeF>[bar]</span>baz",
+ [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo<span style=color:#aBcDeF>{bar}</span>baz",
+ [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo<span style=color:#aBcDeF>{bar}</span>baz",
+ [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo{<span style=color:#aBcDeF>bar</span>}baz",
+ [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo{<span style=color:#aBcDeF>bar</span>}baz",
+ [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+["[foo<span style=color:#aBcDeF>bar]</span>baz",
+ [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
+ "ab<b>c</b>d{}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["[foo<span style=color:#aBcDeF>bar]</span>baz",
+ [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
+ "ab<b>c</b>d{}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+["{foo<span style=color:#aBcDeF>bar}</span>baz",
+ [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
+ "ab<b>c</b>d{}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["{foo<span style=color:#aBcDeF>bar}</span>baz",
+ [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
+ "ab<b>c</b>d{}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo<span style=color:#aBcDeF>[bar</span>baz]",
+ [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo<span style=color:#aBcDeF>[bar</span>baz]",
+ [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo<span style=color:#aBcDeF>{bar</span>baz}",
+ [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo<span style=color:#aBcDeF>{bar</span>baz}",
+ [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz",
+ [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz",
+ [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["inserthtml",""]],
+ "foo[]baz",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["inserthtml","\u0000"]],
+ "foo[]baz",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["inserthtml","\u0007"]],
+ "foo\u0007{}baz",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["inserthtml","<b>"]],
+ "foo<b></b>{}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["inserthtml","<b>"]],
+ "foo<b></b>{}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["inserthtml","<b>abc"]],
+ "foo<b>abc</b>{}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["inserthtml","<b>abc"]],
+ "foo<b>abc</b>{}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+["<p>foo[bar]baz",
+ [["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
+ "<p>foo</p><p>abc</p>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
+["<p>foo[bar]baz",
+ [["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
+ "<p>foo</p><p>abc</p>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
+["<p>foo[bar]baz",
+ [["defaultparagraphseparator","div"],["inserthtml","<li>abc"]],
+ "<p>foo</p><div>abc</div>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
+["<p>foo[bar]baz",
+ [["defaultparagraphseparator","p"],["inserthtml","<li>abc"]],
+ "<p>foo</p><p>abc</p>{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
+["<ol>{<li>foo</li>}<li>bar</ol>",
+ [["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
+ "<p>abc</p>{}<ol><li>bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
+["<ol>{<li>foo</li>}<li>bar</ol>",
+ [["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
+ "<p>abc</p>{}<ol><li>bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
+["<ol><li>foo</li>{<li>bar</li>}<li>baz</ol>",
+ [["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
+ "<ol><li>foo</li></ol><p>abc</p>{}<ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
+["<ol><li>foo</li>{<li>bar</li>}<li>baz</ol>",
+ [["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
+ "<ol><li>foo</li></ol><p>abc</p>{}<ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
+["<ol><li>[foo]</li><li>bar</ol>",
+ [["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
+ "<ol><li><p>abc</p>{}</li><li>bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
+["<ol><li>[foo]</li><li>bar</ol>",
+ [["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
+ "<ol><li><p>abc</p>{}</li><li>bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
+["<xmp>f[o]o</xmp>",
+ [["inserthtml","abc"]],
+ "<xmp>fabc{}o</xmp>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<xmp>f[o]o</xmp>",
+ [["stylewithcss","true"],["inserthtml","<b>abc</b>"]],
+ "<xmp>f<b>abc</b>{}o</xmp>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["<xmp>f[o]o</xmp>",
+ [["stylewithcss","false"],["inserthtml","<b>abc</b>"]],
+ "<xmp>f<b>abc</b>{}o</xmp>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+["<script>f[o]o</script>bar",
+ [["inserthtml","abc"]],
+ "<script>fabc{}o</script>bar",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<script>f[o]o</script>bar",
+ [["stylewithcss","true"],["inserthtml","<b>abc</b>"]],
+ "<script>f<b>abc</b>{}o</script>bar",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["<script>f[o]o</script>bar",
+ [["stylewithcss","false"],["inserthtml","<b>abc</b>"]],
+ "<script>f<b>abc</b>{}o</script>bar",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+["<a>f[o]o</a>",
+ [["inserthtml","<a>abc</a>"]],
+ "<a>f</a><a>abc</a>{}<a>o</a>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<a href=.>f[o]o</a>",
+ [["inserthtml","<a href=/>abc</a>"]],
+ "<a href=\".\">f</a><a href=\"/\">abc</a>{}<a href=\".\">o</a>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<p>f[o]o",
+ [["defaultparagraphseparator","div"],["inserthtml","<hr>"]],
+ "<p>f</p><hr>{}<p>o</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
+["<p>f[o]o",
+ [["defaultparagraphseparator","p"],["inserthtml","<hr>"]],
+ "<p>f</p><hr>{}<p>o</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
+["<b>f[o]o</b>",
+ [["stylewithcss","true"],["inserthtml","<hr>"]],
+ "<b>f</b><hr>{}<b>o</b>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["<b>f[o]o</b>",
+ [["stylewithcss","false"],["inserthtml","<hr>"]],
+ "<b>f</b><hr>{}<b>o</b>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+["<h1>f[o]o</h1>",
+ [["inserthtml","<h2>abc</h2>"]],
+ "<h1>f</h1><h2>abc</h2>{}<h1>o</h1>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<table><tr><td>f[o]o</table>",
+ [["inserthtml","<td>abc</td>"]],
+ "<table><tbody><tr><td>fabc{}o</td></tr></tbody></table>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["f[o]o",
+ [["inserthtml","<td>abc</td>"]],
+ "fabc{}o",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<dl><dt>f[o]o<dd>bar</dl>",
+ [["inserthtml","<dt>abc</dt>"]],
+ "<dl><dt>f</dt><dt>abc</dt>{}<dt>o</dt><dd>bar</dd></dl>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>b[a]r</dl>",
+ [["inserthtml","<dt>abc</dt>"]],
+ "<dl><dt>foo</dt><dd>b</dd><dt>abc</dt>{}<dd>r</dd></dl>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<dl><dt>f[o]o<dd>bar</dl>",
+ [["inserthtml","<dd>abc</dd>"]],
+ "<dl><dt>f</dt><dd>abc</dd>{}<dt>o</dt><dd>bar</dd></dl>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>b[a]r</dl>",
+ [["inserthtml","<dd>abc</dd>"]],
+ "<dl><dt>foo</dt><dd>b</dd><dd>abc</dd>{}<dd>r</dd></dl>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["f[o]o",
+ [["inserthtml","<dt>abc</dt>"]],
+ "f<dl><dt>abc</dt>{}</dl>o",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<ol><li>f[o]o</ol>",
+ [["inserthtml","<dt>abc</dt>"]],
+ "<ol><li>f<dl><dt>abc</dt>{}</dl>o</li></ol>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["f[o]o",
+ [["inserthtml","<dd>abc</dd>"]],
+ "f<dl><dd>abc</dd>{}</dl>o",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<ol><li>f[o]o</ol>",
+ [["inserthtml","<dd>abc</dd>"]],
+ "<ol><li>f<dl><dd>abc</dd>{}</dl>o</li></ol>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<dir><li>f[o]o</dir>",
+ [["inserthtml","<li>abc</li>"]],
+ "<dir><li>f</li><li>abc</li>{}<li>o</li></dir>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<ol><li>f[o]o</ol>",
+ [["inserthtml","<li>abc</li>"]],
+ "<ol><li>f</li><li>abc</li>{}<li>o</li></ol>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<ul><li>f[o]o</ul>",
+ [["inserthtml","<li>abc</li>"]],
+ "<ul><li>f</li><li>abc</li>{}<li>o</li></ul>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<dir><li>f[o]o</dir>",
+ [["inserthtml","<dir><li>abc</dir>"]],
+ "<dir><li>f<dir><li>abc</li></dir>{}o</li></dir>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<ol><li>f[o]o</ol>",
+ [["inserthtml","<dir><li>abc</dir>"]],
+ "<ol><li>f<dir><li>abc</li></dir>{}o</li></ol>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<ul><li>f[o]o</ul>",
+ [["inserthtml","<dir><li>abc</dir>"]],
+ "<ul><li>f<dir><li>abc</li></dir>{}o</li></ul>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<dir><li>f[o]o</dir>",
+ [["inserthtml","<ol><li>abc</ol>"]],
+ "<dir><li>f<ol><li>abc</li></ol>{}o</li></dir>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<ol><li>f[o]o</ol>",
+ [["inserthtml","<ol><li>abc</ol>"]],
+ "<ol><li>f<ol><li>abc</li></ol>{}o</li></ol>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<ul><li>f[o]o</ul>",
+ [["inserthtml","<ol><li>abc</ol>"]],
+ "<ul><li>f<ol><li>abc</li></ol>{}o</li></ul>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<dir><li>f[o]o</dir>",
+ [["inserthtml","<ul><li>abc</ul>"]],
+ "<dir><li>f<ul><li>abc</li></ul>{}o</li></dir>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<ol><li>f[o]o</ol>",
+ [["inserthtml","<ul><li>abc</ul>"]],
+ "<ol><li>f<ul><li>abc</li></ul>{}o</li></ol>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<ul><li>f[o]o</ul>",
+ [["inserthtml","<ul><li>abc</ul>"]],
+ "<ul><li>f<ul><li>abc</li></ul>{}o</li></ul>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["f[o]o",
+ [["defaultparagraphseparator","div"],["inserthtml","<li>abc</li>"]],
+ "f<div>abc</div>{}o",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
+["f[o]o",
+ [["defaultparagraphseparator","p"],["inserthtml","<li>abc</li>"]],
+ "f<p>abc</p>{}o",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
+["<nobr>f[o]o</nobr>",
+ [["inserthtml","<nobr>abc</nobr>"]],
+ "<nobr>f</nobr><nobr>abc</nobr>{}<nobr>o</nobr>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["f[o]o",
+ [["inserthtml","<nobr>abc</nobr>"]],
+ "f<nobr>abc</nobr>{}o",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<font color=blue>foo[]bar</font>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
+ "<font color=\"blue\">foo</font><p><span style=\"color:rgb(0, 0, 255)\">abc</span></p>{}<font color=\"blue\">bar</font>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
+["<font color=blue>foo[]bar</font>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
+ "<font color=\"blue\">foo</font><p><font color=\"#0000ff\">abc</font></p>{}<font color=\"blue\">bar</font>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
+["<font color=blue>foo[]bar</font>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
+ "<font color=\"blue\">foo</font><p><span style=\"color:rgb(0, 0, 255)\">abc</span></p>{}<font color=\"blue\">bar</font>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
+["<font color=blue>foo[]bar</font>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
+ "<font color=\"blue\">foo</font><p><font color=\"#0000ff\">abc</font></p>{}<font color=\"blue\">bar</font>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
+["<span style=color:blue>foo[]bar</span>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
+ "<span style=\"color:rgb(0, 0, 255)\">foo</span><p><span style=\"color:rgb(0, 0, 255)\">abc</span></p>{}<span style=\"color:rgb(0, 0, 255)\">bar</span>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
+["<span style=color:blue>foo[]bar</span>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
+ "<span style=\"color:rgb(0, 0, 255)\">foo</span><p><font color=\"#0000ff\">abc</font></p>{}<span style=\"color:rgb(0, 0, 255)\">bar</span>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
+["<span style=color:blue>foo[]bar</span>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
+ "<span style=\"color:rgb(0, 0, 255)\">foo</span><p><span style=\"color:rgb(0, 0, 255)\">abc</span></p>{}<span style=\"color:rgb(0, 0, 255)\">bar</span>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
+["<span style=color:blue>foo[]bar</span>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
+ "<span style=\"color:rgb(0, 0, 255)\">foo</span><p><font color=\"#0000ff\">abc</font></p>{}<span style=\"color:rgb(0, 0, 255)\">bar</span>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
+["<span style=font-variant:small-caps>foo[]bar</span>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
+ "<span style=\"font-variant:small-caps\">foo</span><p>abc</p>{}<span style=\"font-variant:small-caps\">bar</span>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
+["<span style=font-variant:small-caps>foo[]bar</span>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
+ "<span style=\"font-variant:small-caps\">foo</span><p>abc</p>{}<span style=\"font-variant:small-caps\">bar</span>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
+["<span style=font-variant:small-caps>foo[]bar</span>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
+ "<span style=\"font-variant:small-caps\">foo</span><p>abc</p>{}<span style=\"font-variant:small-caps\">bar</span>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
+["<span style=font-variant:small-caps>foo[]bar</span>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
+ "<span style=\"font-variant:small-caps\">foo</span><p>abc</p>{}<span style=\"font-variant:small-caps\">bar</span>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
+["<p>[foo]</p>",
+ [["inserthtml"," "]],
+ "<p> {}<br></p>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<p>[foo]</p>",
+ [["stylewithcss","true"],["inserthtml","<span style=display:none></span>"]],
+ "<p><span style=\"display:none\"></span>{}<br></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["<p>[foo]</p>",
+ [["stylewithcss","false"],["inserthtml","<span style=display:none></span>"]],
+ "<p><span style=\"display:none\"></span>{}<br></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+["<p>[foo]</p>",
+ [["inserthtml","<!--abc-->"]],
+ "<p><!--abc-->{}<br></p>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<p>{}<br></p>",
+ [["inserthtml","abc"]],
+ "<p>abc{}</p>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<p>{}<br></p>",
+ [["inserthtml","<!--abc-->"]],
+ "<p><!--abc-->{}<br></p>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<p><!--foo-->{}<span><br></span><!--bar--></p>",
+ [["inserthtml","abc"]],
+ "<p><!--foo-->abc{}<!--bar--></p>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<p><!--foo-->{}<span><br></span><!--bar--></p>",
+ [["inserthtml","<!--abc-->"]],
+ "<p><!--foo--><!--abc-->{}<!--bar--><br></p>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<p>{}<span><!--foo--><br><!--bar--></span></p>",
+ [["inserthtml","abc"]],
+ "<p>abc{}</p>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<p>{}<span><!--foo--><br><!--bar--></span></p>",
+ [["inserthtml","<!--abc-->"]],
+ "<p><!--abc-->{}<br></p>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<p><br>{}</p>",
+ [["inserthtml","abc"]],
+ "<p><br>abc{}</p>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<p><br>{}</p>",
+ [["inserthtml","<!--abc-->"]],
+ "<p><br><!--abc-->{}</p>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<p><!--foo--><span><br></span>{}<!--bar--></p>",
+ [["inserthtml","abc"]],
+ "<p><!--foo--><span><br></span>abc{}<!--bar--></p>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<p><!--foo--><span><br></span>{}<!--bar--></p>",
+ [["inserthtml","<!--abc-->"]],
+ "<p><!--foo--><span><br></span><!--abc-->{}<!--bar--></p>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<p><span><!--foo--><br><!--bar--></span>{}</p>",
+ [["inserthtml","abc"]],
+ "<p><span><!--foo--><br><!--bar--></span>abc{}</p>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}],
+["<p><span><!--foo--><br><!--bar--></span>{}</p>",
+ [["inserthtml","<!--abc-->"]],
+ "<p><span><!--foo--><br><!--bar--></span><!--abc-->{}</p>",
+ [true],
+ {"inserthtml":[false,false,"",false,false,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/insertimage.js b/testing/web-platform/tests/editing/data/insertimage.js
new file mode 100644
index 000000000..d1874e652
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/insertimage.js
@@ -0,0 +1,352 @@
+var browserTests = [
+["foo[]bar",
+ [["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["<span>foo</span>{}<span>bar</span>",
+ [["insertimage","/img/lion.svg"]],
+ "<span>foo</span><img src=\"/img/lion.svg\">{}<span>bar</span>",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["<span>foo[</span><span>]bar</span>",
+ [["insertimage","/img/lion.svg"]],
+ "<span>foo<img src=\"/img/lion.svg\">{}</span><span>bar</span>",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["insertimage",""]],
+ "foo[bar]baz",
+ [false],
+ {"insertimage":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}baz",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["foo<span style=color:#aBcDeF>[bar]</span>baz",
+ [["insertimage","/img/lion.svg"]],
+ "foo<span style=\"color:rgb(171, 205, 239)\"><img src=\"/img/lion.svg\">{}</span>baz",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["foo<span style=color:#aBcDeF>{bar}</span>baz",
+ [["insertimage","/img/lion.svg"]],
+ "foo<span style=\"color:rgb(171, 205, 239)\"><img src=\"/img/lion.svg\">{}</span>baz",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["foo{<span style=color:#aBcDeF>bar</span>}baz",
+ [["insertimage","/img/lion.svg"]],
+ "foo<span style=\"color:rgb(171, 205, 239)\"><img src=\"/img/lion.svg\">{}</span>baz",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["[foo<span style=color:#aBcDeF>bar]</span>baz",
+ [["stylewithcss","true"],["insertimage","/img/lion.svg"]],
+ "<img src=\"/img/lion.svg\">{}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""]}],
+["[foo<span style=color:#aBcDeF>bar]</span>baz",
+ [["stylewithcss","false"],["insertimage","/img/lion.svg"]],
+ "<img src=\"/img/lion.svg\">{}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"insertimage":[false,false,"",false,false,""]}],
+["{foo<span style=color:#aBcDeF>bar}</span>baz",
+ [["stylewithcss","true"],["insertimage","/img/lion.svg"]],
+ "<img src=\"/img/lion.svg\">{}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""]}],
+["{foo<span style=color:#aBcDeF>bar}</span>baz",
+ [["stylewithcss","false"],["insertimage","/img/lion.svg"]],
+ "<img src=\"/img/lion.svg\">{}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"insertimage":[false,false,"",false,false,""]}],
+["foo<span style=color:#aBcDeF>[bar</span>baz]",
+ [["insertimage","/img/lion.svg"]],
+ "foo<span style=\"color:rgb(171, 205, 239)\"><img src=\"/img/lion.svg\">{}</span>",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["foo<span style=color:#aBcDeF>{bar</span>baz}",
+ [["insertimage","/img/lion.svg"]],
+ "foo<span style=\"color:rgb(171, 205, 239)\"><img src=\"/img/lion.svg\">{}</span>",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz",
+ [["stylewithcss","true"],["insertimage","/img/lion.svg"]],
+ "foo<span style=\"color:rgb(171, 205, 239)\"><img src=\"/img/lion.svg\">{}</span>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""]}],
+["foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz",
+ [["stylewithcss","false"],["insertimage","/img/lion.svg"]],
+ "foo<span style=\"color:rgb(171, 205, 239)\"><img src=\"/img/lion.svg\">{}</span>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"insertimage":[false,false,"",false,false,""]}],
+["foo<b>[bar]</b>baz",
+ [["insertimage","/img/lion.svg"]],
+ "foo<b><img src=\"/img/lion.svg\">{}</b>baz",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["foo<b>{bar}</b>baz",
+ [["insertimage","/img/lion.svg"]],
+ "foo<b><img src=\"/img/lion.svg\">{}</b>baz",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["foo{<b>bar</b>}baz",
+ [["insertimage","/img/lion.svg"]],
+ "foo<b><img src=\"/img/lion.svg\">{}</b>baz",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["foo<span>[bar]</span>baz",
+ [["insertimage","/img/lion.svg"]],
+ "foo<span><img src=\"/img/lion.svg\">{}</span>baz",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["foo<span>{bar}</span>baz",
+ [["insertimage","/img/lion.svg"]],
+ "foo<span><img src=\"/img/lion.svg\">{}</span>baz",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["foo{<span>bar</span>}baz",
+ [["insertimage","/img/lion.svg"]],
+ "foo<span><img src=\"/img/lion.svg\">{}</span>baz",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["<b>foo[bar</b><i>baz]quz</i>",
+ [["insertimage","/img/lion.svg"]],
+ "<b>foo<img src=\"/img/lion.svg\">{}</b><i>quz</i>",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["<p>foo</p><p>[bar]</p><p>baz</p>",
+ [["insertimage","/img/lion.svg"]],
+ "<p>foo</p><p><img src=\"/img/lion.svg\">{}</p><p>baz</p>",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["<p>foo</p><p>{bar}</p><p>baz</p>",
+ [["insertimage","/img/lion.svg"]],
+ "<p>foo</p><p><img src=\"/img/lion.svg\">{}</p><p>baz</p>",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["<p>foo</p>{<p>bar</p>}<p>baz</p>",
+ [["defaultparagraphseparator","div"],["insertimage","/img/lion.svg"]],
+ "<p>foo</p><img src=\"/img/lion.svg\">{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertimage":[false,false,"",false,false,""]}],
+["<p>foo</p>{<p>bar</p>}<p>baz</p>",
+ [["defaultparagraphseparator","p"],["insertimage","/img/lion.svg"]],
+ "<p>foo</p><img src=\"/img/lion.svg\">{}<p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[bar<p>baz]quz",
+ [["defaultparagraphseparator","div"],["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[bar<p>baz]quz",
+ [["defaultparagraphseparator","p"],["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[bar<div>baz]quz</div>",
+ [["defaultparagraphseparator","div"],["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[bar<div>baz]quz</div>",
+ [["defaultparagraphseparator","p"],["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[bar<h1>baz]quz</h1>",
+ [["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}quz</p>",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["<div>foo[bar</div><p>baz]quz",
+ [["defaultparagraphseparator","div"],["insertimage","/img/lion.svg"]],
+ "<div>foo<img src=\"/img/lion.svg\">{}quz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertimage":[false,false,"",false,false,""]}],
+["<div>foo[bar</div><p>baz]quz",
+ [["defaultparagraphseparator","p"],["insertimage","/img/lion.svg"]],
+ "<div>foo<img src=\"/img/lion.svg\">{}quz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertimage":[false,false,"",false,false,""]}],
+["<blockquote>foo[bar</blockquote><pre>baz]quz</pre>",
+ [["insertimage","/img/lion.svg"]],
+ "<blockquote>foo<img src=\"/img/lion.svg\">{}quz</blockquote>",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["<p><b>foo[bar</b><p>baz]quz",
+ [["defaultparagraphseparator","div"],["insertimage","/img/lion.svg"]],
+ "<p><b>foo</b><img src=\"/img/lion.svg\">{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertimage":[false,false,"",false,false,""]}],
+["<p><b>foo[bar</b><p>baz]quz",
+ [["defaultparagraphseparator","p"],["insertimage","/img/lion.svg"]],
+ "<p><b>foo</b><img src=\"/img/lion.svg\">{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertimage":[false,false,"",false,false,""]}],
+["<div><p>foo[bar</div><p>baz]quz",
+ [["defaultparagraphseparator","div"],["insertimage","/img/lion.svg"]],
+ "<div><p>foo<img src=\"/img/lion.svg\">{}quz</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertimage":[false,false,"",false,false,""]}],
+["<div><p>foo[bar</div><p>baz]quz",
+ [["defaultparagraphseparator","p"],["insertimage","/img/lion.svg"]],
+ "<div><p>foo<img src=\"/img/lion.svg\">{}quz</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[bar<blockquote><p>baz]quz<p>qoz</blockquote",
+ [["defaultparagraphseparator","div"],["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}quz</p><blockquote><p>qoz</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[bar<blockquote><p>baz]quz<p>qoz</blockquote",
+ [["defaultparagraphseparator","p"],["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}quz</p><blockquote><p>qoz</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[bar<p style=color:blue>baz]quz",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}<span style=\"color:rgb(0, 0, 255)\">quz</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[bar<p style=color:blue>baz]quz",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}<font color=\"#0000ff\">quz</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[bar<p style=color:blue>baz]quz",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}<span style=\"color:rgb(0, 0, 255)\">quz</span></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[bar<p style=color:blue>baz]quz",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}<font color=\"#0000ff\">quz</font></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[bar<p><b>baz]quz</b>",
+ [["defaultparagraphseparator","div"],["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}<b>quz</b></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[bar<p><b>baz]quz</b>",
+ [["defaultparagraphseparator","p"],["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}<b>quz</b></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertimage":[false,false,"",false,false,""]}],
+["<div><p>foo<p>[bar<p>baz]</div>",
+ [["defaultparagraphseparator","div"],["insertimage","/img/lion.svg"]],
+ "<div><p>foo</p><p><img src=\"/img/lion.svg\">{}</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertimage":[false,false,"",false,false,""]}],
+["<div><p>foo<p>[bar<p>baz]</div>",
+ [["defaultparagraphseparator","p"],["insertimage","/img/lion.svg"]],
+ "<div><p>foo</p><p><img src=\"/img/lion.svg\">{}</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertimage":[false,false,"",false,false,""]}],
+["foo[<br>]bar",
+ [["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[</p><p>]bar</p>",
+ [["defaultparagraphseparator","div"],["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[</p><p>]bar</p>",
+ [["defaultparagraphseparator","p"],["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[</p><p>]bar<br>baz</p>",
+ [["defaultparagraphseparator","div"],["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}bar<br>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[</p><p>]bar<br>baz</p>",
+ [["defaultparagraphseparator","p"],["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}bar<br>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertimage":[false,false,"",false,false,""]}],
+["foo[<p>]bar</p>",
+ [["defaultparagraphseparator","div"],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertimage":[false,false,"",false,false,""]}],
+["foo[<p>]bar</p>",
+ [["defaultparagraphseparator","p"],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertimage":[false,false,"",false,false,""]}],
+["foo[<p>]bar<br>baz</p>",
+ [["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar<p>baz</p>",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["foo[<p>]bar</p>baz",
+ [["defaultparagraphseparator","div"],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar<br>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertimage":[false,false,"",false,false,""]}],
+["foo[<p>]bar</p>baz",
+ [["defaultparagraphseparator","p"],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar<br>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[</p>]bar",
+ [["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}bar</p>",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[</p>]bar<br>baz",
+ [["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}bar</p>baz",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["<p>foo[</p>]bar<p>baz</p>",
+ [["insertimage","/img/lion.svg"]],
+ "<p>foo<img src=\"/img/lion.svg\">{}bar</p><p>baz</p>",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["foo[<div><p>]bar</div>",
+ [["defaultparagraphseparator","div"],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertimage":[false,false,"",false,false,""]}],
+["foo[<div><p>]bar</div>",
+ [["defaultparagraphseparator","p"],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertimage":[false,false,"",false,false,""]}],
+["<div><p>foo[</p></div>]bar",
+ [["insertimage","/img/lion.svg"]],
+ "<div><p>foo<img src=\"/img/lion.svg\">{}bar</p></div>",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["foo[<div><p>]bar</p>baz</div>",
+ [["defaultparagraphseparator","div"],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar<div>baz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertimage":[false,false,"",false,false,""]}],
+["foo[<div><p>]bar</p>baz</div>",
+ [["defaultparagraphseparator","p"],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar<div>baz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertimage":[false,false,"",false,false,""]}],
+["foo[<div>]bar<p>baz</p></div>",
+ [["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar<div><p>baz</p></div>",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["<div><p>foo</p>bar[</div>]baz",
+ [["insertimage","/img/lion.svg"]],
+ "<div><p>foo</p>bar<img src=\"/img/lion.svg\">{}baz</div>",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}],
+["<div>foo<p>bar[</p></div>]baz",
+ [["insertimage","/img/lion.svg"]],
+ "<div>foo<p>bar<img src=\"/img/lion.svg\">{}baz</p></div>",
+ [true],
+ {"insertimage":[false,false,"",false,false,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/insertlinebreak.js b/testing/web-platform/tests/editing/data/insertlinebreak.js
new file mode 100644
index 000000000..2793cbb1c
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/insertlinebreak.js
@@ -0,0 +1,832 @@
+var browserTests = [
+["foo[bar]baz",
+ [["insertlinebreak",""]],
+ "foo<br>{}baz",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["fo[o<table><tr><td>b]ar</table>",
+ [["insertlinebreak",""]],
+ "fo<br>{}<br><table><tbody><tr><td>ar</td></tr></tbody></table>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<table><tr><td>[foo<td>bar]<tr><td>baz<td>quz</table>",
+ [["insertlinebreak",""]],
+ "<table><tbody><tr><td><br>{}<br></td><td><br></td></tr><tr><td>baz</td><td>quz</td></tr></tbody></table>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<tr><td>baz<td>quz</table>",
+ [["insertlinebreak",""]],
+ "<table><tbody>{}<tr><td><br></td><td><br></td></tr><tr><td>baz</td><td>quz</td></tr></tbody></table>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<table><tr><td>fo[o</table>b]ar",
+ [["insertlinebreak",""]],
+ "<table><tbody><tr><td>fo<br>{}<br></td></tr></tbody></table>ar",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<table><tr><td>fo[o<td>b]ar<td>baz</table>",
+ [["insertlinebreak",""]],
+ "<table><tbody><tr><td>fo<br>{}<br></td><td>ar</td><td>baz</td></tr></tbody></table>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["{<table><tr><td>foo</table>}",
+ [["insertlinebreak",""]],
+ "<br>{}<br>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<table><tr><td>[foo]</table>",
+ [["insertlinebreak",""]],
+ "<table><tbody><tr><td><br>{}<br></td></tr></tbody></table>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li>[foo]<li>bar</ol>",
+ [["insertlinebreak",""]],
+ "<ol><li><br>{}<br></li><li>bar</li></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li>f[o]o<li>bar</ol>",
+ [["insertlinebreak",""]],
+ "<ol><li>f<br>{}o</li><li>bar</li></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["[]foo",
+ [["insertlinebreak",""]],
+ "<br>{}foo",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["foo[]",
+ [["insertlinebreak",""]],
+ "foo<br>{}<br>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<span>foo[]</span>",
+ [["insertlinebreak",""]],
+ "<span>foo<br>{}<br></span>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["foo[]<br>",
+ [["insertlinebreak",""]],
+ "foo<br>{}<br>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["insertlinebreak",""]],
+ "foo<br>{}bar",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<address>[]foo</address>",
+ [["insertlinebreak",""]],
+ "<address><br>{}foo</address>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<address>foo[]</address>",
+ [["insertlinebreak",""]],
+ "<address>foo<br>{}<br></address>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<address>foo[]<br></address>",
+ [["insertlinebreak",""]],
+ "<address>foo<br>{}<br></address>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<address>foo[]bar</address>",
+ [["insertlinebreak",""]],
+ "<address>foo<br>{}bar</address>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<div>[]foo</div>",
+ [["insertlinebreak",""]],
+ "<div><br>{}foo</div>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<div>foo[]</div>",
+ [["insertlinebreak",""]],
+ "<div>foo<br>{}<br></div>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<div>foo[]<br></div>",
+ [["insertlinebreak",""]],
+ "<div>foo<br>{}<br></div>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<div>foo[]bar</div>",
+ [["insertlinebreak",""]],
+ "<div>foo<br>{}bar</div>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dt>[]foo<dd>bar</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dt><br>{}foo</dt><dd>bar</dd></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dt>foo[]<dd>bar</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dt>foo<br>{}<br></dt><dd>bar</dd></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dt>foo[]<br><dd>bar</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dt>foo<br>{}<br></dt><dd>bar</dd></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dt>foo[]bar<dd>baz</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dt>foo<br>{}bar</dt><dd>baz</dd></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>[]bar</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dt>foo</dt><dd><br>{}bar</dd></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>bar[]</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dt>foo</dt><dd>bar<br>{}<br></dd></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>bar[]<br></dl>",
+ [["insertlinebreak",""]],
+ "<dl><dt>foo</dt><dd>bar<br>{}<br></dd></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>bar[]baz</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dt>foo</dt><dd>bar<br>{}baz</dd></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<h1>[]foo</h1>",
+ [["insertlinebreak",""]],
+ "<h1><br>{}foo</h1>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<h1>foo[]</h1>",
+ [["insertlinebreak",""]],
+ "<h1>foo<br>{}<br></h1>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<h1>foo[]<br></h1>",
+ [["insertlinebreak",""]],
+ "<h1>foo<br>{}<br></h1>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<h1>foo[]bar</h1>",
+ [["insertlinebreak",""]],
+ "<h1>foo<br>{}bar</h1>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li>[]foo</ol>",
+ [["insertlinebreak",""]],
+ "<ol><li><br>{}foo</li></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li>foo[]</ol>",
+ [["insertlinebreak",""]],
+ "<ol><li>foo<br>{}<br></li></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li>foo[]<br></ol>",
+ [["insertlinebreak",""]],
+ "<ol><li>foo<br>{}<br></li></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li>foo[]bar</ol>",
+ [["insertlinebreak",""]],
+ "<ol><li>foo<br>{}bar</li></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>[]foo</p>",
+ [["insertlinebreak",""]],
+ "<p><br>{}foo</p>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>foo[]</p>",
+ [["insertlinebreak",""]],
+ "<p>foo<br>{}<br></p>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>foo[]<br></p>",
+ [["insertlinebreak",""]],
+ "<p>foo<br>{}<br></p>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>foo[]bar</p>",
+ [["insertlinebreak",""]],
+ "<p>foo<br>{}bar</p>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<pre>[]foo</pre>",
+ [["insertlinebreak",""]],
+ "<pre><br>{}foo</pre>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<pre>foo[]</pre>",
+ [["insertlinebreak",""]],
+ "<pre>foo<br>{}<br></pre>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<pre>foo[]<br></pre>",
+ [["insertlinebreak",""]],
+ "<pre>foo<br>{}<br></pre>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<pre>foo[]bar</pre>",
+ [["insertlinebreak",""]],
+ "<pre>foo<br>{}bar</pre>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<pre>foo[]<br><br></pre>",
+ [["insertlinebreak",""]],
+ "<pre>foo<br>{}<br><br></pre>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<pre>foo<br>{}<br></pre>",
+ [["insertlinebreak",""]],
+ "<pre>foo<br><br>{}<br></pre>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<pre>foo&#10;[]</pre>",
+ [["insertlinebreak",""]],
+ "<pre>foo\n<br>{}<br></pre>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<pre>foo[]&#10;</pre>",
+ [["insertlinebreak",""]],
+ "<pre>foo<br>{}\n</pre>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<pre>foo&#10;[]&#10;</pre>",
+ [["insertlinebreak",""]],
+ "<pre>foo\n<br>{}\n</pre>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<xmp>foo[]bar</xmp>",
+ [["insertlinebreak",""]],
+ "<xmp>foo[]bar</xmp>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<script>foo[]bar</script>baz",
+ [["insertlinebreak",""]],
+ "<script>foo[]bar</script>baz",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<listing>foo[]bar</listing>",
+ [["insertlinebreak",""]],
+ "<listing>foo<br>{}bar</listing>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li>{}<br></li></ol>",
+ [["insertlinebreak",""]],
+ "<ol><li><br>{}<br></li></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["foo<ol><li>{}<br></li></ol>",
+ [["insertlinebreak",""]],
+ "foo<ol><li><br>{}<br></li></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li>{}<br></li></ol>foo",
+ [["insertlinebreak",""]],
+ "<ol><li><br>{}<br></li></ol>foo",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>{}<br></ol>",
+ [["insertlinebreak",""]],
+ "<ol><li>foo</li><li><br>{}<br></li></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li>{}<br><li>bar</ol>",
+ [["insertlinebreak",""]],
+ "<ol><li><br>{}<br></li><li>bar</li></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ul><li>{}<br></ul></ol>",
+ [["insertlinebreak",""]],
+ "<ol><li>foo</li><ul><li><br>{}<br></li></ul></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dt>{}<br></dt></dl>",
+ [["insertlinebreak",""]],
+ "<dl><dt><br>{}<br></dt></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>{}<br></dl>",
+ [["insertlinebreak",""]],
+ "<dl><dt>foo</dt><dd><br>{}<br></dd></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dt>{}<br><dd>bar</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dt><br>{}<br></dt><dd>bar</dd></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>bar<dl><dt>{}<br><dd>baz</dl></dl>",
+ [["insertlinebreak",""]],
+ "<dl><dt>foo</dt><dd>bar<dl><dt><br>{}<br></dt><dd>baz</dd></dl></dd></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>bar<dl><dt>baz<dd>{}<br></dl></dl>",
+ [["insertlinebreak",""]],
+ "<dl><dt>foo</dt><dd>bar<dl><dt>baz</dt><dd><br>{}<br></dd></dl></dd></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<h1>foo[bar</h1><p>baz]quz</p>",
+ [["defaultparagraphseparator","div"],["insertlinebreak",""]],
+ "<h1>foo<br>{}quz</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertlinebreak":[false,false,"",false,false,""]}],
+["<h1>foo[bar</h1><p>baz]quz</p>",
+ [["defaultparagraphseparator","p"],["insertlinebreak",""]],
+ "<h1>foo<br>{}quz</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>foo[bar</p><h1>baz]quz</h1>",
+ [["insertlinebreak",""]],
+ "<p>foo<br>{}quz</p>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>foo</p>{}<br>",
+ [["insertlinebreak",""]],
+ "<p>foo</p><br>{}<br>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["{}<br><p>foo</p>",
+ [["insertlinebreak",""]],
+ "<br>{}<br><p>foo</p>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>foo</p>{}<br><h1>bar</h1>",
+ [["insertlinebreak",""]],
+ "<p>foo</p><br>{}<br><h1>bar</h1>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<h1>foo</h1>{}<br><p>bar</p>",
+ [["insertlinebreak",""]],
+ "<h1>foo</h1><br>{}<br><p>bar</p>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<h1>foo</h1>{}<br><h2>bar</h2>",
+ [["insertlinebreak",""]],
+ "<h1>foo</h1><br>{}<br><h2>bar</h2>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>foo</p><h1>[bar]</h1><p>baz</p>",
+ [["insertlinebreak",""]],
+ "<p>foo</p><h1><br>{}<br></h1><p>baz</p>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>foo</p>{<h1>bar</h1>}<p>baz</p>",
+ [["insertlinebreak",""]],
+ "<p>foo</p><br>{}<br><p>baz</p>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<table><tr><td>foo[]bar</table>",
+ [["insertlinebreak",""]],
+ "<table><tbody><tr><td>foo<br>{}bar</td></tr></tbody></table>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<table><tr><td><p>foo[]bar</table>",
+ [["insertlinebreak",""]],
+ "<table><tbody><tr><td><p>foo<br>{}bar</p></td></tr></tbody></table>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<blockquote>[]foo</blockquote>",
+ [["insertlinebreak",""]],
+ "<blockquote><br>{}foo</blockquote>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<blockquote>foo[]</blockquote>",
+ [["insertlinebreak",""]],
+ "<blockquote>foo<br>{}<br></blockquote>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<blockquote>foo[]<br></blockquote>",
+ [["insertlinebreak",""]],
+ "<blockquote>foo<br>{}<br></blockquote>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<blockquote>foo[]bar</blockquote>",
+ [["insertlinebreak",""]],
+ "<blockquote>foo<br>{}bar</blockquote>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<blockquote><p>[]foo</blockquote>",
+ [["insertlinebreak",""]],
+ "<blockquote><p><br>{}foo</p></blockquote>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<blockquote><p>foo[]</blockquote>",
+ [["insertlinebreak",""]],
+ "<blockquote><p>foo<br>{}<br></p></blockquote>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<blockquote><p>foo[]bar</blockquote>",
+ [["insertlinebreak",""]],
+ "<blockquote><p>foo<br>{}bar</p></blockquote>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<blockquote><p>foo[]<p>bar</blockquote>",
+ [["insertlinebreak",""]],
+ "<blockquote><p>foo<br>{}<br></p><p>bar</p></blockquote>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<blockquote><p>foo[]bar<p>baz</blockquote>",
+ [["insertlinebreak",""]],
+ "<blockquote><p>foo<br>{}bar</p><p>baz</p></blockquote>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<span>foo[]bar</span>",
+ [["insertlinebreak",""]],
+ "<span>foo<br>{}bar</span>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<span>foo[]bar</span>baz",
+ [["insertlinebreak",""]],
+ "<span>foo<br>{}bar</span>baz",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<b>foo[]bar</b>",
+ [["insertlinebreak",""]],
+ "<b>foo<br>{}bar</b>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<b>foo[]bar</b>baz",
+ [["insertlinebreak",""]],
+ "<b>foo<br>{}bar</b>baz",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<b>foo[]</b>bar",
+ [["insertlinebreak",""]],
+ "<b>foo<br>{}</b>bar",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["foo<b>[]bar</b>",
+ [["insertlinebreak",""]],
+ "foo<b><br>{}bar</b>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<b>foo[]</b><i>bar</i>",
+ [["insertlinebreak",""]],
+ "<b>foo<br>{}</b><i>bar</i>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<b id=x class=y>foo[]bar</b>",
+ [["insertlinebreak",""]],
+ "<b id=\"x\" class=\"y\">foo<br>{}bar</b>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<i><b>foo[]bar</b>baz</i>",
+ [["insertlinebreak",""]],
+ "<i><b>foo<br>{}bar</b>baz</i>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<p><b>foo[]bar</b></p>",
+ [["insertlinebreak",""]],
+ "<p><b>foo<br>{}bar</b></p>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<p><b>[]foo</b></p>",
+ [["insertlinebreak",""]],
+ "<p><b><br>{}foo</b></p>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<p><b id=x class=y>foo[]bar</b></p>",
+ [["insertlinebreak",""]],
+ "<p><b id=\"x\" class=\"y\">foo<br>{}bar</b></p>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<div><b>foo[]bar</b></div>",
+ [["insertlinebreak",""]],
+ "<div><b>foo<br>{}bar</b></div>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<a href=foo>foo[]bar</a>",
+ [["insertlinebreak",""]],
+ "<a href=\"foo\">foo<br>{}bar</a>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<a href=foo>foo[]bar</a>baz",
+ [["insertlinebreak",""]],
+ "<a href=\"foo\">foo<br>{}bar</a>baz",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<a href=foo>foo[]</a>bar",
+ [["insertlinebreak",""]],
+ "<a href=\"foo\">foo<br>{}</a>bar",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["foo<a href=foo>[]bar</a>",
+ [["insertlinebreak",""]],
+ "foo<a href=\"foo\"><br>{}bar</a>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>foo[]<!--bar-->",
+ [["insertlinebreak",""]],
+ "<p>foo<br>{}<br><!--bar--></p>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<p><!--foo-->[]bar",
+ [["insertlinebreak",""]],
+ "<p><!--foo--><br>{}bar</p>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar]</span>baz",
+ [["insertlinebreak",""]],
+ "<p>foo<span style=\"color:rgb(171, 205, 239)\"><br>{}</span>baz</p>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar}</span>baz",
+ [["insertlinebreak",""]],
+ "<p>foo<span style=\"color:rgb(171, 205, 239)\"><br>{}</span>baz</p>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>foo{<span style=color:#aBcDeF>bar</span>}baz",
+ [["insertlinebreak",""]],
+ "<p>foo<span style=\"color:rgb(171, 205, 239)\"><br>{}</span>baz</p>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>[foo<span style=color:#aBcDeF>bar]</span>baz",
+ [["stylewithcss","true"],["insertlinebreak",""]],
+ "<p><br>{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>[foo<span style=color:#aBcDeF>bar]</span>baz",
+ [["stylewithcss","false"],["insertlinebreak",""]],
+ "<p><br>{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>{foo<span style=color:#aBcDeF>bar}</span>baz",
+ [["stylewithcss","true"],["insertlinebreak",""]],
+ "<p><br>{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>{foo<span style=color:#aBcDeF>bar}</span>baz",
+ [["stylewithcss","false"],["insertlinebreak",""]],
+ "<p><br>{}baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span>baz]",
+ [["insertlinebreak",""]],
+ "<p>foo<span style=\"color:rgb(171, 205, 239)\"><br>{}<br></span></p>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar</span>baz}",
+ [["insertlinebreak",""]],
+ "<p>foo<span style=\"color:rgb(171, 205, 239)\"><br>{}<br></span></p>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz",
+ [["stylewithcss","true"],["insertlinebreak",""]],
+ "<p>foo<span style=\"color:rgb(171, 205, 239)\"><br>{}</span>quz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"insertlinebreak":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz",
+ [["stylewithcss","false"],["insertlinebreak",""]],
+ "<p>foo<span style=\"color:rgb(171, 205, 239)\"><br>{}</span>quz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"insertlinebreak":[false,false,"",false,false,""]}],
+["<ul contenteditable><li>{}<br></ul>",
+ [["insertlinebreak",""]],
+ "<ul contenteditable=\"\"><li><br>{}<br></li></ul>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ul contenteditable><li>foo[]</ul>",
+ [["insertlinebreak",""]],
+ "<ul contenteditable=\"\"><li>foo<br>{}<br></li></ul>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<div contenteditable=false><ul contenteditable><li>{}<br></ul></div>",
+ [["insertlinebreak",""]],
+ "<div contenteditable=\"false\"><ul contenteditable=\"\"><li><br>{}<br></li></ul></div>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<div contenteditable=false><ul contenteditable><li>foo[]</ul></div>",
+ [["insertlinebreak",""]],
+ "<div contenteditable=\"false\"><ul contenteditable=\"\"><li>foo<br>{}<br></li></ul></div>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<address><p>foo[]</address>",
+ [["insertlinebreak",""]],
+ "<address><p>foo<br>{}<br></p></address>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dt><p>foo[]</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dt><p>foo<br>{}<br></p></dt></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dd><p>foo[]</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dd><p>foo<br>{}<br></p></dd></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li><p>foo[]</ol>",
+ [["insertlinebreak",""]],
+ "<ol><li><p>foo<br>{}<br></p></li></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ul><li><p>foo[]</ul>",
+ [["insertlinebreak",""]],
+ "<ul><li><p>foo<br>{}<br></p></li></ul>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<address><div>foo[]</address>",
+ [["insertlinebreak",""]],
+ "<address><div>foo<br>{}<br></div></address>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dt><div>foo[]</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dt><div>foo<br>{}<br></div></dt></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dd><div>foo[]</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dd><div>foo<br>{}<br></div></dd></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li><div>foo[]</ol>",
+ [["insertlinebreak",""]],
+ "<ol><li><div>foo<br>{}<br></div></li></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ul><li><div>foo[]</ul>",
+ [["insertlinebreak",""]],
+ "<ul><li><div>foo<br>{}<br></div></li></ul>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<div><p>foo[]</div>",
+ [["insertlinebreak",""]],
+ "<div><p>foo<br>{}<br></p></div>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<div><div>foo[]</div>",
+ [["insertlinebreak",""]],
+ "<div><div>foo<br>{}<br></div></div>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<address><p>[]foo</address>",
+ [["insertlinebreak",""]],
+ "<address><p><br>{}foo</p></address>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dt><p>[]foo</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dt><p><br>{}foo</p></dt></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dd><p>[]foo</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dd><p><br>{}foo</p></dd></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li><p>[]foo</ol>",
+ [["insertlinebreak",""]],
+ "<ol><li><p><br>{}foo</p></li></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ul><li><p>[]foo</ul>",
+ [["insertlinebreak",""]],
+ "<ul><li><p><br>{}foo</p></li></ul>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<address><div>[]foo</address>",
+ [["insertlinebreak",""]],
+ "<address><div><br>{}foo</div></address>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dt><div>[]foo</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dt><div><br>{}foo</div></dt></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dd><div>[]foo</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dd><div><br>{}foo</div></dd></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li><div>[]foo</ol>",
+ [["insertlinebreak",""]],
+ "<ol><li><div><br>{}foo</div></li></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ul><li><div>[]foo</ul>",
+ [["insertlinebreak",""]],
+ "<ul><li><div><br>{}foo</div></li></ul>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<div><p>[]foo</div>",
+ [["insertlinebreak",""]],
+ "<div><p><br>{}foo</p></div>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<div><div>[]foo</div>",
+ [["insertlinebreak",""]],
+ "<div><div><br>{}foo</div></div>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<address><p>foo[]bar</address>",
+ [["insertlinebreak",""]],
+ "<address><p>foo<br>{}bar</p></address>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dt><p>foo[]bar</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dt><p>foo<br>{}bar</p></dt></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dd><p>foo[]bar</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dd><p>foo<br>{}bar</p></dd></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li><p>foo[]bar</ol>",
+ [["insertlinebreak",""]],
+ "<ol><li><p>foo<br>{}bar</p></li></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ul><li><p>foo[]bar</ul>",
+ [["insertlinebreak",""]],
+ "<ul><li><p>foo<br>{}bar</p></li></ul>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<address><div>foo[]bar</address>",
+ [["insertlinebreak",""]],
+ "<address><div>foo<br>{}bar</div></address>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dt><div>foo[]bar</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dt><div>foo<br>{}bar</div></dt></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<dl><dd><div>foo[]bar</dl>",
+ [["insertlinebreak",""]],
+ "<dl><dd><div>foo<br>{}bar</div></dd></dl>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li><div>foo[]bar</ol>",
+ [["insertlinebreak",""]],
+ "<ol><li><div>foo<br>{}bar</div></li></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ul><li><div>foo[]bar</ul>",
+ [["insertlinebreak",""]],
+ "<ul><li><div>foo<br>{}bar</div></li></ul>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<div><p>foo[]bar</div>",
+ [["insertlinebreak",""]],
+ "<div><p>foo<br>{}bar</p></div>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<div><div>foo[]bar</div>",
+ [["insertlinebreak",""]],
+ "<div><div>foo<br>{}bar</div></div>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li class=a id=x><p class=b id=y>foo[]</ol>",
+ [["insertlinebreak",""]],
+ "<ol><li class=\"a\" id=\"x\"><p class=\"b\" id=\"y\">foo<br>{}<br></p></li></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<div class=a id=x><div class=b id=y>foo[]</div></div>",
+ [["insertlinebreak",""]],
+ "<div class=\"a\" id=\"x\"><div class=\"b\" id=\"y\">foo<br>{}<br></div></div>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<div class=a id=x><p class=b id=y>foo[]</div>",
+ [["insertlinebreak",""]],
+ "<div class=\"a\" id=\"x\"><p class=\"b\" id=\"y\">foo<br>{}<br></p></div>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li class=a id=x><p class=b id=y>[]foo</ol>",
+ [["insertlinebreak",""]],
+ "<ol><li class=\"a\" id=\"x\"><p class=\"b\" id=\"y\"><br>{}foo</p></li></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<div class=a id=x><div class=b id=y>[]foo</div></div>",
+ [["insertlinebreak",""]],
+ "<div class=\"a\" id=\"x\"><div class=\"b\" id=\"y\"><br>{}foo</div></div>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<div class=a id=x><p class=b id=y>[]foo</div>",
+ [["insertlinebreak",""]],
+ "<div class=\"a\" id=\"x\"><p class=\"b\" id=\"y\"><br>{}foo</p></div>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<ol><li class=a id=x><p class=b id=y>foo[]bar</ol>",
+ [["insertlinebreak",""]],
+ "<ol><li class=\"a\" id=\"x\"><p class=\"b\" id=\"y\">foo<br>{}bar</p></li></ol>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<div class=a id=x><div class=b id=y>foo[]bar</div></div>",
+ [["insertlinebreak",""]],
+ "<div class=\"a\" id=\"x\"><div class=\"b\" id=\"y\">foo<br>{}bar</div></div>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}],
+["<div class=a id=x><p class=b id=y>foo[]bar</div>",
+ [["insertlinebreak",""]],
+ "<div class=\"a\" id=\"x\"><p class=\"b\" id=\"y\">foo<br>{}bar</p></div>",
+ [true],
+ {"insertlinebreak":[false,false,"",false,false,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/insertorderedlist.js b/testing/web-platform/tests/editing/data/insertorderedlist.js
new file mode 100644
index 000000000..76bda2d4b
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/insertorderedlist.js
@@ -0,0 +1,677 @@
+var browserTests = [
+["foo[]bar",
+ [["insertorderedlist",""]],
+ "<ol><li>foo[]bar</li></ol>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["foo[bar]baz",
+ [["insertorderedlist",""]],
+ "<ol><li>foo[bar]baz</li></ol>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["foo<br>[bar]",
+ [["insertorderedlist",""]],
+ "foo<ol><li>[bar]</li></ol>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["f[oo<br>b]ar<br>baz",
+ [["insertorderedlist",""]],
+ "<ol><li>f[oo</li><li>b]ar</li></ol>baz",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo]<br>bar</p>",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo]</li></ol><p>bar</p>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["[foo<ol><li>bar]</ol>baz",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo</li><li>bar]</li></ol>baz",
+ [true],
+ {"insertorderedlist":[true,false,"",false,true,""]}],
+["foo<ol><li>[bar</ol>baz]",
+ [["insertorderedlist",""]],
+ "foo<ol><li>[bar</li><li>baz]</li></ol>",
+ [true],
+ {"insertorderedlist":[true,false,"",false,true,""]}],
+["[foo<ul><li>bar]</ul>baz",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo</li><li>bar]</li></ol>baz",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["foo<ul><li>[bar</ul>baz]",
+ [["insertorderedlist",""]],
+ "foo<ol><li>[bar</li><li>baz]</li></ol>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["foo<ul><li>[bar</ul><ol><li>baz]</ol>quz",
+ [["insertorderedlist",""]],
+ "foo<ol><li>[bar</li><li>baz]</li></ol>quz",
+ [true],
+ {"insertorderedlist":[true,false,"",false,true,""]}],
+["foo<ol><li>[bar</ol><ul><li>baz]</ul>quz",
+ [["insertorderedlist",""]],
+ "foo<ol><li>[bar</li><li>baz]</li></ol>quz",
+ [true],
+ {"insertorderedlist":[true,false,"",false,true,""]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["insertorderedlist",""]],
+ "<table><tbody><tr><td>foo</td><td><ol><li>b[a]r</li></ol></td><td>baz</td></tr></tbody></table>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<table><tbody><tr><td>fo[o<td>b]ar<td>baz</table>",
+ [["insertorderedlist",""]],
+ "<table><tbody><tr><td><ol><li>fo[o</li></ol></td><td><ol><li>b]ar</li></ol></td><td>baz</td></tr></tbody></table>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["insertorderedlist",""]],
+ "<ol><li>{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</li></ol>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<p>foo<p>[bar]<p>baz",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<p>foo</p><ol><li>[bar]</li></ol><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<p>foo<p>[bar]<p>baz",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<p>foo</p><ol><li>[bar]</li></ol><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<p>foo<blockquote>[bar]</blockquote><p>baz",
+ [["insertorderedlist",""]],
+ "<p>foo</p><blockquote><ol><li>[bar]</li></ol></blockquote><p>baz</p>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<dl><dt>foo<dd>[bar]<dt>baz<dd>quz</dl>",
+ [["insertorderedlist",""]],
+ "<dl><dt>foo</dt><dd><ol><li>[bar]</li></ol></dd><dt>baz</dt><dd>quz</dd></dl>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<dl><dt>foo<dd>bar<dt>[baz]<dd>quz</dl>",
+ [["insertorderedlist",""]],
+ "<dl><dt>foo</dt><dd>bar</dd><dt><ol><li>[baz]</li></ol></dt><dd>quz</dd></dl>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo<p>bar]<p>baz",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<ol><li>[foo</li><li>bar]</li></ol><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo<p>bar]<p>baz",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<ol><li>[foo</li><li>bar]</li></ol><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo<blockquote>bar]</blockquote><p>baz",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<ol><li>[foo</li><ol><li>bar]</li></ol></ol><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo<blockquote>bar]</blockquote><p>baz",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<ol><li>[foo</li><ol><li>bar]</li></ol></ol><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<dl><dt>[foo<dd>bar]<dt>baz<dd>quz</dl>",
+ [["insertorderedlist",""]],
+ "<dl><dt><ol><li>[foo</li></ol></dt><dd><ol><li>bar]</li></ol></dd><dt>baz</dt><dd>quz</dd></dl>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<dl><dt>foo<dd>[bar<dt>baz]<dd>quz</dl>",
+ [["insertorderedlist",""]],
+ "<dl><dt>foo</dt><dd><ol><li>[bar</li></ol></dd><dt><ol><li>baz]</li></ol></dt><dd>quz</dd></dl>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo<blockquote><p>bar]<p>baz</blockquote>",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<ol><li>[foo</li><ol><li>bar]</li></ol></ol><blockquote><p>baz</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo<blockquote><p>bar]<p>baz</blockquote>",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<ol><li>[foo</li><ol><li>bar]</li></ol></ol><blockquote><p>baz</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo<li>[bar]<li>baz</ol>",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<ol><li>foo</li></ol><div>[bar]</div><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>foo<li>[bar]<li>baz</ol>",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<ol><li>foo</li></ol><p>[bar]</p><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>foo</ol>[bar]",
+ [["insertorderedlist",""]],
+ "<ol><li>foo</li><li>[bar]</li></ol>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["[foo]<ol><li>bar</ol>",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo]</li><li>bar</li></ol>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo</ol>[bar]<ol><li>baz</ol>",
+ [["insertorderedlist",""]],
+ "<ol><li>foo</li><li>[bar]</li><li>baz</li></ol>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ol><ol><li>[foo]</ol></ol>",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo]</li></ol>",
+ [true],
+ {"insertorderedlist":[false,true,"",false,true,""]}],
+["<ol><li>[foo]<br>bar<li>baz</ol>",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<div>[foo]<br>bar</div><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>[foo]<br>bar<li>baz</ol>",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<p>[foo]<br>bar</p><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>foo<br>[bar]<li>baz</ol>",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<div>foo<br>[bar]</div><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>foo<br>[bar]<li>baz</ol>",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<p>foo<br>[bar]</p><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li><div>[foo]</div>bar<li>baz</ol>",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<div>[foo]</div><div>bar</div><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li><div>[foo]</div>bar<li>baz</ol>",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<div>[foo]</div><p>bar</p><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>foo<ol><li>[bar]<li>baz</ol><li>quz</ol>",
+ [["insertorderedlist",""]],
+ "<ol><li>foo</li><li>[bar]</li><ol><li>baz</li></ol><li>quz</li></ol>",
+ [true],
+ {"insertorderedlist":[false,true,"",false,true,""]}],
+["<ol><li>foo<ol><li>bar<li>[baz]</ol><li>quz</ol>",
+ [["insertorderedlist",""]],
+ "<ol><li>foo</li><ol><li>bar</li></ol><li>[baz]</li><li>quz</li></ol>",
+ [true],
+ {"insertorderedlist":[false,true,"",false,true,""]}],
+["<ol><li>foo</li><ol><li>[bar]<li>baz</ol><li>quz</ol>",
+ [["insertorderedlist",""]],
+ "<ol><li>foo</li><li>[bar]</li><ol><li>baz</li></ol><li>quz</li></ol>",
+ [true],
+ {"insertorderedlist":[false,true,"",false,true,""]}],
+["<ol><li>foo</li><ol><li>bar<li>[baz]</ol><li>quz</ol>",
+ [["insertorderedlist",""]],
+ "<ol><li>foo</li><ol><li>bar</li></ol><li>[baz]</li><li>quz</li></ol>",
+ [true],
+ {"insertorderedlist":[false,true,"",false,true,""]}],
+["<ol><li>[foo]<ol><li>bar</ol><li>baz</ol>",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<div>[foo]</div><ol><ol><li>bar</li></ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>[foo]<ol><li>bar</ol><li>baz</ol>",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<p>[foo]</p><ol><ol><li>bar</li></ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>[foo]</li><ol><li>bar</ol><li>baz</ol>",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<div>[foo]</div><ol><ol><li>bar</li></ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>[foo]</li><ol><li>bar</ol><li>baz</ol>",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<p>[foo]</p><ol><ol><li>bar</li></ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>foo<li>[bar]<ol><li>baz</ol><li>quz</ol>",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<ol><li>foo</li></ol><div>[bar]</div><ol><ol><li>baz</li></ol><li>quz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>foo<li>[bar]<ol><li>baz</ol><li>quz</ol>",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<ol><li>foo</li></ol><p>[bar]</p><ol><ol><li>baz</li></ol><li>quz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>foo<li>[bar]</li><ol><li>baz</ol><li>quz</ol>",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<ol><li>foo</li></ol><div>[bar]</div><ol><ol><li>baz</li></ol><li>quz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>foo<li>[bar]</li><ol><li>baz</ol><li>quz</ol>",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<ol><li>foo</li></ol><p>[bar]</p><ol><ol><li>baz</li></ol><li>quz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>foo<ol><li>bar<li>baz</ol><li>[quz]</ol>",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<ol><li>foo<ol><li>bar</li><li>baz</li></ol></li></ol><div>[quz]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>foo<ol><li>bar<li>baz</ol><li>[quz]</ol>",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<ol><li>foo<ol><li>bar</li><li>baz</li></ol></li></ol><p>[quz]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>foo</li><ol><li>bar<li>baz</ol><li>[quz]</ol>",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<ol><li>foo</li><ol><li>bar</li><li>baz</li></ol></ol><div>[quz]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>foo</li><ol><li>bar<li>baz</ol><li>[quz]</ol>",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<ol><li>foo</li><ol><li>bar</li><li>baz</li></ol></ol><p>[quz]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>foo<li>[bar<li>baz]</ol>",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<ol><li>foo</li></ol><div>[bar</div><div>baz]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>foo<li>[bar<li>baz]</ol>",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<ol><li>foo</li></ol><p>[bar</p><p>baz]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>[foo<ol><li>bar]</ol><li>baz</ol>",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<div>[foo</div><ol><li>bar]</li><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,true,"",true,false,""]}],
+["<ol><li>[foo<ol><li>bar]</ol><li>baz</ol>",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<p>[foo</p><ol><li>bar]</li><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,true,"",true,false,""]}],
+["<ol><li>foo<ol><li>b[ar</ol><li>b]az</ol>",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<ol><li>foo</li><li>b[ar</li></ol><div>b]az</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,true,"",true,false,""]}],
+["<ol><li>foo<ol><li>b[ar</ol><li>b]az</ol>",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<ol><li>foo</li><li>b[ar</li></ol><p>b]az</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,true,"",true,false,""]}],
+["<ol><li>[foo<ol><li>bar</ol><li>baz]</ol><p>extra",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<div>[foo</div><ol><li>bar</li></ol><div>baz]</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,true,"",true,false,""]}],
+["<ol><li>[foo<ol><li>bar</ol><li>baz]</ol><p>extra",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<p>[foo</p><ol><li>bar</li></ol><p>baz]</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,true,"",true,false,""]}],
+["<ol><li>[foo]<ol><li>bar</ol>baz</ol>",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<div>[foo]</div><ol><ol><li>bar</li></ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>[foo]<ol><li>bar</ol>baz</ol>",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<p>[foo]</p><ol><ol><li>bar</li></ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>foo<ol><li>[bar]</ol>baz</ol>",
+ [["insertorderedlist",""]],
+ "<ol><li>foo</li><li>[bar]</li><li>baz</li></ol>",
+ [true],
+ {"insertorderedlist":[false,true,"",false,true,""]}],
+["<ol><li>foo<ol><li>bar</ol>[baz]</ol>",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<ol><li>foo</li><ol><li>bar</li></ol></ol><div>[baz]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>foo<ol><li>bar</ol>[baz]</ol>",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<ol><li>foo</li><ol><li>bar</li></ol></ol><p>[baz]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,true,"",false,false,""]}],
+["<ol><li>[foo<ol><li>bar]</ol>baz</ol>",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<div>[foo</div><ol><li>bar]</li><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,true,"",true,false,""]}],
+["<ol><li>[foo<ol><li>bar]</ol>baz</ol>",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<p>[foo</p><ol><li>bar]</li><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,true,"",true,false,""]}],
+["<ul><li>foo<li>[bar]<li>baz</ul>",
+ [["insertorderedlist",""]],
+ "<ul><li>foo</li></ul><ol><li>[bar]</li></ol><ul><li>baz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo</ul>[bar]",
+ [["insertorderedlist",""]],
+ "<ul><li>foo</li></ul><ol><li>[bar]</li></ol>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["[foo]<ul><li>bar</ul>",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo]</li></ol><ul><li>bar</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo</ul>[bar]<ul><li>baz</ul>",
+ [["insertorderedlist",""]],
+ "<ul><li>foo</li></ul><ol><li>[bar]</li></ol><ul><li>baz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><ul><li>[foo]</ul></ul>",
+ [["insertorderedlist",""]],
+ "<ol><ol><li>[foo]</li></ol></ol>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>[foo]<br>bar<li>baz</ul>",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo]<br>bar</li></ol><ul><li>baz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo<br>[bar]<li>baz</ul>",
+ [["insertorderedlist",""]],
+ "<ol><li>foo<br>[bar]</li></ol><ul><li>baz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li><div>[foo]</div>bar<li>baz</ul>",
+ [["insertorderedlist",""]],
+ "<ol><li><div>[foo]</div>bar</li></ol><ul><li>baz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo<ul><li>[bar]<li>baz</ul><li>quz</ul>",
+ [["insertorderedlist",""]],
+ "<ul><li>foo</li><ol><li>[bar]</li></ol><ul><li>baz</li></ul><li>quz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo<ul><li>bar<li>[baz]</ul><li>quz</ul>",
+ [["insertorderedlist",""]],
+ "<ul><li>foo</li><ul><li>bar</li></ul><ol><li>[baz]</li></ol><li>quz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo</li><ul><li>[bar]<li>baz</ul><li>quz</ul>",
+ [["insertorderedlist",""]],
+ "<ul><li>foo</li><ol><li>[bar]</li></ol><ul><li>baz</li></ul><li>quz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo</li><ul><li>bar<li>[baz]</ul><li>quz</ul>",
+ [["insertorderedlist",""]],
+ "<ul><li>foo</li><ul><li>bar</li></ul><ol><li>[baz]</li></ol><li>quz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>[foo]<ul><li>bar</ul><li>baz</ul>",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo]</li></ol><ul><ul><li>bar</li></ul><li>baz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>[foo]</li><ul><li>bar</ul><li>baz</ul>",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo]</li></ol><ul><ul><li>bar</li></ul><li>baz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo<li>[bar]<ul><li>baz</ul><li>quz</ul>",
+ [["insertorderedlist",""]],
+ "<ul><li>foo</li></ul><ol><li>[bar]</li></ol><ul><ul><li>baz</li></ul><li>quz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo<li>[bar]</li><ul><li>baz</ul><li>quz</ul>",
+ [["insertorderedlist",""]],
+ "<ul><li>foo</li></ul><ol><li>[bar]</li></ol><ul><ul><li>baz</li></ul><li>quz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo<ul><li>bar<li>baz</ul><li>[quz]</ul>",
+ [["insertorderedlist",""]],
+ "<ul><li>foo<ul><li>bar</li><li>baz</li></ul></li></ul><ol><li>[quz]</li></ol>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo</li><ul><li>bar<li>baz</ul><li>[quz]</ul>",
+ [["insertorderedlist",""]],
+ "<ul><li>foo</li><ul><li>bar</li><li>baz</li></ul></ul><ol><li>[quz]</li></ol>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo<li>[bar<li>baz]</ul>",
+ [["insertorderedlist",""]],
+ "<ul><li>foo</li></ul><ol><li>[bar</li><li>baz]</li></ol>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>[foo<ul><li>bar]</ul><li>baz</ul>",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo</li><ol><li>bar]</li></ol></ol><ul><li>baz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo<ul><li>b[ar</ul><li>b]az</ul>",
+ [["insertorderedlist",""]],
+ "<ul><li>foo</li></ul><ol><ol><li>b[ar</li></ol><li>b]az</li></ol>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>[foo<ul><li>bar</ul><li>baz]</ul><p>extra",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo</li><ol><li>bar</li></ol><li>baz]</li></ol><p>extra</p>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>[foo]<ul><li>bar</ul>baz</ul>",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo]</li></ol><ul><ul><li>bar</li></ul><li>baz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo<ul><li>[bar]</ul>baz</ul>",
+ [["insertorderedlist",""]],
+ "<ul><li>foo</li><ol><li>[bar]</li></ol><li>baz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo<ul><li>bar</ul>[baz]</ul>",
+ [["insertorderedlist",""]],
+ "<ul><li>foo</li><ul><li>bar</li></ul></ul><ol><li>[baz]</li></ol>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>[foo<ul><li>bar]</ul>baz</ul>",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo</li><ol><li>bar]</li></ol></ol><ul><li>baz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["foo<ol><li>bar</ol><ul><li>[baz]</ul>quz",
+ [["insertorderedlist",""]],
+ "foo<ol><li>bar</li><li>[baz]</li></ol>quz",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["foo<ol><li>bar</ol><ul><li>[baz</ul>quz]",
+ [["insertorderedlist",""]],
+ "foo<ol><li>bar</li><li>[baz</li><li>quz]</li></ol>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["foo<ul><li>[bar]</ul><ol><li>baz</ol>quz",
+ [["insertorderedlist",""]],
+ "foo<ol><li>[bar]</li><li>baz</li></ol>quz",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["[foo<ul><li>bar]</ul><ol><li>baz</ol>quz",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo</li><li>bar]</li><li>baz</li></ol>quz",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["[foo]<blockquote>bar</blockquote>baz",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo]</li></ol><blockquote>bar</blockquote>baz",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["foo<blockquote>[bar]</blockquote>baz",
+ [["insertorderedlist",""]],
+ "foo<blockquote><ol><li>[bar]</li></ol></blockquote>baz",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["[foo<blockquote>bar]</blockquote>baz",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo</li><ol><li>bar]</li></ol></ol>baz",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo</ol><blockquote>[bar]</blockquote>baz",
+ [["insertorderedlist",""]],
+ "<ol><li>foo</li><ol><li>[bar]</li></ol></ol>baz",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["[foo]<blockquote><ol><li>bar</ol></blockquote>baz",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo]</li></ol><blockquote><ol><li>bar</li></ol></blockquote>baz",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["foo<blockquote>[bar]<br>baz</blockquote>",
+ [["insertorderedlist",""]],
+ "foo<blockquote><ol><li>[bar]</li></ol>baz</blockquote>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["[foo<blockquote>bar]<br>baz</blockquote>",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo</li><ol><li>bar]</li></ol></ol><blockquote>baz</blockquote>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo</ol><blockquote>[bar]<br>baz</blockquote>",
+ [["insertorderedlist",""]],
+ "<ol><li>foo</li><ol><li>[bar]</li></ol></ol><blockquote>baz</blockquote>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo]<blockquote><p>bar</blockquote><p>baz",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<ol><li>[foo]</li></ol><blockquote><p>bar</p></blockquote><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo]<blockquote><p>bar</blockquote><p>baz",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<ol><li>[foo]</li></ol><blockquote><p>bar</p></blockquote><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<p>foo<blockquote><p>[bar]</blockquote><p>baz",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<p>foo</p><blockquote><ol><li>[bar]</li></ol></blockquote><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<p>foo<blockquote><p>[bar]</blockquote><p>baz",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<p>foo</p><blockquote><ol><li>[bar]</li></ol></blockquote><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo<blockquote><p>bar]</blockquote><p>baz",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<ol><li>[foo</li><ol><li>bar]</li></ol></ol><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo<blockquote><p>bar]</blockquote><p>baz",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<ol><li>[foo</li><ol><li>bar]</li></ol></ol><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo</ol><blockquote><p>[bar]</blockquote><p>baz",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<ol><li>foo</li><ol><li>[bar]</li></ol></ol><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo</ol><blockquote><p>[bar]</blockquote><p>baz",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<ol><li>foo</li><ol><li>[bar]</li></ol></ol><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul id=abc><li>foo<li>[bar]<li>baz</ul>",
+ [["insertorderedlist",""]],
+ "<ul id=\"abc\"><li>foo</li></ul><ol><li>[bar]</li></ol><ul><li>baz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul style=color:blue><li>foo<li>[bar]<li>baz</ul>",
+ [["stylewithcss","true"],["insertorderedlist",""]],
+ "<ul style=\"color:rgb(0, 0, 255)\"><li>foo</li></ul><ol><li><span style=\"color:rgb(0, 0, 255)\">[bar]</span></li></ol><ul style=\"color:rgb(0, 0, 255)\"><li>baz</li></ul>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul style=color:blue><li>foo<li>[bar]<li>baz</ul>",
+ [["stylewithcss","false"],["insertorderedlist",""]],
+ "<ul style=\"color:rgb(0, 0, 255)\"><li>foo</li></ul><ol><li><font color=\"#0000ff\">[bar]</font></li></ol><ul style=\"color:rgb(0, 0, 255)\"><li>baz</li></ul>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul style=text-indent:1em><li>foo<li>[bar]<li>baz</ul>",
+ [["stylewithcss","true"],["insertorderedlist",""]],
+ "<ul style=\"text-indent:1em\"><li>foo</li></ul><ol><li>[bar]</li></ol><ul style=\"text-indent:1em\"><li>baz</li></ul>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul style=text-indent:1em><li>foo<li>[bar]<li>baz</ul>",
+ [["stylewithcss","false"],["insertorderedlist",""]],
+ "<ul style=\"text-indent:1em\"><li>foo</li></ul><ol><li>[bar]</li></ol><ul style=\"text-indent:1em\"><li>baz</li></ul>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul id=abc><li>[foo]<li>bar<li>baz</ul>",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo]</li></ol><ul id=\"abc\"><li>bar</li><li>baz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul style=color:blue><li>[foo]<li>bar<li>baz</ul>",
+ [["stylewithcss","true"],["insertorderedlist",""]],
+ "<ol><li><span style=\"color:rgb(0, 0, 255)\">[foo]</span></li></ol><ul style=\"color:rgb(0, 0, 255)\"><li>bar</li><li>baz</li></ul>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul style=color:blue><li>[foo]<li>bar<li>baz</ul>",
+ [["stylewithcss","false"],["insertorderedlist",""]],
+ "<ol><li><font color=\"#0000ff\">[foo]</font></li></ol><ul style=\"color:rgb(0, 0, 255)\"><li>bar</li><li>baz</li></ul>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul style=text-indent:1em><li>[foo]<li>bar<li>baz</ul>",
+ [["insertorderedlist",""]],
+ "<ol><li>[foo]</li></ol><ul style=\"text-indent:1em\"><li>bar</li><li>baz</li></ul>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul id=abc><li>foo<li>bar<li>[baz]</ul>",
+ [["insertorderedlist",""]],
+ "<ul id=\"abc\"><li>foo</li><li>bar</li></ul><ol><li>[baz]</li></ol>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul style=color:blue><li>foo<li>bar<li>[baz]</ul>",
+ [["stylewithcss","true"],["insertorderedlist",""]],
+ "<ul style=\"color:rgb(0, 0, 255)\"><li>foo</li><li>bar</li></ul><ol><li><span style=\"color:rgb(0, 0, 255)\">[baz]</span></li></ol>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul style=color:blue><li>foo<li>bar<li>[baz]</ul>",
+ [["stylewithcss","false"],["insertorderedlist",""]],
+ "<ul style=\"color:rgb(0, 0, 255)\"><li>foo</li><li>bar</li></ul><ol><li><font color=\"#0000ff\">[baz]</font></li></ol>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"insertorderedlist":[false,false,"",false,true,""]}],
+["<ul style=text-indent:1em><li>foo<li>bar<li>[baz]</ul>",
+ [["insertorderedlist",""]],
+ "<ul style=\"text-indent:1em\"><li>foo</li><li>bar</li></ul><ol><li>[baz]</li></ol>",
+ [true],
+ {"insertorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo</ol> <p>[bar]",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<ol><li>foo</li> <li>[bar]</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo</ol> <p>[bar]",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<ol><li>foo</li> <li>[bar]</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo]</p> <ol><li>bar</ol>",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<ol><li>[foo]</li> <li>bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo]</p> <ol><li>bar</ol>",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<ol><li>[foo]</li> <li>bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo</ol> <p>[bar]</p> <ol><li>baz</ol>",
+ [["defaultparagraphseparator","div"],["insertorderedlist",""]],
+ "<ol><li>foo</li> <li>[bar]</li> <li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo</ol> <p>[bar]</p> <ol><li>baz</ol>",
+ [["defaultparagraphseparator","p"],["insertorderedlist",""]],
+ "<ol><li>foo</li> <li>[bar]</li> <li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertorderedlist":[false,false,"",false,true,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/insertparagraph.js b/testing/web-platform/tests/editing/data/insertparagraph.js
new file mode 100644
index 000000000..a9a3be4e7
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/insertparagraph.js
@@ -0,0 +1,1602 @@
+var browserTests = [
+["foo[bar]baz",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div>foo</div><div>{}baz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["fo[o<table><tr><td>b]ar</table>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div>fo</div><div>{}<br></div><table><tbody><tr><td>ar</td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["fo[o<table><tr><td>b]ar</table>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>fo</p><p>{}<br></p><table><tbody><tr><td>ar</td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<table><tr><td>[foo<td>bar]<tr><td>baz<td>quz</table>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<table><tbody><tr><td><div><br></div><div>{}<br></div></td><td><br></td></tr><tr><td>baz</td><td>quz</td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<table><tr><td>[foo<td>bar]<tr><td>baz<td>quz</table>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<table><tbody><tr><td><p><br></p><p>{}<br></p></td><td><br></td></tr><tr><td>baz</td><td>quz</td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<tr><td>baz<td>quz</table>",
+ [["insertparagraph",""]],
+ "<table><tbody>{}<tr><td><br></td><td><br></td></tr><tr><td>baz</td><td>quz</td></tr></tbody></table>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<table><tr><td>fo[o</table>b]ar",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<table><tbody><tr><td><div>fo</div><div>{}<br></div></td></tr></tbody></table>ar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<table><tr><td>fo[o</table>b]ar",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<table><tbody><tr><td><p>fo</p><p>{}<br></p></td></tr></tbody></table>ar",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<table><tr><td>fo[o<td>b]ar<td>baz</table>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<table><tbody><tr><td><div>fo</div><div>{}<br></div></td><td>ar</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<table><tr><td>fo[o<td>b]ar<td>baz</table>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<table><tbody><tr><td><p>fo</p><p>{}<br></p></td><td>ar</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["{<table><tr><td>foo</table>}",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><br></div><div>{}<br></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["{<table><tr><td>foo</table>}",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><br></p><p>{}<br></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<table><tr><td>[foo]</table>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<table><tbody><tr><td><div><br></div><div>{}<br></div></td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<table><tr><td>[foo]</table>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<table><tbody><tr><td><p><br></p><p>{}<br></p></td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li>[foo]<li>bar</ol>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div>{}<br></div><ol><li>bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li>[foo]<li>bar</ol>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>{}<br></p><ol><li>bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li>f[o]o<li>bar</ol>",
+ [["insertparagraph",""]],
+ "<ol><li>f</li><li>{}o</li><li>bar</li></ol>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["[]foo",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><br></div><div>{}foo</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["[]foo",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><br></p><p>{}foo</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["foo[]",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div>foo</div><div>{}<br></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["foo[]",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}<br></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<span>foo[]</span>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><span>foo</span></div><div>{}<br></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<span>foo[]</span>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><span>foo</span></p><p>{}<br></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["foo[]<br>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div>foo</div><div>{}<br></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["foo[]<br>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}<br></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div>foo</div><div>{}bar</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<address>[]foo</address>",
+ [["insertparagraph",""]],
+ "<address><br>{}foo</address>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<address>foo[]</address>",
+ [["insertparagraph",""]],
+ "<address>foo<br>{}<br></address>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<address>foo[]<br></address>",
+ [["insertparagraph",""]],
+ "<address>foo<br>{}<br></address>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<address>foo[]bar</address>",
+ [["insertparagraph",""]],
+ "<address>foo<br>{}bar</address>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<div>[]foo</div>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><br></div><div>{}foo</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div>[]foo</div>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div><br></div><div>{}foo</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div>foo[]</div>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div>foo</div><div>{}<br></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div>foo[]</div>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div>foo</div><div>{}<br></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div>foo[]<br></div>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div>foo</div><div>{}<br></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div>foo[]<br></div>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div>foo</div><div>{}<br></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div>foo[]bar</div>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div>foo</div><div>{}bar</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div>foo[]bar</div>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div>foo</div><div>{}bar</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt>[]foo<dd>bar</dl>",
+ [["insertparagraph",""]],
+ "<dl><dt><br></dt><dt>{}foo</dt><dd>bar</dd></dl>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt>foo[]<dd>bar</dl>",
+ [["insertparagraph",""]],
+ "<dl><dt>foo</dt><dd>{}<br></dd><dd>bar</dd></dl>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt>foo[]<br><dd>bar</dl>",
+ [["insertparagraph",""]],
+ "<dl><dt>foo</dt><dd>{}<br></dd><dd>bar</dd></dl>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt>foo[]bar<dd>baz</dl>",
+ [["insertparagraph",""]],
+ "<dl><dt>foo</dt><dt>{}bar</dt><dd>baz</dd></dl>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>[]bar</dl>",
+ [["insertparagraph",""]],
+ "<dl><dt>foo</dt><dd><br></dd><dd>{}bar</dd></dl>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>bar[]</dl>",
+ [["insertparagraph",""]],
+ "<dl><dt>foo</dt><dd>bar</dd><dt>{}<br></dt></dl>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>bar[]<br></dl>",
+ [["insertparagraph",""]],
+ "<dl><dt>foo</dt><dd>bar</dd><dt>{}<br></dt></dl>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>bar[]baz</dl>",
+ [["insertparagraph",""]],
+ "<dl><dt>foo</dt><dd>bar</dd><dd>{}baz</dd></dl>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<h1>[]foo</h1>",
+ [["insertparagraph",""]],
+ "<h1><br></h1><h1>{}foo</h1>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<h1>foo[]</h1>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<h1>foo</h1><div>{}<br></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<h1>foo[]</h1>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<h1>foo</h1><p>{}<br></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<h1>foo[]<br></h1>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<h1>foo</h1><div>{}<br></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<h1>foo[]<br></h1>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<h1>foo</h1><p>{}<br></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<h1>foo[]bar</h1>",
+ [["insertparagraph",""]],
+ "<h1>foo</h1><h1>{}bar</h1>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li>[]foo</ol>",
+ [["insertparagraph",""]],
+ "<ol><li><br></li><li>{}foo</li></ol>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li>foo[]</ol>",
+ [["insertparagraph",""]],
+ "<ol><li>foo</li><li>{}<br></li></ol>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li>foo[]<br></ol>",
+ [["insertparagraph",""]],
+ "<ol><li>foo</li><li>{}<br></li></ol>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li>foo[]bar</ol>",
+ [["insertparagraph",""]],
+ "<ol><li>foo</li><li>{}bar</li></ol>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<p>[]foo</p>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p><br></p><p>{}foo</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>[]foo</p>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><br></p><p>{}foo</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo[]</p>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><p>{}<br></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo[]</p>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}<br></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo[]<br></p>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><p>{}<br></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo[]<br></p>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}<br></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo[]bar</p>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><p>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo[]bar</p>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<pre>[]foo</pre>",
+ [["insertparagraph",""]],
+ "<pre><br>{}foo</pre>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<pre>foo[]</pre>",
+ [["insertparagraph",""]],
+ "<pre>foo<br>{}<br></pre>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<pre>foo[]<br></pre>",
+ [["insertparagraph",""]],
+ "<pre>foo<br>{}<br></pre>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<pre>foo[]bar</pre>",
+ [["insertparagraph",""]],
+ "<pre>foo<br>{}bar</pre>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<pre>foo[]<br><br></pre>",
+ [["insertparagraph",""]],
+ "<pre>foo<br>{}<br><br></pre>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<pre>foo<br>{}<br></pre>",
+ [["insertparagraph",""]],
+ "<pre>foo<br><br>{}<br></pre>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<pre>foo&#10;[]</pre>",
+ [["insertparagraph",""]],
+ "<pre>foo\n<br>{}<br></pre>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<pre>foo[]&#10;</pre>",
+ [["insertparagraph",""]],
+ "<pre>foo<br>{}\n</pre>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<pre>foo&#10;[]&#10;</pre>",
+ [["insertparagraph",""]],
+ "<pre>foo\n<br>{}\n</pre>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<xmp>foo[]bar</xmp>",
+ [["insertparagraph",""]],
+ "<xmp>foo</xmp><xmp>{}bar</xmp>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<script>foo[]bar</script>baz",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><script>foo</script><br></div><div>{}<script>bar</script>baz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<script>foo[]bar</script>baz",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><script>foo</script><br></p><p>{}<script>bar</script>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div style=display:none>foo[]bar</div>baz",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div style=\"display:none\">foo<br></div><div style=\"display:none\">{}bar<br></div>baz",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div style=display:none>foo[]bar</div>baz",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div style=\"display:none\">foo<br></div><div style=\"display:none\">{}bar<br></div>baz",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div style=display:none>foo[]bar</div>baz",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div style=\"display:none\">foo<br></div><div style=\"display:none\">{}bar<br></div>baz",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div style=display:none>foo[]bar</div>baz",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div style=\"display:none\">foo<br></div><div style=\"display:none\">{}bar<br></div>baz",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<listing>foo[]bar</listing>",
+ [["insertparagraph",""]],
+ "<listing>foo<br>{}bar</listing>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li>{}<br></li></ol>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div>{}<br></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li>{}<br></li></ol>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>{}<br></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["foo<ol><li>{}<br></li></ol>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "foo<div>{}<br></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["foo<ol><li>{}<br></li></ol>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "foo<p>{}<br></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li>{}<br></li></ol>foo",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div>{}<br></div>foo",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li>{}<br></li></ol>foo",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>{}<br></p>foo",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>{}<br></ol>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<ol><li>foo</li></ol><div>{}<br></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>{}<br></ol>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<ol><li>foo</li></ol><p>{}<br></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li>{}<br><li>bar</ol>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div>{}<br></div><ol><li>bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li>{}<br><li>bar</ol>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>{}<br></p><ol><li>bar</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ul><li>{}<br></ul></ol>",
+ [["insertparagraph",""]],
+ "<ol><li>foo</li><li>{}<br></li></ol>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt>{}<br></dt></dl>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div>{}<br></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt>{}<br></dt></dl>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>{}<br></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>{}<br></dl>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<dl><dt>foo</dt></dl><div>{}<br></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>{}<br></dl>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<dl><dt>foo</dt></dl><p>{}<br></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt>{}<br><dd>bar</dl>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div>{}<br></div><dl><dd>bar</dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt>{}<br><dd>bar</dl>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>{}<br></p><dl><dd>bar</dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>bar<dl><dt>{}<br><dd>baz</dl></dl>",
+ [["insertparagraph",""]],
+ "<dl><dt>foo</dt><dd>bar</dd><dt>{}<br></dt><dd><dl><dd>baz</dd></dl></dd></dl>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt>foo<dd>bar<dl><dt>baz<dd>{}<br></dl></dl>",
+ [["insertparagraph",""]],
+ "<dl><dt>foo</dt><dd>bar<dl><dt>baz</dt></dl></dd><dd>{}<br></dd></dl>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<h1>foo[bar</h1><p>baz]quz</p>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<h1>foo</h1><h1>{}quz</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<h1>foo[bar</h1><p>baz]quz</p>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<h1>foo</h1><h1>{}quz</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo[bar</p><h1>baz]quz</h1>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><p>{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo[bar</p><h1>baz]quz</h1>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}quz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo</p>{}<br>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><div><br></div><div>{}<br></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo</p>{}<br>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p><br></p><p>{}<br></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["{}<br><p>foo</p>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><br></div><div>{}<br></div><p>foo</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["{}<br><p>foo</p>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><br></p><p>{}<br></p><p>foo</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo</p>{}<br><h1>bar</h1>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><div><br></div><div>{}<br></div><h1>bar</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo</p>{}<br><h1>bar</h1>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p><br></p><p>{}<br></p><h1>bar</h1>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<h1>foo</h1>{}<br><p>bar</p>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<h1>foo</h1><div><br></div><div>{}<br></div><p>bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<h1>foo</h1>{}<br><p>bar</p>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<h1>foo</h1><p><br></p><p>{}<br></p><p>bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<h1>foo</h1>{}<br><h2>bar</h2>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<h1>foo</h1><div><br></div><div>{}<br></div><h2>bar</h2>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<h1>foo</h1>{}<br><h2>bar</h2>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<h1>foo</h1><p><br></p><p>{}<br></p><h2>bar</h2>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo</p><h1>[bar]</h1><p>baz</p>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><h1><br></h1><div>{}<br></div><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo</p><h1>[bar]</h1><p>baz</p>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><h1><br></h1><p>{}<br></p><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo</p>{<h1>bar</h1>}<p>baz</p>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><div>{}<br></div><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo</p>{<h1>bar</h1>}<p>baz</p>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}<br></p><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<table><tr><td>foo[]bar</table>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<table><tbody><tr><td><div>foo</div><div>{}bar</div></td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<table><tr><td>foo[]bar</table>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<table><tbody><tr><td><p>foo</p><p>{}bar</p></td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<table><tr><td><p>foo[]bar</table>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<table><tbody><tr><td><p>foo</p><p>{}bar</p></td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<table><tr><td><p>foo[]bar</table>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<table><tbody><tr><td><p>foo</p><p>{}bar</p></td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<blockquote>[]foo</blockquote>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<blockquote><div><br></div><div>{}foo</div></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<blockquote>[]foo</blockquote>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<blockquote><p><br></p><p>{}foo</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<blockquote>foo[]</blockquote>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<blockquote><div>foo</div><div>{}<br></div></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<blockquote>foo[]</blockquote>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<blockquote><p>foo</p><p>{}<br></p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<blockquote>foo[]<br></blockquote>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<blockquote><div>foo</div><div>{}<br></div></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<blockquote>foo[]<br></blockquote>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<blockquote><p>foo</p><p>{}<br></p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<blockquote>foo[]bar</blockquote>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<blockquote><div>foo</div><div>{}bar</div></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<blockquote>foo[]bar</blockquote>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<blockquote><p>foo</p><p>{}bar</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<blockquote><p>[]foo</blockquote>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<blockquote><p><br></p><p>{}foo</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<blockquote><p>[]foo</blockquote>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<blockquote><p><br></p><p>{}foo</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<blockquote><p>foo[]</blockquote>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<blockquote><p>foo</p><p>{}<br></p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<blockquote><p>foo[]</blockquote>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<blockquote><p>foo</p><p>{}<br></p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<blockquote><p>foo[]bar</blockquote>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<blockquote><p>foo</p><p>{}bar</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<blockquote><p>foo[]bar</blockquote>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<blockquote><p>foo</p><p>{}bar</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<blockquote><p>foo[]<p>bar</blockquote>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<blockquote><p>foo</p><p>{}<br></p><p>bar</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<blockquote><p>foo[]<p>bar</blockquote>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<blockquote><p>foo</p><p>{}<br></p><p>bar</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<blockquote><p>foo[]bar<p>baz</blockquote>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<blockquote><p>foo</p><p>{}bar</p><p>baz</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<blockquote><p>foo[]bar<p>baz</blockquote>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<blockquote><p>foo</p><p>{}bar</p><p>baz</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<span>foo[]bar</span>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><span>foo</span></div><div>{}<span>bar</span></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<span>foo[]bar</span>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><span>foo</span></p><p>{}<span>bar</span></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<span>foo[]bar</span>baz",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><span>foo</span></div><div>{}<span>bar</span>baz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<span>foo[]bar</span>baz",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><span>foo</span></p><p>{}<span>bar</span>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<b>foo[]bar</b>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><b>foo</b></div><div>{}<b>bar</b></div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<b>foo[]bar</b>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><b>foo</b></div><div>{}<b>bar</b></div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<b>foo[]bar</b>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><b>foo</b></p><p>{}<b>bar</b></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<b>foo[]bar</b>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><b>foo</b></p><p>{}<b>bar</b></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<b>foo[]bar</b>baz",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><b>foo</b></div><div>{}<b>bar</b>baz</div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<b>foo[]bar</b>baz",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><b>foo</b></div><div>{}<b>bar</b>baz</div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<b>foo[]bar</b>baz",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><b>foo</b></p><p>{}<b>bar</b>baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<b>foo[]bar</b>baz",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><b>foo</b></p><p>{}<b>bar</b>baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<b>foo[]</b>bar",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><b>foo</b></div><div>{}bar</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<b>foo[]</b>bar",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><b>foo</b></p><p>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["foo<b>[]bar</b>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div>foo</div><div>{}<b>bar</b></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["foo<b>[]bar</b>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}<b>bar</b></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<b>foo[]</b><i>bar</i>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><b>foo</b></div><div>{}<i>bar</i></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<b>foo[]</b><i>bar</i>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><b>foo</b></p><p>{}<i>bar</i></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<b id=x class=y>foo[]bar</b>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><b id=\"x\" class=\"y\">foo</b></div><div>{}<b class=\"y\">bar</b></div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<b id=x class=y>foo[]bar</b>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><b id=\"x\" class=\"y\">foo</b></div><div>{}<b class=\"y\">bar</b></div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<b id=x class=y>foo[]bar</b>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><b id=\"x\" class=\"y\">foo</b></p><p>{}<b class=\"y\">bar</b></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<b id=x class=y>foo[]bar</b>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><b id=\"x\" class=\"y\">foo</b></p><p>{}<b class=\"y\">bar</b></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<i><b>foo[]bar</b>baz</i>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><i><b>foo</b></i></div><div>{}<i><b>bar</b>baz</i></div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<i><b>foo[]bar</b>baz</i>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><i><b>foo</b></i></div><div>{}<i><b>bar</b>baz</i></div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<i><b>foo[]bar</b>baz</i>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><i><b>foo</b></i></p><p>{}<i><b>bar</b>baz</i></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<i><b>foo[]bar</b>baz</i>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><i><b>foo</b></i></p><p>{}<i><b>bar</b>baz</i></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p><b>foo[]bar</b></p>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p><b>foo</b></p><p>{}<b>bar</b></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p><b>foo[]bar</b></p>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p><b>foo</b></p><p>{}<b>bar</b></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p><b>foo[]bar</b></p>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><b>foo</b></p><p>{}<b>bar</b></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p><b>foo[]bar</b></p>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><b>foo</b></p><p>{}<b>bar</b></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p><b>[]foo</b></p>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p><br></p><p>{}<b>foo</b></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p><b>[]foo</b></p>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><br></p><p>{}<b>foo</b></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p><b id=x class=y>foo[]bar</b></p>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p><b id=\"x\" class=\"y\">foo</b></p><p>{}<b class=\"y\">bar</b></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p><b id=x class=y>foo[]bar</b></p>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p><b id=\"x\" class=\"y\">foo</b></p><p>{}<b class=\"y\">bar</b></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p><b id=x class=y>foo[]bar</b></p>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><b id=\"x\" class=\"y\">foo</b></p><p>{}<b class=\"y\">bar</b></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p><b id=x class=y>foo[]bar</b></p>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><b id=\"x\" class=\"y\">foo</b></p><p>{}<b class=\"y\">bar</b></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div><b>foo[]bar</b></div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><b>foo</b></div><div>{}<b>bar</b></div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div><b>foo[]bar</b></div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><b>foo</b></div><div>{}<b>bar</b></div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div><b>foo[]bar</b></div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div><b>foo</b></div><div>{}<b>bar</b></div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div><b>foo[]bar</b></div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div><b>foo</b></div><div>{}<b>bar</b></div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<a href=foo>foo[]bar</a>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><a href=\"foo\">foo</a></div><div>{}<a href=\"foo\">bar</a></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<a href=foo>foo[]bar</a>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><a href=\"foo\">foo</a></p><p>{}<a href=\"foo\">bar</a></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<a href=foo>foo[]bar</a>baz",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><a href=\"foo\">foo</a></div><div>{}<a href=\"foo\">bar</a>baz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<a href=foo>foo[]bar</a>baz",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><a href=\"foo\">foo</a></p><p>{}<a href=\"foo\">bar</a>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<a href=foo>foo[]</a>bar",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><a href=\"foo\">foo</a></div><div>{}bar</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<a href=foo>foo[]</a>bar",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><a href=\"foo\">foo</a></p><p>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["foo<a href=foo>[]bar</a>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div>foo</div><div>{}<a href=\"foo\">bar</a></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["foo<a href=foo>[]bar</a>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}<a href=\"foo\">bar</a></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo[]<!--bar-->",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><p>{}<!--bar--><br></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo[]<!--bar-->",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}<!--bar--><br></p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p><!--foo-->[]bar",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p><!--foo--><br></p><p>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p><!--foo-->[]bar",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><!--foo--><br></p><p>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar]</span>baz",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar]</span>baz",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar]</span>baz",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar]</span>baz",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar}</span>baz",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar}</span>baz",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar}</span>baz",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar}</span>baz",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo{<span style=color:#aBcDeF>bar</span>}baz",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo{<span style=color:#aBcDeF>bar</span>}baz",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo{<span style=color:#aBcDeF>bar</span>}baz",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo{<span style=color:#aBcDeF>bar</span>}baz",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>[foo<span style=color:#aBcDeF>bar]</span>baz",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p><br></p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>[foo<span style=color:#aBcDeF>bar]</span>baz",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p><br></p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>[foo<span style=color:#aBcDeF>bar]</span>baz",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><br></p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>[foo<span style=color:#aBcDeF>bar]</span>baz",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><br></p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>{foo<span style=color:#aBcDeF>bar}</span>baz",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p><br></p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>{foo<span style=color:#aBcDeF>bar}</span>baz",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p><br></p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>{foo<span style=color:#aBcDeF>bar}</span>baz",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><br></p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>{foo<span style=color:#aBcDeF>bar}</span>baz",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p><br></p><p>{}baz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span>baz]",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><p>{}<br></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span>baz]",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><p>{}<br></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span>baz]",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}<br></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span>baz]",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}<br></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar</span>baz}",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><p>{}<br></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar</span>baz}",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><p>{}<br></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar</span>baz}",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}<br></p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar</span>baz}",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}<br></p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><p>{}quz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<p>foo</p><p>{}quz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}quz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<p>foo</p><p>{}quz</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ul contenteditable><li>{}<br></ul>",
+ [["insertparagraph",""]],
+ "<ul contenteditable=\"\"><li>{}<br></li></ul>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<ul contenteditable><li>foo[]</ul>",
+ [["insertparagraph",""]],
+ "<ul contenteditable=\"\"><li>foo</li><li>{}<br></li></ul>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<div contenteditable=false><ul contenteditable><li>{}<br></ul></div>",
+ [["insertparagraph",""]],
+ "<div contenteditable=\"false\"><ul contenteditable=\"\"><li>{}<br></li></ul></div>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<div contenteditable=false><ul contenteditable><li>foo[]</ul></div>",
+ [["insertparagraph",""]],
+ "<div contenteditable=\"false\"><ul contenteditable=\"\"><li>foo</li><li>{}<br></li></ul></div>",
+ [true],
+ {"insertparagraph":[false,false,"",false,false,""]}],
+["<address><p>foo[]</address>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<address><p>foo</p><p>{}<br></p></address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<address><p>foo[]</address>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<address><p>foo</p><p>{}<br></p></address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt><p>foo[]</dl>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<dl><dt><p>foo</p></dt><dd><p>{}<br></p></dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt><p>foo[]</dl>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<dl><dt><p>foo</p></dt><dd><p>{}<br></p></dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dd><p>foo[]</dl>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<dl><dd><p>foo</p></dd><dt><p>{}<br></p></dt></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dd><p>foo[]</dl>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<dl><dd><p>foo</p></dd><dt><p>{}<br></p></dt></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li><p>foo[]</ol>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<ol><li><p>foo</p></li><li><p>{}<br></p></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li><p>foo[]</ol>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<ol><li><p>foo</p></li><li><p>{}<br></p></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ul><li><p>foo[]</ul>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<ul><li><p>foo</p></li><li><p>{}<br></p></li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ul><li><p>foo[]</ul>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<ul><li><p>foo</p></li><li><p>{}<br></p></li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<address><div>foo[]</address>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<address><div>foo</div><div>{}<br></div></address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<address><div>foo[]</address>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<address><div>foo</div><div>{}<br></div></address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt><div>foo[]</dl>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<dl><dt><div>foo</div></dt><dd><div>{}<br></div></dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt><div>foo[]</dl>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<dl><dt><div>foo</div></dt><dd><div>{}<br></div></dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dd><div>foo[]</dl>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<dl><dd><div>foo</div></dd><dt><div>{}<br></div></dt></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dd><div>foo[]</dl>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<dl><dd><div>foo</div></dd><dt><div>{}<br></div></dt></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li><div>foo[]</ol>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<ol><li><div>foo</div></li><li><div>{}<br></div></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li><div>foo[]</ol>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<ol><li><div>foo</div></li><li><div>{}<br></div></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ul><li><div>foo[]</ul>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<ul><li><div>foo</div></li><li><div>{}<br></div></li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ul><li><div>foo[]</ul>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<ul><li><div>foo</div></li><li><div>{}<br></div></li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div><p>foo[]</div>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><p>foo</p><p>{}<br></p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div><p>foo[]</div>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div><p>foo</p><p>{}<br></p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div><div>foo[]</div>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><div>foo</div><div>{}<br></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div><div>foo[]</div>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div><div>foo</div><div>{}<br></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<address><p>[]foo</address>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<address><p><br></p><p>{}foo</p></address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<address><p>[]foo</address>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<address><p><br></p><p>{}foo</p></address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt><p>[]foo</dl>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<dl><dt><p><br></p></dt><dt><p>{}foo</p></dt></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt><p>[]foo</dl>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<dl><dt><p><br></p></dt><dt><p>{}foo</p></dt></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dd><p>[]foo</dl>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<dl><dd><p><br></p></dd><dd><p>{}foo</p></dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dd><p>[]foo</dl>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<dl><dd><p><br></p></dd><dd><p>{}foo</p></dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li><p>[]foo</ol>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<ol><li><p><br></p></li><li><p>{}foo</p></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li><p>[]foo</ol>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<ol><li><p><br></p></li><li><p>{}foo</p></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ul><li><p>[]foo</ul>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<ul><li><p><br></p></li><li><p>{}foo</p></li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ul><li><p>[]foo</ul>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<ul><li><p><br></p></li><li><p>{}foo</p></li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<address><div>[]foo</address>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<address><div><br></div><div>{}foo</div></address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<address><div>[]foo</address>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<address><div><br></div><div>{}foo</div></address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt><div>[]foo</dl>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<dl><dt><div><br></div></dt><dt><div>{}foo</div></dt></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt><div>[]foo</dl>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<dl><dt><div><br></div></dt><dt><div>{}foo</div></dt></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dd><div>[]foo</dl>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<dl><dd><div><br></div></dd><dd><div>{}foo</div></dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dd><div>[]foo</dl>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<dl><dd><div><br></div></dd><dd><div>{}foo</div></dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li><div>[]foo</ol>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<ol><li><div><br></div></li><li><div>{}foo</div></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li><div>[]foo</ol>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<ol><li><div><br></div></li><li><div>{}foo</div></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ul><li><div>[]foo</ul>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<ul><li><div><br></div></li><li><div>{}foo</div></li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ul><li><div>[]foo</ul>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<ul><li><div><br></div></li><li><div>{}foo</div></li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div><p>[]foo</div>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><p><br></p><p>{}foo</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div><p>[]foo</div>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div><p><br></p><p>{}foo</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div><div>[]foo</div>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><div><br></div><div>{}foo</div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div><div>[]foo</div>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div><div><br></div><div>{}foo</div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<address><p>foo[]bar</address>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<address><p>foo</p><p>{}bar</p></address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<address><p>foo[]bar</address>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<address><p>foo</p><p>{}bar</p></address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt><p>foo[]bar</dl>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<dl><dt><p>foo</p></dt><dt><p>{}bar</p></dt></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt><p>foo[]bar</dl>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<dl><dt><p>foo</p></dt><dt><p>{}bar</p></dt></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dd><p>foo[]bar</dl>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<dl><dd><p>foo</p></dd><dd><p>{}bar</p></dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dd><p>foo[]bar</dl>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<dl><dd><p>foo</p></dd><dd><p>{}bar</p></dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li><p>foo[]bar</ol>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<ol><li><p>foo</p></li><li><p>{}bar</p></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li><p>foo[]bar</ol>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<ol><li><p>foo</p></li><li><p>{}bar</p></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ul><li><p>foo[]bar</ul>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<ul><li><p>foo</p></li><li><p>{}bar</p></li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ul><li><p>foo[]bar</ul>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<ul><li><p>foo</p></li><li><p>{}bar</p></li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<address><div>foo[]bar</address>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<address><div>foo</div><div>{}bar</div></address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<address><div>foo[]bar</address>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<address><div>foo</div><div>{}bar</div></address>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt><div>foo[]bar</dl>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<dl><dt><div>foo</div></dt><dt><div>{}bar</div></dt></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dt><div>foo[]bar</dl>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<dl><dt><div>foo</div></dt><dt><div>{}bar</div></dt></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dd><div>foo[]bar</dl>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<dl><dd><div>foo</div></dd><dd><div>{}bar</div></dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<dl><dd><div>foo[]bar</dl>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<dl><dd><div>foo</div></dd><dd><div>{}bar</div></dd></dl>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li><div>foo[]bar</ol>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<ol><li><div>foo</div></li><li><div>{}bar</div></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li><div>foo[]bar</ol>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<ol><li><div>foo</div></li><li><div>{}bar</div></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ul><li><div>foo[]bar</ul>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<ul><li><div>foo</div></li><li><div>{}bar</div></li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ul><li><div>foo[]bar</ul>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<ul><li><div>foo</div></li><li><div>{}bar</div></li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div><p>foo[]bar</div>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><p>foo</p><p>{}bar</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div><p>foo[]bar</div>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div><p>foo</p><p>{}bar</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div><div>foo[]bar</div>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div><div>foo</div><div>{}bar</div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div><div>foo[]bar</div>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div><div>foo</div><div>{}bar</div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li class=a id=x><p class=b id=y>foo[]</ol>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<ol><li class=\"a\" id=\"x\"><p class=\"b\" id=\"y\">foo</p></li><li class=\"a\"><p class=\"b\">{}<br></p></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li class=a id=x><p class=b id=y>foo[]</ol>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<ol><li class=\"a\" id=\"x\"><p class=\"b\" id=\"y\">foo</p></li><li class=\"a\"><p class=\"b\">{}<br></p></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div class=a id=x><div class=b id=y>foo[]</div></div>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div class=\"a\" id=\"x\"><div class=\"b\" id=\"y\">foo</div><div class=\"b\">{}<br></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div class=a id=x><div class=b id=y>foo[]</div></div>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div class=\"a\" id=\"x\"><div class=\"b\" id=\"y\">foo</div><div class=\"b\">{}<br></div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div class=a id=x><p class=b id=y>foo[]</div>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div class=\"a\" id=\"x\"><p class=\"b\" id=\"y\">foo</p><p class=\"b\">{}<br></p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div class=a id=x><p class=b id=y>foo[]</div>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div class=\"a\" id=\"x\"><p class=\"b\" id=\"y\">foo</p><p class=\"b\">{}<br></p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li class=a id=x><p class=b id=y>[]foo</ol>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<ol><li class=\"a\" id=\"x\"><p class=\"b\" id=\"y\"><br></p></li><li class=\"a\"><p class=\"b\">{}foo</p></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li class=a id=x><p class=b id=y>[]foo</ol>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<ol><li class=\"a\" id=\"x\"><p class=\"b\" id=\"y\"><br></p></li><li class=\"a\"><p class=\"b\">{}foo</p></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div class=a id=x><div class=b id=y>[]foo</div></div>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div class=\"a\" id=\"x\"><div class=\"b\" id=\"y\"><br></div><div class=\"b\">{}foo</div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div class=a id=x><div class=b id=y>[]foo</div></div>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div class=\"a\" id=\"x\"><div class=\"b\" id=\"y\"><br></div><div class=\"b\">{}foo</div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div class=a id=x><p class=b id=y>[]foo</div>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div class=\"a\" id=\"x\"><p class=\"b\" id=\"y\"><br></p><p class=\"b\">{}foo</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div class=a id=x><p class=b id=y>[]foo</div>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div class=\"a\" id=\"x\"><p class=\"b\" id=\"y\"><br></p><p class=\"b\">{}foo</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li class=a id=x><p class=b id=y>foo[]bar</ol>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<ol><li class=\"a\" id=\"x\"><p class=\"b\" id=\"y\">foo</p></li><li class=\"a\"><p class=\"b\">{}bar</p></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<ol><li class=a id=x><p class=b id=y>foo[]bar</ol>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<ol><li class=\"a\" id=\"x\"><p class=\"b\" id=\"y\">foo</p></li><li class=\"a\"><p class=\"b\">{}bar</p></li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div class=a id=x><div class=b id=y>foo[]bar</div></div>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div class=\"a\" id=\"x\"><div class=\"b\" id=\"y\">foo</div><div class=\"b\">{}bar</div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div class=a id=x><div class=b id=y>foo[]bar</div></div>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div class=\"a\" id=\"x\"><div class=\"b\" id=\"y\">foo</div><div class=\"b\">{}bar</div></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div class=a id=x><p class=b id=y>foo[]bar</div>",
+ [["defaultparagraphseparator","div"],["insertparagraph",""]],
+ "<div class=\"a\" id=\"x\"><p class=\"b\" id=\"y\">foo</p><p class=\"b\">{}bar</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertparagraph":[false,false,"",false,false,""]}],
+["<div class=a id=x><p class=b id=y>foo[]bar</div>",
+ [["defaultparagraphseparator","p"],["insertparagraph",""]],
+ "<div class=\"a\" id=\"x\"><p class=\"b\" id=\"y\">foo</p><p class=\"b\">{}bar</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertparagraph":[false,false,"",false,false,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/inserttext.js b/testing/web-platform/tests/editing/data/inserttext.js
new file mode 100644
index 000000000..8d4e31c17
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/inserttext.js
@@ -0,0 +1,1192 @@
+var browserTests = [
+["foo[bar]baz",
+ [["inserttext","a"]],
+ "fooa[]baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["inserttext",""]],
+ "foo[]baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["inserttext","\t"]],
+ "foo\t[]bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["inserttext","&"]],
+ "foo&amp;[]bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["defaultparagraphseparator","div"],["inserttext","\n"]],
+ "<div>foo</div><div>{}bar</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"div"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["defaultparagraphseparator","p"],["inserttext","\n"]],
+ "<p>foo</p><p>{}bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["defaultparagraphseparator","div"],["inserttext","abc\ndef"]],
+ "<div>fooabc</div><div>def[]bar</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["defaultparagraphseparator","p"],["inserttext","abc\ndef"]],
+ "<p>fooabc</p><p>def[]bar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["inserttext","\u0007"]],
+ "foo\u0007[]bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["inserttext","<b>hi</b>"]],
+ "foo&lt;b&gt;hi&lt;/b&gt;[]bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["inserttext","<"]],
+ "foo&lt;[]bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["inserttext","&amp;"]],
+ "foo&amp;amp;[]bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["inserttext"," "]],
+ "foo []bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo []bar",
+ [["inserttext"," "]],
+ "foo&nbsp; []bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo[] bar",
+ [["inserttext"," "]],
+ "foo&nbsp;[] bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo &nbsp;[]bar",
+ [["inserttext"," "]],
+ "foo &nbsp; []bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo []&nbsp;bar",
+ [["inserttext"," "]],
+ "foo &nbsp;[] bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo[] &nbsp;bar",
+ [["inserttext"," "]],
+ "foo []&nbsp; bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo&nbsp; []bar",
+ [["inserttext"," "]],
+ "foo &nbsp; []bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo&nbsp;[] bar",
+ [["inserttext"," "]],
+ "foo &nbsp;[] bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo[]&nbsp; bar",
+ [["inserttext"," "]],
+ "foo []&nbsp; bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo&nbsp;&nbsp;[]bar",
+ [["inserttext"," "]],
+ "foo &nbsp; []bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo&nbsp;[]&nbsp;bar",
+ [["inserttext"," "]],
+ "foo &nbsp;[] bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo[]&nbsp;&nbsp;bar",
+ [["inserttext"," "]],
+ "foo []&nbsp; bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo []&nbsp; bar",
+ [["inserttext"," "]],
+ "foo &nbsp;[]&nbsp; bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo []bar",
+ [["inserttext"," "]],
+ "foo&nbsp; []bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo []&nbsp;&nbsp; &nbsp; bar",
+ [["inserttext"," "]],
+ "foo &nbsp;[] &nbsp; &nbsp; bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["[]foo",
+ [["inserttext"," "]],
+ "&nbsp;[]foo",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["{}foo",
+ [["inserttext"," "]],
+ "&nbsp;[]foo",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo[]",
+ [["inserttext"," "]],
+ "foo&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo{}",
+ [["inserttext"," "]],
+ "foo&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo&nbsp;[]",
+ [["inserttext"," "]],
+ "foo &nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo&nbsp;{}",
+ [["inserttext"," "]],
+ "foo &nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo&nbsp;&nbsp;[]",
+ [["inserttext"," "]],
+ "foo &nbsp;&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo&nbsp;&nbsp;{}",
+ [["inserttext"," "]],
+ "foo &nbsp;&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<b>foo[]</b>bar",
+ [["inserttext"," "]],
+ "<b>foo []</b>bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo[]<b>bar</b>",
+ [["inserttext"," "]],
+ "foo []<b>bar</b>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo[] ",
+ [["inserttext"," "]],
+ "foo&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+[" foo [] ",
+ [["inserttext"," "]],
+ " foo&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo[]<span> </span>",
+ [["inserttext"," "]],
+ "foo&nbsp;[]<span> </span>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo[]<span> </span> ",
+ [["inserttext"," "]],
+ "foo&nbsp;[]<span> </span> ",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+[" []foo",
+ [["inserttext"," "]],
+ "&nbsp;[]foo",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+[" [] foo ",
+ [["inserttext"," "]],
+ "&nbsp;[]foo ",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<span> </span>[]foo",
+ [["inserttext"," "]],
+ "<span> </span>&nbsp;[]foo",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+[" <span> </span>[]foo",
+ [["inserttext"," "]],
+ " <span> </span>&nbsp;[]foo",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["{}<br>",
+ [["inserttext"," "]],
+ "&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<p>{}<br>",
+ [["inserttext"," "]],
+ "<p>&nbsp;[]</p>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<p>foo[]<p>bar",
+ [["inserttext"," "]],
+ "<p>foo&nbsp;[]</p><p>bar</p>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<p>foo&nbsp;[]<p>bar",
+ [["inserttext"," "]],
+ "<p>foo &nbsp;[]</p><p>bar</p>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<p>foo[]<p>&nbsp;bar",
+ [["inserttext"," "]],
+ "<p>foo&nbsp;[]</p><p>&nbsp;bar</p>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<pre>foo[]bar</pre>",
+ [["inserttext"," "]],
+ "<pre>foo []bar</pre>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<pre>foo []bar</pre>",
+ [["inserttext"," "]],
+ "<pre>foo []bar</pre>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<pre>foo[] bar</pre>",
+ [["inserttext"," "]],
+ "<pre>foo [] bar</pre>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<pre>foo &nbsp;[]bar</pre>",
+ [["inserttext"," "]],
+ "<pre>foo &nbsp; []bar</pre>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<pre>[]foo</pre>",
+ [["inserttext"," "]],
+ "<pre> []foo</pre>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<pre>foo[]</pre>",
+ [["inserttext"," "]],
+ "<pre>foo []</pre>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<pre>foo&nbsp;[]</pre>",
+ [["inserttext"," "]],
+ "<pre>foo&nbsp; []</pre>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<pre> foo [] </pre>",
+ [["inserttext"," "]],
+ "<pre> foo [] </pre>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre>foo[]bar</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre\">foo []bar</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre>foo []bar</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre\">foo []bar</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre>foo[] bar</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre\">foo [] bar</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre>foo &nbsp;[]bar</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre\">foo &nbsp; []bar</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre>[]foo</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre\"> []foo</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre>foo[]</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre\">foo []</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre>foo&nbsp;[]</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre\">foo&nbsp; []</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre> foo [] </div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre\"> foo [] </div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-wrap>foo[]bar</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre-wrap\">foo []bar</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-wrap>foo []bar</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre-wrap\">foo []bar</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-wrap>foo[] bar</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre-wrap\">foo [] bar</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-wrap>foo &nbsp;[]bar</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre-wrap\">foo &nbsp; []bar</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-wrap>[]foo</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre-wrap\"> []foo</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-wrap>foo[]</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre-wrap\">foo []</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-wrap>foo&nbsp;[]</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre-wrap\">foo&nbsp; []</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-wrap> foo [] </div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre-wrap\"> foo [] </div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-line>foo[]bar</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre-line\">foo []bar</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-line>foo []bar</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre-line\">foo&nbsp; []bar</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-line>foo[] bar</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre-line\">foo&nbsp;[] bar</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-line>foo &nbsp;[]bar</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre-line\">foo &nbsp; []bar</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-line>[]foo</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre-line\">&nbsp;[]foo</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-line>foo[]</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre-line\">foo&nbsp;[]</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-line>foo&nbsp;[]</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre-line\">foo &nbsp;[]</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:pre-line> foo [] </div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:pre-line\"> foo&nbsp;[]</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:nowrap>foo[]bar</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:nowrap\">foo []bar</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:nowrap>foo []bar</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:nowrap\">foo&nbsp; []bar</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:nowrap>foo[] bar</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:nowrap\">foo&nbsp;[] bar</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:nowrap>foo &nbsp;[]bar</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:nowrap\">foo &nbsp; []bar</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:nowrap>[]foo</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:nowrap\">&nbsp;[]foo</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:nowrap>foo[]</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:nowrap\">foo&nbsp;[]</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:nowrap>foo&nbsp;[]</div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:nowrap\">foo &nbsp;[]</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<div style=white-space:nowrap> foo [] </div>",
+ [["inserttext"," "]],
+ "<div style=\"white-space:nowrap\"> foo&nbsp;[]</div>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["http://a[]",
+ [["inserttext"," "]],
+ "<a href=\"http://a\">http://a</a>&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["ftp://a[]",
+ [["inserttext"," "]],
+ "<a href=\"ftp://a\">ftp://a</a>&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["quasit://a[]",
+ [["inserttext"," "]],
+ "<a href=\"quasit://a\">quasit://a</a>&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+[".x-++-.://a[]",
+ [["inserttext"," "]],
+ ".<a href=\"x-++-.://a\">x-++-.://a</a>&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["(http://a)[]",
+ [["inserttext"," "]],
+ "(<a href=\"http://a\">http://a</a>)&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["&lt;http://a>[]",
+ [["inserttext"," "]],
+ "&lt;<a href=\"http://a\">http://a</a>&gt;&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["http://a![]",
+ [["inserttext"," "]],
+ "<a href=\"http://a\">http://a</a>!&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["!\"#$%&amp;'()*+,-./:;&lt;=>?^_`|~http://a!\"#$%&amp;'()*+,-./:;&lt;=>?^_`|~[]",
+ [["inserttext"," "]],
+ "!\"#$%&amp;'()*+,-./:;&lt;=&gt;?^_`|~<a href=\"http://a!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?^_`|~\">http://a!\"#$%&amp;'()*+,-./:;&lt;=&gt;?^_`|~</a>&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["http://a!\"'(),-.:;&lt;>`[]",
+ [["inserttext"," "]],
+ "<a href=\"http://a\">http://a</a>!\"'(),-.:;&lt;&gt;`&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["http://a#$%&amp;*+/=?^_|~[]",
+ [["inserttext"," "]],
+ "<a href=\"http://a#$%&amp;*+/=?^_|~\">http://a#$%&amp;*+/=?^_|~</a>&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["mailto:a[]",
+ [["inserttext"," "]],
+ "<a href=\"mailto:a\">mailto:a</a>&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["a@b[]",
+ [["inserttext"," "]],
+ "<a href=\"mailto:a@b\">a@b</a>&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["a@[]",
+ [["inserttext"," "]],
+ "a@&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["@b[]",
+ [["inserttext"," "]],
+ "@b&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["#@x[]",
+ [["inserttext"," "]],
+ "<a href=\"mailto:#@x\">#@x</a>&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["a@.[]",
+ [["inserttext"," "]],
+ "a@.&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["!\"#$%&amp;'()*+,-./:;&lt;=>?^_`|~a@b!\"#$%&amp;'()*+,-./:;&lt;=>?^_`|~[]",
+ [["inserttext"," "]],
+ "!\"#$%&amp;'()*+,-./:;&lt;=&gt;<a href=\"mailto:?^_`|~a@b\">?^_`|~a@b</a>!\"#$%&amp;'()*+,-./:;&lt;=&gt;?^_`|~&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<b>a@b</b>{}",
+ [["inserttext"," "]],
+ "<a href=\"mailto:a@b\"><b>a@b</b></a> []",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<b>a</b><i>@</i><u>b</u>{}",
+ [["inserttext"," "]],
+ "<b>a</b><i>@</i><u>b</u> []",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["a@b<b>[]c</b>",
+ [["inserttext"," "]],
+ "<a href=\"mailto:a@b\">a@b</a><b> []c</b>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<p>a@b</p><p>[]c</p>",
+ [["inserttext"," "]],
+ "<p>a@b</p><p>&nbsp;[]c</p>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["http://a[]",
+ [["inserttext","a"]],
+ "http://aa[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["http://a[]",
+ [["inserttext","\t"]],
+ "<a href=\"http://a\">http://a</a>\t[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["http://a[]",
+ [["inserttext","\f"]],
+ "<a href=\"http://a\">http://a</a>\f[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["http://a[]",
+ [["inserttext"," "]],
+ "http://a&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo[]",
+ [["inserttext"," "]],
+ "foo &nbsp;&nbsp;[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["inserttext","a"]],
+ "fooa[]bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo&nbsp;[]",
+ [["inserttext","a"]],
+ "foo a[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo []",
+ [["inserttext","a"]],
+ "foo a[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<p>foo[]",
+ [["inserttext","a"]],
+ "<p>fooa[]</p>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<p>foo</p>{}",
+ [["inserttext","a"]],
+ "<p>foo</p>a[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<p>[]foo",
+ [["inserttext","a"]],
+ "<p>a[]foo</p>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<p>{}foo",
+ [["inserttext","a"]],
+ "<p>a[]foo</p>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["{}<p>foo",
+ [["inserttext","a"]],
+ "a[]<p>foo</p>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<p>foo</p>{}<p>bar</p>",
+ [["inserttext","a"]],
+ "<p>foo</p>a[]<p>bar</p>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<b>foo[]</b>bar",
+ [["inserttext","a"]],
+ "<b>fooa[]</b>bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<b>foo</b>[]bar",
+ [["inserttext","a"]],
+ "<b>foo</b>a[]bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<b>{}</b>bar",
+ [["inserttext","a"]],
+ "foo<b>a[]</b>bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<a>foo[]</a>bar",
+ [["inserttext","a"]],
+ "<a>fooa[]</a>bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<a>foo</a>[]bar",
+ [["inserttext","a"]],
+ "<a>foo</a>a[]bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<a href=/>foo[]</a>bar",
+ [["inserttext","a"]],
+ "<a href=\"/\">fooa[]</a>bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<a href=/>foo</a>[]bar",
+ [["inserttext","a"]],
+ "<a href=\"/\">foo</a>a[]bar",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<p>fo[o<p>b]ar",
+ [["defaultparagraphseparator","div"],["inserttext","a"]],
+ "<p>foa[]ar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserttext":[false,false,"",false,false,""]}],
+["<p>fo[o<p>b]ar",
+ [["defaultparagraphseparator","p"],["inserttext","a"]],
+ "<p>foa[]ar</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserttext":[false,false,"",false,false,""]}],
+["<p>fo[o<p>bar<p>b]az",
+ [["defaultparagraphseparator","div"],["inserttext","a"]],
+ "<p>foa[]az</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserttext":[false,false,"",false,false,""]}],
+["<p>fo[o<p>bar<p>b]az",
+ [["defaultparagraphseparator","p"],["inserttext","a"]],
+ "<p>foa[]az</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserttext":[false,false,"",false,false,""]}],
+["{}<br>",
+ [["inserttext","a"]],
+ "a[]",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<p>{}<br>",
+ [["inserttext","a"]],
+ "<p>a[]</p>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<p><span>{}<br></span>",
+ [["inserttext","a"]],
+ "<p><span>a[]</span></p>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar]</span>baz",
+ [["inserttext","a"]],
+ "<p>foo<span style=\"color:rgb(171, 205, 239)\">a[]</span>baz</p>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar}</span>baz",
+ [["inserttext","a"]],
+ "<p>foo<span style=\"color:rgb(171, 205, 239)\">a[]</span>baz</p>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<p>foo{<span style=color:#aBcDeF>bar</span>}baz",
+ [["inserttext","a"]],
+ "<p>foo<span style=\"color:rgb(171, 205, 239)\">a[]</span>baz</p>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<p>[foo<span style=color:#aBcDeF>bar]</span>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "<p>a[]baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["<p>[foo<span style=color:#aBcDeF>bar]</span>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "<p>a[]baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["<p>{foo<span style=color:#aBcDeF>bar}</span>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "<p>a[]baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["<p>{foo<span style=color:#aBcDeF>bar}</span>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "<p>a[]baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span>baz]",
+ [["inserttext","a"]],
+ "<p>foo<span style=\"color:rgb(171, 205, 239)\">a[]</span></p>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>{bar</span>baz}",
+ [["inserttext","a"]],
+ "<p>foo<span style=\"color:rgb(171, 205, 239)\">a[]</span></p>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "<p>foo<span style=\"color:rgb(171, 205, 239)\">a[]</span>quz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["<p>foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "<p>foo<span style=\"color:rgb(171, 205, 239)\">a[]</span>quz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<b>[bar]</b>baz",
+ [["inserttext","a"]],
+ "foo<b>a[]</b>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<i>[bar]</i>baz",
+ [["inserttext","a"]],
+ "foo<i>a[]</i>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<s>[bar]</s>baz",
+ [["inserttext","a"]],
+ "foo<s>a[]</s>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<sub>[bar]</sub>baz",
+ [["inserttext","a"]],
+ "foo<sub>a[]</sub>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<sup>[bar]</sup>baz",
+ [["inserttext","a"]],
+ "foo<sup>a[]</sup>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<u>[bar]</u>baz",
+ [["inserttext","a"]],
+ "foo<u>a[]</u>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com>[bar]</a>baz",
+ [["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\">a[]</a>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<font face=sans-serif>[bar]</font>baz",
+ [["inserttext","a"]],
+ "foo<font face=\"sans-serif\">a[]</font>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<font size=4>[bar]</font>baz",
+ [["inserttext","a"]],
+ "foo<font size=\"4\">a[]</font>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<font color=#0000FF>[bar]</font>baz",
+ [["inserttext","a"]],
+ "foo<font color=\"#0000FF\">a[]</font>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<span style=background-color:#00FFFF>[bar]</span>baz",
+ [["inserttext","a"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com><font color=blue>[bar]</font></a>baz",
+ [["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\"><font color=\"blue\">a[]</font></a>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<font color=blue><a href=http://www.google.com>[bar]</a></font>baz",
+ [["inserttext","a"]],
+ "foo<font color=\"blue\"><a href=\"http://www.google.com\">a[]</a></font>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com><font color=brown>[bar]</font></a>baz",
+ [["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\"><font color=\"brown\">a[]</font></a>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<font color=brown><a href=http://www.google.com>[bar]</a></font>baz",
+ [["inserttext","a"]],
+ "foo<font color=\"brown\"><a href=\"http://www.google.com\">a[]</a></font>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com><font color=black>[bar]</font></a>baz",
+ [["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\"><font color=\"black\">a[]</font></a>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com><u>[bar]</u></a>baz",
+ [["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\"><u>a[]</u></a>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<u><a href=http://www.google.com>[bar]</a></u>baz",
+ [["inserttext","a"]],
+ "foo<u><a href=\"http://www.google.com\">a[]</a></u>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<sub><font size=2>[bar]</font></sub>baz",
+ [["inserttext","a"]],
+ "foo<sub><font size=\"2\">a[]</font></sub>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<font size=2><sub>[bar]</sub></font>baz",
+ [["inserttext","a"]],
+ "foo<font size=\"2\"><sub>a[]</sub></font>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<sub><font size=3>[bar]</font></sub>baz",
+ [["inserttext","a"]],
+ "foo<sub><font size=\"3\">a[]</font></sub>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<font size=3><sub>[bar]</sub></font>baz",
+ [["inserttext","a"]],
+ "foo<font size=\"3\"><sub>a[]</sub></font>baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["[foo<b>bar]</b>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<b>bar]</b>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<i>bar]</i>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<i>bar]</i>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<s>bar]</s>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<s>bar]</s>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<sub>bar]</sub>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<sub>bar]</sub>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<sup>bar]</sup>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<sup>bar]</sup>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<u>bar]</u>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<u>bar]</u>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<a href=http://www.google.com>bar]</a>baz",
+ [["inserttext","a"]],
+ "a[]baz",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["[foo<font face=sans-serif>bar]</font>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font face=sans-serif>bar]</font>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font size=4>bar]</font>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font size=4>bar]</font>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font color=#0000FF>bar]</font>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font color=#0000FF>bar]</font>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<span style=background-color:#00FFFF>bar]</span>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<span style=background-color:#00FFFF>bar]</span>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<a href=http://www.google.com><font color=blue>bar]</font></a>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<a href=http://www.google.com><font color=blue>bar]</font></a>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font color=blue><a href=http://www.google.com>bar]</a></font>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font color=blue><a href=http://www.google.com>bar]</a></font>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<a href=http://www.google.com><font color=brown>bar]</font></a>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<a href=http://www.google.com><font color=brown>bar]</font></a>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font color=brown><a href=http://www.google.com>bar]</a></font>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font color=brown><a href=http://www.google.com>bar]</a></font>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<a href=http://www.google.com><font color=black>bar]</font></a>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<a href=http://www.google.com><font color=black>bar]</font></a>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<a href=http://www.google.com><u>bar]</u></a>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<a href=http://www.google.com><u>bar]</u></a>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<u><a href=http://www.google.com>bar]</a></u>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<u><a href=http://www.google.com>bar]</a></u>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<sub><font size=2>bar]</font></sub>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<sub><font size=2>bar]</font></sub>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font size=2><sub>bar]</sub></font>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font size=2><sub>bar]</sub></font>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<sub><font size=3>bar]</font></sub>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<sub><font size=3>bar]</font></sub>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font size=3><sub>bar]</sub></font>baz",
+ [["stylewithcss","true"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font size=3><sub>bar]</sub></font>baz",
+ [["stylewithcss","false"],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<b>[bar</b>baz]",
+ [["inserttext","a"]],
+ "foo<b>a[]</b>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<i>[bar</i>baz]",
+ [["inserttext","a"]],
+ "foo<i>a[]</i>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<s>[bar</s>baz]",
+ [["inserttext","a"]],
+ "foo<s>a[]</s>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<sub>[bar</sub>baz]",
+ [["inserttext","a"]],
+ "foo<sub>a[]</sub>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<sup>[bar</sup>baz]",
+ [["inserttext","a"]],
+ "foo<sup>a[]</sup>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<u>[bar</u>baz]",
+ [["inserttext","a"]],
+ "foo<u>a[]</u>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com>[bar</a>baz]",
+ [["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\">a[]</a>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<font face=sans-serif>[bar</font>baz]",
+ [["inserttext","a"]],
+ "foo<font face=\"sans-serif\">a[]</font>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<font size=4>[bar</font>baz]",
+ [["inserttext","a"]],
+ "foo<font size=\"4\">a[]</font>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<font color=#0000FF>[bar</font>baz]",
+ [["inserttext","a"]],
+ "foo<font color=\"#0000FF\">a[]</font>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<span style=background-color:#00FFFF>[bar</span>baz]",
+ [["inserttext","a"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com><font color=blue>[bar</font></a>baz]",
+ [["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\"><font color=\"blue\">a[]</font></a>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<font color=blue><a href=http://www.google.com>[bar</a></font>baz]",
+ [["inserttext","a"]],
+ "foo<font color=\"blue\"><a href=\"http://www.google.com\">a[]</a></font>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com><font color=brown>[bar</font></a>baz]",
+ [["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\"><font color=\"brown\">a[]</font></a>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<font color=brown><a href=http://www.google.com>[bar</a></font>baz]",
+ [["inserttext","a"]],
+ "foo<font color=\"brown\"><a href=\"http://www.google.com\">a[]</a></font>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com><font color=black>[bar</font></a>baz]",
+ [["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\"><font color=\"black\">a[]</font></a>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com><u>[bar</u></a>baz]",
+ [["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\"><u>a[]</u></a>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<u><a href=http://www.google.com>[bar</a></u>baz]",
+ [["inserttext","a"]],
+ "foo<u><a href=\"http://www.google.com\">a[]</a></u>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<sub><font size=2>[bar</font></sub>baz]",
+ [["inserttext","a"]],
+ "foo<sub><font size=\"2\">a[]</font></sub>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<font size=2><sub>[bar</sub></font>baz]",
+ [["inserttext","a"]],
+ "foo<font size=\"2\"><sub>a[]</sub></font>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<sub><font size=3>[bar</font></sub>baz]",
+ [["inserttext","a"]],
+ "foo<sub><font size=\"3\">a[]</font></sub>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["foo<font size=3><sub>[bar</sub></font>baz]",
+ [["inserttext","a"]],
+ "foo<font size=\"3\"><sub>a[]</sub></font>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}],
+["<blockquote><font color=blue>[foo]</font></blockquote>",
+ [["inserttext","a"]],
+ "<blockquote><font color=\"blue\">a[]</font></blockquote>",
+ [true],
+ {"inserttext":[false,false,"",false,false,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/insertunorderedlist.js b/testing/web-platform/tests/editing/data/insertunorderedlist.js
new file mode 100644
index 000000000..ad4a7236f
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/insertunorderedlist.js
@@ -0,0 +1,742 @@
+var browserTests = [
+["foo[]bar",
+ [["insertunorderedlist",""]],
+ "<ul><li>foo[]bar</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["foo[bar]baz",
+ [["insertunorderedlist",""]],
+ "<ul><li>foo[bar]baz</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["foo<br>[bar]",
+ [["insertunorderedlist",""]],
+ "foo<ul><li>[bar]</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["f[oo<br>b]ar<br>baz",
+ [["insertunorderedlist",""]],
+ "<ul><li>f[oo</li><li>b]ar</li></ul>baz",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo]<br>bar</p>",
+ [["insertunorderedlist",""]],
+ "<ul><li>[foo]</li></ul><p>bar</p>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["[foo<ol><li>bar]</ol>baz",
+ [["insertunorderedlist",""]],
+ "<ul><li>[foo</li><li>bar]</li></ul>baz",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["foo<ol><li>[bar</ol>baz]",
+ [["insertunorderedlist",""]],
+ "foo<ul><li>[bar</li><li>baz]</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["[foo<ul><li>bar]</ul>baz",
+ [["insertunorderedlist",""]],
+ "<ul><li>[foo</li><li>bar]</li></ul>baz",
+ [true],
+ {"insertunorderedlist":[true,false,"",false,true,""]}],
+["foo<ul><li>[bar</ul>baz]",
+ [["insertunorderedlist",""]],
+ "foo<ul><li>[bar</li><li>baz]</li></ul>",
+ [true],
+ {"insertunorderedlist":[true,false,"",false,true,""]}],
+["foo<ul><li>[bar</ul><ol><li>baz]</ol>quz",
+ [["insertunorderedlist",""]],
+ "foo<ul><li>[bar</li><li>baz]</li></ul>quz",
+ [true],
+ {"insertunorderedlist":[true,false,"",false,true,""]}],
+["foo<ol><li>[bar</ol><ul><li>baz]</ul>quz",
+ [["insertunorderedlist",""]],
+ "foo<ul><li>[bar</li><li>baz]</li></ul>quz",
+ [true],
+ {"insertunorderedlist":[true,false,"",false,true,""]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["insertunorderedlist",""]],
+ "<table><tbody><tr><td>foo</td><td><ul><li>b[a]r</li></ul></td><td>baz</td></tr></tbody></table>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<table><tbody><tr><td>fo[o<td>b]ar<td>baz</table>",
+ [["insertunorderedlist",""]],
+ "<table><tbody><tr><td><ul><li>fo[o</li></ul></td><td><ul><li>b]ar</li></ul></td><td>baz</td></tr></tbody></table>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["insertunorderedlist",""]],
+ "<ul><li>{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<p>foo<p>[bar]<p>baz",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<p>foo</p><ul><li>[bar]</li></ul><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<p>foo<p>[bar]<p>baz",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<p>foo</p><ul><li>[bar]</li></ul><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<p>foo<blockquote>[bar]</blockquote><p>baz",
+ [["insertunorderedlist",""]],
+ "<p>foo</p><blockquote><ul><li>[bar]</li></ul></blockquote><p>baz</p>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<dl><dt>foo<dd>[bar]<dt>baz<dd>quz</dl>",
+ [["insertunorderedlist",""]],
+ "<dl><dt>foo</dt><dd><ul><li>[bar]</li></ul></dd><dt>baz</dt><dd>quz</dd></dl>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<dl><dt>foo<dd>bar<dt>[baz]<dd>quz</dl>",
+ [["insertunorderedlist",""]],
+ "<dl><dt>foo</dt><dd>bar</dd><dt><ul><li>[baz]</li></ul></dt><dd>quz</dd></dl>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo<p>bar]<p>baz",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul><li>[foo</li><li>bar]</li></ul><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo<p>bar]<p>baz",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul><li>[foo</li><li>bar]</li></ul><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo<blockquote>bar]</blockquote><p>baz",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul><li>[foo</li><ul><li>bar]</li></ul></ul><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo<blockquote>bar]</blockquote><p>baz",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul><li>[foo</li><ul><li>bar]</li></ul></ul><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<dl><dt>[foo<dd>bar]<dt>baz<dd>quz</dl>",
+ [["insertunorderedlist",""]],
+ "<dl><dt><ul><li>[foo</li></ul></dt><dd><ul><li>bar]</li></ul></dd><dt>baz</dt><dd>quz</dd></dl>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<dl><dt>foo<dd>[bar<dt>baz]<dd>quz</dl>",
+ [["insertunorderedlist",""]],
+ "<dl><dt>foo</dt><dd><ul><li>[bar</li></ul></dd><dt><ul><li>baz]</li></ul></dt><dd>quz</dd></dl>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo<blockquote><p>bar]<p>baz</blockquote>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul><li>[foo</li><ul><li>bar]</li></ul></ul><blockquote><p>baz</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo<blockquote><p>bar]<p>baz</blockquote>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul><li>[foo</li><ul><li>bar]</li></ul></ul><blockquote><p>baz</p></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo<li>[bar]<li>baz</ol>",
+ [["insertunorderedlist",""]],
+ "<ol><li>foo</li></ol><ul><li>[bar]</li></ul><ol><li>baz</li></ol>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo</ol>[bar]",
+ [["insertunorderedlist",""]],
+ "<ol><li>foo</li></ol><ul><li>[bar]</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["[foo]<ol><li>bar</ol>",
+ [["insertunorderedlist",""]],
+ "<ul><li>[foo]</li></ul><ol><li>bar</li></ol>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo</ol>[bar]<ol><li>baz</ol>",
+ [["insertunorderedlist",""]],
+ "<ol><li>foo</li></ol><ul><li>[bar]</li></ul><ol><li>baz</li></ol>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><ol><li>[foo]</ol></ol>",
+ [["insertunorderedlist",""]],
+ "<ul><ul><li>[foo]</li></ul></ul>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>[foo]<br>bar<li>baz</ol>",
+ [["insertunorderedlist",""]],
+ "<ul><li>[foo]<br>bar</li></ul><ol><li>baz</li></ol>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo<br>[bar]<li>baz</ol>",
+ [["insertunorderedlist",""]],
+ "<ul><li>foo<br>[bar]</li></ul><ol><li>baz</li></ol>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li><div>[foo]</div>bar<li>baz</ol>",
+ [["insertunorderedlist",""]],
+ "<ul><li><div>[foo]</div>bar</li></ul><ol><li>baz</li></ol>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo<ol><li>[bar]<li>baz</ol><li>quz</ol>",
+ [["insertunorderedlist",""]],
+ "<ol><li>foo</li><ul><li>[bar]</li></ul><ol><li>baz</li></ol><li>quz</li></ol>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo<ol><li>bar<li>[baz]</ol><li>quz</ol>",
+ [["insertunorderedlist",""]],
+ "<ol><li>foo</li><ol><li>bar</li></ol><ul><li>[baz]</li></ul><li>quz</li></ol>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo</li><ol><li>[bar]<li>baz</ol><li>quz</ol>",
+ [["insertunorderedlist",""]],
+ "<ol><li>foo</li><ul><li>[bar]</li></ul><ol><li>baz</li></ol><li>quz</li></ol>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo</li><ol><li>bar<li>[baz]</ol><li>quz</ol>",
+ [["insertunorderedlist",""]],
+ "<ol><li>foo</li><ol><li>bar</li></ol><ul><li>[baz]</li></ul><li>quz</li></ol>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>[foo]<ol><li>bar</ol><li>baz</ol>",
+ [["insertunorderedlist",""]],
+ "<ul><li>[foo]</li></ul><ol><ol><li>bar</li></ol><li>baz</li></ol>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>[foo]</li><ol><li>bar</ol><li>baz</ol>",
+ [["insertunorderedlist",""]],
+ "<ul><li>[foo]</li></ul><ol><ol><li>bar</li></ol><li>baz</li></ol>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo<li>[bar]<ol><li>baz</ol><li>quz</ol>",
+ [["insertunorderedlist",""]],
+ "<ol><li>foo</li></ol><ul><li>[bar]</li></ul><ol><ol><li>baz</li></ol><li>quz</li></ol>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo<li>[bar]</li><ol><li>baz</ol><li>quz</ol>",
+ [["insertunorderedlist",""]],
+ "<ol><li>foo</li></ol><ul><li>[bar]</li></ul><ol><ol><li>baz</li></ol><li>quz</li></ol>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo<ol><li>bar<li>baz</ol><li>[quz]</ol>",
+ [["insertunorderedlist",""]],
+ "<ol><li>foo<ol><li>bar</li><li>baz</li></ol></li></ol><ul><li>[quz]</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo</li><ol><li>bar<li>baz</ol><li>[quz]</ol>",
+ [["insertunorderedlist",""]],
+ "<ol><li>foo</li><ol><li>bar</li><li>baz</li></ol></ol><ul><li>[quz]</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo<li>[bar<li>baz]</ol>",
+ [["insertunorderedlist",""]],
+ "<ol><li>foo</li></ol><ul><li>[bar</li><li>baz]</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>[foo<ol><li>bar]</ol><li>baz</ol>",
+ [["insertunorderedlist",""]],
+ "<ul><li>[foo</li><ul><li>bar]</li></ul></ul><ol><li>baz</li></ol>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo<ol><li>b[ar</ol><li>b]az</ol>",
+ [["insertunorderedlist",""]],
+ "<ol><li>foo</li></ol><ul><ul><li>b[ar</li></ul><li>b]az</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>[foo<ol><li>bar</ol><li>baz]</ol><p>extra",
+ [["insertunorderedlist",""]],
+ "<ul><li>[foo</li><ul><li>bar</li></ul><li>baz]</li></ul><p>extra</p>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>[foo]<ol><li>bar</ol>baz</ol>",
+ [["insertunorderedlist",""]],
+ "<ul><li>[foo]</li></ul><ol><ol><li>bar</li></ol><li>baz</li></ol>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo<ol><li>[bar]</ol>baz</ol>",
+ [["insertunorderedlist",""]],
+ "<ol><li>foo</li><ul><li>[bar]</li></ul><li>baz</li></ol>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo<ol><li>bar</ol>[baz]</ol>",
+ [["insertunorderedlist",""]],
+ "<ol><li>foo</li><ol><li>bar</li></ol></ol><ul><li>[baz]</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>[foo<ol><li>bar]</ol>baz</ol>",
+ [["insertunorderedlist",""]],
+ "<ul><li>[foo</li><ul><li>bar]</li></ul></ul><ol><li>baz</li></ol>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo<li>[bar]<li>baz</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul><li>foo</li></ul><div>[bar]</div><ul><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>foo<li>[bar]<li>baz</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul><li>foo</li></ul><p>[bar]</p><ul><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>foo</ul>[bar]",
+ [["insertunorderedlist",""]],
+ "<ul><li>foo</li><li>[bar]</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["[foo]<ul><li>bar</ul>",
+ [["insertunorderedlist",""]],
+ "<ul><li>[foo]</li><li>bar</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo</ul>[bar]<ul><li>baz</ul>",
+ [["insertunorderedlist",""]],
+ "<ul><li>foo</li><li>[bar]</li><li>baz</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ul><ul><li>[foo]</ul></ul>",
+ [["insertunorderedlist",""]],
+ "<ul><li>[foo]</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,true,"",false,true,""]}],
+["<ul><li>[foo]<br>bar<li>baz</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<div>[foo]<br>bar</div><ul><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>[foo]<br>bar<li>baz</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<p>[foo]<br>bar</p><ul><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>foo<br>[bar]<li>baz</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<div>foo<br>[bar]</div><ul><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>foo<br>[bar]<li>baz</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<p>foo<br>[bar]</p><ul><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li><div>[foo]</div>bar<li>baz</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<div>[foo]</div><div>bar</div><ul><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li><div>[foo]</div>bar<li>baz</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<div>[foo]</div><p>bar</p><ul><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>foo<ul><li>[bar]<li>baz</ul><li>quz</ul>",
+ [["insertunorderedlist",""]],
+ "<ul><li>foo</li><li>[bar]</li><ul><li>baz</li></ul><li>quz</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,true,"",false,true,""]}],
+["<ul><li>foo<ul><li>bar<li>[baz]</ul><li>quz</ul>",
+ [["insertunorderedlist",""]],
+ "<ul><li>foo</li><ul><li>bar</li></ul><li>[baz]</li><li>quz</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,true,"",false,true,""]}],
+["<ul><li>foo</li><ul><li>[bar]<li>baz</ul><li>quz</ul>",
+ [["insertunorderedlist",""]],
+ "<ul><li>foo</li><li>[bar]</li><ul><li>baz</li></ul><li>quz</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,true,"",false,true,""]}],
+["<ul><li>foo</li><ul><li>bar<li>[baz]</ul><li>quz</ul>",
+ [["insertunorderedlist",""]],
+ "<ul><li>foo</li><ul><li>bar</li></ul><li>[baz]</li><li>quz</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,true,"",false,true,""]}],
+["<ul><li>[foo]<ul><li>bar</ul><li>baz</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<div>[foo]</div><ul><ul><li>bar</li></ul><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>[foo]<ul><li>bar</ul><li>baz</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<p>[foo]</p><ul><ul><li>bar</li></ul><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>[foo]</li><ul><li>bar</ul><li>baz</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<div>[foo]</div><ul><ul><li>bar</li></ul><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>[foo]</li><ul><li>bar</ul><li>baz</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<p>[foo]</p><ul><ul><li>bar</li></ul><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>foo<li>[bar]<ul><li>baz</ul><li>quz</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul><li>foo</li></ul><div>[bar]</div><ul><ul><li>baz</li></ul><li>quz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>foo<li>[bar]<ul><li>baz</ul><li>quz</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul><li>foo</li></ul><p>[bar]</p><ul><ul><li>baz</li></ul><li>quz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>foo<li>[bar]</li><ul><li>baz</ul><li>quz</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul><li>foo</li></ul><div>[bar]</div><ul><ul><li>baz</li></ul><li>quz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>foo<li>[bar]</li><ul><li>baz</ul><li>quz</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul><li>foo</li></ul><p>[bar]</p><ul><ul><li>baz</li></ul><li>quz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>foo<ul><li>bar<li>baz</ul><li>[quz]</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul><li>foo<ul><li>bar</li><li>baz</li></ul></li></ul><div>[quz]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>foo<ul><li>bar<li>baz</ul><li>[quz]</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul><li>foo<ul><li>bar</li><li>baz</li></ul></li></ul><p>[quz]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>foo</li><ul><li>bar<li>baz</ul><li>[quz]</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul><li>foo</li><ul><li>bar</li><li>baz</li></ul></ul><div>[quz]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>foo</li><ul><li>bar<li>baz</ul><li>[quz]</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul><li>foo</li><ul><li>bar</li><li>baz</li></ul></ul><p>[quz]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>foo<li>[bar<li>baz]</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul><li>foo</li></ul><div>[bar</div><div>baz]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>foo<li>[bar<li>baz]</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul><li>foo</li></ul><p>[bar</p><p>baz]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>[foo<ul><li>bar]</ul><li>baz</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<div>[foo</div><ul><li>bar]</li><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",true,false,""]}],
+["<ul><li>[foo<ul><li>bar]</ul><li>baz</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<p>[foo</p><ul><li>bar]</li><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",true,false,""]}],
+["<ul><li>foo<ul><li>b[ar</ul><li>b]az</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul><li>foo</li><li>b[ar</li></ul><div>b]az</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",true,false,""]}],
+["<ul><li>foo<ul><li>b[ar</ul><li>b]az</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul><li>foo</li><li>b[ar</li></ul><p>b]az</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",true,false,""]}],
+["<ul><li>[foo<ul><li>bar</ul><li>baz]</ul><p>extra",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<div>[foo</div><ul><li>bar</li></ul><div>baz]</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",true,false,""]}],
+["<ul><li>[foo<ul><li>bar</ul><li>baz]</ul><p>extra",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<p>[foo</p><ul><li>bar</li></ul><p>baz]</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",true,false,""]}],
+["<ul><li>[foo]<ul><li>bar</ul>baz</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<div>[foo]</div><ul><ul><li>bar</li></ul><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>[foo]<ul><li>bar</ul>baz</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<p>[foo]</p><ul><ul><li>bar</li></ul><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>foo<ul><li>[bar]</ul>baz</ul>",
+ [["insertunorderedlist",""]],
+ "<ul><li>foo</li><li>[bar]</li><li>baz</li></ul>",
+ [true],
+ {"insertunorderedlist":[false,true,"",false,true,""]}],
+["<ul><li>foo<ul><li>bar</ul>[baz]</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul><li>foo</li><ul><li>bar</li></ul></ul><div>[baz]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>foo<ul><li>bar</ul>[baz]</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul><li>foo</li><ul><li>bar</li></ul></ul><p>[baz]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>[foo<ul><li>bar]</ul>baz</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<div>[foo</div><ul><li>bar]</li><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",true,false,""]}],
+["<ul><li>[foo<ul><li>bar]</ul>baz</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<p>[foo</p><ul><li>bar]</li><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",true,false,""]}],
+["foo<ol><li>bar</ol><ul><li>[baz]</ul>quz",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "foo<ol><li>bar</li></ol><div>[baz]</div>quz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["foo<ol><li>bar</ol><ul><li>[baz]</ul>quz",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "foo<ol><li>bar</li></ol><p>[baz]</p>quz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["foo<ol><li>bar</ol><ul><li>[baz</ul>quz]",
+ [["insertunorderedlist",""]],
+ "foo<ol><li>bar</li></ol><ul><li>[baz</li><li>quz]</li></ul>",
+ [true],
+ {"insertunorderedlist":[true,false,"",false,true,""]}],
+["foo<ul><li>[bar]</ul><ol><li>baz</ol>quz",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "foo<div>[bar]</div><ol><li>baz</li></ol>quz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["foo<ul><li>[bar]</ul><ol><li>baz</ol>quz",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "foo<p>[bar]</p><ol><li>baz</li></ol>quz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["[foo<ul><li>bar]</ul><ol><li>baz</ol>quz",
+ [["insertunorderedlist",""]],
+ "<ul><li>[foo</li><li>bar]</li></ul><ol><li>baz</li></ol>quz",
+ [true],
+ {"insertunorderedlist":[true,false,"",false,true,""]}],
+["[foo]<blockquote>bar</blockquote>baz",
+ [["insertunorderedlist",""]],
+ "<ul><li>[foo]</li></ul><blockquote>bar</blockquote>baz",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["foo<blockquote>[bar]</blockquote>baz",
+ [["insertunorderedlist",""]],
+ "foo<blockquote><ul><li>[bar]</li></ul></blockquote>baz",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["[foo<blockquote>bar]</blockquote>baz",
+ [["insertunorderedlist",""]],
+ "<ul><li>[foo</li><ul><li>bar]</li></ul></ul>baz",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo</ol><blockquote>[bar]</blockquote>baz",
+ [["insertunorderedlist",""]],
+ "<ol><li>foo</li></ol><blockquote><ul><li>[bar]</li></ul></blockquote>baz",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["[foo]<blockquote><ol><li>bar</ol></blockquote>baz",
+ [["insertunorderedlist",""]],
+ "<ul><li>[foo]</li></ul><blockquote><ol><li>bar</li></ol></blockquote>baz",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["foo<blockquote>[bar]<br>baz</blockquote>",
+ [["insertunorderedlist",""]],
+ "foo<blockquote><ul><li>[bar]</li></ul>baz</blockquote>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["[foo<blockquote>bar]<br>baz</blockquote>",
+ [["insertunorderedlist",""]],
+ "<ul><li>[foo</li><ul><li>bar]</li></ul></ul><blockquote>baz</blockquote>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo</ol><blockquote>[bar]<br>baz</blockquote>",
+ [["insertunorderedlist",""]],
+ "<ol><li>foo</li></ol><blockquote><ul><li>[bar]</li></ul>baz</blockquote>",
+ [true],
+ {"insertunorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo]<blockquote><p>bar</blockquote><p>baz",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul><li>[foo]</li></ul><blockquote><p>bar</p></blockquote><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo]<blockquote><p>bar</blockquote><p>baz",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul><li>[foo]</li></ul><blockquote><p>bar</p></blockquote><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<p>foo<blockquote><p>[bar]</blockquote><p>baz",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<p>foo</p><blockquote><ul><li>[bar]</li></ul></blockquote><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<p>foo<blockquote><p>[bar]</blockquote><p>baz",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<p>foo</p><blockquote><ul><li>[bar]</li></ul></blockquote><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo<blockquote><p>bar]</blockquote><p>baz",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul><li>[foo</li><ul><li>bar]</li></ul></ul><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo<blockquote><p>bar]</blockquote><p>baz",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul><li>[foo</li><ul><li>bar]</li></ul></ul><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo</ol><blockquote><p>[bar]</blockquote><p>baz",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ol><li>foo</li></ol><blockquote><ul><li>[bar]</li></ul></blockquote><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ol><li>foo</ol><blockquote><p>[bar]</blockquote><p>baz",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ol><li>foo</li></ol><blockquote><ul><li>[bar]</li></ul></blockquote><p>baz</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ul id=abc><li>foo<li>[bar]<li>baz</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul id=\"abc\"><li>foo</li></ul><div>[bar]</div><ul><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul id=abc><li>foo<li>[bar]<li>baz</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul id=\"abc\"><li>foo</li></ul><p>[bar]</p><ul><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul style=color:blue><li>foo<li>[bar]<li>baz</ul>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul style=\"color:rgb(0, 0, 255)\"><li>foo</li></ul><div>[bar]</div><ul style=\"color:rgb(0, 0, 255)\"><li>baz</li></ul>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul style=color:blue><li>foo<li>[bar]<li>baz</ul>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul style=\"color:rgb(0, 0, 255)\"><li>foo</li></ul><div>[bar]</div><ul style=\"color:rgb(0, 0, 255)\"><li>baz</li></ul>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul style=color:blue><li>foo<li>[bar]<li>baz</ul>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul style=\"color:rgb(0, 0, 255)\"><li>foo</li></ul><p>[bar]</p><ul style=\"color:rgb(0, 0, 255)\"><li>baz</li></ul>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul style=color:blue><li>foo<li>[bar]<li>baz</ul>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul style=\"color:rgb(0, 0, 255)\"><li>foo</li></ul><p>[bar]</p><ul style=\"color:rgb(0, 0, 255)\"><li>baz</li></ul>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul style=text-indent:1em><li>foo<li>[bar]<li>baz</ul>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul style=\"text-indent:1em\"><li>foo</li></ul><div>[bar]</div><ul style=\"text-indent:1em\"><li>baz</li></ul>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul style=text-indent:1em><li>foo<li>[bar]<li>baz</ul>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul style=\"text-indent:1em\"><li>foo</li></ul><div>[bar]</div><ul style=\"text-indent:1em\"><li>baz</li></ul>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul style=text-indent:1em><li>foo<li>[bar]<li>baz</ul>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul style=\"text-indent:1em\"><li>foo</li></ul><p>[bar]</p><ul style=\"text-indent:1em\"><li>baz</li></ul>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul style=text-indent:1em><li>foo<li>[bar]<li>baz</ul>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul style=\"text-indent:1em\"><li>foo</li></ul><p>[bar]</p><ul style=\"text-indent:1em\"><li>baz</li></ul>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul id=abc><li>[foo]<li>bar<li>baz</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<div>[foo]</div><ul id=\"abc\"><li>bar</li><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul id=abc><li>[foo]<li>bar<li>baz</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<p>[foo]</p><ul id=\"abc\"><li>bar</li><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul style=color:blue><li>[foo]<li>bar<li>baz</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<div>[foo]</div><ul style=\"color:rgb(0, 0, 255)\"><li>bar</li><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul style=color:blue><li>[foo]<li>bar<li>baz</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<p>[foo]</p><ul style=\"color:rgb(0, 0, 255)\"><li>bar</li><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul style=text-indent:1em><li>[foo]<li>bar<li>baz</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<div>[foo]</div><ul style=\"text-indent:1em\"><li>bar</li><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul style=text-indent:1em><li>[foo]<li>bar<li>baz</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<p>[foo]</p><ul style=\"text-indent:1em\"><li>bar</li><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul id=abc><li>foo<li>bar<li>[baz]</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul id=\"abc\"><li>foo</li><li>bar</li></ul><div>[baz]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul id=abc><li>foo<li>bar<li>[baz]</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul id=\"abc\"><li>foo</li><li>bar</li></ul><p>[baz]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul style=color:blue><li>foo<li>bar<li>[baz]</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul style=\"color:rgb(0, 0, 255)\"><li>foo</li><li>bar</li></ul><div>[baz]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul style=color:blue><li>foo<li>bar<li>[baz]</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul style=\"color:rgb(0, 0, 255)\"><li>foo</li><li>bar</li></ul><p>[baz]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul style=text-indent:1em><li>foo<li>bar<li>[baz]</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul style=\"text-indent:1em\"><li>foo</li><li>bar</li></ul><div>[baz]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul style=text-indent:1em><li>foo<li>bar<li>[baz]</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul style=\"text-indent:1em\"><li>foo</li><li>bar</li></ul><p>[baz]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,true,"",false,false,""]}],
+["<ul><li>foo</ul> <p>[bar]",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul><li>foo</li> <li>[bar]</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo</ul> <p>[bar]",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul><li>foo</li> <li>[bar]</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo]</p> <ul><li>bar</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul><li>[foo]</li> <li>bar</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<p>[foo]</p> <ul><li>bar</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul><li>[foo]</li> <li>bar</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo</ul> <p>[bar]</p> <ul><li>baz</ul>",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul><li>foo</li> <li>[bar]</li> <li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["<ul><li>foo</ul> <p>[bar]</p> <ul><li>baz</ul>",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul><li>foo</li> <li>[bar]</li> <li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["{<div style=\"font-size: 1.3em\">1</div><div style=\"font-size: 1.1em\">2</div>}",
+ [["defaultparagraphseparator","div"],["insertunorderedlist",""]],
+ "<ul>{<li style=\"font-size:1.3em\">1</li><li style=\"font-size:1.1em\">2</li>}</ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["{<div style=\"font-size: 1.3em\">1</div><div style=\"font-size: 1.1em\">2</div>}",
+ [["defaultparagraphseparator","p"],["insertunorderedlist",""]],
+ "<ul>{<li style=\"font-size:1.3em\">1</li><li style=\"font-size:1.1em\">2</li>}</ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"insertunorderedlist":[false,false,"",false,true,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/italic.js b/testing/web-platform/tests/editing/data/italic.js
new file mode 100644
index 000000000..3de047d0e
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/italic.js
@@ -0,0 +1,717 @@
+var browserTests = [
+["foo[]bar",
+ [["italic",""]],
+ "foo[]bar",
+ [true],
+ {"italic":[false,false,"",false,true,""]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","true"],["italic",""]],
+ "<p><span style=\"font-style:italic\">[foo</span></p> <p><span style=\"font-style:italic\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,false,"",false,true,""]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","false"],["italic",""]],
+ "<p><i>[foo</i></p> <p><i>bar]</i></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,false,"",false,true,""]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","true"],["italic",""]],
+ "<span style=\"font-style:italic\"><span>[foo</span> <span>bar]</span></span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,false,"",false,true,""]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","false"],["italic",""]],
+ "<i><span>[foo</span> <span>bar]</span></i>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,false,"",false,true,""]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","true"],["italic",""]],
+ "<p><span style=\"font-style:italic\">[foo</span></p><p> <span style=\"font-style:italic\"><span>bar</span></span> </p><p><span style=\"font-style:italic\">baz]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,false,"",false,true,""]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","false"],["italic",""]],
+ "<p><i>[foo</i></p><p> <i><span>bar</span></i> </p><p><i>baz]</i></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,false,"",false,true,""]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","true"],["italic",""]],
+ "<p><span style=\"font-style:italic\">[foo</span></p><p><span style=\"font-style:italic\"><br></span></p><p><span style=\"font-style:italic\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,false,"",false,true,""]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","false"],["italic",""]],
+ "<p><i>[foo</i></p><p><i><br></i></p><p><i>bar]</i></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,false,"",false,true,""]}],
+["<b>foo[]bar</b>",
+ [["italic",""]],
+ "<b>foo[]bar</b>",
+ [true],
+ {"italic":[false,false,"",false,true,""]}],
+["<i>foo[]bar</i>",
+ [["italic",""]],
+ "<i>foo[]bar</i>",
+ [true],
+ {"italic":[false,true,"",false,false,""]}],
+["<span>foo</span>{}<span>bar</span>",
+ [["italic",""]],
+ "<span>foo</span>{}<span>bar</span>",
+ [true],
+ {"italic":[false,false,"",false,true,""]}],
+["<span>foo[</span><span>]bar</span>",
+ [["italic",""]],
+ "<span>foo[</span><span>]bar</span>",
+ [true],
+ {"italic":[false,false,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo<span style=\"font-style:italic\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,false,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo<i>[bar]</i>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,false,"",false,true,""]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo<span style=\"font-style:italic\">[bar</span><b><span style=\"font-style:italic\">baz]</span>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,false,"",false,true,""]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo<i>[bar</i><b><i>baz]</i>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,false,"",false,true,""]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["italic",""]],
+ "foo<i>[barbaz]qoz</i>quz",
+ [true],
+ {"italic":[true,false,"",false,true,""]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","true"],["italic",""]],
+ "{<p></p><p> </p><p><span style=\"font-style:italic\">foo</span></p>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,false,"",false,true,""]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","false"],["italic",""]],
+ "{<p></p><p> </p><p><i>foo</i></p>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,false,"",false,true,""]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","true"],["italic",""]],
+ "<table><tbody><tr><td>foo</td><td>b<span style=\"font-style:italic\">[a]</span>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,false,"",false,true,""]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","false"],["italic",""]],
+ "<table><tbody><tr><td>foo</td><td>b<i>[a]</i>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["italic",""]],
+ "<table><tbody><tr><td>foo</td>{<td><span style=\"font-style:italic\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["italic",""]],
+ "<table><tbody><tr><td>foo</td>{<td><i>bar</i></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["italic",""]],
+ "<table><tbody><tr>{<td><span style=\"font-style:italic\">foo</span></td><td><span style=\"font-style:italic\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["italic",""]],
+ "<table><tbody><tr>{<td><i>foo</i></td><td><i>bar</i></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,false,"",false,true,""]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["italic",""]],
+ "<table><tbody>{<tr><td><span style=\"font-style:italic\">foo</span></td><td><span style=\"font-style:italic\">bar</span></td><td><span style=\"font-style:italic\">baz</span></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,false,"",false,true,""]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["italic",""]],
+ "<table><tbody>{<tr><td><i>foo</i></td><td><i>bar</i></td><td><i>baz</i></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,false,"",false,true,""]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["italic",""]],
+ "<table>{<tbody><tr><td><span style=\"font-style:italic\">foo</span></td><td><span style=\"font-style:italic\">bar</span></td><td><span style=\"font-style:italic\">baz</span></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,false,"",false,true,""]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["italic",""]],
+ "<table>{<tbody><tr><td><i>foo</i></td><td><i>bar</i></td><td><i>baz</i></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,false,"",false,true,""]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","true"],["italic",""]],
+ "{<table><tbody><tr><td><span style=\"font-style:italic\">foo</span></td><td><span style=\"font-style:italic\">bar</span></td><td><span style=\"font-style:italic\">baz</span></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,false,"",false,true,""]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","false"],["italic",""]],
+ "{<table><tbody><tr><td><i>foo</i></td><td><i>bar</i></td><td><i>baz</i></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,false,"",false,true,""]}],
+["foo<span style=\"font-style: italic\">[bar]</span>baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo<span style=\"font-style: italic\">[bar]</span>baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo<address>[bar]</address>baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo<address><span style=\"font-style:normal\">[bar]</span></address>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo<address>[bar]</address>baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo<address><span style=\"font-style:normal\">[bar]</span></address>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo<cite>[bar]</cite>baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo<cite><span style=\"font-style:normal\">[bar]</span></cite>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo<cite>[bar]</cite>baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo<cite><span style=\"font-style:normal\">[bar]</span></cite>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo<dfn>[bar]</dfn>baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo<dfn><span style=\"font-style:normal\">[bar]</span></dfn>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo<dfn>[bar]</dfn>baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo<dfn><span style=\"font-style:normal\">[bar]</span></dfn>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo<em>[bar]</em>baz",
+ [["italic",""]],
+ "foo[bar]baz",
+ [true],
+ {"italic":[false,true,"",false,false,""]}],
+["foo<i>[bar]</i>baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo<i>[bar]</i>baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo<var>[bar]</var>baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo<var><span style=\"font-style:normal\">[bar]</span></var>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo<var>[bar]</var>baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo<var><span style=\"font-style:normal\">[bar]</span></var>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo{<address>bar</address>}baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo{<address><span style=\"font-style:normal\">bar</span></address>}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo{<address>bar</address>}baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo{<address><span style=\"font-style:normal\">bar</span></address>}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo{<cite>bar</cite>}baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo{<cite><span style=\"font-style:normal\">bar</span></cite>}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo{<cite>bar</cite>}baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo{<cite><span style=\"font-style:normal\">bar</span></cite>}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo{<dfn>bar</dfn>}baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo{<dfn><span style=\"font-style:normal\">bar</span></dfn>}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo{<dfn>bar</dfn>}baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo{<dfn><span style=\"font-style:normal\">bar</span></dfn>}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo{<em>bar</em>}baz",
+ [["italic",""]],
+ "foo{bar}baz",
+ [true],
+ {"italic":[false,true,"",false,false,""]}],
+["foo{<i>bar</i>}baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo{bar}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo{<i>bar</i>}baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo{bar}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo{<var>bar</var>}baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo{<var><span style=\"font-style:normal\">bar</span></var>}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo{<var>bar</var>}baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo{<var><span style=\"font-style:normal\">bar</span></var>}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo<address>b[a]r</address>baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo<address>b<span style=\"font-style:normal\">[a]</span>r</address>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo<address>b[a]r</address>baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo<address>b<span style=\"font-style:normal\">[a]</span>r</address>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo<cite>b[a]r</cite>baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo<cite>b<span style=\"font-style:normal\">[a]</span>r</cite>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo<cite>b[a]r</cite>baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo<cite>b<span style=\"font-style:normal\">[a]</span>r</cite>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo<dfn>b[a]r</dfn>baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo<dfn>b<span style=\"font-style:normal\">[a]</span>r</dfn>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo<dfn>b[a]r</dfn>baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo<dfn>b<span style=\"font-style:normal\">[a]</span>r</dfn>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo<em>b[a]r</em>baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo<span style=\"font-style:italic\">b</span>[a]<span style=\"font-style:italic\">r</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo<em>b[a]r</em>baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo<i>b</i>[a]<i>r</i>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo<i>b[a]r</i>baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo<span style=\"font-style:italic\">b</span>[a]<span style=\"font-style:italic\">r</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo<i>b[a]r</i>baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo<i>b</i>[a]<i>r</i>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo<var>b[a]r</var>baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo<var>b<span style=\"font-style:normal\">[a]</span>r</var>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo<var>b[a]r</var>baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo<var>b<span style=\"font-style:normal\">[a]</span>r</var>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["fo[o<address>bar</address>b]az",
+ [["stylewithcss","true"],["italic",""]],
+ "fo<span style=\"font-style:italic\">[o</span><address>bar</address><span style=\"font-style:italic\">b]</span>az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["fo[o<address>bar</address>b]az",
+ [["stylewithcss","false"],["italic",""]],
+ "fo<i>[o</i><address>bar</address><i>b]</i>az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["fo[o<cite>bar</cite>b]az",
+ [["stylewithcss","true"],["italic",""]],
+ "fo<span style=\"font-style:italic\">[o<cite>bar</cite>b]</span>az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["fo[o<cite>bar</cite>b]az",
+ [["stylewithcss","false"],["italic",""]],
+ "fo<i>[o<cite>bar</cite>b]</i>az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["fo[o<dfn>bar</dfn>b]az",
+ [["stylewithcss","true"],["italic",""]],
+ "fo<span style=\"font-style:italic\">[o<dfn>bar</dfn>b]</span>az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["fo[o<dfn>bar</dfn>b]az",
+ [["stylewithcss","false"],["italic",""]],
+ "fo<i>[o<dfn>bar</dfn>b]</i>az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["fo[o<em>bar</em>b]az",
+ [["stylewithcss","true"],["italic",""]],
+ "fo<span style=\"font-style:italic\">[obarb]</span>az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["fo[o<em>bar</em>b]az",
+ [["stylewithcss","false"],["italic",""]],
+ "fo<i>[obarb]</i>az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["fo[o<i>bar</i>b]az",
+ [["stylewithcss","true"],["italic",""]],
+ "fo<span style=\"font-style:italic\">[obarb]</span>az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["fo[o<i>bar</i>b]az",
+ [["stylewithcss","false"],["italic",""]],
+ "fo<i>[obarb]</i>az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["fo[o<var>bar</var>b]az",
+ [["stylewithcss","true"],["italic",""]],
+ "fo<span style=\"font-style:italic\">[o<var>bar</var>b]</span>az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["fo[o<var>bar</var>b]az",
+ [["stylewithcss","false"],["italic",""]],
+ "fo<i>[o<var>bar</var>b]</i>az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["foo[<address>bar</address>baz]",
+ [["stylewithcss","true"],["italic",""]],
+ "foo[<address>bar</address><span style=\"font-style:italic\">baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["foo[<address>bar</address>baz]",
+ [["stylewithcss","false"],["italic",""]],
+ "foo[<address>bar</address><i>baz]</i>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["foo[<cite>bar</cite>baz]",
+ [["stylewithcss","true"],["italic",""]],
+ "foo[<cite>bar</cite><span style=\"font-style:italic\">baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["foo[<cite>bar</cite>baz]",
+ [["stylewithcss","false"],["italic",""]],
+ "foo[<cite>bar</cite><i>baz]</i>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["foo[<dfn>bar</dfn>baz]",
+ [["stylewithcss","true"],["italic",""]],
+ "foo[<dfn>bar</dfn><span style=\"font-style:italic\">baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["foo[<dfn>bar</dfn>baz]",
+ [["stylewithcss","false"],["italic",""]],
+ "foo[<dfn>bar</dfn><i>baz]</i>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["foo[<em>bar</em>baz]",
+ [["stylewithcss","true"],["italic",""]],
+ "foo[<span style=\"font-style:italic\">barbaz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["foo[<em>bar</em>baz]",
+ [["stylewithcss","false"],["italic",""]],
+ "foo[<i>barbaz]</i>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["foo[<i>bar</i>baz]",
+ [["stylewithcss","true"],["italic",""]],
+ "foo[<span style=\"font-style:italic\">barbaz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["foo[<i>bar</i>baz]",
+ [["stylewithcss","false"],["italic",""]],
+ "foo[<i>barbaz]</i>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["foo[<var>bar</var>baz]",
+ [["stylewithcss","true"],["italic",""]],
+ "foo[<var>bar</var><span style=\"font-style:italic\">baz]</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["foo[<var>bar</var>baz]",
+ [["stylewithcss","false"],["italic",""]],
+ "foo[<var>bar</var><i>baz]</i>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["[foo<address>bar</address>]baz",
+ [["stylewithcss","true"],["italic",""]],
+ "<span style=\"font-style:italic\">[foo</span><address>bar</address>]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["[foo<address>bar</address>]baz",
+ [["stylewithcss","false"],["italic",""]],
+ "<i>[foo</i><address>bar</address>]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["[foo<cite>bar</cite>]baz",
+ [["stylewithcss","true"],["italic",""]],
+ "<span style=\"font-style:italic\">[foo<cite>bar</cite></span>]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["[foo<cite>bar</cite>]baz",
+ [["stylewithcss","false"],["italic",""]],
+ "<i>[foo<cite>bar</cite></i>]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["[foo<dfn>bar</dfn>]baz",
+ [["stylewithcss","true"],["italic",""]],
+ "<span style=\"font-style:italic\">[foo<dfn>bar</dfn></span>]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["[foo<dfn>bar</dfn>]baz",
+ [["stylewithcss","false"],["italic",""]],
+ "<i>[foo<dfn>bar</dfn></i>]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["[foo<em>bar</em>]baz",
+ [["stylewithcss","true"],["italic",""]],
+ "<span style=\"font-style:italic\">[foobar</span>]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["[foo<em>bar</em>]baz",
+ [["stylewithcss","false"],["italic",""]],
+ "<i>[foobar</i>]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["[foo<i>bar</i>]baz",
+ [["stylewithcss","true"],["italic",""]],
+ "<span style=\"font-style:italic\">[foobar</span>]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["[foo<i>bar</i>]baz",
+ [["stylewithcss","false"],["italic",""]],
+ "<i>[foobar</i>]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["[foo<var>bar</var>]baz",
+ [["stylewithcss","true"],["italic",""]],
+ "<span style=\"font-style:italic\">[foo<var>bar</var></span>]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["[foo<var>bar</var>]baz",
+ [["stylewithcss","false"],["italic",""]],
+ "<i>[foo<var>bar</var></i>]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["foo<span style=\"font-style: italic\">[bar]</span>baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo<span style=\"font-style: italic\">[bar]</span>baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo<span style=\"font-style: oblique\">[bar]</span>baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo<span style=\"font-style: oblique\">[bar]</span>baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo<span style=\"font-style: oblique\">b[a]r</span>baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo<span style=\"font-style:oblique\">b</span>[a]<span style=\"font-style:oblique\">r</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo<span style=\"font-style: oblique\">b[a]r</span>baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo<span style=\"font-style:oblique\">b</span>[a]<span style=\"font-style:oblique\">r</span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["<i>{<p>foo</p><p>bar</p>}<p>baz</p></i>",
+ [["stylewithcss","true"],["italic",""]],
+ "{<p>foo</p><p>bar</p>}<p><span style=\"font-style:italic\">baz</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["<i>{<p>foo</p><p>bar</p>}<p>baz</p></i>",
+ [["stylewithcss","false"],["italic",""]],
+ "{<p>foo</p><p>bar</p>}<p><i>baz</i></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["<i><p>foo[<b>bar</b>}</p><p>baz</p></i>",
+ [["stylewithcss","true"],["italic",""]],
+ "<p><span style=\"font-style:italic\">foo[</span><b>bar</b>}</p><p><span style=\"font-style:italic\">baz</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["<i><p>foo[<b>bar</b>}</p><p>baz</p></i>",
+ [["stylewithcss","false"],["italic",""]],
+ "<p><i>foo[</i><b>bar</b>}</p><p><i>baz</i></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo [bar <b>baz] qoz</b> quz sic",
+ [["stylewithcss","true"],["italic",""]],
+ "foo <span style=\"font-style:italic\">[bar </span><b><span style=\"font-style:italic\">baz]</span> qoz</b> quz sic",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,false,"",false,true,""]}],
+["foo [bar <b>baz] qoz</b> quz sic",
+ [["stylewithcss","false"],["italic",""]],
+ "foo <i>[bar </i><b><i>baz]</i> qoz</b> quz sic",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,false,"",false,true,""]}],
+["foo bar <b>baz [qoz</b> quz] sic",
+ [["stylewithcss","true"],["italic",""]],
+ "foo bar <b>baz <span style=\"font-style:italic\">[qoz</span></b><span style=\"font-style:italic\"> quz]</span> sic",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,false,"",false,true,""]}],
+["foo bar <b>baz [qoz</b> quz] sic",
+ [["stylewithcss","false"],["italic",""]],
+ "foo bar <b>baz <i>[qoz</i></b><i> quz]</i> sic",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,false,"",false,true,""]}],
+["foo [bar <i>baz] qoz</i> quz sic",
+ [["italic",""]],
+ "foo <i>[bar baz] qoz</i> quz sic",
+ [true],
+ {"italic":[true,false,"",false,true,""]}],
+["foo bar <i>baz [qoz</i> quz] sic",
+ [["italic",""]],
+ "foo bar <i>baz [qoz quz]</i> sic",
+ [true],
+ {"italic":[true,false,"",false,true,""]}],
+["fo[o<i>b]ar</i>baz",
+ [["italic",""]],
+ "fo<i>[ob]ar</i>baz",
+ [true],
+ {"italic":[true,false,"",false,true,""]}],
+["foo<i>ba[r</i>b]az",
+ [["italic",""]],
+ "foo<i>ba[rb]</i>az",
+ [true],
+ {"italic":[true,false,"",false,true,""]}],
+["fo[o<i>bar</i>b]az",
+ [["stylewithcss","true"],["italic",""]],
+ "fo<span style=\"font-style:italic\">[obarb]</span>az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["fo[o<i>bar</i>b]az",
+ [["stylewithcss","false"],["italic",""]],
+ "fo<i>[obarb]</i>az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["foo[<i>b]ar</i>baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo[b]<span style=\"font-style:italic\">ar</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo[<i>b]ar</i>baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo[b]<i>ar</i>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo<i>ba[r</i>]baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo<span style=\"font-style:italic\">ba</span>[r]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo<i>ba[r</i>]baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo<i>ba</i>[r]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo[<i>bar</i>]baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo[<i>bar</i>]baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo<i>[bar]</i>baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo<i>[bar]</i>baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["foo{<i>bar</i>}baz",
+ [["stylewithcss","true"],["italic",""]],
+ "foo{bar}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["foo{<i>bar</i>}baz",
+ [["stylewithcss","false"],["italic",""]],
+ "foo{bar}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["fo[o<span style=font-style:italic>b]ar</span>baz",
+ [["italic",""]],
+ "fo<span style=\"font-style:italic\">[ob]ar</span>baz",
+ [true],
+ {"italic":[true,false,"",false,true,""]}],
+["fo[o<span style=font-style:oblique>b]ar</span>baz",
+ [["stylewithcss","true"],["italic",""]],
+ "fo<span style=\"font-style:italic\">[o</span><span style=\"font-style:oblique\"><span style=\"font-style:italic\">b]</span>ar</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[true,false,"",false,true,""]}],
+["fo[o<span style=font-style:oblique>b]ar</span>baz",
+ [["stylewithcss","false"],["italic",""]],
+ "fo<i>[o</i><span style=\"font-style:oblique\"><i>b]</i>ar</span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[true,false,"",false,true,""]}],
+["<span style=font-style:italic>fo[o</span><span style=font-style:oblique>b]ar</span>",
+ [["stylewithcss","true"],["italic",""]],
+ "<span style=\"font-style:italic\">fo</span>[ob]<span style=\"font-style:oblique\">ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["<span style=font-style:italic>fo[o</span><span style=font-style:oblique>b]ar</span>",
+ [["stylewithcss","false"],["italic",""]],
+ "<i>fo</i>[ob]<span style=\"font-style:oblique\">ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["<span style=font-style:oblique>fo[o</span><span style=font-style:italic>b]ar</span>",
+ [["stylewithcss","true"],["italic",""]],
+ "<span style=\"font-style:oblique\">fo</span>[ob]<span style=\"font-style:italic\">ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["<span style=font-style:oblique>fo[o</span><span style=font-style:italic>b]ar</span>",
+ [["stylewithcss","false"],["italic",""]],
+ "<span style=\"font-style:oblique\">fo</span>[ob]<i>ar</i>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}],
+["<i>fo[o</i><address>b]ar</address>",
+ [["stylewithcss","true"],["italic",""]],
+ "<span style=\"font-style:italic\">fo</span>[o<address><span style=\"font-style:normal\">b]</span>ar</address>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"italic":[false,true,"",false,false,""]}],
+["<i>fo[o</i><address>b]ar</address>",
+ [["stylewithcss","false"],["italic",""]],
+ "<i>fo</i>[o<address><span style=\"font-style:normal\">b]</span>ar</address>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"italic":[false,true,"",false,false,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/justifycenter.js b/testing/web-platform/tests/editing/data/justifycenter.js
new file mode 100644
index 000000000..76491ee44
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/justifycenter.js
@@ -0,0 +1,1472 @@
+var browserTests = [
+["foo[]bar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[]bar</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[]bar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[]bar</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[]bar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[]bar</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[]bar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[]bar</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<span>foo</span>{}<span>bar</span><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><span>foo</span>{}<span>bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<span>foo</span>{}<span>bar</span><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><span>foo</span>{}<span>bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<span>foo</span>{}<span>bar</span><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><span>foo</span>{}<span>bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<span>foo</span>{}<span>bar</span><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><span>foo</span>{}<span>bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<span>foo[</span><span>]bar</span><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><span>foo[</span><span>]bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<span>foo[</span><span>]bar</span><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><span>foo[</span><span>]bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<span>foo[</span><span>]bar</span><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><span>foo[</span><span>]bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<span>foo[</span><span>]bar</span><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><span>foo[</span><span>]bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[bar]baz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[bar]baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[bar]baz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[bar]baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[bar]baz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[bar]baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[bar]baz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[bar]baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[bar<b>baz]qoz</b>quz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[bar<b>baz]qoz</b>quz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[bar<b>baz]qoz</b>quz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[bar<b>baz]qoz</b>quz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[bar<b>baz]qoz</b>quz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[bar<b>baz]qoz</b>quz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[bar<b>baz]qoz</b>quz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[bar<b>baz]qoz</b>quz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>foo[]bar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>foo[]bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>foo[]bar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>foo[]bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>foo[]bar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>foo[]bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>foo[]bar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>foo[]bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>foo[bar]baz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>foo[bar]baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>foo[bar]baz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>foo[bar]baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>foo[bar]baz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>foo[bar]baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>foo[bar]baz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>foo[bar]baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<h1>foo[bar]baz</h1><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><h1>foo[bar]baz</h1></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<h1>foo[bar]baz</h1><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><h1>foo[bar]baz</h1></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<h1>foo[bar]baz</h1><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><h1>foo[bar]baz</h1></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<h1>foo[bar]baz</h1><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><h1>foo[bar]baz</h1></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<pre>foo[bar]baz</pre><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><pre>foo[bar]baz</pre></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<pre>foo[bar]baz</pre><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><pre>foo[bar]baz</pre></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<pre>foo[bar]baz</pre><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><pre>foo[bar]baz</pre></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<pre>foo[bar]baz</pre><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><pre>foo[bar]baz</pre></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<xmp>foo[bar]baz</xmp><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><xmp>foo[bar]baz</xmp></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<xmp>foo[bar]baz</xmp><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><xmp>foo[bar]baz</xmp></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<xmp>foo[bar]baz</xmp><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><xmp>foo[bar]baz</xmp></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<xmp>foo[bar]baz</xmp><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><xmp>foo[bar]baz</xmp></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<center><p>[foo]<p>bar</center><p>extra",
+ [["justifycenter",""]],
+ "<center><p>[foo]</p><p>bar</p></center><p>extra</p>",
+ [true],
+ {"justifycenter":[false,true,"center",false,true,"center"]}],
+["<center><p>[foo<p>bar]</center><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<center><p>[foo<p>bar]</center><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<center><p>[foo<p>bar]</center><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<center><p>[foo<p>bar]</center><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<table><tbody><tr><td>foo</td><td><div style=\"text-align:center\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<table><tbody><tr><td>foo</td><td><div style=\"text-align:center\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<table><tbody><tr><td>foo</td><td><div style=\"text-align:center\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<table><tbody><tr><td>foo</td><td><div style=\"text-align:center\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<table><tbody><tr><td>foo</td>{<td><div style=\"text-align:center\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<table><tbody><tr><td>foo</td>{<td><div style=\"text-align:center\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<table><tbody><tr><td>foo</td>{<td><div style=\"text-align:center\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<table><tbody><tr><td>foo</td>{<td><div style=\"text-align:center\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<table><tbody><tr>{<td><div style=\"text-align:center\">foo</div></td><td><div style=\"text-align:center\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<table><tbody><tr>{<td><div style=\"text-align:center\">foo</div></td><td><div style=\"text-align:center\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<table><tbody><tr>{<td><div style=\"text-align:center\">foo</div></td><td><div style=\"text-align:center\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<table><tbody><tr>{<td><div style=\"text-align:center\">foo</div></td><td><div style=\"text-align:center\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<table align=\"center\"><tbody><tr><td>foo</td><td><div style=\"text-align:center\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<table align=\"center\"><tbody><tr><td>foo</td><td><div style=\"text-align:center\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<table align=\"center\"><tbody><tr><td>foo</td><td><div style=\"text-align:center\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<table align=\"center\"><tbody><tr><td>foo</td><td><div style=\"text-align:center\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<table align=\"center\"><tbody><tr><td>foo</td>{<td><div style=\"text-align:center\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<table align=\"center\"><tbody><tr><td>foo</td>{<td><div style=\"text-align:center\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<table align=\"center\"><tbody><tr><td>foo</td>{<td><div style=\"text-align:center\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<table align=\"center\"><tbody><tr><td>foo</td>{<td><div style=\"text-align:center\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<table align=\"center\"><tbody><tr>{<td><div style=\"text-align:center\">foo</div></td><td><div style=\"text-align:center\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<table align=\"center\"><tbody><tr>{<td><div style=\"text-align:center\">foo</div></td><td><div style=\"text-align:center\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<table align=\"center\"><tbody><tr>{<td><div style=\"text-align:center\">foo</div></td><td><div style=\"text-align:center\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<table align=\"center\"><tbody><tr>{<td><div style=\"text-align:center\">foo</div></td><td><div style=\"text-align:center\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table align=center data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["{<table align=center><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["{<table align=center><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["{<table align=center><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["{<table align=center><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<table><tbody align=center><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["justifycenter",""]],
+ "<table><tbody align=\"center\"><tr><td>foo</td><td>b[a]r</td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table><tbody align=center><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifycenter",""]],
+ "<table><tbody align=\"center\"><tr><td>foo</td>{<td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table><tbody align=center><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifycenter",""]],
+ "<table><tbody align=\"center\"><tr>{<td>foo</td><td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table><tbody align=center data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table><tbody align=center data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table><tbody align=center data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table><tbody align=center data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table data-start=0 data-end=1><tbody align=center><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table data-start=0 data-end=1><tbody align=center><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table data-start=0 data-end=1><tbody align=center><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table data-start=0 data-end=1><tbody align=center><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["{<table><tbody align=center><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["{<table><tbody align=center><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["{<table><tbody align=center><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["{<table><tbody align=center><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table><tbody><tr align=center><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["justifycenter",""]],
+ "<table><tbody><tr align=\"center\"><td>foo</td><td>b[a]r</td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table><tbody><tr align=center data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifycenter",""]],
+ "<table><tbody><tr align=\"center\"><td>foo</td>{<td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table><tbody><tr align=center data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifycenter",""]],
+ "<table><tbody><tr align=\"center\">{<td>foo</td><td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table><tbody data-start=0 data-end=1><tr align=center><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table><tbody data-start=0 data-end=1><tr align=center><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table><tbody data-start=0 data-end=1><tr align=center><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table><tbody data-start=0 data-end=1><tr align=center><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table data-start=0 data-end=1><tbody><tr align=center><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table data-start=0 data-end=1><tbody><tr align=center><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table data-start=0 data-end=1><tbody><tr align=center><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<table data-start=0 data-end=1><tbody><tr align=center><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["{<table><tr align=center><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["{<table><tr align=center><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["{<table><tr align=center><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["{<table><tr align=center><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<div align=center><p>[foo]<p>bar</div><p>extra",
+ [["justifycenter",""]],
+ "<div align=\"center\"><p>[foo]</p><p>bar</p></div><p>extra</p>",
+ [true],
+ {"justifycenter":[false,true,"center",false,true,"center"]}],
+["<div align=center><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","true"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<div align=center><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","false"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<div style=text-align:center><p>[foo]<p>bar</div><p>extra",
+ [["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo]</p><p>bar</p></div><p>extra</p>",
+ [true],
+ {"justifycenter":[false,true,"center",false,true,"center"]}],
+["<div style=text-align:center><p>[foo<p>bar]</div><p>extra",
+ [["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true],
+ {"justifycenter":[false,true,"center",false,true,"center"]}],
+["<div align=justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div align=\"justify\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"justify",false,true,"center"]}],
+["<div align=justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div align=\"justify\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"justify",false,true,"center"]}],
+["<div align=justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div align=\"justify\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"justify",false,true,"center"]}],
+["<div align=justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div align=\"justify\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"justify",false,true,"center"]}],
+["<div align=justify><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","true"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifycenter":[false,false,"justify",false,true,"center"]}],
+["<div align=justify><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","false"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifycenter":[false,false,"justify",false,true,"center"]}],
+["<div style=text-align:justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:justify\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"justify",false,true,"center"]}],
+["<div style=text-align:justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:justify\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"justify",false,true,"center"]}],
+["<div style=text-align:justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:justify\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"justify",false,true,"center"]}],
+["<div style=text-align:justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:justify\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"justify",false,true,"center"]}],
+["<div style=text-align:justify><p>[foo<p>bar]</div><p>extra",
+ [["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true],
+ {"justifycenter":[false,false,"justify",false,true,"center"]}],
+["<div align=left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div align=\"left\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div align=\"left\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div align=\"left\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div align=\"left\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=left><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","true"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=left><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","false"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:left\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:left\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:left\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:left\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:left><p>[foo<p>bar]</div><p>extra",
+ [["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true],
+ {"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div align=\"right\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"right",false,true,"center"]}],
+["<div align=right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div align=\"right\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"right",false,true,"center"]}],
+["<div align=right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div align=\"right\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"right",false,true,"center"]}],
+["<div align=right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div align=\"right\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"right",false,true,"center"]}],
+["<div align=right><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","true"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifycenter":[false,false,"right",false,true,"center"]}],
+["<div align=right><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","false"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifycenter":[false,false,"right",false,true,"center"]}],
+["<div style=text-align:right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:right\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"right",false,true,"center"]}],
+["<div style=text-align:right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:right\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"right",false,true,"center"]}],
+["<div style=text-align:right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:right\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"right",false,true,"center"]}],
+["<div style=text-align:right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:right\"><div style=\"text-align:center\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"right",false,true,"center"]}],
+["<div style=text-align:right><p>[foo<p>bar]</div><p>extra",
+ [["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true],
+ {"justifycenter":[false,false,"right",false,true,"center"]}],
+["<center>foo</center>[bar]<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<center>foo</center><div style=\"text-align:center\">[bar]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<center>foo</center>[bar]<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<center>foo</center><div style=\"text-align:center\">[bar]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<center>foo</center>[bar]<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<center>foo</center><div style=\"text-align:center\">[bar]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<center>foo</center>[bar]<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<center>foo</center><div style=\"text-align:center\">[bar]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["[foo]<center>bar</center><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo]</div><center>bar</center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["[foo]<center>bar</center><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo]</div><center>bar</center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["[foo]<center>bar</center><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo]</div><center>bar</center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["[foo]<center>bar</center><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo]</div><center>bar</center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<center>foo</center>[bar]<center>baz</center><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<center>foo</center><div style=\"text-align:center\">[bar]</div><center>baz</center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<center>foo</center>[bar]<center>baz</center><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<center>foo</center><div style=\"text-align:center\">[bar]</div><center>baz</center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<center>foo</center>[bar]<center>baz</center><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<center>foo</center><div style=\"text-align:center\">[bar]</div><center>baz</center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<center>foo</center>[bar]<center>baz</center><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<center>foo</center><div style=\"text-align:center\">[bar]</div><center>baz</center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=center>foo</div>[bar]<p>extra",
+ [["justifycenter",""]],
+ "<div align=\"center\">foo<br>[bar]</div><p>extra</p>",
+ [true],
+ {"justifycenter":[false,false,"left",false,true,"center"]}],
+["[foo]<div align=center>bar</div><p>extra",
+ [["justifycenter",""]],
+ "<div align=\"center\">[foo]<br>bar</div><p>extra</p>",
+ [true],
+ {"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=center>foo</div>[bar]<div align=center>baz</div><p>extra",
+ [["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div align=\"center\">foo<br>[bar]<br>baz</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=center>foo</div>[bar]<div align=center>baz</div><p>extra",
+ [["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div align=\"center\">foo<br>[bar]<br>baz</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=center><p>foo</div><p>[bar]<p>extra",
+ [["justifycenter",""]],
+ "<div align=\"center\"><p>foo</p><p>[bar]</p></div><p>extra</p>",
+ [true],
+ {"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>[foo]<div align=center><p>bar</div><p>extra",
+ [["justifycenter",""]],
+ "<div align=\"center\"><p>[foo]</p><p>bar</p></div><p>extra</p>",
+ [true],
+ {"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=center><p>foo</div><p>[bar]<div align=center><p>baz</div><p>extra",
+ [["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div align=\"center\"><p>foo</p><p>[bar]</p><p>baz</p></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=center><p>foo</div><p>[bar]<div align=center><p>baz</div><p>extra",
+ [["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div align=\"center\"><p>foo</p><p>[bar]</p><p>baz</p></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:center>foo</div>[bar]<p>extra",
+ [["justifycenter",""]],
+ "<div style=\"text-align:center\">foo<br>[bar]</div><p>extra</p>",
+ [true],
+ {"justifycenter":[false,false,"left",false,true,"center"]}],
+["[foo]<div style=text-align:center>bar</div><p>extra",
+ [["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo]<br>bar</div><p>extra</p>",
+ [true],
+ {"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:center>foo</div>[bar]<div style=text-align:center>baz</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo<br>[bar]<br>baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:center>foo</div>[bar]<div style=text-align:center>baz</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo<br>[bar]<br>baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:center>foo</div>[bar]<div style=text-align:center>baz</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo<br>[bar]<br>baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:center>foo</div>[bar]<div style=text-align:center>baz</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo<br>[bar]<br>baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:center><p>foo</div><p>[bar]<p>extra",
+ [["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>foo</p><p>[bar]</p></div><p>extra</p>",
+ [true],
+ {"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>[foo]<div style=text-align:center><p>bar</div><p>extra",
+ [["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo]</p><p>bar</p></div><p>extra</p>",
+ [true],
+ {"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:center><p>foo</div><p>[bar]<div style=text-align:center><p>baz</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>foo</p><p>[bar]</p><p>baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:center><p>foo</div><p>[bar]<div style=text-align:center><p>baz</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>foo</p><p>[bar]</p><p>baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:center><p>foo</div><p>[bar]<div style=text-align:center><p>baz</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>foo</p><p>[bar]</p><p>baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:center><p>foo</div><p>[bar]<div style=text-align:center><p>baz</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>foo</p><p>[bar]</p><p>baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p align=center>foo<p>[bar]<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<p align=\"center\">foo</p><div style=\"text-align:center\"><p>[bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p align=center>foo<p>[bar]<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<p align=\"center\">foo</p><div style=\"text-align:center\"><p>[bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p align=center>foo<p>[bar]<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<p align=\"center\">foo</p><div style=\"text-align:center\"><p>[bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p align=center>foo<p>[bar]<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<p align=\"center\">foo</p><div style=\"text-align:center\"><p>[bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>[foo]<p align=center>bar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo]</p></div><p align=\"center\">bar</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>[foo]<p align=center>bar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo]</p></div><p align=\"center\">bar</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>[foo]<p align=center>bar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo]</p></div><p align=\"center\">bar</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>[foo]<p align=center>bar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo]</p></div><p align=\"center\">bar</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p align=center>foo<p>[bar]<p align=center>baz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<p align=\"center\">foo</p><div style=\"text-align:center\"><p>[bar]</p></div><p align=\"center\">baz</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p align=center>foo<p>[bar]<p align=center>baz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<p align=\"center\">foo</p><div style=\"text-align:center\"><p>[bar]</p></div><p align=\"center\">baz</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p align=center>foo<p>[bar]<p align=center>baz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<p align=\"center\">foo</p><div style=\"text-align:center\"><p>[bar]</p></div><p align=\"center\">baz</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p align=center>foo<p>[bar]<p align=center>baz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<p align=\"center\">foo</p><div style=\"text-align:center\"><p>[bar]</p></div><p align=\"center\">baz</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<center>[foo</center>bar]<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo<br>bar]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<center>[foo</center>bar]<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo<br>bar]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<center>[foo</center>bar]<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo<br>bar]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<center>[foo</center>bar]<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo<br>bar]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<center>fo[o</center>b]ar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">fo[o<br>b]ar</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<center>fo[o</center>b]ar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">fo[o<br>b]ar</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<center>fo[o</center>b]ar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">fo[o<br>b]ar</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<center>fo[o</center>b]ar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">fo[o<br>b]ar</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<div align=center>[foo</div>bar]<p>extra",
+ [["stylewithcss","true"],["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo<br>bar]</div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<div align=center>[foo</div>bar]<p>extra",
+ [["stylewithcss","false"],["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo<br>bar]</div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<div align=center>fo[o</div>b]ar<p>extra",
+ [["stylewithcss","true"],["justifycenter",""]],
+ "<div style=\"text-align:center\">fo[o<br>b]ar</div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<div align=center>fo[o</div>b]ar<p>extra",
+ [["stylewithcss","false"],["justifycenter",""]],
+ "<div style=\"text-align:center\">fo[o<br>b]ar</div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<div style=text-align:center>[foo</div>bar]<p>extra",
+ [["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo<br>bar]</div><p>extra</p>",
+ [true],
+ {"justifycenter":[true,false,"center",false,true,"center"]}],
+["<div style=text-align:center>fo[o</div>b]ar<p>extra",
+ [["justifycenter",""]],
+ "<div style=\"text-align:center\">fo[o<br>b]ar</div><p>extra</p>",
+ [true],
+ {"justifycenter":[true,false,"center",false,true,"center"]}],
+["<span style=text-align:center>[foo]</span><p>extra",
+ [["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo]</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<span style=text-align:center>[foo]</span><p>extra",
+ [["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo]</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<span style=text-align:center>f[o]o</span><p>extra",
+ [["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">f[o]o</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<span style=text-align:center>f[o]o</span><p>extra",
+ [["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">f[o]o</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:center>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:center\">baz]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<div style=text-align:center>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:center\">baz]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<div style=text-align:center>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:center\">baz]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<div style=text-align:center>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:center\">baz]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<div align=nonsense><p>[foo]</div><p>extra",
+ [["stylewithcss","true"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo]</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=nonsense><p>[foo]</div><p>extra",
+ [["stylewithcss","false"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo]</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:inherit><p>[foo]</div><p>extra",
+ [["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo]</p></div><p>extra</p>",
+ [true],
+ {"justifycenter":[false,false,"left",false,true,"center"]}],
+["<quasit align=right><p>[foo]</p></quasit><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><quasit><p>[foo]</p></quasit></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<quasit align=right><p>[foo]</p></quasit><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><quasit><p>[foo]</p></quasit></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<quasit align=right><p>[foo]</p></quasit><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><quasit><p>[foo]</p></quasit></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<quasit align=right><p>[foo]</p></quasit><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><quasit><p>[foo]</p></quasit></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=center>{<div align=left>foo</div>}</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=center>{<div align=left>foo</div>}</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=center>{<div align=left>foo</div>}</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=center>{<div align=left>foo</div>}</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=left>{<div align=center>foo</div>}</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<div align=left>{<div align=center>foo</div>}</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<div align=left>{<div align=center>foo</div>}</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<div align=left>{<div align=center>foo</div>}</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<div align=center>{<div align=left>foo</div>bar}</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<br>bar}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[true,false,"left",false,true,"center"]}],
+["<div align=center>{<div align=left>foo</div>bar}</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<br>bar}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[true,false,"left",false,true,"center"]}],
+["<div align=center>{<div align=left>foo</div>bar}</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<br>bar}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[true,false,"left",false,true,"center"]}],
+["<div align=center>{<div align=left>foo</div>bar}</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<br>bar}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[true,false,"left",false,true,"center"]}],
+["<div align=left>{<div align=center>foo</div>bar}</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<br>bar}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<div align=left>{<div align=center>foo</div>bar}</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<br>bar}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<div align=left>{<div align=center>foo</div>bar}</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<br>bar}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<div align=left>{<div align=center>foo</div>bar}</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<br>bar}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<div align=center>{<div align=left>foo</div><img src=/img/lion.svg>}</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<br><img src=\"/img/lion.svg\">}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[true,false,"left",false,true,"center"]}],
+["<div align=center>{<div align=left>foo</div><img src=/img/lion.svg>}</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<br><img src=\"/img/lion.svg\">}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[true,false,"left",false,true,"center"]}],
+["<div align=center>{<div align=left>foo</div><img src=/img/lion.svg>}</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<br><img src=\"/img/lion.svg\">}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[true,false,"left",false,true,"center"]}],
+["<div align=center>{<div align=left>foo</div><img src=/img/lion.svg>}</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<br><img src=\"/img/lion.svg\">}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[true,false,"left",false,true,"center"]}],
+["<div align=left>{<div align=center>foo</div><img src=/img/lion.svg>}</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<br><img src=\"/img/lion.svg\">}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<div align=left>{<div align=center>foo</div><img src=/img/lion.svg>}</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<br><img src=\"/img/lion.svg\">}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<div align=left>{<div align=center>foo</div><img src=/img/lion.svg>}</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<br><img src=\"/img/lion.svg\">}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<div align=left>{<div align=center>foo</div><img src=/img/lion.svg>}</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<br><img src=\"/img/lion.svg\">}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[true,false,"center",false,true,"center"]}],
+["<div align=center>{<div align=left>foo</div><!-- bar -->}</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<!-- bar -->}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=center>{<div align=left>foo</div><!-- bar -->}</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<!-- bar -->}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=center>{<div align=left>foo</div><!-- bar -->}</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<!-- bar -->}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=center>{<div align=left>foo</div><!-- bar -->}</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<!-- bar -->}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=left>{<div align=center>foo</div><!-- bar -->}</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<!-- bar -->}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<div align=left>{<div align=center>foo</div><!-- bar -->}</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<!-- bar -->}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<div align=left>{<div align=center>foo</div><!-- bar -->}</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<!-- bar -->}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<div align=left>{<div align=center>foo</div><!-- bar -->}</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\">{foo<!-- bar -->}</div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,true,"center",false,true,"center"]}],
+["<div style=text-align:start>[foo]</div><p>extra",
+ [["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo]</div><p>extra</p>",
+ [true],
+ {"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:end>[foo]</div><p>extra",
+ [["justifycenter",""]],
+ "<div style=\"text-align:center\">[foo]</div><p>extra</p>",
+ [true],
+ {"justifycenter":[false,false,"right",false,true,"center"]}],
+["<div dir=rtl style=text-align:start>[foo]</div><p>extra",
+ [["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><div dir=\"rtl\">[foo]</div></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"right",false,true,"center"]}],
+["<div dir=rtl style=text-align:start>[foo]</div><p>extra",
+ [["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><div dir=\"rtl\">[foo]</div></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"right",false,true,"center"]}],
+["<div dir=rtl style=text-align:end>[foo]</div><p>extra",
+ [["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><div dir=\"rtl\">[foo]</div></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div dir=rtl style=text-align:end>[foo]</div><p>extra",
+ [["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><div dir=\"rtl\">[foo]</div></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:center><p>foo</div> <p>[bar]",
+ [["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>foo</p> <p>[bar]</p></div>",
+ [true],
+ {"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=center><p>foo</div> <p>[bar]",
+ [["justifycenter",""]],
+ "<div align=\"center\"><p>foo</p> <p>[bar]</p></div>",
+ [true],
+ {"justifycenter":[false,false,"left",false,true,"center"]}],
+["<center><p>foo</center> <p>[bar]",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<center><p>foo</p></center><div style=\"text-align:center\"> <p>[bar]</p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<center><p>foo</center> <p>[bar]",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<center><p>foo</p></center><div style=\"text-align:center\"> <p>[bar]</p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<center><p>foo</center> <p>[bar]",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<center><p>foo</p></center><div style=\"text-align:center\"> <p>[bar]</p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<center><p>foo</center> <p>[bar]",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<center><p>foo</p></center><div style=\"text-align:center\"> <p>[bar]</p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>[foo]</p> <div style=text-align:center><p>bar</div>",
+ [["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo]</p> <p>bar</p></div>",
+ [true],
+ {"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>[foo]</p> <div align=center><p>bar</div>",
+ [["justifycenter",""]],
+ "<div align=\"center\"><p>[foo]</p> <p>bar</p></div>",
+ [true],
+ {"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>[foo]</p> <center><p>bar</center>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo]</p> </div><center><p>bar</p></center>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>[foo]</p> <center><p>bar</center>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo]</p> </div><center><p>bar</p></center>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>[foo]</p> <center><p>bar</center>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo]</p> </div><center><p>bar</p></center>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<p>[foo]</p> <center><p>bar</center>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>[foo]</p> </div><center><p>bar</p></center>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:center><p>foo</div> <p>[bar]</p> <div style=text-align:center><p>baz</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>foo</p> <p>[bar]</p> <p>baz</p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:center><p>foo</div> <p>[bar]</p> <div style=text-align:center><p>baz</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>foo</p> <p>[bar]</p> <p>baz</p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:center><p>foo</div> <p>[bar]</p> <div style=text-align:center><p>baz</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>foo</p> <p>[bar]</p> <p>baz</p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div style=text-align:center><p>foo</div> <p>[bar]</p> <div style=text-align:center><p>baz</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div style=\"text-align:center\"><p>foo</p> <p>[bar]</p> <p>baz</p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=center><p>foo</div> <p>[bar]</p> <div align=center><p>baz</div>",
+ [["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<div align=\"center\"><p>foo</p> <p>[bar]</p> <p>baz</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<div align=center><p>foo</div> <p>[bar]</p> <div align=center><p>baz</div>",
+ [["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<div align=\"center\"><p>foo</p> <p>[bar]</p> <p>baz</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<center><p>foo</center> <p>[bar]</p> <center><p>baz</center>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<center><p>foo</p></center><div style=\"text-align:center\"> <p>[bar]</p> </div><center><p>baz</p></center>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<center><p>foo</center> <p>[bar]</p> <center><p>baz</center>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifycenter",""]],
+ "<center><p>foo</p></center><div style=\"text-align:center\"> <p>[bar]</p> </div><center><p>baz</p></center>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<center><p>foo</center> <p>[bar]</p> <center><p>baz</center>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<center><p>foo</p></center><div style=\"text-align:center\"> <p>[bar]</p> </div><center><p>baz</p></center>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["<center><p>foo</center> <p>[bar]</p> <center><p>baz</center>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifycenter",""]],
+ "<center><p>foo</p></center><div style=\"text-align:center\"> <p>[bar]</p> </div><center><p>baz</p></center>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifycenter":[false,false,"left",false,true,"center"]}]
+]
diff --git a/testing/web-platform/tests/editing/data/justifyfull.js b/testing/web-platform/tests/editing/data/justifyfull.js
new file mode 100644
index 000000000..c8beca840
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/justifyfull.js
@@ -0,0 +1,1167 @@
+var browserTests = [
+["foo[]bar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[]bar</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[]bar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[]bar</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[]bar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[]bar</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[]bar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[]bar</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<span>foo</span>{}<span>bar</span><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><span>foo</span>{}<span>bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<span>foo</span>{}<span>bar</span><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><span>foo</span>{}<span>bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<span>foo</span>{}<span>bar</span><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><span>foo</span>{}<span>bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<span>foo</span>{}<span>bar</span><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><span>foo</span>{}<span>bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<span>foo[</span><span>]bar</span><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><span>foo[</span><span>]bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<span>foo[</span><span>]bar</span><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><span>foo[</span><span>]bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<span>foo[</span><span>]bar</span><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><span>foo[</span><span>]bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<span>foo[</span><span>]bar</span><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><span>foo[</span><span>]bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[bar]baz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[bar]baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[bar]baz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[bar]baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[bar]baz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[bar]baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[bar]baz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[bar]baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[bar<b>baz]qoz</b>quz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[bar<b>baz]qoz</b>quz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[bar<b>baz]qoz</b>quz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[bar<b>baz]qoz</b>quz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[bar<b>baz]qoz</b>quz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[bar<b>baz]qoz</b>quz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[bar<b>baz]qoz</b>quz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[bar<b>baz]qoz</b>quz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p>foo[]bar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>foo[]bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p>foo[]bar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>foo[]bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p>foo[]bar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>foo[]bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p>foo[]bar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>foo[]bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p>foo[bar]baz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>foo[bar]baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p>foo[bar]baz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>foo[bar]baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p>foo[bar]baz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>foo[bar]baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p>foo[bar]baz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>foo[bar]baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<h1>foo[bar]baz</h1><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><h1>foo[bar]baz</h1></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<h1>foo[bar]baz</h1><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><h1>foo[bar]baz</h1></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<h1>foo[bar]baz</h1><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><h1>foo[bar]baz</h1></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<h1>foo[bar]baz</h1><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><h1>foo[bar]baz</h1></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<pre>foo[bar]baz</pre><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><pre>foo[bar]baz</pre></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<pre>foo[bar]baz</pre><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><pre>foo[bar]baz</pre></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<pre>foo[bar]baz</pre><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><pre>foo[bar]baz</pre></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<pre>foo[bar]baz</pre><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><pre>foo[bar]baz</pre></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<xmp>foo[bar]baz</xmp><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><xmp>foo[bar]baz</xmp></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<xmp>foo[bar]baz</xmp><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><xmp>foo[bar]baz</xmp></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<xmp>foo[bar]baz</xmp><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><xmp>foo[bar]baz</xmp></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<xmp>foo[bar]baz</xmp><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><xmp>foo[bar]baz</xmp></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<center><p>[foo]<p>bar</center><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<center><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"center",false,true,"justify"]}],
+["<center><p>[foo]<p>bar</center><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<center><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"center",false,true,"justify"]}],
+["<center><p>[foo]<p>bar</center><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<center><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"center",false,true,"justify"]}],
+["<center><p>[foo]<p>bar</center><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<center><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"center",false,true,"justify"]}],
+["<center><p>[foo<p>bar]</center><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"center",false,true,"justify"]}],
+["<center><p>[foo<p>bar]</center><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"center",false,true,"justify"]}],
+["<center><p>[foo<p>bar]</center><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"center",false,true,"justify"]}],
+["<center><p>[foo<p>bar]</center><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"center",false,true,"justify"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<table><tbody><tr><td>foo</td><td><div style=\"text-align:justify\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<table><tbody><tr><td>foo</td><td><div style=\"text-align:justify\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<table><tbody><tr><td>foo</td><td><div style=\"text-align:justify\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<table><tbody><tr><td>foo</td><td><div style=\"text-align:justify\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<table><tbody><tr><td>foo</td>{<td><div style=\"text-align:justify\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<table><tbody><tr><td>foo</td>{<td><div style=\"text-align:justify\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<table><tbody><tr><td>foo</td>{<td><div style=\"text-align:justify\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<table><tbody><tr><td>foo</td>{<td><div style=\"text-align:justify\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<table><tbody><tr>{<td><div style=\"text-align:justify\">foo</div></td><td><div style=\"text-align:justify\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<table><tbody><tr>{<td><div style=\"text-align:justify\">foo</div></td><td><div style=\"text-align:justify\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<table><tbody><tr>{<td><div style=\"text-align:justify\">foo</div></td><td><div style=\"text-align:justify\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<table><tbody><tr>{<td><div style=\"text-align:justify\">foo</div></td><td><div style=\"text-align:justify\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<table align=\"justify\"><tbody><tr><td>foo</td><td><div style=\"text-align:justify\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<table align=\"justify\"><tbody><tr><td>foo</td><td><div style=\"text-align:justify\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<table align=\"justify\"><tbody><tr><td>foo</td><td><div style=\"text-align:justify\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<table align=\"justify\"><tbody><tr><td>foo</td><td><div style=\"text-align:justify\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<table align=\"justify\"><tbody><tr><td>foo</td>{<td><div style=\"text-align:justify\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<table align=\"justify\"><tbody><tr><td>foo</td>{<td><div style=\"text-align:justify\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<table align=\"justify\"><tbody><tr><td>foo</td>{<td><div style=\"text-align:justify\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<table align=\"justify\"><tbody><tr><td>foo</td>{<td><div style=\"text-align:justify\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<table align=\"justify\"><tbody><tr>{<td><div style=\"text-align:justify\">foo</div></td><td><div style=\"text-align:justify\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<table align=\"justify\"><tbody><tr>{<td><div style=\"text-align:justify\">foo</div></td><td><div style=\"text-align:justify\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<table align=\"justify\"><tbody><tr>{<td><div style=\"text-align:justify\">foo</div></td><td><div style=\"text-align:justify\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<table align=\"justify\"><tbody><tr>{<td><div style=\"text-align:justify\">foo</div></td><td><div style=\"text-align:justify\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table align=justify data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["{<table align=justify><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["{<table align=justify><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["{<table align=justify><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["{<table align=justify><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<table><tbody align=justify><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["justifyfull",""]],
+ "<table><tbody align=\"justify\"><tr><td>foo</td><td>b[a]r</td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table><tbody align=justify><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyfull",""]],
+ "<table><tbody align=\"justify\"><tr><td>foo</td>{<td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table><tbody align=justify><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyfull",""]],
+ "<table><tbody align=\"justify\"><tr>{<td>foo</td><td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table><tbody align=justify data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table><tbody align=justify data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table><tbody align=justify data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table><tbody align=justify data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table data-start=0 data-end=1><tbody align=justify><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table data-start=0 data-end=1><tbody align=justify><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table data-start=0 data-end=1><tbody align=justify><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table data-start=0 data-end=1><tbody align=justify><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["{<table><tbody align=justify><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["{<table><tbody align=justify><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["{<table><tbody align=justify><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["{<table><tbody align=justify><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table><tbody><tr align=justify><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["justifyfull",""]],
+ "<table><tbody><tr align=\"justify\"><td>foo</td><td>b[a]r</td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table><tbody><tr align=justify data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyfull",""]],
+ "<table><tbody><tr align=\"justify\"><td>foo</td>{<td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table><tbody><tr align=justify data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyfull",""]],
+ "<table><tbody><tr align=\"justify\">{<td>foo</td><td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table><tbody data-start=0 data-end=1><tr align=justify><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table><tbody data-start=0 data-end=1><tr align=justify><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table><tbody data-start=0 data-end=1><tr align=justify><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table><tbody data-start=0 data-end=1><tr align=justify><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table data-start=0 data-end=1><tbody><tr align=justify><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table data-start=0 data-end=1><tbody><tr align=justify><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table data-start=0 data-end=1><tbody><tr align=justify><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<table data-start=0 data-end=1><tbody><tr align=justify><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["{<table><tr align=justify><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["{<table><tr align=justify><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["{<table><tr align=justify><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["{<table><tr align=justify><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<div align=center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div align=\"center\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"center",false,true,"justify"]}],
+["<div align=center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div align=\"center\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"center",false,true,"justify"]}],
+["<div align=center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div align=\"center\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"center",false,true,"justify"]}],
+["<div align=center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div align=\"center\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"center",false,true,"justify"]}],
+["<div align=center><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","true"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifyfull":[false,false,"center",false,true,"justify"]}],
+["<div align=center><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","false"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifyfull":[false,false,"center",false,true,"justify"]}],
+["<div style=text-align:center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:center\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"center",false,true,"justify"]}],
+["<div style=text-align:center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:center\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"center",false,true,"justify"]}],
+["<div style=text-align:center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:center\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"center",false,true,"justify"]}],
+["<div style=text-align:center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:center\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"center",false,true,"justify"]}],
+["<div style=text-align:center><p>[foo<p>bar]</div><p>extra",
+ [["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true],
+ {"justifyfull":[false,false,"center",false,true,"justify"]}],
+["<div align=justify><p>[foo]<p>bar</div><p>extra",
+ [["justifyfull",""]],
+ "<div align=\"justify\"><p>[foo]</p><p>bar</p></div><p>extra</p>",
+ [true],
+ {"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<div align=justify><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","true"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<div align=justify><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","false"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<div style=text-align:justify><p>[foo]<p>bar</div><p>extra",
+ [["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo]</p><p>bar</p></div><p>extra</p>",
+ [true],
+ {"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<div style=text-align:justify><p>[foo<p>bar]</div><p>extra",
+ [["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true],
+ {"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<div align=left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div align=\"left\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div align=left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div align=\"left\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div align=left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div align=\"left\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div align=left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div align=\"left\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div align=left><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","true"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div align=left><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","false"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:left\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:left\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:left\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:left\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:left><p>[foo<p>bar]</div><p>extra",
+ [["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true],
+ {"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div align=right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div align=\"right\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"right",false,true,"justify"]}],
+["<div align=right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div align=\"right\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"right",false,true,"justify"]}],
+["<div align=right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div align=\"right\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"right",false,true,"justify"]}],
+["<div align=right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div align=\"right\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"right",false,true,"justify"]}],
+["<div align=right><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","true"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifyfull":[false,false,"right",false,true,"justify"]}],
+["<div align=right><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","false"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifyfull":[false,false,"right",false,true,"justify"]}],
+["<div style=text-align:right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:right\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"right",false,true,"justify"]}],
+["<div style=text-align:right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:right\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"right",false,true,"justify"]}],
+["<div style=text-align:right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:right\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"right",false,true,"justify"]}],
+["<div style=text-align:right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:right\"><div style=\"text-align:justify\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"right",false,true,"justify"]}],
+["<div style=text-align:right><p>[foo<p>bar]</div><p>extra",
+ [["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true],
+ {"justifyfull":[false,false,"right",false,true,"justify"]}],
+["<div align=justify>foo</div>[bar]<p>extra",
+ [["justifyfull",""]],
+ "<div align=\"justify\">foo<br>[bar]</div><p>extra</p>",
+ [true],
+ {"justifyfull":[false,false,"left",false,true,"justify"]}],
+["[foo]<div align=justify>bar</div><p>extra",
+ [["justifyfull",""]],
+ "<div align=\"justify\">[foo]<br>bar</div><p>extra</p>",
+ [true],
+ {"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div align=justify>foo</div>[bar]<div align=justify>baz</div><p>extra",
+ [["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div align=\"justify\">foo<br>[bar]<br>baz</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div align=justify>foo</div>[bar]<div align=justify>baz</div><p>extra",
+ [["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div align=\"justify\">foo<br>[bar]<br>baz</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div align=justify><p>foo</div><p>[bar]<p>extra",
+ [["justifyfull",""]],
+ "<div align=\"justify\"><p>foo</p><p>[bar]</p></div><p>extra</p>",
+ [true],
+ {"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p>[foo]<div align=justify><p>bar</div><p>extra",
+ [["justifyfull",""]],
+ "<div align=\"justify\"><p>[foo]</p><p>bar</p></div><p>extra</p>",
+ [true],
+ {"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div align=justify><p>foo</div><p>[bar]<div align=justify><p>baz</div><p>extra",
+ [["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div align=\"justify\"><p>foo</p><p>[bar]</p><p>baz</p></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div align=justify><p>foo</div><p>[bar]<div align=justify><p>baz</div><p>extra",
+ [["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div align=\"justify\"><p>foo</p><p>[bar]</p><p>baz</p></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:justify>foo</div>[bar]<p>extra",
+ [["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo<br>[bar]</div><p>extra</p>",
+ [true],
+ {"justifyfull":[false,false,"left",false,true,"justify"]}],
+["[foo]<div style=text-align:justify>bar</div><p>extra",
+ [["justifyfull",""]],
+ "<div style=\"text-align:justify\">[foo]<br>bar</div><p>extra</p>",
+ [true],
+ {"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:justify>foo</div>[bar]<div style=text-align:justify>baz</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo<br>[bar]<br>baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:justify>foo</div>[bar]<div style=text-align:justify>baz</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo<br>[bar]<br>baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:justify>foo</div>[bar]<div style=text-align:justify>baz</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo<br>[bar]<br>baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:justify>foo</div>[bar]<div style=text-align:justify>baz</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo<br>[bar]<br>baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:justify><p>foo</div><p>[bar]<p>extra",
+ [["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>foo</p><p>[bar]</p></div><p>extra</p>",
+ [true],
+ {"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p>[foo]<div style=text-align:justify><p>bar</div><p>extra",
+ [["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo]</p><p>bar</p></div><p>extra</p>",
+ [true],
+ {"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:justify><p>foo</div><p>[bar]<div style=text-align:justify><p>baz</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>foo</p><p>[bar]</p><p>baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:justify><p>foo</div><p>[bar]<div style=text-align:justify><p>baz</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>foo</p><p>[bar]</p><p>baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:justify><p>foo</div><p>[bar]<div style=text-align:justify><p>baz</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>foo</p><p>[bar]</p><p>baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:justify><p>foo</div><p>[bar]<div style=text-align:justify><p>baz</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>foo</p><p>[bar]</p><p>baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p align=justify>foo<p>[bar]<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<p align=\"justify\">foo</p><div style=\"text-align:justify\"><p>[bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p align=justify>foo<p>[bar]<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<p align=\"justify\">foo</p><div style=\"text-align:justify\"><p>[bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p align=justify>foo<p>[bar]<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<p align=\"justify\">foo</p><div style=\"text-align:justify\"><p>[bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p align=justify>foo<p>[bar]<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<p align=\"justify\">foo</p><div style=\"text-align:justify\"><p>[bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p>[foo]<p align=justify>bar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo]</p></div><p align=\"justify\">bar</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p>[foo]<p align=justify>bar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo]</p></div><p align=\"justify\">bar</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p>[foo]<p align=justify>bar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo]</p></div><p align=\"justify\">bar</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p>[foo]<p align=justify>bar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo]</p></div><p align=\"justify\">bar</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p align=justify>foo<p>[bar]<p align=justify>baz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<p align=\"justify\">foo</p><div style=\"text-align:justify\"><p>[bar]</p></div><p align=\"justify\">baz</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p align=justify>foo<p>[bar]<p align=justify>baz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<p align=\"justify\">foo</p><div style=\"text-align:justify\"><p>[bar]</p></div><p align=\"justify\">baz</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p align=justify>foo<p>[bar]<p align=justify>baz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<p align=\"justify\">foo</p><div style=\"text-align:justify\"><p>[bar]</p></div><p align=\"justify\">baz</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p align=justify>foo<p>[bar]<p align=justify>baz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<p align=\"justify\">foo</p><div style=\"text-align:justify\"><p>[bar]</p></div><p align=\"justify\">baz</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div align=justify>[foo</div>bar]<p>extra",
+ [["stylewithcss","true"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">[foo<br>bar]</div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifyfull":[true,false,"justify",false,true,"justify"]}],
+["<div align=justify>[foo</div>bar]<p>extra",
+ [["stylewithcss","false"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">[foo<br>bar]</div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifyfull":[true,false,"justify",false,true,"justify"]}],
+["<div align=justify>fo[o</div>b]ar<p>extra",
+ [["stylewithcss","true"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">fo[o<br>b]ar</div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifyfull":[true,false,"justify",false,true,"justify"]}],
+["<div align=justify>fo[o</div>b]ar<p>extra",
+ [["stylewithcss","false"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">fo[o<br>b]ar</div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifyfull":[true,false,"justify",false,true,"justify"]}],
+["<div style=text-align:justify>[foo</div>bar]<p>extra",
+ [["justifyfull",""]],
+ "<div style=\"text-align:justify\">[foo<br>bar]</div><p>extra</p>",
+ [true],
+ {"justifyfull":[true,false,"justify",false,true,"justify"]}],
+["<div style=text-align:justify>fo[o</div>b]ar<p>extra",
+ [["justifyfull",""]],
+ "<div style=\"text-align:justify\">fo[o<br>b]ar</div><p>extra</p>",
+ [true],
+ {"justifyfull":[true,false,"justify",false,true,"justify"]}],
+["<span style=text-align:justify>[foo]</span><p>extra",
+ [["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">[foo]</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<span style=text-align:justify>[foo]</span><p>extra",
+ [["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">[foo]</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<span style=text-align:justify>f[o]o</span><p>extra",
+ [["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">f[o]o</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<span style=text-align:justify>f[o]o</span><p>extra",
+ [["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">f[o]o</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:justify>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">[foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:justify\">baz]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<div style=text-align:justify>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">[foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:justify\">baz]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<div style=text-align:justify>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">[foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:justify\">baz]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<div style=text-align:justify>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">[foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:justify\">baz]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,true,"justify",false,true,"justify"]}],
+["<div align=nonsense><p>[foo]</div><p>extra",
+ [["stylewithcss","true"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo]</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div align=nonsense><p>[foo]</div><p>extra",
+ [["stylewithcss","false"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo]</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:inherit><p>[foo]</div><p>extra",
+ [["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo]</p></div><p>extra</p>",
+ [true],
+ {"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<quasit align=center><p>[foo]</p></quasit><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><quasit><p>[foo]</p></quasit></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<quasit align=center><p>[foo]</p></quasit><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><quasit><p>[foo]</p></quasit></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<quasit align=center><p>[foo]</p></quasit><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><quasit><p>[foo]</p></quasit></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<quasit align=center><p>[foo]</p></quasit><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><quasit><p>[foo]</p></quasit></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:start>[foo]</div><p>extra",
+ [["justifyfull",""]],
+ "<div style=\"text-align:justify\">[foo]</div><p>extra</p>",
+ [true],
+ {"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:end>[foo]</div><p>extra",
+ [["justifyfull",""]],
+ "<div style=\"text-align:justify\">[foo]</div><p>extra</p>",
+ [true],
+ {"justifyfull":[false,false,"right",false,true,"justify"]}],
+["<div dir=rtl style=text-align:start>[foo]</div><p>extra",
+ [["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><div dir=\"rtl\">[foo]</div></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"right",false,true,"justify"]}],
+["<div dir=rtl style=text-align:start>[foo]</div><p>extra",
+ [["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><div dir=\"rtl\">[foo]</div></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"right",false,true,"justify"]}],
+["<div dir=rtl style=text-align:end>[foo]</div><p>extra",
+ [["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><div dir=\"rtl\">[foo]</div></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div dir=rtl style=text-align:end>[foo]</div><p>extra",
+ [["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><div dir=\"rtl\">[foo]</div></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:justify><p>foo</div> <p>[bar]",
+ [["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>foo</p> <p>[bar]</p></div>",
+ [true],
+ {"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div align=justify><p>foo</div> <p>[bar]",
+ [["justifyfull",""]],
+ "<div align=\"justify\"><p>foo</p> <p>[bar]</p></div>",
+ [true],
+ {"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p>[foo]</p> <div style=text-align:justify><p>bar</div>",
+ [["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>[foo]</p> <p>bar</p></div>",
+ [true],
+ {"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<p>[foo]</p> <div align=justify><p>bar</div>",
+ [["justifyfull",""]],
+ "<div align=\"justify\"><p>[foo]</p> <p>bar</p></div>",
+ [true],
+ {"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:justify><p>foo</div> <p>[bar]</p> <div style=text-align:justify><p>baz</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>foo</p> <p>[bar]</p> <p>baz</p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:justify><p>foo</div> <p>[bar]</p> <div style=text-align:justify><p>baz</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>foo</p> <p>[bar]</p> <p>baz</p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:justify><p>foo</div> <p>[bar]</p> <div style=text-align:justify><p>baz</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>foo</p> <p>[bar]</p> <p>baz</p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div style=text-align:justify><p>foo</div> <p>[bar]</p> <div style=text-align:justify><p>baz</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div style=\"text-align:justify\"><p>foo</p> <p>[bar]</p> <p>baz</p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div align=justify><p>foo</div> <p>[bar]</p> <div align=justify><p>baz</div>",
+ [["defaultparagraphseparator","div"],["justifyfull",""]],
+ "<div align=\"justify\"><p>foo</p> <p>[bar]</p> <p>baz</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["<div align=justify><p>foo</div> <p>[bar]</p> <div align=justify><p>baz</div>",
+ [["defaultparagraphseparator","p"],["justifyfull",""]],
+ "<div align=\"justify\"><p>foo</p> <p>[bar]</p> <p>baz</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyfull":[false,false,"left",false,true,"justify"]}]
+]
diff --git a/testing/web-platform/tests/editing/data/justifyleft.js b/testing/web-platform/tests/editing/data/justifyleft.js
new file mode 100644
index 000000000..c08033744
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/justifyleft.js
@@ -0,0 +1,747 @@
+var browserTests = [
+["foo[]bar<p>extra",
+ [["justifyleft",""]],
+ "foo[]bar<p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<span>foo</span>{}<span>bar</span><p>extra",
+ [["justifyleft",""]],
+ "<span>foo</span>{}<span>bar</span><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<span>foo[</span><span>]bar</span><p>extra",
+ [["justifyleft",""]],
+ "<span>foo[</span><span>]bar</span><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["foo[bar]baz<p>extra",
+ [["justifyleft",""]],
+ "foo[bar]baz<p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["foo[bar<b>baz]qoz</b>quz<p>extra",
+ [["justifyleft",""]],
+ "foo[bar<b>baz]qoz</b>quz<p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<p>foo[]bar<p>extra",
+ [["justifyleft",""]],
+ "<p>foo[]bar</p><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<p>foo[bar]baz<p>extra",
+ [["justifyleft",""]],
+ "<p>foo[bar]baz</p><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<h1>foo[bar]baz</h1><p>extra",
+ [["justifyleft",""]],
+ "<h1>foo[bar]baz</h1><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<pre>foo[bar]baz</pre><p>extra",
+ [["justifyleft",""]],
+ "<pre>foo[bar]baz</pre><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<xmp>foo[bar]baz</xmp><p>extra",
+ [["justifyleft",""]],
+ "<xmp>foo[bar]baz</xmp><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<center><p>[foo]<p>bar</center><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<center><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyleft":[false,false,"center",false,true,"left"]}],
+["<center><p>[foo]<p>bar</center><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<center><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyleft":[false,false,"center",false,true,"left"]}],
+["<center><p>[foo]<p>bar</center><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<center><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,false,"center",false,true,"left"]}],
+["<center><p>[foo]<p>bar</center><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<center><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyleft":[false,false,"center",false,true,"left"]}],
+["<center><p>[foo<p>bar]</center><p>extra",
+ [["justifyleft",""]],
+ "<p>[foo</p><p>bar]</p><p>extra</p>",
+ [true],
+ {"justifyleft":[false,false,"center",false,true,"left"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table><tbody><tr><td>foo</td><td>b[a]r</td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table><tbody><tr><td>foo</td>{<td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table><tbody><tr>{<td>foo</td><td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["justifyleft",""]],
+ "{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}<p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<table align=left><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table align=\"left\"><tbody><tr><td>foo</td><td>b[a]r</td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<table align=left><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table align=\"left\"><tbody><tr><td>foo</td>{<td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<table align=left><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table align=\"left\"><tbody><tr>{<td>foo</td><td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<table align=left><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<table align=left data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["{<table align=left><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["justifyleft",""]],
+ "{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}<p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<table><tbody align=left><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table><tbody align=\"left\"><tr><td>foo</td><td>b[a]r</td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<table><tbody align=left><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table><tbody align=\"left\"><tr><td>foo</td>{<td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<table><tbody align=left><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table><tbody align=\"left\"><tr>{<td>foo</td><td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<table><tbody align=left data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<table data-start=0 data-end=1><tbody align=left><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["{<table><tbody align=left><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["justifyleft",""]],
+ "{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}<p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<table><tbody><tr align=left><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table><tbody><tr align=\"left\"><td>foo</td><td>b[a]r</td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<table><tbody><tr align=left data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table><tbody><tr align=\"left\"><td>foo</td>{<td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<table><tbody><tr align=left data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table><tbody><tr align=\"left\">{<td>foo</td><td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<table><tbody data-start=0 data-end=1><tr align=left><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<table data-start=0 data-end=1><tbody><tr align=left><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyleft",""]],
+ "<table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["{<table><tr align=left><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["justifyleft",""]],
+ "{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}<p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div align=center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<div align=\"center\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,false,"center",false,true,"left"]}],
+["<div align=center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<div align=\"center\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyleft":[false,false,"center",false,true,"left"]}],
+["<div align=center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<div align=\"center\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,false,"center",false,true,"left"]}],
+["<div align=center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<div align=\"center\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyleft":[false,false,"center",false,true,"left"]}],
+["<div align=center><p>[foo<p>bar}</div><p>extra",
+ [["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<p>[foo</p><p>bar}</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,false,"center",false,true,"left"]}],
+["<div align=center><p>[foo<p>bar}</div><p>extra",
+ [["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<p>[foo</p><p>bar}</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,false,"center",false,true,"left"]}],
+["<div style=text-align:center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<div style=\"text-align:center\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,false,"center",false,true,"left"]}],
+["<div style=text-align:center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<div style=\"text-align:center\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyleft":[false,false,"center",false,true,"left"]}],
+["<div style=text-align:center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<div style=\"text-align:center\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,false,"center",false,true,"left"]}],
+["<div style=text-align:center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<div style=\"text-align:center\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyleft":[false,false,"center",false,true,"left"]}],
+["<div style=text-align:center><p>[foo<p>bar]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<p>[foo</p><p>bar]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,false,"center",false,true,"left"]}],
+["<div style=text-align:center><p>[foo<p>bar]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<p>[foo</p><p>bar]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyleft":[false,false,"center",false,true,"left"]}],
+["<div style=text-align:center><p>[foo<p>bar]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<p>[foo</p><p>bar]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,false,"center",false,true,"left"]}],
+["<div style=text-align:center><p>[foo<p>bar]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<p>[foo</p><p>bar]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyleft":[false,false,"center",false,true,"left"]}],
+["<div align=justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<div align=\"justify\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,false,"justify",false,true,"left"]}],
+["<div align=justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<div align=\"justify\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyleft":[false,false,"justify",false,true,"left"]}],
+["<div align=justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<div align=\"justify\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,false,"justify",false,true,"left"]}],
+["<div align=justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<div align=\"justify\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyleft":[false,false,"justify",false,true,"left"]}],
+["<div align=justify><p>[foo<p>bar}</div><p>extra",
+ [["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<p>[foo</p><p>bar}</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,false,"justify",false,true,"left"]}],
+["<div align=justify><p>[foo<p>bar}</div><p>extra",
+ [["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<p>[foo</p><p>bar}</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,false,"justify",false,true,"left"]}],
+["<div style=text-align:justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<div style=\"text-align:justify\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,false,"justify",false,true,"left"]}],
+["<div style=text-align:justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<div style=\"text-align:justify\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyleft":[false,false,"justify",false,true,"left"]}],
+["<div style=text-align:justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<div style=\"text-align:justify\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,false,"justify",false,true,"left"]}],
+["<div style=text-align:justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<div style=\"text-align:justify\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyleft":[false,false,"justify",false,true,"left"]}],
+["<div style=text-align:justify><p>[foo<p>bar]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<p>[foo</p><p>bar]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,false,"justify",false,true,"left"]}],
+["<div style=text-align:justify><p>[foo<p>bar]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<p>[foo</p><p>bar]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyleft":[false,false,"justify",false,true,"left"]}],
+["<div style=text-align:justify><p>[foo<p>bar]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<p>[foo</p><p>bar]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,false,"justify",false,true,"left"]}],
+["<div style=text-align:justify><p>[foo<p>bar]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<p>[foo</p><p>bar]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyleft":[false,false,"justify",false,true,"left"]}],
+["<div align=left><p>[foo]<p>bar</div><p>extra",
+ [["justifyleft",""]],
+ "<div align=\"left\"><p>[foo]</p><p>bar</p></div><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div align=left><p>[foo<p>bar}</div><p>extra",
+ [["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<p>[foo</p><p>bar}</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div align=left><p>[foo<p>bar}</div><p>extra",
+ [["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<p>[foo</p><p>bar}</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left><p>[foo]<p>bar</div><p>extra",
+ [["justifyleft",""]],
+ "<div style=\"text-align:left\"><p>[foo]</p><p>bar</p></div><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left><p>[foo<p>bar]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<p>[foo</p><p>bar]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left><p>[foo<p>bar]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<p>[foo</p><p>bar]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left><p>[foo<p>bar]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<p>[foo</p><p>bar]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left><p>[foo<p>bar]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<p>[foo</p><p>bar]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div align=right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<div align=\"right\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div align=right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<div align=\"right\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div align=right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<div align=\"right\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div align=right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<div align=\"right\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div align=right><p>[foo<p>bar}</div><p>extra",
+ [["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<p>[foo</p><p>bar}</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div align=right><p>[foo<p>bar}</div><p>extra",
+ [["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<p>[foo</p><p>bar}</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div style=text-align:right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<div style=\"text-align:right\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div style=text-align:right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<div style=\"text-align:right\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div style=text-align:right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<div style=\"text-align:right\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div style=text-align:right><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<div style=\"text-align:right\"><div style=\"text-align:left\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div style=text-align:right><p>[foo<p>bar]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<p>[foo</p><p>bar]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div style=text-align:right><p>[foo<p>bar]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<p>[foo</p><p>bar]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div style=text-align:right><p>[foo<p>bar]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<p>[foo</p><p>bar]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div style=text-align:right><p>[foo<p>bar]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<p>[foo</p><p>bar]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div align=left>foo</div>[bar]<p>extra",
+ [["justifyleft",""]],
+ "<div align=\"left\">foo</div>[bar]<p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["[foo]<div align=left>bar</div><p>extra",
+ [["justifyleft",""]],
+ "[foo]<div align=\"left\">bar</div><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div align=left>foo</div>[bar]<div align=left>baz</div><p>extra",
+ [["justifyleft",""]],
+ "<div align=\"left\">foo</div>[bar]<div align=\"left\">baz</div><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div align=left><p>foo</div><p>[bar]<p>extra",
+ [["justifyleft",""]],
+ "<div align=\"left\"><p>foo</p></div><p>[bar]</p><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<p>[foo]<div align=left><p>bar</div><p>extra",
+ [["justifyleft",""]],
+ "<p>[foo]</p><div align=\"left\"><p>bar</p></div><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div align=left><p>foo</div><p>[bar]<div align=left><p>baz</div><p>extra",
+ [["justifyleft",""]],
+ "<div align=\"left\"><p>foo</p></div><p>[bar]</p><div align=\"left\"><p>baz</p></div><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left>foo</div>[bar]<p>extra",
+ [["justifyleft",""]],
+ "<div style=\"text-align:left\">foo</div>[bar]<p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["[foo]<div style=text-align:left>bar</div><p>extra",
+ [["justifyleft",""]],
+ "[foo]<div style=\"text-align:left\">bar</div><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left>foo</div>[bar]<div style=text-align:left>baz</div><p>extra",
+ [["justifyleft",""]],
+ "<div style=\"text-align:left\">foo</div>[bar]<div style=\"text-align:left\">baz</div><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left><p>foo</div><p>[bar]<p>extra",
+ [["justifyleft",""]],
+ "<div style=\"text-align:left\"><p>foo</p></div><p>[bar]</p><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<p>[foo]<div style=text-align:left><p>bar</div><p>extra",
+ [["justifyleft",""]],
+ "<p>[foo]</p><div style=\"text-align:left\"><p>bar</p></div><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left><p>foo</div><p>[bar]<div style=text-align:left><p>baz</div><p>extra",
+ [["justifyleft",""]],
+ "<div style=\"text-align:left\"><p>foo</p></div><p>[bar]</p><div style=\"text-align:left\"><p>baz</p></div><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<p align=left>foo<p>[bar]<p>extra",
+ [["justifyleft",""]],
+ "<p align=\"left\">foo</p><p>[bar]</p><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<p>[foo]<p align=left>bar<p>extra",
+ [["justifyleft",""]],
+ "<p>[foo]</p><p align=\"left\">bar</p><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<p align=left>foo<p>[bar]<p align=left>baz<p>extra",
+ [["justifyleft",""]],
+ "<p align=\"left\">foo</p><p>[bar]</p><p align=\"left\">baz</p><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div align=left>[foo</div>bar]<p>extra",
+ [["defaultparagraphseparator","div"],["justifyleft",""]],
+ "[foo<br>bar]<p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div align=left>[foo</div>bar]<p>extra",
+ [["defaultparagraphseparator","p"],["justifyleft",""]],
+ "[foo<br>bar]<p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div align=left>fo[o</div>b]ar<p>extra",
+ [["defaultparagraphseparator","div"],["justifyleft",""]],
+ "fo[o<br>b]ar<p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div align=left>fo[o</div>b]ar<p>extra",
+ [["defaultparagraphseparator","p"],["justifyleft",""]],
+ "fo[o<br>b]ar<p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left>[foo</div>bar]<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "[foo<br>bar]<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left>[foo</div>bar]<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "[foo<br>bar]<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left>[foo</div>bar]<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "[foo<br>bar]<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left>[foo</div>bar]<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "[foo<br>bar]<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left>fo[o</div>b]ar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "fo[o<br>b]ar<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left>fo[o</div>b]ar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "fo[o<br>b]ar<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left>fo[o</div>b]ar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "fo[o<br>b]ar<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left>fo[o</div>b]ar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "fo[o<br>b]ar<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<span style=text-align:left>[foo]</span><p>extra",
+ [["stylewithcss","true"],["justifyleft",""]],
+ "[foo]<p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<span style=text-align:left>[foo]</span><p>extra",
+ [["stylewithcss","false"],["justifyleft",""]],
+ "[foo]<p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<span style=text-align:left>f[o]o</span><p>extra",
+ [["stylewithcss","true"],["justifyleft",""]],
+ "f[o]o<p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<span style=text-align:left>f[o]o</span><p>extra",
+ [["stylewithcss","false"],["justifyleft",""]],
+ "f[o]o<p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "[foo<div style=\"text-align:left\" contenteditable=\"false\">bar</div>baz]<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "[foo<div style=\"text-align:left\" contenteditable=\"false\">bar</div>baz]<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "[foo<div style=\"text-align:left\" contenteditable=\"false\">bar</div>baz]<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "[foo<div style=\"text-align:left\" contenteditable=\"false\">bar</div>baz]<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div align=nonsense><p>[foo]</div><p>extra",
+ [["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<p>[foo]</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div align=nonsense><p>[foo]</div><p>extra",
+ [["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<p>[foo]</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:inherit><p>[foo]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<p>[foo]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:inherit><p>[foo]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<p>[foo]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:inherit><p>[foo]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<p>[foo]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:inherit><p>[foo]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<p>[foo]</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<quasit align=center><p>[foo]</p></quasit><p>extra",
+ [["justifyleft",""]],
+ "<quasit><p>[foo]</p></quasit><p>extra</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:start>[foo]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "[foo]<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:start>[foo]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "[foo]<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:start>[foo]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "[foo]<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:start>[foo]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "[foo]<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:end>[foo]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "[foo]<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div style=text-align:end>[foo]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyleft",""]],
+ "[foo]<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div style=text-align:end>[foo]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "[foo]<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div style=text-align:end>[foo]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyleft",""]],
+ "[foo]<p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div dir=rtl style=text-align:start>[foo]</div><p>extra",
+ [["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<div style=\"text-align:left\"><div dir=\"rtl\">[foo]</div></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div dir=rtl style=text-align:start>[foo]</div><p>extra",
+ [["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<div style=\"text-align:left\"><div dir=\"rtl\">[foo]</div></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,false,"right",false,true,"left"]}],
+["<div dir=rtl style=text-align:end>[foo]</div><p>extra",
+ [["defaultparagraphseparator","div"],["justifyleft",""]],
+ "<div style=\"text-align:left\"><div dir=\"rtl\">[foo]</div></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div dir=rtl style=text-align:end>[foo]</div><p>extra",
+ [["defaultparagraphseparator","p"],["justifyleft",""]],
+ "<div style=\"text-align:left\"><div dir=\"rtl\">[foo]</div></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left><p>foo</div> <p>[bar]",
+ [["justifyleft",""]],
+ "<div style=\"text-align:left\"><p>foo</p></div> <p>[bar]</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div align=left><p>foo</div> <p>[bar]",
+ [["justifyleft",""]],
+ "<div align=\"left\"><p>foo</p></div> <p>[bar]</p>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<p>[foo]</p> <div style=text-align:left><p>bar</div>",
+ [["justifyleft",""]],
+ "<p>[foo]</p> <div style=\"text-align:left\"><p>bar</p></div>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<p>[foo]</p> <div align=left><p>bar</div>",
+ [["justifyleft",""]],
+ "<p>[foo]</p> <div align=\"left\"><p>bar</p></div>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div style=text-align:left><p>foo</div> <p>[bar]</p> <div style=text-align:left><p>baz</div>",
+ [["justifyleft",""]],
+ "<div style=\"text-align:left\"><p>foo</p></div> <p>[bar]</p> <div style=\"text-align:left\"><p>baz</p></div>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}],
+["<div align=left><p>foo</div> <p>[bar]</p> <div align=left><p>baz</div>",
+ [["justifyleft",""]],
+ "<div align=\"left\"><p>foo</p></div> <p>[bar]</p> <div align=\"left\"><p>baz</p></div>",
+ [true],
+ {"justifyleft":[false,true,"left",false,true,"left"]}]
+]
diff --git a/testing/web-platform/tests/editing/data/justifyright.js b/testing/web-platform/tests/editing/data/justifyright.js
new file mode 100644
index 000000000..595f7376e
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/justifyright.js
@@ -0,0 +1,1167 @@
+var browserTests = [
+["foo[]bar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[]bar</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[]bar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[]bar</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[]bar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[]bar</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[]bar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[]bar</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<span>foo</span>{}<span>bar</span><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><span>foo</span>{}<span>bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<span>foo</span>{}<span>bar</span><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><span>foo</span>{}<span>bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<span>foo</span>{}<span>bar</span><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><span>foo</span>{}<span>bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<span>foo</span>{}<span>bar</span><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><span>foo</span>{}<span>bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<span>foo[</span><span>]bar</span><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><span>foo[</span><span>]bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<span>foo[</span><span>]bar</span><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><span>foo[</span><span>]bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<span>foo[</span><span>]bar</span><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><span>foo[</span><span>]bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<span>foo[</span><span>]bar</span><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><span>foo[</span><span>]bar</span></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[bar]baz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[bar]baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[bar]baz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[bar]baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[bar]baz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[bar]baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[bar]baz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[bar]baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[bar<b>baz]qoz</b>quz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[bar<b>baz]qoz</b>quz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[bar<b>baz]qoz</b>quz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[bar<b>baz]qoz</b>quz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[bar<b>baz]qoz</b>quz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[bar<b>baz]qoz</b>quz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[bar<b>baz]qoz</b>quz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[bar<b>baz]qoz</b>quz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p>foo[]bar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>foo[]bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p>foo[]bar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>foo[]bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p>foo[]bar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>foo[]bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p>foo[]bar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>foo[]bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p>foo[bar]baz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>foo[bar]baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p>foo[bar]baz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>foo[bar]baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p>foo[bar]baz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>foo[bar]baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p>foo[bar]baz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>foo[bar]baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<h1>foo[bar]baz</h1><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><h1>foo[bar]baz</h1></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<h1>foo[bar]baz</h1><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><h1>foo[bar]baz</h1></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<h1>foo[bar]baz</h1><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><h1>foo[bar]baz</h1></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<h1>foo[bar]baz</h1><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><h1>foo[bar]baz</h1></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<pre>foo[bar]baz</pre><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><pre>foo[bar]baz</pre></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<pre>foo[bar]baz</pre><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><pre>foo[bar]baz</pre></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<pre>foo[bar]baz</pre><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><pre>foo[bar]baz</pre></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<pre>foo[bar]baz</pre><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><pre>foo[bar]baz</pre></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<xmp>foo[bar]baz</xmp><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><xmp>foo[bar]baz</xmp></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<xmp>foo[bar]baz</xmp><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><xmp>foo[bar]baz</xmp></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<xmp>foo[bar]baz</xmp><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><xmp>foo[bar]baz</xmp></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<xmp>foo[bar]baz</xmp><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><xmp>foo[bar]baz</xmp></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<center><p>[foo]<p>bar</center><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<center><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"center",false,true,"right"]}],
+["<center><p>[foo]<p>bar</center><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<center><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"center",false,true,"right"]}],
+["<center><p>[foo]<p>bar</center><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<center><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"center",false,true,"right"]}],
+["<center><p>[foo]<p>bar</center><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<center><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></center><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"center",false,true,"right"]}],
+["<center><p>[foo<p>bar]</center><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"center",false,true,"right"]}],
+["<center><p>[foo<p>bar]</center><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"center",false,true,"right"]}],
+["<center><p>[foo<p>bar]</center><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"center",false,true,"right"]}],
+["<center><p>[foo<p>bar]</center><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"center",false,true,"right"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<table><tbody><tr><td>foo</td><td><div style=\"text-align:right\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<table><tbody><tr><td>foo</td><td><div style=\"text-align:right\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<table><tbody><tr><td>foo</td><td><div style=\"text-align:right\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<table><tbody><tr><td>foo</td><td><div style=\"text-align:right\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<table><tbody><tr><td>foo</td>{<td><div style=\"text-align:right\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<table><tbody><tr><td>foo</td>{<td><div style=\"text-align:right\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<table><tbody><tr><td>foo</td>{<td><div style=\"text-align:right\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<table><tbody><tr><td>foo</td>{<td><div style=\"text-align:right\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<table><tbody><tr>{<td><div style=\"text-align:right\">foo</div></td><td><div style=\"text-align:right\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<table><tbody><tr>{<td><div style=\"text-align:right\">foo</div></td><td><div style=\"text-align:right\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<table><tbody><tr>{<td><div style=\"text-align:right\">foo</div></td><td><div style=\"text-align:right\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<table><tbody><tr>{<td><div style=\"text-align:right\">foo</div></td><td><div style=\"text-align:right\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<table align=\"right\"><tbody><tr><td>foo</td><td><div style=\"text-align:right\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<table align=\"right\"><tbody><tr><td>foo</td><td><div style=\"text-align:right\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<table align=\"right\"><tbody><tr><td>foo</td><td><div style=\"text-align:right\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<table align=\"right\"><tbody><tr><td>foo</td><td><div style=\"text-align:right\">b[a]r</div></td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<table align=\"right\"><tbody><tr><td>foo</td>{<td><div style=\"text-align:right\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<table align=\"right\"><tbody><tr><td>foo</td>{<td><div style=\"text-align:right\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<table align=\"right\"><tbody><tr><td>foo</td>{<td><div style=\"text-align:right\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<table align=\"right\"><tbody><tr><td>foo</td>{<td><div style=\"text-align:right\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<table align=\"right\"><tbody><tr>{<td><div style=\"text-align:right\">foo</div></td><td><div style=\"text-align:right\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<table align=\"right\"><tbody><tr>{<td><div style=\"text-align:right\">foo</div></td><td><div style=\"text-align:right\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<table align=\"right\"><tbody><tr>{<td><div style=\"text-align:right\">foo</div></td><td><div style=\"text-align:right\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<table align=\"right\"><tbody><tr>{<td><div style=\"text-align:right\">foo</div></td><td><div style=\"text-align:right\">bar</div></td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table align=right data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["{<table align=right><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["{<table align=right><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["{<table align=right><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["{<table align=right><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<table><tbody align=right><tr><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["justifyright",""]],
+ "<table><tbody align=\"right\"><tr><td>foo</td><td>b[a]r</td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyright":[false,true,"right",false,true,"right"]}],
+["<table><tbody align=right><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyright",""]],
+ "<table><tbody align=\"right\"><tr><td>foo</td>{<td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyright":[false,true,"right",false,true,"right"]}],
+["<table><tbody align=right><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyright",""]],
+ "<table><tbody align=\"right\"><tr>{<td>foo</td><td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyright":[false,true,"right",false,true,"right"]}],
+["<table><tbody align=right data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<table><tbody align=right data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<table><tbody align=right data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<table><tbody align=right data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<table data-start=0 data-end=1><tbody align=right><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<table data-start=0 data-end=1><tbody align=right><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<table data-start=0 data-end=1><tbody align=right><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<table data-start=0 data-end=1><tbody align=right><tr><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,true,"right",false,true,"right"]}],
+["{<table><tbody align=right><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,true,"right",false,true,"right"]}],
+["{<table><tbody align=right><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,true,"right",false,true,"right"]}],
+["{<table><tbody align=right><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,true,"right",false,true,"right"]}],
+["{<table><tbody align=right><tr><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<table><tbody><tr align=right><td>foo<td>b[a]r<td>baz</table><p>extra",
+ [["justifyright",""]],
+ "<table><tbody><tr align=\"right\"><td>foo</td><td>b[a]r</td><td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyright":[false,true,"right",false,true,"right"]}],
+["<table><tbody><tr align=right data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyright",""]],
+ "<table><tbody><tr align=\"right\"><td>foo</td>{<td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyright":[false,true,"right",false,true,"right"]}],
+["<table><tbody><tr align=right data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra",
+ [["justifyright",""]],
+ "<table><tbody><tr align=\"right\">{<td>foo</td><td>bar</td>}<td>baz</td></tr></tbody></table><p>extra</p>",
+ [true],
+ {"justifyright":[false,true,"right",false,true,"right"]}],
+["<table><tbody data-start=0 data-end=1><tr align=right><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<table><tbody data-start=0 data-end=1><tr align=right><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<table><tbody data-start=0 data-end=1><tr align=right><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<table><tbody data-start=0 data-end=1><tr align=right><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table><tbody>{<tr><td>foo</td><td>bar</td><td>baz</td></tr>}</tbody></table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<table data-start=0 data-end=1><tbody><tr align=right><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<table data-start=0 data-end=1><tbody><tr align=right><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<table data-start=0 data-end=1><tbody><tr align=right><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<table data-start=0 data-end=1><tbody><tr align=right><td>foo<td>bar<td>baz</table><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><table>{<tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody>}</table></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,true,"right",false,true,"right"]}],
+["{<table><tr align=right><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,true,"right",false,true,"right"]}],
+["{<table><tr align=right><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,true,"right",false,true,"right"]}],
+["{<table><tr align=right><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,true,"right",false,true,"right"]}],
+["{<table><tr align=right><td>foo<td>bar<td>baz</table>}<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">{<table><tbody><tr><td>foo</td><td>bar</td><td>baz</td></tr></tbody></table>}</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<div align=center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div align=\"center\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"center",false,true,"right"]}],
+["<div align=center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div align=\"center\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"center",false,true,"right"]}],
+["<div align=center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div align=\"center\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"center",false,true,"right"]}],
+["<div align=center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div align=\"center\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"center",false,true,"right"]}],
+["<div align=center><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","true"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifyright":[false,false,"center",false,true,"right"]}],
+["<div align=center><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","false"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifyright":[false,false,"center",false,true,"right"]}],
+["<div style=text-align:center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:center\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"center",false,true,"right"]}],
+["<div style=text-align:center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:center\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"center",false,true,"right"]}],
+["<div style=text-align:center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:center\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"center",false,true,"right"]}],
+["<div style=text-align:center><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:center\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"center",false,true,"right"]}],
+["<div style=text-align:center><p>[foo<p>bar]</div><p>extra",
+ [["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true],
+ {"justifyright":[false,false,"center",false,true,"right"]}],
+["<div align=justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div align=\"justify\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"justify",false,true,"right"]}],
+["<div align=justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div align=\"justify\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"justify",false,true,"right"]}],
+["<div align=justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div align=\"justify\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"justify",false,true,"right"]}],
+["<div align=justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div align=\"justify\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"justify",false,true,"right"]}],
+["<div align=justify><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","true"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifyright":[false,false,"justify",false,true,"right"]}],
+["<div align=justify><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","false"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifyright":[false,false,"justify",false,true,"right"]}],
+["<div style=text-align:justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:justify\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"justify",false,true,"right"]}],
+["<div style=text-align:justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:justify\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"justify",false,true,"right"]}],
+["<div style=text-align:justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:justify\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"justify",false,true,"right"]}],
+["<div style=text-align:justify><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:justify\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"justify",false,true,"right"]}],
+["<div style=text-align:justify><p>[foo<p>bar]</div><p>extra",
+ [["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true],
+ {"justifyright":[false,false,"justify",false,true,"right"]}],
+["<div align=left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div align=\"left\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div align=left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div align=\"left\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div align=left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div align=\"left\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div align=left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div align=\"left\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div align=left><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","true"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div align=left><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","false"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:left\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:left\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:left\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:left><p>[foo]<p>bar</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:left\"><div style=\"text-align:right\"><p>[foo]</p></div><p>bar</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:left><p>[foo<p>bar]</div><p>extra",
+ [["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true],
+ {"justifyright":[false,false,"left",false,true,"right"]}],
+["<div align=right><p>[foo]<p>bar</div><p>extra",
+ [["justifyright",""]],
+ "<div align=\"right\"><p>[foo]</p><p>bar</p></div><p>extra</p>",
+ [true],
+ {"justifyright":[false,true,"right",false,true,"right"]}],
+["<div align=right><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","true"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifyright":[false,true,"right",false,true,"right"]}],
+["<div align=right><p>[foo<p>bar}</div><p>extra",
+ [["stylewithcss","false"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo</p><p>bar}</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifyright":[false,true,"right",false,true,"right"]}],
+["<div style=text-align:right><p>[foo]<p>bar</div><p>extra",
+ [["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo]</p><p>bar</p></div><p>extra</p>",
+ [true],
+ {"justifyright":[false,true,"right",false,true,"right"]}],
+["<div style=text-align:right><p>[foo<p>bar]</div><p>extra",
+ [["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo</p><p>bar]</p></div><p>extra</p>",
+ [true],
+ {"justifyright":[false,true,"right",false,true,"right"]}],
+["<div align=right>foo</div>[bar]<p>extra",
+ [["justifyright",""]],
+ "<div align=\"right\">foo<br>[bar]</div><p>extra</p>",
+ [true],
+ {"justifyright":[false,false,"left",false,true,"right"]}],
+["[foo]<div align=right>bar</div><p>extra",
+ [["justifyright",""]],
+ "<div align=\"right\">[foo]<br>bar</div><p>extra</p>",
+ [true],
+ {"justifyright":[false,false,"left",false,true,"right"]}],
+["<div align=right>foo</div>[bar]<div align=right>baz</div><p>extra",
+ [["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div align=\"right\">foo<br>[bar]<br>baz</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div align=right>foo</div>[bar]<div align=right>baz</div><p>extra",
+ [["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div align=\"right\">foo<br>[bar]<br>baz</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div align=right><p>foo</div><p>[bar]<p>extra",
+ [["justifyright",""]],
+ "<div align=\"right\"><p>foo</p><p>[bar]</p></div><p>extra</p>",
+ [true],
+ {"justifyright":[false,false,"left",false,true,"right"]}],
+["<p>[foo]<div align=right><p>bar</div><p>extra",
+ [["justifyright",""]],
+ "<div align=\"right\"><p>[foo]</p><p>bar</p></div><p>extra</p>",
+ [true],
+ {"justifyright":[false,false,"left",false,true,"right"]}],
+["<div align=right><p>foo</div><p>[bar]<div align=right><p>baz</div><p>extra",
+ [["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div align=\"right\"><p>foo</p><p>[bar]</p><p>baz</p></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div align=right><p>foo</div><p>[bar]<div align=right><p>baz</div><p>extra",
+ [["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div align=\"right\"><p>foo</p><p>[bar]</p><p>baz</p></div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:right>foo</div>[bar]<p>extra",
+ [["justifyright",""]],
+ "<div style=\"text-align:right\">foo<br>[bar]</div><p>extra</p>",
+ [true],
+ {"justifyright":[false,false,"left",false,true,"right"]}],
+["[foo]<div style=text-align:right>bar</div><p>extra",
+ [["justifyright",""]],
+ "<div style=\"text-align:right\">[foo]<br>bar</div><p>extra</p>",
+ [true],
+ {"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:right>foo</div>[bar]<div style=text-align:right>baz</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo<br>[bar]<br>baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:right>foo</div>[bar]<div style=text-align:right>baz</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo<br>[bar]<br>baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:right>foo</div>[bar]<div style=text-align:right>baz</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo<br>[bar]<br>baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:right>foo</div>[bar]<div style=text-align:right>baz</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo<br>[bar]<br>baz</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:right><p>foo</div><p>[bar]<p>extra",
+ [["justifyright",""]],
+ "<div style=\"text-align:right\"><p>foo</p><p>[bar]</p></div><p>extra</p>",
+ [true],
+ {"justifyright":[false,false,"left",false,true,"right"]}],
+["<p>[foo]<div style=text-align:right><p>bar</div><p>extra",
+ [["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo]</p><p>bar</p></div><p>extra</p>",
+ [true],
+ {"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:right><p>foo</div><p>[bar]<div style=text-align:right><p>baz</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>foo</p><p>[bar]</p><p>baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:right><p>foo</div><p>[bar]<div style=text-align:right><p>baz</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>foo</p><p>[bar]</p><p>baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:right><p>foo</div><p>[bar]<div style=text-align:right><p>baz</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>foo</p><p>[bar]</p><p>baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:right><p>foo</div><p>[bar]<div style=text-align:right><p>baz</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>foo</p><p>[bar]</p><p>baz</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p align=right>foo<p>[bar]<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<p align=\"right\">foo</p><div style=\"text-align:right\"><p>[bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p align=right>foo<p>[bar]<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<p align=\"right\">foo</p><div style=\"text-align:right\"><p>[bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p align=right>foo<p>[bar]<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<p align=\"right\">foo</p><div style=\"text-align:right\"><p>[bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p align=right>foo<p>[bar]<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<p align=\"right\">foo</p><div style=\"text-align:right\"><p>[bar]</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p>[foo]<p align=right>bar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo]</p></div><p align=\"right\">bar</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p>[foo]<p align=right>bar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo]</p></div><p align=\"right\">bar</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p>[foo]<p align=right>bar<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo]</p></div><p align=\"right\">bar</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p>[foo]<p align=right>bar<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo]</p></div><p align=\"right\">bar</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p align=right>foo<p>[bar]<p align=right>baz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<p align=\"right\">foo</p><div style=\"text-align:right\"><p>[bar]</p></div><p align=\"right\">baz</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p align=right>foo<p>[bar]<p align=right>baz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<p align=\"right\">foo</p><div style=\"text-align:right\"><p>[bar]</p></div><p align=\"right\">baz</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p align=right>foo<p>[bar]<p align=right>baz<p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<p align=\"right\">foo</p><div style=\"text-align:right\"><p>[bar]</p></div><p align=\"right\">baz</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<p align=right>foo<p>[bar]<p align=right>baz<p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<p align=\"right\">foo</p><div style=\"text-align:right\"><p>[bar]</p></div><p align=\"right\">baz</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div align=right>[foo</div>bar]<p>extra",
+ [["stylewithcss","true"],["justifyright",""]],
+ "<div style=\"text-align:right\">[foo<br>bar]</div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifyright":[true,false,"right",false,true,"right"]}],
+["<div align=right>[foo</div>bar]<p>extra",
+ [["stylewithcss","false"],["justifyright",""]],
+ "<div style=\"text-align:right\">[foo<br>bar]</div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifyright":[true,false,"right",false,true,"right"]}],
+["<div align=right>fo[o</div>b]ar<p>extra",
+ [["stylewithcss","true"],["justifyright",""]],
+ "<div style=\"text-align:right\">fo[o<br>b]ar</div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifyright":[true,false,"right",false,true,"right"]}],
+["<div align=right>fo[o</div>b]ar<p>extra",
+ [["stylewithcss","false"],["justifyright",""]],
+ "<div style=\"text-align:right\">fo[o<br>b]ar</div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifyright":[true,false,"right",false,true,"right"]}],
+["<div style=text-align:right>[foo</div>bar]<p>extra",
+ [["justifyright",""]],
+ "<div style=\"text-align:right\">[foo<br>bar]</div><p>extra</p>",
+ [true],
+ {"justifyright":[true,false,"right",false,true,"right"]}],
+["<div style=text-align:right>fo[o</div>b]ar<p>extra",
+ [["justifyright",""]],
+ "<div style=\"text-align:right\">fo[o<br>b]ar</div><p>extra</p>",
+ [true],
+ {"justifyright":[true,false,"right",false,true,"right"]}],
+["<span style=text-align:right>[foo]</span><p>extra",
+ [["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">[foo]</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<span style=text-align:right>[foo]</span><p>extra",
+ [["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">[foo]</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<span style=text-align:right>f[o]o</span><p>extra",
+ [["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">f[o]o</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<span style=text-align:right>f[o]o</span><p>extra",
+ [["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">f[o]o</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">[foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:right\">baz]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\">[foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:right\">baz]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">[foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:right\">baz]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\">[foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:right\">baz]</div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,true,"right",false,true,"right"]}],
+["<div align=nonsense><p>[foo]</div><p>extra",
+ [["stylewithcss","true"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo]</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div align=nonsense><p>[foo]</div><p>extra",
+ [["stylewithcss","false"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo]</p></div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:inherit><p>[foo]</div><p>extra",
+ [["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo]</p></div><p>extra</p>",
+ [true],
+ {"justifyright":[false,false,"left",false,true,"right"]}],
+["<quasit align=center><p>[foo]</p></quasit><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><quasit><p>[foo]</p></quasit></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<quasit align=center><p>[foo]</p></quasit><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><quasit><p>[foo]</p></quasit></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<quasit align=center><p>[foo]</p></quasit><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><quasit><p>[foo]</p></quasit></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<quasit align=center><p>[foo]</p></quasit><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><quasit><p>[foo]</p></quasit></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:start>[foo]</div><p>extra",
+ [["justifyright",""]],
+ "<div style=\"text-align:right\">[foo]</div><p>extra</p>",
+ [true],
+ {"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:end>[foo]</div><p>extra",
+ [["justifyright",""]],
+ "<div style=\"text-align:right\">[foo]</div><p>extra</p>",
+ [true],
+ {"justifyright":[false,true,"right",false,true,"right"]}],
+["<div dir=rtl style=text-align:start>[foo]</div><p>extra",
+ [["stylewithcss","true"],["justifyright",""]],
+ "<div dir=\"rtl\">[foo]</div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifyright":[false,true,"right",false,true,"right"]}],
+["<div dir=rtl style=text-align:start>[foo]</div><p>extra",
+ [["stylewithcss","false"],["justifyright",""]],
+ "<div dir=\"rtl\">[foo]</div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifyright":[false,true,"right",false,true,"right"]}],
+["<div dir=rtl style=text-align:end>[foo]</div><p>extra",
+ [["stylewithcss","true"],["justifyright",""]],
+ "<div dir=\"rtl\">[foo]</div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div dir=rtl style=text-align:end>[foo]</div><p>extra",
+ [["stylewithcss","false"],["justifyright",""]],
+ "<div dir=\"rtl\">[foo]</div><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:right><p>foo</div> <p>[bar]",
+ [["justifyright",""]],
+ "<div style=\"text-align:right\"><p>foo</p> <p>[bar]</p></div>",
+ [true],
+ {"justifyright":[false,false,"left",false,true,"right"]}],
+["<div align=right><p>foo</div> <p>[bar]",
+ [["justifyright",""]],
+ "<div align=\"right\"><p>foo</p> <p>[bar]</p></div>",
+ [true],
+ {"justifyright":[false,false,"left",false,true,"right"]}],
+["<p>[foo]</p> <div style=text-align:right><p>bar</div>",
+ [["justifyright",""]],
+ "<div style=\"text-align:right\"><p>[foo]</p> <p>bar</p></div>",
+ [true],
+ {"justifyright":[false,false,"left",false,true,"right"]}],
+["<p>[foo]</p> <div align=right><p>bar</div>",
+ [["justifyright",""]],
+ "<div align=\"right\"><p>[foo]</p> <p>bar</p></div>",
+ [true],
+ {"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>foo</p> <p>[bar]</p> <p>baz</p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>foo</p> <p>[bar]</p> <p>baz</p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>foo</p> <p>[bar]</p> <p>baz</p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div style=\"text-align:right\"><p>foo</p> <p>[bar]</p> <p>baz</p></div>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>",
+ [["defaultparagraphseparator","div"],["justifyright",""]],
+ "<div align=\"right\"><p>foo</p> <p>[bar]</p> <p>baz</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"justifyright":[false,false,"left",false,true,"right"]}],
+["<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>",
+ [["defaultparagraphseparator","p"],["justifyright",""]],
+ "<div align=\"right\"><p>foo</p> <p>[bar]</p> <p>baz</p></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"justifyright":[false,false,"left",false,true,"right"]}]
+]
diff --git a/testing/web-platform/tests/editing/data/misc.js b/testing/web-platform/tests/editing/data/misc.js
new file mode 100644
index 000000000..490b59537
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/misc.js
@@ -0,0 +1,237 @@
+var browserTests = [
+["foo[bar]baz",
+ [["defaultparagraphseparator",""]],
+ "foo[bar]baz",
+ [false],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"div"]}],
+["foo[bar]baz",
+ [["defaultparagraphseparator","div"]],
+ "foo[bar]baz",
+ [true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"]}],
+["foo[bar]baz",
+ [["defaultparagraphseparator","p"]],
+ "foo[bar]baz",
+ [true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"]}],
+["foo[bar]baz",
+ [["defaultparagraphseparator","DIV"]],
+ "foo[bar]baz",
+ [true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"]}],
+["foo[bar]baz",
+ [["defaultparagraphseparator","P"]],
+ "foo[bar]baz",
+ [true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"]}],
+["foo[bar]baz",
+ [["defaultparagraphseparator"," div "]],
+ "foo[bar]baz",
+ [false],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"]}],
+["foo[bar]baz",
+ [["defaultparagraphseparator"," p "]],
+ "foo[bar]baz",
+ [false],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"]}],
+["foo[bar]baz",
+ [["defaultparagraphseparator","<div>"]],
+ "foo[bar]baz",
+ [false],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"]}],
+["foo[bar]baz",
+ [["defaultparagraphseparator","<p>"]],
+ "foo[bar]baz",
+ [false],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"]}],
+["foo[bar]baz",
+ [["defaultparagraphseparator","li"]],
+ "foo[bar]baz",
+ [false],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"]}],
+["foo[bar]baz",
+ [["defaultparagraphseparator","blockquote"]],
+ "foo[bar]baz",
+ [false],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"]}],
+["foo[bar]baz",
+ [["selectall",""]],
+ "foo[bar]baz",
+ [true],
+ {"selectall":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["stylewithcss","true"]],
+ "foo[bar]baz",
+ [true],
+ {"stylewithcss":[false,false,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","TRUE"]],
+ "foo[bar]baz",
+ [true],
+ {"stylewithcss":[false,true,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","TrUe"]],
+ "foo[bar]baz",
+ [true],
+ {"stylewithcss":[false,true,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","true "]],
+ "foo[bar]baz",
+ [true],
+ {"stylewithcss":[false,true,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss"," true"]],
+ "foo[bar]baz",
+ [true],
+ {"stylewithcss":[false,true,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","truer"]],
+ "foo[bar]baz",
+ [true],
+ {"stylewithcss":[false,true,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss"," true "]],
+ "foo[bar]baz",
+ [true],
+ {"stylewithcss":[false,true,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss"," TrUe"]],
+ "foo[bar]baz",
+ [true],
+ {"stylewithcss":[false,true,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss",""]],
+ "foo[bar]baz",
+ [true],
+ {"stylewithcss":[false,true,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss"," "]],
+ "foo[bar]baz",
+ [true],
+ {"stylewithcss":[false,true,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","false"]],
+ "foo[bar]baz",
+ [true],
+ {"stylewithcss":[false,true,"",false,false,""]}],
+["foo[bar]baz",
+ [["stylewithcss","FALSE"]],
+ "foo[bar]baz",
+ [true],
+ {"stylewithcss":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["stylewithcss","FaLsE"]],
+ "foo[bar]baz",
+ [true],
+ {"stylewithcss":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["stylewithcss"," false"]],
+ "foo[bar]baz",
+ [true],
+ {"stylewithcss":[false,false,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","false "]],
+ "foo[bar]baz",
+ [true],
+ {"stylewithcss":[false,true,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","falser"]],
+ "foo[bar]baz",
+ [true],
+ {"stylewithcss":[false,true,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","falsé"]],
+ "foo[bar]baz",
+ [true],
+ {"stylewithcss":[false,true,"",false,true,""]}],
+["foo[bar]baz",
+ [["usecss","true"]],
+ "foo[bar]baz",
+ [true],
+ {"usecss":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["usecss","TRUE"]],
+ "foo[bar]baz",
+ [true],
+ {"usecss":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["usecss","TrUe"]],
+ "foo[bar]baz",
+ [true],
+ {"usecss":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["usecss","true "]],
+ "foo[bar]baz",
+ [true],
+ {"usecss":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["usecss"," true"]],
+ "foo[bar]baz",
+ [true],
+ {"usecss":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["usecss","truer"]],
+ "foo[bar]baz",
+ [true],
+ {"usecss":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["usecss"," true "]],
+ "foo[bar]baz",
+ [true],
+ {"usecss":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["usecss"," TrUe"]],
+ "foo[bar]baz",
+ [true],
+ {"usecss":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["usecss",""]],
+ "foo[bar]baz",
+ [true],
+ {"usecss":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["usecss"," "]],
+ "foo[bar]baz",
+ [true],
+ {"usecss":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["usecss","false"]],
+ "foo[bar]baz",
+ [true],
+ {"usecss":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["usecss","FALSE"]],
+ "foo[bar]baz",
+ [true],
+ {"usecss":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["usecss","FaLsE"]],
+ "foo[bar]baz",
+ [true],
+ {"usecss":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["usecss"," false"]],
+ "foo[bar]baz",
+ [true],
+ {"usecss":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["usecss","false "]],
+ "foo[bar]baz",
+ [true],
+ {"usecss":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["usecss","falser"]],
+ "foo[bar]baz",
+ [true],
+ {"usecss":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["usecss","falsé"]],
+ "foo[bar]baz",
+ [true],
+ {"usecss":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["quasit",""]],
+ "foo[bar]baz",
+ [false],
+ {"quasit":[false,false,"",false,false,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/multitest.js b/testing/web-platform/tests/editing/data/multitest.js
new file mode 100644
index 000000000..caab22778
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/multitest.js
@@ -0,0 +1,2417 @@
+var browserTests = [
+["foo[]bar",
+ [["bold",""],["inserttext","a"]],
+ "foo<b>a[]</b>bar",
+ [true,true],
+ {"bold":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["delete",""]],
+ "fo[]bar",
+ [true,true],
+ {"bold":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["delete",""],["inserttext","a"]],
+ "fo<b>a[]</b>bar",
+ [true,true,true],
+ {"bold":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["formatblock","<div>"]],
+ "<div>foo[]bar</div>",
+ [true,true],
+ {"bold":[false,false,"",false,true,""],"formatblock":[false,false,"",false,false,"div"]}],
+["foo[]bar",
+ [["bold",""],["formatblock","<div>"],["inserttext","a"]],
+ "<div>foo<b>a[]</b>bar</div>",
+ [true,true,true],
+ {"bold":[false,false,"",false,true,""],"formatblock":[false,false,"",false,false,"div"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["forwarddelete",""]],
+ "foo[]ar",
+ [true,true],
+ {"bold":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["forwarddelete",""],["inserttext","a"]],
+ "foo<b>a[]</b>ar",
+ [true,true,true],
+ {"bold":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["indent",""]],
+ "<blockquote>foo[]bar</blockquote>",
+ [true,true],
+ {"bold":[false,false,"",false,true,""],"indent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["indent",""],["inserttext","a"]],
+ "<blockquote>foo<b>a[]</b>bar</blockquote>",
+ [true,true,true],
+ {"bold":[false,false,"",false,true,""],"indent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["inserthorizontalrule",""]],
+ "foo<hr>{}bar",
+ [true,true],
+ {"bold":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["inserthorizontalrule",""],["inserttext","a"]],
+ "foo<hr><b>a[]</b>bar",
+ [true,true,true],
+ {"bold":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}bar",
+ [true,true],
+ {"bold":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
+ "fooab<b>c</b>d<b>a[]</b>bar",
+ [true,true,true],
+ {"bold":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar",
+ [true,true],
+ {"bold":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["insertimage","/img/lion.svg"],["inserttext","a"]],
+ "foo<img src=\"/img/lion.svg\"><b>a[]</b>bar",
+ [true,true,true],
+ {"bold":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["insertlinebreak",""]],
+ "foo<br>{}bar",
+ [true,true],
+ {"bold":[false,false,"",false,true,""],"insertlinebreak":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["insertlinebreak",""],["inserttext","a"]],
+ "foo<br><b>a[]</b>bar",
+ [true,true,true],
+ {"bold":[false,false,"",false,true,""],"insertlinebreak":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["insertorderedlist",""]],
+ "<ol><li>foo[]bar</li></ol>",
+ [true,true],
+ {"bold":[false,false,"",false,true,""],"insertorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["bold",""],["insertorderedlist",""],["inserttext","a"]],
+ "<ol><li>foo<b>a[]</b>bar</li></ol>",
+ [true,true,true],
+ {"bold":[false,false,"",false,true,""],"insertorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["insertparagraph",""]],
+ "<p>foo</p><p>{}bar</p>",
+ [true,true],
+ {"bold":[false,false,"",false,true,""],"insertparagraph":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["insertparagraph",""],["inserttext","a"]],
+ "<p>foo</p><p><b>a[]</b>bar</p>",
+ [true,true,true],
+ {"bold":[false,false,"",false,true,""],"insertparagraph":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["insertunorderedlist",""]],
+ "<ul><li>foo[]bar</li></ul>",
+ [true,true],
+ {"bold":[false,false,"",false,true,""],"insertunorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["bold",""],["insertunorderedlist",""],["inserttext","a"]],
+ "<ul><li>foo<b>a[]</b>bar</li></ul>",
+ [true,true,true],
+ {"bold":[false,false,"",false,true,""],"insertunorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[]bar</div>",
+ [true,true],
+ {"bold":[false,false,"",false,true,""],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[]bar",
+ [["bold",""],["justifycenter",""],["inserttext","a"]],
+ "<div style=\"text-align:center\">foo<b>a[]</b>bar</div>",
+ [true,true,true],
+ {"bold":[false,false,"",false,true,""],"justifycenter":[false,false,"left",false,true,"center"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[]bar</div>",
+ [true,true],
+ {"bold":[false,false,"",false,true,""],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[]bar",
+ [["bold",""],["justifyfull",""],["inserttext","a"]],
+ "<div style=\"text-align:justify\">foo<b>a[]</b>bar</div>",
+ [true,true,true],
+ {"bold":[false,false,"",false,true,""],"justifyfull":[false,false,"left",false,true,"justify"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["justifyleft",""]],
+ "foo[]bar",
+ [true,true],
+ {"bold":[false,false,"",false,true,""],"justifyleft":[false,true,"left",false,true,"left"]}],
+["foo[]bar",
+ [["bold",""],["justifyleft",""],["inserttext","a"]],
+ "foo<b>a[]</b>bar",
+ [true,true,true],
+ {"bold":[false,false,"",false,true,""],"justifyleft":[false,true,"left",false,true,"left"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[]bar</div>",
+ [true,true],
+ {"bold":[false,false,"",false,true,""],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[]bar",
+ [["bold",""],["justifyright",""],["inserttext","a"]],
+ "<div style=\"text-align:right\">foo<b>a[]</b>bar</div>",
+ [true,true,true],
+ {"bold":[false,false,"",false,true,""],"justifyright":[false,false,"left",false,true,"right"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["outdent",""]],
+ "foo[]bar",
+ [true,true],
+ {"bold":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["bold",""],["outdent",""],["inserttext","a"]],
+ "foo<b>a[]</b>bar",
+ [true,true,true],
+ {"bold":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["inserttext","a"]],
+ "foo<i>a[]</i>bar",
+ [true,true],
+ {"italic":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["delete",""]],
+ "fo[]bar",
+ [true,true],
+ {"italic":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["delete",""],["inserttext","a"]],
+ "fo<i>a[]</i>bar",
+ [true,true,true],
+ {"italic":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["formatblock","<div>"]],
+ "<div>foo[]bar</div>",
+ [true,true],
+ {"italic":[false,false,"",false,true,""],"formatblock":[false,false,"",false,false,"div"]}],
+["foo[]bar",
+ [["italic",""],["formatblock","<div>"],["inserttext","a"]],
+ "<div>foo<i>a[]</i>bar</div>",
+ [true,true,true],
+ {"italic":[false,false,"",false,true,""],"formatblock":[false,false,"",false,false,"div"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["forwarddelete",""]],
+ "foo[]ar",
+ [true,true],
+ {"italic":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["forwarddelete",""],["inserttext","a"]],
+ "foo<i>a[]</i>ar",
+ [true,true,true],
+ {"italic":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["indent",""]],
+ "<blockquote>foo[]bar</blockquote>",
+ [true,true],
+ {"italic":[false,false,"",false,true,""],"indent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["indent",""],["inserttext","a"]],
+ "<blockquote>foo<i>a[]</i>bar</blockquote>",
+ [true,true,true],
+ {"italic":[false,false,"",false,true,""],"indent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["inserthorizontalrule",""]],
+ "foo<hr>{}bar",
+ [true,true],
+ {"italic":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["inserthorizontalrule",""],["inserttext","a"]],
+ "foo<hr><i>a[]</i>bar",
+ [true,true,true],
+ {"italic":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}bar",
+ [true,true],
+ {"italic":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
+ "fooab<b>c</b>d<i>a[]</i>bar",
+ [true,true,true],
+ {"italic":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar",
+ [true,true],
+ {"italic":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["insertimage","/img/lion.svg"],["inserttext","a"]],
+ "foo<img src=\"/img/lion.svg\"><i>a[]</i>bar",
+ [true,true,true],
+ {"italic":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["insertlinebreak",""]],
+ "foo<br>{}bar",
+ [true,true],
+ {"italic":[false,false,"",false,true,""],"insertlinebreak":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["insertlinebreak",""],["inserttext","a"]],
+ "foo<br><i>a[]</i>bar",
+ [true,true,true],
+ {"italic":[false,false,"",false,true,""],"insertlinebreak":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["insertorderedlist",""]],
+ "<ol><li>foo[]bar</li></ol>",
+ [true,true],
+ {"italic":[false,false,"",false,true,""],"insertorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["italic",""],["insertorderedlist",""],["inserttext","a"]],
+ "<ol><li>foo<i>a[]</i>bar</li></ol>",
+ [true,true,true],
+ {"italic":[false,false,"",false,true,""],"insertorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["insertparagraph",""]],
+ "<p>foo</p><p>{}bar</p>",
+ [true,true],
+ {"italic":[false,false,"",false,true,""],"insertparagraph":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["insertparagraph",""],["inserttext","a"]],
+ "<p>foo</p><p><i>a[]</i>bar</p>",
+ [true,true,true],
+ {"italic":[false,false,"",false,true,""],"insertparagraph":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["insertunorderedlist",""]],
+ "<ul><li>foo[]bar</li></ul>",
+ [true,true],
+ {"italic":[false,false,"",false,true,""],"insertunorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["italic",""],["insertunorderedlist",""],["inserttext","a"]],
+ "<ul><li>foo<i>a[]</i>bar</li></ul>",
+ [true,true,true],
+ {"italic":[false,false,"",false,true,""],"insertunorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[]bar</div>",
+ [true,true],
+ {"italic":[false,false,"",false,true,""],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[]bar",
+ [["italic",""],["justifycenter",""],["inserttext","a"]],
+ "<div style=\"text-align:center\">foo<i>a[]</i>bar</div>",
+ [true,true,true],
+ {"italic":[false,false,"",false,true,""],"justifycenter":[false,false,"left",false,true,"center"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[]bar</div>",
+ [true,true],
+ {"italic":[false,false,"",false,true,""],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[]bar",
+ [["italic",""],["justifyfull",""],["inserttext","a"]],
+ "<div style=\"text-align:justify\">foo<i>a[]</i>bar</div>",
+ [true,true,true],
+ {"italic":[false,false,"",false,true,""],"justifyfull":[false,false,"left",false,true,"justify"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["justifyleft",""]],
+ "foo[]bar",
+ [true,true],
+ {"italic":[false,false,"",false,true,""],"justifyleft":[false,true,"left",false,true,"left"]}],
+["foo[]bar",
+ [["italic",""],["justifyleft",""],["inserttext","a"]],
+ "foo<i>a[]</i>bar",
+ [true,true,true],
+ {"italic":[false,false,"",false,true,""],"justifyleft":[false,true,"left",false,true,"left"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[]bar</div>",
+ [true,true],
+ {"italic":[false,false,"",false,true,""],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[]bar",
+ [["italic",""],["justifyright",""],["inserttext","a"]],
+ "<div style=\"text-align:right\">foo<i>a[]</i>bar</div>",
+ [true,true,true],
+ {"italic":[false,false,"",false,true,""],"justifyright":[false,false,"left",false,true,"right"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["outdent",""]],
+ "foo[]bar",
+ [true,true],
+ {"italic":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["italic",""],["outdent",""],["inserttext","a"]],
+ "foo<i>a[]</i>bar",
+ [true,true,true],
+ {"italic":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["inserttext","a"]],
+ "foo<s>a[]</s>bar",
+ [true,true],
+ {"strikethrough":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["delete",""]],
+ "fo[]bar",
+ [true,true],
+ {"strikethrough":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["delete",""],["inserttext","a"]],
+ "fo<s>a[]</s>bar",
+ [true,true,true],
+ {"strikethrough":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["formatblock","<div>"]],
+ "<div>foo[]bar</div>",
+ [true,true],
+ {"strikethrough":[false,false,"",false,true,""],"formatblock":[false,false,"",false,false,"div"]}],
+["foo[]bar",
+ [["strikethrough",""],["formatblock","<div>"],["inserttext","a"]],
+ "<div>foo<s>a[]</s>bar</div>",
+ [true,true,true],
+ {"strikethrough":[false,false,"",false,true,""],"formatblock":[false,false,"",false,false,"div"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["forwarddelete",""]],
+ "foo[]ar",
+ [true,true],
+ {"strikethrough":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["forwarddelete",""],["inserttext","a"]],
+ "foo<s>a[]</s>ar",
+ [true,true,true],
+ {"strikethrough":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["indent",""]],
+ "<blockquote>foo[]bar</blockquote>",
+ [true,true],
+ {"strikethrough":[false,false,"",false,true,""],"indent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["indent",""],["inserttext","a"]],
+ "<blockquote>foo<s>a[]</s>bar</blockquote>",
+ [true,true,true],
+ {"strikethrough":[false,false,"",false,true,""],"indent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["inserthorizontalrule",""]],
+ "foo<hr>{}bar",
+ [true,true],
+ {"strikethrough":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["inserthorizontalrule",""],["inserttext","a"]],
+ "foo<hr><s>a[]</s>bar",
+ [true,true,true],
+ {"strikethrough":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}bar",
+ [true,true],
+ {"strikethrough":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
+ "fooab<b>c</b>d<s>a[]</s>bar",
+ [true,true,true],
+ {"strikethrough":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar",
+ [true,true],
+ {"strikethrough":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["insertimage","/img/lion.svg"],["inserttext","a"]],
+ "foo<img src=\"/img/lion.svg\"><s>a[]</s>bar",
+ [true,true,true],
+ {"strikethrough":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["insertlinebreak",""]],
+ "foo<br>{}bar",
+ [true,true],
+ {"strikethrough":[false,false,"",false,true,""],"insertlinebreak":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["insertlinebreak",""],["inserttext","a"]],
+ "foo<br><s>a[]</s>bar",
+ [true,true,true],
+ {"strikethrough":[false,false,"",false,true,""],"insertlinebreak":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["insertorderedlist",""]],
+ "<ol><li>foo[]bar</li></ol>",
+ [true,true],
+ {"strikethrough":[false,false,"",false,true,""],"insertorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["strikethrough",""],["insertorderedlist",""],["inserttext","a"]],
+ "<ol><li>foo<s>a[]</s>bar</li></ol>",
+ [true,true,true],
+ {"strikethrough":[false,false,"",false,true,""],"insertorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["insertparagraph",""]],
+ "<p>foo</p><p>{}bar</p>",
+ [true,true],
+ {"strikethrough":[false,false,"",false,true,""],"insertparagraph":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["insertparagraph",""],["inserttext","a"]],
+ "<p>foo</p><p><s>a[]</s>bar</p>",
+ [true,true,true],
+ {"strikethrough":[false,false,"",false,true,""],"insertparagraph":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["insertunorderedlist",""]],
+ "<ul><li>foo[]bar</li></ul>",
+ [true,true],
+ {"strikethrough":[false,false,"",false,true,""],"insertunorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["strikethrough",""],["insertunorderedlist",""],["inserttext","a"]],
+ "<ul><li>foo<s>a[]</s>bar</li></ul>",
+ [true,true,true],
+ {"strikethrough":[false,false,"",false,true,""],"insertunorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[]bar</div>",
+ [true,true],
+ {"strikethrough":[false,false,"",false,true,""],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[]bar",
+ [["strikethrough",""],["justifycenter",""],["inserttext","a"]],
+ "<div style=\"text-align:center\">foo<s>a[]</s>bar</div>",
+ [true,true,true],
+ {"strikethrough":[false,false,"",false,true,""],"justifycenter":[false,false,"left",false,true,"center"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[]bar</div>",
+ [true,true],
+ {"strikethrough":[false,false,"",false,true,""],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[]bar",
+ [["strikethrough",""],["justifyfull",""],["inserttext","a"]],
+ "<div style=\"text-align:justify\">foo<s>a[]</s>bar</div>",
+ [true,true,true],
+ {"strikethrough":[false,false,"",false,true,""],"justifyfull":[false,false,"left",false,true,"justify"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["justifyleft",""]],
+ "foo[]bar",
+ [true,true],
+ {"strikethrough":[false,false,"",false,true,""],"justifyleft":[false,true,"left",false,true,"left"]}],
+["foo[]bar",
+ [["strikethrough",""],["justifyleft",""],["inserttext","a"]],
+ "foo<s>a[]</s>bar",
+ [true,true,true],
+ {"strikethrough":[false,false,"",false,true,""],"justifyleft":[false,true,"left",false,true,"left"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[]bar</div>",
+ [true,true],
+ {"strikethrough":[false,false,"",false,true,""],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[]bar",
+ [["strikethrough",""],["justifyright",""],["inserttext","a"]],
+ "<div style=\"text-align:right\">foo<s>a[]</s>bar</div>",
+ [true,true,true],
+ {"strikethrough":[false,false,"",false,true,""],"justifyright":[false,false,"left",false,true,"right"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["outdent",""]],
+ "foo[]bar",
+ [true,true],
+ {"strikethrough":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["strikethrough",""],["outdent",""],["inserttext","a"]],
+ "foo<s>a[]</s>bar",
+ [true,true,true],
+ {"strikethrough":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["inserttext","a"]],
+ "foo<sub>a[]</sub>bar",
+ [true,true],
+ {"subscript":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["delete",""]],
+ "fo[]bar",
+ [true,true],
+ {"subscript":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["delete",""],["inserttext","a"]],
+ "fo<sub><font size=\"3\">a[]</font></sub>bar",
+ [true,true,true],
+ {"subscript":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["formatblock","<div>"]],
+ "<div>foo[]bar</div>",
+ [true,true],
+ {"subscript":[false,false,"",false,true,""],"formatblock":[false,false,"",false,false,"div"]}],
+["foo[]bar",
+ [["subscript",""],["formatblock","<div>"],["inserttext","a"]],
+ "<div>foo<sub>a[]</sub>bar</div>",
+ [true,true,true],
+ {"subscript":[false,false,"",false,true,""],"formatblock":[false,false,"",false,false,"div"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["forwarddelete",""]],
+ "foo[]ar",
+ [true,true],
+ {"subscript":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["forwarddelete",""],["inserttext","a"]],
+ "foo<sub><font size=\"3\">a[]</font></sub>ar",
+ [true,true,true],
+ {"subscript":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["indent",""]],
+ "<blockquote>foo[]bar</blockquote>",
+ [true,true],
+ {"subscript":[false,false,"",false,true,""],"indent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["indent",""],["inserttext","a"]],
+ "<blockquote>foo<sub>a[]</sub>bar</blockquote>",
+ [true,true,true],
+ {"subscript":[false,false,"",false,true,""],"indent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["inserthorizontalrule",""]],
+ "foo<hr>{}bar",
+ [true,true],
+ {"subscript":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["inserthorizontalrule",""],["inserttext","a"]],
+ "foo<hr><sub>a[]</sub>bar",
+ [true,true,true],
+ {"subscript":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}bar",
+ [true,true],
+ {"subscript":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
+ "fooab<b>c</b>d<sub>a[]</sub>bar",
+ [true,true,true],
+ {"subscript":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar",
+ [true,true],
+ {"subscript":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["insertimage","/img/lion.svg"],["inserttext","a"]],
+ "foo<img src=\"/img/lion.svg\"><sub>a[]</sub>bar",
+ [true,true,true],
+ {"subscript":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["insertlinebreak",""]],
+ "foo<br>{}bar",
+ [true,true],
+ {"subscript":[false,false,"",false,true,""],"insertlinebreak":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["insertlinebreak",""],["inserttext","a"]],
+ "foo<br><sub>a[]</sub>bar",
+ [true,true,true],
+ {"subscript":[false,false,"",false,true,""],"insertlinebreak":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["insertorderedlist",""]],
+ "<ol><li>foo[]bar</li></ol>",
+ [true,true],
+ {"subscript":[false,false,"",false,true,""],"insertorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["subscript",""],["insertorderedlist",""],["inserttext","a"]],
+ "<ol><li>foo<sub>a[]</sub>bar</li></ol>",
+ [true,true,true],
+ {"subscript":[false,false,"",false,true,""],"insertorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["insertparagraph",""]],
+ "<p>foo</p><p>{}bar</p>",
+ [true,true],
+ {"subscript":[false,false,"",false,true,""],"insertparagraph":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["insertparagraph",""],["inserttext","a"]],
+ "<p>foo</p><p><sub>a[]</sub>bar</p>",
+ [true,true,true],
+ {"subscript":[false,false,"",false,true,""],"insertparagraph":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["insertunorderedlist",""]],
+ "<ul><li>foo[]bar</li></ul>",
+ [true,true],
+ {"subscript":[false,false,"",false,true,""],"insertunorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["subscript",""],["insertunorderedlist",""],["inserttext","a"]],
+ "<ul><li>foo<sub>a[]</sub>bar</li></ul>",
+ [true,true,true],
+ {"subscript":[false,false,"",false,true,""],"insertunorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[]bar</div>",
+ [true,true],
+ {"subscript":[false,false,"",false,true,""],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[]bar",
+ [["subscript",""],["justifycenter",""],["inserttext","a"]],
+ "<div style=\"text-align:center\">foo<sub>a[]</sub>bar</div>",
+ [true,true,true],
+ {"subscript":[false,false,"",false,true,""],"justifycenter":[false,false,"left",false,true,"center"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[]bar</div>",
+ [true,true],
+ {"subscript":[false,false,"",false,true,""],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[]bar",
+ [["subscript",""],["justifyfull",""],["inserttext","a"]],
+ "<div style=\"text-align:justify\">foo<sub>a[]</sub>bar</div>",
+ [true,true,true],
+ {"subscript":[false,false,"",false,true,""],"justifyfull":[false,false,"left",false,true,"justify"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["justifyleft",""]],
+ "foo[]bar",
+ [true,true],
+ {"subscript":[false,false,"",false,true,""],"justifyleft":[false,true,"left",false,true,"left"]}],
+["foo[]bar",
+ [["subscript",""],["justifyleft",""],["inserttext","a"]],
+ "foo<sub>a[]</sub>bar",
+ [true,true,true],
+ {"subscript":[false,false,"",false,true,""],"justifyleft":[false,true,"left",false,true,"left"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[]bar</div>",
+ [true,true],
+ {"subscript":[false,false,"",false,true,""],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[]bar",
+ [["subscript",""],["justifyright",""],["inserttext","a"]],
+ "<div style=\"text-align:right\">foo<sub>a[]</sub>bar</div>",
+ [true,true,true],
+ {"subscript":[false,false,"",false,true,""],"justifyright":[false,false,"left",false,true,"right"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["outdent",""]],
+ "foo[]bar",
+ [true,true],
+ {"subscript":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["outdent",""],["inserttext","a"]],
+ "foo<sub>a[]</sub>bar",
+ [true,true,true],
+ {"subscript":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["inserttext","a"]],
+ "foo<sup>a[]</sup>bar",
+ [true,true],
+ {"superscript":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["delete",""]],
+ "fo[]bar",
+ [true,true],
+ {"superscript":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["delete",""],["inserttext","a"]],
+ "fo<sup><font size=\"3\">a[]</font></sup>bar",
+ [true,true,true],
+ {"superscript":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["formatblock","<div>"]],
+ "<div>foo[]bar</div>",
+ [true,true],
+ {"superscript":[false,false,"",false,true,""],"formatblock":[false,false,"",false,false,"div"]}],
+["foo[]bar",
+ [["superscript",""],["formatblock","<div>"],["inserttext","a"]],
+ "<div>foo<sup>a[]</sup>bar</div>",
+ [true,true,true],
+ {"superscript":[false,false,"",false,true,""],"formatblock":[false,false,"",false,false,"div"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["forwarddelete",""]],
+ "foo[]ar",
+ [true,true],
+ {"superscript":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["forwarddelete",""],["inserttext","a"]],
+ "foo<sup><font size=\"3\">a[]</font></sup>ar",
+ [true,true,true],
+ {"superscript":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["indent",""]],
+ "<blockquote>foo[]bar</blockquote>",
+ [true,true],
+ {"superscript":[false,false,"",false,true,""],"indent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["indent",""],["inserttext","a"]],
+ "<blockquote>foo<sup>a[]</sup>bar</blockquote>",
+ [true,true,true],
+ {"superscript":[false,false,"",false,true,""],"indent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["inserthorizontalrule",""]],
+ "foo<hr>{}bar",
+ [true,true],
+ {"superscript":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["inserthorizontalrule",""],["inserttext","a"]],
+ "foo<hr><sup>a[]</sup>bar",
+ [true,true,true],
+ {"superscript":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}bar",
+ [true,true],
+ {"superscript":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
+ "fooab<b>c</b>d<sup>a[]</sup>bar",
+ [true,true,true],
+ {"superscript":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar",
+ [true,true],
+ {"superscript":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["insertimage","/img/lion.svg"],["inserttext","a"]],
+ "foo<img src=\"/img/lion.svg\"><sup>a[]</sup>bar",
+ [true,true,true],
+ {"superscript":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["insertlinebreak",""]],
+ "foo<br>{}bar",
+ [true,true],
+ {"superscript":[false,false,"",false,true,""],"insertlinebreak":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["insertlinebreak",""],["inserttext","a"]],
+ "foo<br><sup>a[]</sup>bar",
+ [true,true,true],
+ {"superscript":[false,false,"",false,true,""],"insertlinebreak":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["insertorderedlist",""]],
+ "<ol><li>foo[]bar</li></ol>",
+ [true,true],
+ {"superscript":[false,false,"",false,true,""],"insertorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["superscript",""],["insertorderedlist",""],["inserttext","a"]],
+ "<ol><li>foo<sup>a[]</sup>bar</li></ol>",
+ [true,true,true],
+ {"superscript":[false,false,"",false,true,""],"insertorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["insertparagraph",""]],
+ "<p>foo</p><p>{}bar</p>",
+ [true,true],
+ {"superscript":[false,false,"",false,true,""],"insertparagraph":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["insertparagraph",""],["inserttext","a"]],
+ "<p>foo</p><p><sup>a[]</sup>bar</p>",
+ [true,true,true],
+ {"superscript":[false,false,"",false,true,""],"insertparagraph":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["insertunorderedlist",""]],
+ "<ul><li>foo[]bar</li></ul>",
+ [true,true],
+ {"superscript":[false,false,"",false,true,""],"insertunorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["superscript",""],["insertunorderedlist",""],["inserttext","a"]],
+ "<ul><li>foo<sup>a[]</sup>bar</li></ul>",
+ [true,true,true],
+ {"superscript":[false,false,"",false,true,""],"insertunorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[]bar</div>",
+ [true,true],
+ {"superscript":[false,false,"",false,true,""],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[]bar",
+ [["superscript",""],["justifycenter",""],["inserttext","a"]],
+ "<div style=\"text-align:center\">foo<sup>a[]</sup>bar</div>",
+ [true,true,true],
+ {"superscript":[false,false,"",false,true,""],"justifycenter":[false,false,"left",false,true,"center"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[]bar</div>",
+ [true,true],
+ {"superscript":[false,false,"",false,true,""],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[]bar",
+ [["superscript",""],["justifyfull",""],["inserttext","a"]],
+ "<div style=\"text-align:justify\">foo<sup>a[]</sup>bar</div>",
+ [true,true,true],
+ {"superscript":[false,false,"",false,true,""],"justifyfull":[false,false,"left",false,true,"justify"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["justifyleft",""]],
+ "foo[]bar",
+ [true,true],
+ {"superscript":[false,false,"",false,true,""],"justifyleft":[false,true,"left",false,true,"left"]}],
+["foo[]bar",
+ [["superscript",""],["justifyleft",""],["inserttext","a"]],
+ "foo<sup>a[]</sup>bar",
+ [true,true,true],
+ {"superscript":[false,false,"",false,true,""],"justifyleft":[false,true,"left",false,true,"left"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[]bar</div>",
+ [true,true],
+ {"superscript":[false,false,"",false,true,""],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[]bar",
+ [["superscript",""],["justifyright",""],["inserttext","a"]],
+ "<div style=\"text-align:right\">foo<sup>a[]</sup>bar</div>",
+ [true,true,true],
+ {"superscript":[false,false,"",false,true,""],"justifyright":[false,false,"left",false,true,"right"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["outdent",""]],
+ "foo[]bar",
+ [true,true],
+ {"superscript":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["outdent",""],["inserttext","a"]],
+ "foo<sup>a[]</sup>bar",
+ [true,true,true],
+ {"superscript":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["inserttext","a"]],
+ "foo<u>a[]</u>bar",
+ [true,true],
+ {"underline":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["delete",""]],
+ "fo[]bar",
+ [true,true],
+ {"underline":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["delete",""],["inserttext","a"]],
+ "fo<u>a[]</u>bar",
+ [true,true,true],
+ {"underline":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["formatblock","<div>"]],
+ "<div>foo[]bar</div>",
+ [true,true],
+ {"underline":[false,false,"",false,true,""],"formatblock":[false,false,"",false,false,"div"]}],
+["foo[]bar",
+ [["underline",""],["formatblock","<div>"],["inserttext","a"]],
+ "<div>foo<u>a[]</u>bar</div>",
+ [true,true,true],
+ {"underline":[false,false,"",false,true,""],"formatblock":[false,false,"",false,false,"div"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["forwarddelete",""]],
+ "foo[]ar",
+ [true,true],
+ {"underline":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["forwarddelete",""],["inserttext","a"]],
+ "foo<u>a[]</u>ar",
+ [true,true,true],
+ {"underline":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["indent",""]],
+ "<blockquote>foo[]bar</blockquote>",
+ [true,true],
+ {"underline":[false,false,"",false,true,""],"indent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["indent",""],["inserttext","a"]],
+ "<blockquote>foo<u>a[]</u>bar</blockquote>",
+ [true,true,true],
+ {"underline":[false,false,"",false,true,""],"indent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["inserthorizontalrule",""]],
+ "foo<hr>{}bar",
+ [true,true],
+ {"underline":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["inserthorizontalrule",""],["inserttext","a"]],
+ "foo<hr><u>a[]</u>bar",
+ [true,true,true],
+ {"underline":[false,false,"",false,true,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}bar",
+ [true,true],
+ {"underline":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
+ "fooab<b>c</b>d<u>a[]</u>bar",
+ [true,true,true],
+ {"underline":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar",
+ [true,true],
+ {"underline":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["insertimage","/img/lion.svg"],["inserttext","a"]],
+ "foo<img src=\"/img/lion.svg\"><u>a[]</u>bar",
+ [true,true,true],
+ {"underline":[false,false,"",false,true,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["insertlinebreak",""]],
+ "foo<br>{}bar",
+ [true,true],
+ {"underline":[false,false,"",false,true,""],"insertlinebreak":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["insertlinebreak",""],["inserttext","a"]],
+ "foo<br><u>a[]</u>bar",
+ [true,true,true],
+ {"underline":[false,false,"",false,true,""],"insertlinebreak":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["insertorderedlist",""]],
+ "<ol><li>foo[]bar</li></ol>",
+ [true,true],
+ {"underline":[false,false,"",false,true,""],"insertorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["underline",""],["insertorderedlist",""],["inserttext","a"]],
+ "<ol><li>foo<u>a[]</u>bar</li></ol>",
+ [true,true,true],
+ {"underline":[false,false,"",false,true,""],"insertorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["insertparagraph",""]],
+ "<p>foo</p><p>{}bar</p>",
+ [true,true],
+ {"underline":[false,false,"",false,true,""],"insertparagraph":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["insertparagraph",""],["inserttext","a"]],
+ "<p>foo</p><p><u>a[]</u>bar</p>",
+ [true,true,true],
+ {"underline":[false,false,"",false,true,""],"insertparagraph":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["insertunorderedlist",""]],
+ "<ul><li>foo[]bar</li></ul>",
+ [true,true],
+ {"underline":[false,false,"",false,true,""],"insertunorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["underline",""],["insertunorderedlist",""],["inserttext","a"]],
+ "<ul><li>foo<u>a[]</u>bar</li></ul>",
+ [true,true,true],
+ {"underline":[false,false,"",false,true,""],"insertunorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[]bar</div>",
+ [true,true],
+ {"underline":[false,false,"",false,true,""],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[]bar",
+ [["underline",""],["justifycenter",""],["inserttext","a"]],
+ "<div style=\"text-align:center\">foo<u>a[]</u>bar</div>",
+ [true,true,true],
+ {"underline":[false,false,"",false,true,""],"justifycenter":[false,false,"left",false,true,"center"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[]bar</div>",
+ [true,true],
+ {"underline":[false,false,"",false,true,""],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[]bar",
+ [["underline",""],["justifyfull",""],["inserttext","a"]],
+ "<div style=\"text-align:justify\">foo<u>a[]</u>bar</div>",
+ [true,true,true],
+ {"underline":[false,false,"",false,true,""],"justifyfull":[false,false,"left",false,true,"justify"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["justifyleft",""]],
+ "foo[]bar",
+ [true,true],
+ {"underline":[false,false,"",false,true,""],"justifyleft":[false,true,"left",false,true,"left"]}],
+["foo[]bar",
+ [["underline",""],["justifyleft",""],["inserttext","a"]],
+ "foo<u>a[]</u>bar",
+ [true,true,true],
+ {"underline":[false,false,"",false,true,""],"justifyleft":[false,true,"left",false,true,"left"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[]bar</div>",
+ [true,true],
+ {"underline":[false,false,"",false,true,""],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[]bar",
+ [["underline",""],["justifyright",""],["inserttext","a"]],
+ "<div style=\"text-align:right\">foo<u>a[]</u>bar</div>",
+ [true,true,true],
+ {"underline":[false,false,"",false,true,""],"justifyright":[false,false,"left",false,true,"right"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["outdent",""]],
+ "foo[]bar",
+ [true,true],
+ {"underline":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["outdent",""],["inserttext","a"]],
+ "foo<u>a[]</u>bar",
+ [true,true,true],
+ {"underline":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["inserttext","a"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+ [true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["delete",""]],
+ "fo[]bar",
+ [true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"delete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["delete",""],["inserttext","a"]],
+ "fo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+ [true,true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["formatblock","<div>"]],
+ "<div>foo[]bar</div>",
+ [true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"formatblock":[false,false,"",false,false,"div"]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["formatblock","<div>"],["inserttext","a"]],
+ "<div>foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar</div>",
+ [true,true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"formatblock":[false,false,"",false,false,"div"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["forwarddelete",""]],
+ "foo[]ar",
+ [true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["forwarddelete",""],["inserttext","a"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>ar",
+ [true,true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"forwarddelete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["indent",""]],
+ "<blockquote>foo[]bar</blockquote>",
+ [true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"indent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["indent",""],["inserttext","a"]],
+ "<blockquote>foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar</blockquote>",
+ [true,true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"indent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["inserthorizontalrule",""]],
+ "foo<hr>{}bar",
+ [true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["inserthorizontalrule",""],["inserttext","a"]],
+ "foo<hr><span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+ [true,true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}bar",
+ [true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"inserthtml":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
+ "fooab<b>c</b>d<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+ [true,true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar",
+ [true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertimage":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["insertimage","/img/lion.svg"],["inserttext","a"]],
+ "foo<img src=\"/img/lion.svg\"><span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+ [true,true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["insertlinebreak",""]],
+ "foo<br>{}bar",
+ [true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertlinebreak":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["insertlinebreak",""],["inserttext","a"]],
+ "foo<br><span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+ [true,true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertlinebreak":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["insertorderedlist",""]],
+ "<ol><li>foo[]bar</li></ol>",
+ [true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["insertorderedlist",""],["inserttext","a"]],
+ "<ol><li>foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar</li></ol>",
+ [true,true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["insertparagraph",""]],
+ "<p>foo</p><p>{}bar</p>",
+ [true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertparagraph":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["insertparagraph",""],["inserttext","a"]],
+ "<p>foo</p><p><span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar</p>",
+ [true,true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertparagraph":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["insertunorderedlist",""]],
+ "<ul><li>foo[]bar</li></ul>",
+ [true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["insertunorderedlist",""],["inserttext","a"]],
+ "<ul><li>foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar</li></ul>",
+ [true,true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertunorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[]bar</div>",
+ [true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["justifycenter",""],["inserttext","a"]],
+ "<div style=\"text-align:center\">foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar</div>",
+ [true,true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"justifycenter":[false,false,"left",false,true,"center"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[]bar</div>",
+ [true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["justifyfull",""],["inserttext","a"]],
+ "<div style=\"text-align:justify\">foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar</div>",
+ [true,true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"justifyfull":[false,false,"left",false,true,"justify"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["justifyleft",""]],
+ "foo[]bar",
+ [true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["justifyleft",""],["inserttext","a"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+ [true,true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"justifyleft":[false,true,"left",false,true,"left"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[]bar</div>",
+ [true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["justifyright",""],["inserttext","a"]],
+ "<div style=\"text-align:right\">foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar</div>",
+ [true,true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"justifyright":[false,false,"left",false,true,"right"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["outdent",""]],
+ "foo[]bar",
+ [true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"outdent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","#00FFFF"],["outdent",""],["inserttext","a"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+ [true,true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"outdent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com/\">a[]</a>bar",
+ [true,true],
+ {"createlink":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["delete",""]],
+ "fo[]bar",
+ [true,true],
+ {"createlink":[false,false,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["delete",""],["inserttext","a"]],
+ "fo<a href=\"http://www.google.com/\"><font color=\"#000000\">a[]</font></a>bar",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["formatblock","<div>"]],
+ "<div>foo[]bar</div>",
+ [true,true],
+ {"createlink":[false,false,"",false,false,""],"formatblock":[false,false,"",false,false,"div"]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["formatblock","<div>"],["inserttext","a"]],
+ "<div>foo<a href=\"http://www.google.com/\">a[]</a>bar</div>",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"formatblock":[false,false,"",false,false,"div"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["forwarddelete",""]],
+ "foo[]ar",
+ [true,true],
+ {"createlink":[false,false,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["forwarddelete",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com/\"><font color=\"#000000\">a[]</font></a>ar",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"forwarddelete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["indent",""]],
+ "<blockquote>foo[]bar</blockquote>",
+ [true,true],
+ {"createlink":[false,false,"",false,false,""],"indent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["indent",""],["inserttext","a"]],
+ "<blockquote>foo<a href=\"http://www.google.com/\">a[]</a>bar</blockquote>",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"indent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["inserthorizontalrule",""]],
+ "foo<hr>{}bar",
+ [true,true],
+ {"createlink":[false,false,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["inserthorizontalrule",""],["inserttext","a"]],
+ "foo<hr><a href=\"http://www.google.com/\">a[]</a>bar",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}bar",
+ [true,true],
+ {"createlink":[false,false,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
+ "fooab<b>c</b>d<a href=\"http://www.google.com/\">a[]</a>bar",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar",
+ [true,true],
+ {"createlink":[false,false,"",false,false,""],"insertimage":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["insertimage","/img/lion.svg"],["inserttext","a"]],
+ "foo<img src=\"/img/lion.svg\"><a href=\"http://www.google.com/\">a[]</a>bar",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["insertlinebreak",""]],
+ "foo<br>{}bar",
+ [true,true],
+ {"createlink":[false,false,"",false,false,""],"insertlinebreak":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["insertlinebreak",""],["inserttext","a"]],
+ "foo<br><a href=\"http://www.google.com/\">a[]</a>bar",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"insertlinebreak":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["insertorderedlist",""]],
+ "<ol><li>foo[]bar</li></ol>",
+ [true,true],
+ {"createlink":[false,false,"",false,false,""],"insertorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["insertorderedlist",""],["inserttext","a"]],
+ "<ol><li>foo<a href=\"http://www.google.com/\">a[]</a>bar</li></ol>",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"insertorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["insertparagraph",""]],
+ "<p>foo</p><p>{}bar</p>",
+ [true,true],
+ {"createlink":[false,false,"",false,false,""],"insertparagraph":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["insertparagraph",""],["inserttext","a"]],
+ "<p>foo</p><p><a href=\"http://www.google.com/\">a[]</a>bar</p>",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"insertparagraph":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["insertunorderedlist",""]],
+ "<ul><li>foo[]bar</li></ul>",
+ [true,true],
+ {"createlink":[false,false,"",false,false,""],"insertunorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["insertunorderedlist",""],["inserttext","a"]],
+ "<ul><li>foo<a href=\"http://www.google.com/\">a[]</a>bar</li></ul>",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"insertunorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[]bar</div>",
+ [true,true],
+ {"createlink":[false,false,"",false,false,""],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["justifycenter",""],["inserttext","a"]],
+ "<div style=\"text-align:center\">foo<a href=\"http://www.google.com/\">a[]</a>bar</div>",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"justifycenter":[false,false,"left",false,true,"center"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[]bar</div>",
+ [true,true],
+ {"createlink":[false,false,"",false,false,""],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["justifyfull",""],["inserttext","a"]],
+ "<div style=\"text-align:justify\">foo<a href=\"http://www.google.com/\">a[]</a>bar</div>",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"justifyfull":[false,false,"left",false,true,"justify"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["justifyleft",""]],
+ "foo[]bar",
+ [true,true],
+ {"createlink":[false,false,"",false,false,""],"justifyleft":[false,true,"left",false,true,"left"]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["justifyleft",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com/\">a[]</a>bar",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"justifyleft":[false,true,"left",false,true,"left"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[]bar</div>",
+ [true,true],
+ {"createlink":[false,false,"",false,false,""],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["justifyright",""],["inserttext","a"]],
+ "<div style=\"text-align:right\">foo<a href=\"http://www.google.com/\">a[]</a>bar</div>",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"justifyright":[false,false,"left",false,true,"right"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["outdent",""]],
+ "foo[]bar",
+ [true,true],
+ {"createlink":[false,false,"",false,false,""],"outdent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["outdent",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com/\">a[]</a>bar",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"outdent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["inserttext","a"]],
+ "foo<font face=\"sans-serif\">a[]</font>bar",
+ [true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["delete",""]],
+ "fo[]bar",
+ [true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"delete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["delete",""],["inserttext","a"]],
+ "fo<font face=\"sans-serif\">a[]</font>bar",
+ [true,true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["formatblock","<div>"]],
+ "<div>foo[]bar</div>",
+ [true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"formatblock":[false,false,"",false,false,"div"]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["formatblock","<div>"],["inserttext","a"]],
+ "<div>foo<font face=\"sans-serif\">a[]</font>bar</div>",
+ [true,true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"formatblock":[false,false,"",false,false,"div"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["forwarddelete",""]],
+ "foo[]ar",
+ [true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["forwarddelete",""],["inserttext","a"]],
+ "foo<font face=\"sans-serif\">a[]</font>ar",
+ [true,true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"forwarddelete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["indent",""]],
+ "<blockquote>foo[]bar</blockquote>",
+ [true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"indent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["indent",""],["inserttext","a"]],
+ "<blockquote>foo<font face=\"sans-serif\">a[]</font>bar</blockquote>",
+ [true,true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"indent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["inserthorizontalrule",""]],
+ "foo<hr>{}bar",
+ [true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["inserthorizontalrule",""],["inserttext","a"]],
+ "foo<hr><font face=\"sans-serif\">a[]</font>bar",
+ [true,true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}bar",
+ [true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"inserthtml":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
+ "fooab<b>c</b>d<font face=\"sans-serif\">a[]</font>bar",
+ [true,true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar",
+ [true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"insertimage":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["insertimage","/img/lion.svg"],["inserttext","a"]],
+ "foo<img src=\"/img/lion.svg\"><font face=\"sans-serif\">a[]</font>bar",
+ [true,true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["insertlinebreak",""]],
+ "foo<br>{}bar",
+ [true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"insertlinebreak":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["insertlinebreak",""],["inserttext","a"]],
+ "foo<br><font face=\"sans-serif\">a[]</font>bar",
+ [true,true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"insertlinebreak":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["insertorderedlist",""]],
+ "<ol><li>foo[]bar</li></ol>",
+ [true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"insertorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["insertorderedlist",""],["inserttext","a"]],
+ "<ol><li>foo<font face=\"sans-serif\">a[]</font>bar</li></ol>",
+ [true,true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"insertorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["insertparagraph",""]],
+ "<p>foo</p><p>{}bar</p>",
+ [true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"insertparagraph":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["insertparagraph",""],["inserttext","a"]],
+ "<p>foo</p><p><font face=\"sans-serif\">a[]</font>bar</p>",
+ [true,true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"insertparagraph":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["insertunorderedlist",""]],
+ "<ul><li>foo[]bar</li></ul>",
+ [true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["insertunorderedlist",""],["inserttext","a"]],
+ "<ul><li>foo<font face=\"sans-serif\">a[]</font>bar</li></ul>",
+ [true,true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"insertunorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[]bar</div>",
+ [true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["justifycenter",""],["inserttext","a"]],
+ "<div style=\"text-align:center\">foo<font face=\"sans-serif\">a[]</font>bar</div>",
+ [true,true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"justifycenter":[false,false,"left",false,true,"center"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[]bar</div>",
+ [true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["justifyfull",""],["inserttext","a"]],
+ "<div style=\"text-align:justify\">foo<font face=\"sans-serif\">a[]</font>bar</div>",
+ [true,true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"justifyfull":[false,false,"left",false,true,"justify"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["justifyleft",""]],
+ "foo[]bar",
+ [true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["justifyleft",""],["inserttext","a"]],
+ "foo<font face=\"sans-serif\">a[]</font>bar",
+ [true,true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"justifyleft":[false,true,"left",false,true,"left"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[]bar</div>",
+ [true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["justifyright",""],["inserttext","a"]],
+ "<div style=\"text-align:right\">foo<font face=\"sans-serif\">a[]</font>bar</div>",
+ [true,true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"justifyright":[false,false,"left",false,true,"right"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["outdent",""]],
+ "foo[]bar",
+ [true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"outdent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontname","sans-serif"],["outdent",""],["inserttext","a"]],
+ "foo<font face=\"sans-serif\">a[]</font>bar",
+ [true,true,true],
+ {"fontname":[false,false,"serif",false,false,"sans-serif"],"outdent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["inserttext","a"]],
+ "foo<font size=\"4\">a[]</font>bar",
+ [true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["delete",""]],
+ "fo[]bar",
+ [true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"delete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["delete",""],["inserttext","a"]],
+ "fo<font size=\"4\">a[]</font>bar",
+ [true,true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["formatblock","<div>"]],
+ "<div>foo[]bar</div>",
+ [true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"formatblock":[false,false,"",false,false,"div"]}],
+["foo[]bar",
+ [["fontsize","4"],["formatblock","<div>"],["inserttext","a"]],
+ "<div>foo<font size=\"4\">a[]</font>bar</div>",
+ [true,true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"formatblock":[false,false,"",false,false,"div"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["forwarddelete",""]],
+ "foo[]ar",
+ [true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["forwarddelete",""],["inserttext","a"]],
+ "foo<font size=\"4\">a[]</font>ar",
+ [true,true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"forwarddelete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["indent",""]],
+ "<blockquote>foo[]bar</blockquote>",
+ [true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"indent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["indent",""],["inserttext","a"]],
+ "<blockquote>foo<font size=\"4\">a[]</font>bar</blockquote>",
+ [true,true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"indent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["inserthorizontalrule",""]],
+ "foo<hr>{}bar",
+ [true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["inserthorizontalrule",""],["inserttext","a"]],
+ "foo<hr><font size=\"4\">a[]</font>bar",
+ [true,true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}bar",
+ [true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"inserthtml":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
+ "fooab<b>c</b>d<font size=\"4\">a[]</font>bar",
+ [true,true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar",
+ [true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"insertimage":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["insertimage","/img/lion.svg"],["inserttext","a"]],
+ "foo<img src=\"/img/lion.svg\"><font size=\"4\">a[]</font>bar",
+ [true,true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["insertlinebreak",""]],
+ "foo<br>{}bar",
+ [true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"insertlinebreak":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["insertlinebreak",""],["inserttext","a"]],
+ "foo<br><font size=\"4\">a[]</font>bar",
+ [true,true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"insertlinebreak":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["insertorderedlist",""]],
+ "<ol><li>foo[]bar</li></ol>",
+ [true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"insertorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["fontsize","4"],["insertorderedlist",""],["inserttext","a"]],
+ "<ol><li>foo<font size=\"4\">a[]</font>bar</li></ol>",
+ [true,true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"insertorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["insertparagraph",""]],
+ "<p>foo</p><p>{}bar</p>",
+ [true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"insertparagraph":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["insertparagraph",""],["inserttext","a"]],
+ "<p>foo</p><p><font size=\"4\">a[]</font>bar</p>",
+ [true,true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"insertparagraph":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["insertunorderedlist",""]],
+ "<ul><li>foo[]bar</li></ul>",
+ [true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["fontsize","4"],["insertunorderedlist",""],["inserttext","a"]],
+ "<ul><li>foo<font size=\"4\">a[]</font>bar</li></ul>",
+ [true,true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"insertunorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[]bar</div>",
+ [true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[]bar",
+ [["fontsize","4"],["justifycenter",""],["inserttext","a"]],
+ "<div style=\"text-align:center\">foo<font size=\"4\">a[]</font>bar</div>",
+ [true,true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"justifycenter":[false,false,"left",false,true,"center"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[]bar</div>",
+ [true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[]bar",
+ [["fontsize","4"],["justifyfull",""],["inserttext","a"]],
+ "<div style=\"text-align:justify\">foo<font size=\"4\">a[]</font>bar</div>",
+ [true,true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"justifyfull":[false,false,"left",false,true,"justify"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["justifyleft",""]],
+ "foo[]bar",
+ [true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["foo[]bar",
+ [["fontsize","4"],["justifyleft",""],["inserttext","a"]],
+ "foo<font size=\"4\">a[]</font>bar",
+ [true,true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"justifyleft":[false,true,"left",false,true,"left"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[]bar</div>",
+ [true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[]bar",
+ [["fontsize","4"],["justifyright",""],["inserttext","a"]],
+ "<div style=\"text-align:right\">foo<font size=\"4\">a[]</font>bar</div>",
+ [true,true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"justifyright":[false,false,"left",false,true,"right"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["outdent",""]],
+ "foo[]bar",
+ [true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"outdent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","4"],["outdent",""],["inserttext","a"]],
+ "foo<font size=\"4\">a[]</font>bar",
+ [true,true,true],
+ {"fontsize":[false,false,"3",false,false,"4"],"outdent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["inserttext","a"]],
+ "foo<font color=\"#0000ff\">a[]</font>bar",
+ [true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["delete",""]],
+ "fo[]bar",
+ [true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"delete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["delete",""],["inserttext","a"]],
+ "fo<font color=\"#0000ff\">a[]</font>bar",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["formatblock","<div>"]],
+ "<div>foo[]bar</div>",
+ [true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"formatblock":[false,false,"",false,false,"div"]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["formatblock","<div>"],["inserttext","a"]],
+ "<div>foo<font color=\"#0000ff\">a[]</font>bar</div>",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"formatblock":[false,false,"",false,false,"div"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["forwarddelete",""]],
+ "foo[]ar",
+ [true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["forwarddelete",""],["inserttext","a"]],
+ "foo<font color=\"#0000ff\">a[]</font>ar",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"forwarddelete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["indent",""]],
+ "<blockquote>foo[]bar</blockquote>",
+ [true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"indent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["indent",""],["inserttext","a"]],
+ "<blockquote>foo<font color=\"#0000ff\">a[]</font>bar</blockquote>",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"indent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["inserthorizontalrule",""]],
+ "foo<hr>{}bar",
+ [true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["inserthorizontalrule",""],["inserttext","a"]],
+ "foo<hr><font color=\"#0000ff\">a[]</font>bar",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}bar",
+ [true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"inserthtml":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
+ "fooab<b>c</b>d<font color=\"#0000ff\">a[]</font>bar",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar",
+ [true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"insertimage":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["insertimage","/img/lion.svg"],["inserttext","a"]],
+ "foo<img src=\"/img/lion.svg\"><font color=\"#0000ff\">a[]</font>bar",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["insertlinebreak",""]],
+ "foo<br>{}bar",
+ [true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"insertlinebreak":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["insertlinebreak",""],["inserttext","a"]],
+ "foo<br><font color=\"#0000ff\">a[]</font>bar",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"insertlinebreak":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["insertorderedlist",""]],
+ "<ol><li>foo[]bar</li></ol>",
+ [true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"insertorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["insertorderedlist",""],["inserttext","a"]],
+ "<ol><li>foo<font color=\"#0000ff\">a[]</font>bar</li></ol>",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"insertorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["insertparagraph",""]],
+ "<p>foo</p><p>{}bar</p>",
+ [true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"insertparagraph":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["insertparagraph",""],["inserttext","a"]],
+ "<p>foo</p><p><font color=\"#0000ff\">a[]</font>bar</p>",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"insertparagraph":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["insertunorderedlist",""]],
+ "<ul><li>foo[]bar</li></ul>",
+ [true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["insertunorderedlist",""],["inserttext","a"]],
+ "<ul><li>foo<font color=\"#0000ff\">a[]</font>bar</li></ul>",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"insertunorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[]bar</div>",
+ [true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["justifycenter",""],["inserttext","a"]],
+ "<div style=\"text-align:center\">foo<font color=\"#0000ff\">a[]</font>bar</div>",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"justifycenter":[false,false,"left",false,true,"center"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[]bar</div>",
+ [true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["justifyfull",""],["inserttext","a"]],
+ "<div style=\"text-align:justify\">foo<font color=\"#0000ff\">a[]</font>bar</div>",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"justifyfull":[false,false,"left",false,true,"justify"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["justifyleft",""]],
+ "foo[]bar",
+ [true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["justifyleft",""],["inserttext","a"]],
+ "foo<font color=\"#0000ff\">a[]</font>bar",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"justifyleft":[false,true,"left",false,true,"left"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[]bar</div>",
+ [true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["justifyright",""],["inserttext","a"]],
+ "<div style=\"text-align:right\">foo<font color=\"#0000ff\">a[]</font>bar</div>",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"justifyright":[false,false,"left",false,true,"right"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["outdent",""]],
+ "foo[]bar",
+ [true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"outdent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["outdent",""],["inserttext","a"]],
+ "foo<font color=\"#0000ff\">a[]</font>bar",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"outdent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["inserttext","a"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+ [true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["delete",""]],
+ "fo[]bar",
+ [true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"delete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["delete",""],["inserttext","a"]],
+ "fo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+ [true,true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["formatblock","<div>"]],
+ "<div>foo[]bar</div>",
+ [true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"formatblock":[false,false,"",false,false,"div"]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["formatblock","<div>"],["inserttext","a"]],
+ "<div>foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar</div>",
+ [true,true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"formatblock":[false,false,"",false,false,"div"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["forwarddelete",""]],
+ "foo[]ar",
+ [true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"forwarddelete":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["forwarddelete",""],["inserttext","a"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>ar",
+ [true,true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"forwarddelete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["indent",""]],
+ "<blockquote>foo[]bar</blockquote>",
+ [true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"indent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["indent",""],["inserttext","a"]],
+ "<blockquote>foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar</blockquote>",
+ [true,true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"indent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["inserthorizontalrule",""]],
+ "foo<hr>{}bar",
+ [true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"inserthorizontalrule":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["inserthorizontalrule",""],["inserttext","a"]],
+ "foo<hr><span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+ [true,true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"inserthorizontalrule":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["inserthtml","ab<b>c</b>d"]],
+ "fooab<b>c</b>d{}bar",
+ [true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"inserthtml":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["inserthtml","ab<b>c</b>d"],["inserttext","a"]],
+ "fooab<b>c</b>d<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+ [true,true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"inserthtml":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["insertimage","/img/lion.svg"]],
+ "foo<img src=\"/img/lion.svg\">{}bar",
+ [true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertimage":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["insertimage","/img/lion.svg"],["inserttext","a"]],
+ "foo<img src=\"/img/lion.svg\"><span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+ [true,true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertimage":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["insertlinebreak",""]],
+ "foo<br>{}bar",
+ [true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertlinebreak":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["insertlinebreak",""],["inserttext","a"]],
+ "foo<br><span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+ [true,true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertlinebreak":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["insertorderedlist",""]],
+ "<ol><li>foo[]bar</li></ol>",
+ [true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["insertorderedlist",""],["inserttext","a"]],
+ "<ol><li>foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar</li></ol>",
+ [true,true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["insertparagraph",""]],
+ "<p>foo</p><p>{}bar</p>",
+ [true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertparagraph":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["insertparagraph",""],["inserttext","a"]],
+ "<p>foo</p><p><span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar</p>",
+ [true,true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertparagraph":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["insertunorderedlist",""]],
+ "<ul><li>foo[]bar</li></ul>",
+ [true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertunorderedlist":[false,false,"",false,true,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["insertunorderedlist",""],["inserttext","a"]],
+ "<ul><li>foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar</li></ul>",
+ [true,true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"insertunorderedlist":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["justifycenter",""]],
+ "<div style=\"text-align:center\">foo[]bar</div>",
+ [true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"justifycenter":[false,false,"left",false,true,"center"]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["justifycenter",""],["inserttext","a"]],
+ "<div style=\"text-align:center\">foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar</div>",
+ [true,true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"justifycenter":[false,false,"left",false,true,"center"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["justifyfull",""]],
+ "<div style=\"text-align:justify\">foo[]bar</div>",
+ [true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"justifyfull":[false,false,"left",false,true,"justify"]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["justifyfull",""],["inserttext","a"]],
+ "<div style=\"text-align:justify\">foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar</div>",
+ [true,true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"justifyfull":[false,false,"left",false,true,"justify"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["justifyleft",""]],
+ "foo[]bar",
+ [true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"justifyleft":[false,true,"left",false,true,"left"]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["justifyleft",""],["inserttext","a"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+ [true,true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"justifyleft":[false,true,"left",false,true,"left"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["justifyright",""]],
+ "<div style=\"text-align:right\">foo[]bar</div>",
+ [true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"justifyright":[false,false,"left",false,true,"right"]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["justifyright",""],["inserttext","a"]],
+ "<div style=\"text-align:right\">foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar</div>",
+ [true,true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"justifyright":[false,false,"left",false,true,"right"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["outdent",""]],
+ "foo[]bar",
+ [true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"outdent":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","#00FFFF"],["outdent",""],["inserttext","a"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+ [true,true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"outdent":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["superscript",""],["subscript",""],["inserttext","a"]],
+ "foo<sub>a[]</sub>bar",
+ [true,true,true],
+ {"superscript":[false,false,"",false,false,""],"subscript":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["superscript",""],["inserttext","a"]],
+ "foo<sup>a[]</sup>bar",
+ [true,true,true],
+ {"subscript":[false,false,"",false,false,""],"superscript":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["forecolor","#0000FF"],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com/\">a[]</a>bar",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","#0000FF"],["createlink","http://www.google.com/"],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com/\">a[]</a>bar",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"createlink":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["forecolor","blue"],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com/\">a[]</a>bar",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","blue"],["createlink","http://www.google.com/"],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com/\">a[]</a>bar",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 255)"],"createlink":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["forecolor","brown"],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com/\"><font color=\"#a52a2a\">a[]</font></a>bar",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(165, 42, 42)"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","brown"],["createlink","http://www.google.com/"],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com/\"><font color=\"#a52a2a\">a[]</font></a>bar",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(165, 42, 42)"],"createlink":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["forecolor","black"],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com/\"><font color=\"#000000\">a[]</font></a>bar",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["forecolor","black"],["createlink","http://www.google.com/"],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com/\"><font color=\"#000000\">a[]</font></a>bar",
+ [true,true,true],
+ {"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"],"createlink":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["underline",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com/\">a[]</a>bar",
+ [true,true,true],
+ {"createlink":[false,false,"",false,false,""],"underline":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["createlink","http://www.google.com/"],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com/\">a[]</a>bar",
+ [true,true,true],
+ {"underline":[false,false,"",false,true,""],"createlink":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["createlink","http://www.google.com/"],["underline",""],["underline",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com/\">a[]</a>bar",
+ [true,true,true,true],
+ {"createlink":[false,false,"",false,false,""],"underline":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["underline",""],["underline",""],["createlink","http://www.google.com/"],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com/\">a[]</a>bar",
+ [true,true,true,true],
+ {"underline":[false,false,"",false,true,""],"createlink":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["fontsize","2"],["inserttext","a"]],
+ "foo<sub>a[]</sub>bar",
+ [true,true,true],
+ {"subscript":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"2"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","2"],["subscript",""],["inserttext","a"]],
+ "foo<sub>a[]</sub>bar",
+ [true,true,true],
+ {"fontsize":[false,false,"3",false,false,"2"],"subscript":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["subscript",""],["fontsize","3"],["inserttext","a"]],
+ "foo<sub><font size=\"3\">a[]</font></sub>bar",
+ [true,true,true],
+ {"subscript":[false,false,"",false,true,""],"fontsize":[false,false,"3",false,false,"3"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["fontsize","3"],["subscript",""],["inserttext","a"]],
+ "foo<sub><font size=\"3\">a[]</font></sub>bar",
+ [true,true,true],
+ {"fontsize":[false,false,"3",false,false,"3"],"subscript":[false,false,"",false,true,""],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["hilitecolor","aqua"],["backcolor","tan"],["inserttext","a"]],
+ "foo<span style=\"background-color:rgb(210, 180, 140)\">a[]</span>bar",
+ [true,true,true],
+ {"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(210, 180, 140)"],"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(210, 180, 140)"],"inserttext":[false,false,"",false,false,""]}],
+["foo[]bar",
+ [["backcolor","tan"],["hilitecolor","aqua"],["inserttext","a"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>bar",
+ [true,true,true],
+ {"backcolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"hilitecolor":[false,false,"rgba(0, 0, 0, 0)",false,false,"rgb(0, 255, 255)"],"inserttext":[false,false,"",false,false,""]}],
+["foo<b>[bar]</b>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<b>a[]</b>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<i>[bar]</i>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<i>a[]</i>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<s>[bar]</s>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<s>a[]</s>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<sub>[bar]</sub>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<sub>a[]</sub>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<sup>[bar]</sup>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<sup>a[]</sup>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<u>[bar]</u>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<u>a[]</u>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com>[bar]</a>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\">a[]</a>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<font face=sans-serif>[bar]</font>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<font face=\"sans-serif\">a[]</font>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<font size=4>[bar]</font>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<font size=\"4\">a[]</font>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<font color=#0000FF>[bar]</font>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<font color=\"#0000ff\">a[]</font>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<span style=background-color:#00FFFF>[bar]</span>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com><font color=blue>[bar]</font></a>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\">a[]</a>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<font color=blue><a href=http://www.google.com>[bar]</a></font>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\">a[]</a>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com><font color=brown>[bar]</font></a>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\"><font color=\"#a52a2a\">a[]</font></a>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<font color=brown><a href=http://www.google.com>[bar]</a></font>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\">a[]</a>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com><font color=black>[bar]</font></a>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\"><font color=\"#000000\">a[]</font></a>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com><u>[bar]</u></a>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\">a[]</a>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<u><a href=http://www.google.com>[bar]</a></u>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\">a[]</a>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<sub><font size=2>[bar]</font></sub>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<sub>a[]</sub>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<font size=2><sub>[bar]</sub></font>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<sub><font size=\"1\">a[]</font></sub>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<sub><font size=3>[bar]</font></sub>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<sub><font size=\"3\">a[]</font></sub>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<font size=3><sub>[bar]</sub></font>baz",
+ [["delete",""],["inserttext","a"]],
+ "foo<sub>a[]</sub>baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<b>bar]</b>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<i>bar]</i>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<s>bar]</s>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<sub>bar]</sub>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<sup>bar]</sup>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<u>bar]</u>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<a href=http://www.google.com>bar]</a>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font face=sans-serif>bar]</font>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font size=4>bar]</font>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font color=#0000FF>bar]</font>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<span style=background-color:#00FFFF>bar]</span>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<a href=http://www.google.com><font color=blue>bar]</font></a>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font color=blue><a href=http://www.google.com>bar]</a></font>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<a href=http://www.google.com><font color=brown>bar]</font></a>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font color=brown><a href=http://www.google.com>bar]</a></font>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<a href=http://www.google.com><font color=black>bar]</font></a>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<a href=http://www.google.com><u>bar]</u></a>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<u><a href=http://www.google.com>bar]</a></u>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<sub><font size=2>bar]</font></sub>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font size=2><sub>bar]</sub></font>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<sub><font size=3>bar]</font></sub>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["[foo<font size=3><sub>bar]</sub></font>baz",
+ [["delete",""],["inserttext","a"]],
+ "a[]baz",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<b>[bar</b>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<b>a[]</b>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<i>[bar</i>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<i>a[]</i>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<s>[bar</s>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<s>a[]</s>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<sub>[bar</sub>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<sub>a[]</sub>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<sup>[bar</sup>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<sup>a[]</sup>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<u>[bar</u>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<u>a[]</u>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com>[bar</a>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\">a[]</a>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<font face=sans-serif>[bar</font>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<font face=\"sans-serif\">a[]</font>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<font size=4>[bar</font>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<font size=\"4\">a[]</font>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<font color=#0000FF>[bar</font>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<font color=\"#0000ff\">a[]</font>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<span style=background-color:#00FFFF>[bar</span>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<span style=\"background-color:rgb(0, 255, 255)\">a[]</span>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com><font color=blue>[bar</font></a>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\">a[]</a>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<font color=blue><a href=http://www.google.com>[bar</a></font>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\">a[]</a>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com><font color=brown>[bar</font></a>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\"><font color=\"#a52a2a\">a[]</font></a>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<font color=brown><a href=http://www.google.com>[bar</a></font>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\">a[]</a>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com><font color=black>[bar</font></a>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\"><font color=\"#000000\">a[]</font></a>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com><u>[bar</u></a>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\">a[]</a>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<u><a href=http://www.google.com>[bar</a></u>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<a href=\"http://www.google.com\">a[]</a>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<sub><font size=2>[bar</font></sub>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<sub>a[]</sub>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<font size=2><sub>[bar</sub></font>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<sub><font size=\"1\">a[]</font></sub>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<sub><font size=3>[bar</font></sub>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<sub><font size=\"3\">a[]</font></sub>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["foo<font size=3><sub>[bar</sub></font>baz]",
+ [["delete",""],["inserttext","a"]],
+ "foo<sub>a[]</sub>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}],
+["<blockquote><font color=blue>[foo]</font></blockquote>",
+ [["delete",""],["inserttext","a"]],
+ "<blockquote><font color=\"blue\">a[]</font></blockquote>",
+ [true,true],
+ {"delete":[false,false,"",false,false,""],"inserttext":[false,false,"",false,false,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/outdent.js b/testing/web-platform/tests/editing/data/outdent.js
new file mode 100644
index 000000000..18d48d0cb
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/outdent.js
@@ -0,0 +1,877 @@
+var browserTests = [
+["<blockquote><p>foo[bar]</p><p>baz</p></blockquote><p>extra",
+ [["outdent",""]],
+ "<p>foo[bar]</p><blockquote><p>baz</p></blockquote><p>extra</p>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote><p>foo[bar</p><p>b]az</p></blockquote><p>extra",
+ [["outdent",""]],
+ "<p>foo[bar</p><p>b]az</p><p>extra</p>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote><p>foo[bar]</p></blockquote><p>baz</p><p>extra",
+ [["outdent",""]],
+ "<p>foo[bar]</p><p>baz</p><p>extra</p>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote><p>foo[bar</p></blockquote><p>b]az</p><p>extra",
+ [["outdent",""]],
+ "<p>foo[bar</p><p>b]az</p><p>extra</p>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote style=\"margin-right: 0px;\" dir=\"ltr\"><p>foo[bar]</p><p>baz</p></blockquote><p>extra",
+ [["stylewithcss","true"],["outdent",""]],
+ "<p>foo[bar]</p><blockquote><p>baz</p></blockquote><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""]}],
+["<blockquote style=\"margin-right: 0px;\" dir=\"ltr\"><p>foo[bar]</p><p>baz</p></blockquote><p>extra",
+ [["stylewithcss","false"],["outdent",""]],
+ "<p>foo[bar]</p><blockquote><p>baz</p></blockquote><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"outdent":[false,false,"",false,false,""]}],
+["<blockquote style=\"margin-right: 0px;\" dir=\"ltr\"><p>foo[bar</p><p>b]az</p></blockquote><p>extra",
+ [["stylewithcss","true"],["outdent",""]],
+ "<p>foo[bar</p><p>b]az</p><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""]}],
+["<blockquote style=\"margin-right: 0px;\" dir=\"ltr\"><p>foo[bar</p><p>b]az</p></blockquote><p>extra",
+ [["stylewithcss","false"],["outdent",""]],
+ "<p>foo[bar</p><p>b]az</p><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"outdent":[false,false,"",false,false,""]}],
+["<blockquote style=\"margin-right: 0px;\" dir=\"ltr\"><p>foo[bar]</p></blockquote><p>baz</p><p>extra",
+ [["stylewithcss","true"],["outdent",""]],
+ "<p>foo[bar]</p><p>baz</p><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""]}],
+["<blockquote style=\"margin-right: 0px;\" dir=\"ltr\"><p>foo[bar]</p></blockquote><p>baz</p><p>extra",
+ [["stylewithcss","false"],["outdent",""]],
+ "<p>foo[bar]</p><p>baz</p><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"outdent":[false,false,"",false,false,""]}],
+["<blockquote style=\"margin-right: 0px;\" dir=\"ltr\"><p>foo[bar</p></blockquote><p>b]az</p><p>extra",
+ [["stylewithcss","true"],["outdent",""]],
+ "<p>foo[bar</p><p>b]az</p><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""]}],
+["<blockquote style=\"margin-right: 0px;\" dir=\"ltr\"><p>foo[bar</p></blockquote><p>b]az</p><p>extra",
+ [["stylewithcss","false"],["outdent",""]],
+ "<p>foo[bar</p><p>b]az</p><p>extra</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"outdent":[false,false,"",false,false,""]}],
+["<p style=\"margin-left: 40px\">foo[bar]</p><p style=\"margin-left: 40px\">baz</p><p>extra",
+ [["outdent",""]],
+ "<p style=\"margin-left:40px\">foo[bar]</p><p style=\"margin-left:40px\">baz</p><p>extra</p>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<p style=\"margin-left: 40px\">foo[bar</p><p style=\"margin-left: 40px\">b]az</p><p>extra",
+ [["outdent",""]],
+ "<p style=\"margin-left:40px\">foo[bar</p><p style=\"margin-left:40px\">b]az</p><p>extra</p>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<p style=\"margin-left: 40px\">foo[bar]</p><p>baz</p><p>extra",
+ [["outdent",""]],
+ "<p style=\"margin-left:40px\">foo[bar]</p><p>baz</p><p>extra</p>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<p style=\"margin-left: 40px\">foo[bar</p><p>b]az</p><p>extra",
+ [["outdent",""]],
+ "<p style=\"margin-left:40px\">foo[bar</p><p>b]az</p><p>extra</p>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px;\"><p>foo[bar]</p><p>baz</p></blockquote><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["outdent",""]],
+ "<div class=\"webkit-indent-blockquote\"><p>foo[bar]</p><blockquote><p>baz</p></blockquote></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px;\"><p>foo[bar]</p><p>baz</p></blockquote><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["outdent",""]],
+ "<div class=\"webkit-indent-blockquote\"><p>foo[bar]</p><blockquote><p>baz</p></blockquote></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px;\"><p>foo[bar]</p><p>baz</p></blockquote><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["outdent",""]],
+ "<div class=\"webkit-indent-blockquote\"><p>foo[bar]</p><blockquote><p>baz</p></blockquote></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px;\"><p>foo[bar]</p><p>baz</p></blockquote><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["outdent",""]],
+ "<div class=\"webkit-indent-blockquote\"><p>foo[bar]</p><blockquote><p>baz</p></blockquote></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px;\"><p>foo[bar</p><p>b]az</p></blockquote><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["outdent",""]],
+ "<div class=\"webkit-indent-blockquote\"><p>foo[bar</p><p>b]az</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px;\"><p>foo[bar</p><p>b]az</p></blockquote><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["outdent",""]],
+ "<div class=\"webkit-indent-blockquote\"><p>foo[bar</p><p>b]az</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px;\"><p>foo[bar</p><p>b]az</p></blockquote><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["outdent",""]],
+ "<div class=\"webkit-indent-blockquote\"><p>foo[bar</p><p>b]az</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px;\"><p>foo[bar</p><p>b]az</p></blockquote><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["outdent",""]],
+ "<div class=\"webkit-indent-blockquote\"><p>foo[bar</p><p>b]az</p></div><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px;\"><p>foo[bar]</p></blockquote><p>baz</p><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["outdent",""]],
+ "<div class=\"webkit-indent-blockquote\"><p>foo[bar]</p></div><p>baz</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px;\"><p>foo[bar]</p></blockquote><p>baz</p><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["outdent",""]],
+ "<div class=\"webkit-indent-blockquote\"><p>foo[bar]</p></div><p>baz</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px;\"><p>foo[bar]</p></blockquote><p>baz</p><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["outdent",""]],
+ "<div class=\"webkit-indent-blockquote\"><p>foo[bar]</p></div><p>baz</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px;\"><p>foo[bar]</p></blockquote><p>baz</p><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["outdent",""]],
+ "<div class=\"webkit-indent-blockquote\"><p>foo[bar]</p></div><p>baz</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px;\"><p>foo[bar</p></blockquote><p>b]az</p><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","div"],["outdent",""]],
+ "<div class=\"webkit-indent-blockquote\"><p>foo[bar</p></div><p>b]az</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px;\"><p>foo[bar</p></blockquote><p>b]az</p><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","div"],["outdent",""]],
+ "<div class=\"webkit-indent-blockquote\"><p>foo[bar</p></div><p>b]az</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px;\"><p>foo[bar</p></blockquote><p>b]az</p><p>extra",
+ [["stylewithcss","true"],["defaultparagraphseparator","p"],["outdent",""]],
+ "<div class=\"webkit-indent-blockquote\"><p>foo[bar</p></div><p>b]az</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote class=\"webkit-indent-blockquote\" style=\"margin: 0 0 0 40px; border: none; padding: 0px;\"><p>foo[bar</p></blockquote><p>b]az</p><p>extra",
+ [["stylewithcss","false"],["defaultparagraphseparator","p"],["outdent",""]],
+ "<div class=\"webkit-indent-blockquote\"><p>foo[bar</p></div><p>b]az</p><p>extra</p>",
+ [true,true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote><blockquote>foo[bar]baz</blockquote></blockquote>",
+ [["outdent",""]],
+ "<blockquote>foo[bar]baz</blockquote>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote><blockquote data-abc=def>foo[bar]baz</blockquote></blockquote>",
+ [["outdent",""]],
+ "<blockquote data-abc=\"def\">foo[bar]baz</blockquote>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote data-abc=def><blockquote>foo[bar]baz</blockquote></blockquote>",
+ [["outdent",""]],
+ "<blockquote data-abc=\"def\">foo[bar]baz</blockquote>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote><div>foo[bar]baz</div></blockquote>",
+ [["outdent",""]],
+ "<div>foo[bar]baz</div>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote><div id=abc>foo[bar]baz</div></blockquote>",
+ [["outdent",""]],
+ "<div id=\"abc\">foo[bar]baz</div>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote id=abc>foo[bar]baz</blockquote>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<div id=\"abc\">foo[bar]baz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote id=abc>foo[bar]baz</blockquote>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<div id=\"abc\">foo[bar]baz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote style=\"color: blue\">foo[bar]baz</blockquote>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<div style=\"color:rgb(0, 0, 255)\">foo[bar]baz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote style=\"color: blue\">foo[bar]baz</blockquote>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<div style=\"color:rgb(0, 0, 255)\">foo[bar]baz</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote><blockquote><p>foo[bar]<p>baz</blockquote></blockquote>",
+ [["outdent",""]],
+ "<blockquote><p>foo[bar]</p><blockquote><p>baz</p></blockquote></blockquote>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote><blockquote data-abc=def><p>foo[bar]<p>baz</blockquote></blockquote>",
+ [["outdent",""]],
+ "<blockquote data-abc=\"def\"><p>foo[bar]</p><blockquote><p>baz</p></blockquote></blockquote>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote data-abc=def><blockquote><p>foo[bar]<p>baz</blockquote></blockquote>",
+ [["outdent",""]],
+ "<blockquote data-abc=\"def\"><p>foo[bar]</p><blockquote><p>baz</p></blockquote></blockquote>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote><div><p>foo[bar]<p>baz</div></blockquote>",
+ [["outdent",""]],
+ "<div><p>foo[bar]</p><blockquote><p>baz</p></blockquote></div>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote><div id=abc><p>foo[bar]<p>baz</div></blockquote>",
+ [["outdent",""]],
+ "<div id=\"abc\"><p>foo[bar]</p><blockquote><p>baz</p></blockquote></div>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote id=abc><p>foo[bar]<p>baz</blockquote>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<div id=\"abc\"><p>foo[bar]</p><blockquote><p>baz</p></blockquote></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote id=abc><p>foo[bar]<p>baz</blockquote>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<div id=\"abc\"><p>foo[bar]</p><blockquote><p>baz</p></blockquote></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote style=\"color: blue\"><p>foo[bar]<p>baz</blockquote>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<div style=\"color:rgb(0, 0, 255)\"><p>foo[bar]</p><blockquote><p>baz</p></blockquote></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote style=\"color: blue\"><p>foo[bar]<p>baz</blockquote>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<div style=\"color:rgb(0, 0, 255)\"><p>foo[bar]</p><blockquote><p>baz</p></blockquote></div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote><p><b>foo[bar]</b><p>baz</blockquote>",
+ [["outdent",""]],
+ "<p><b>foo[bar]</b></p><blockquote><p>baz</p></blockquote>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote><p><strong>foo[bar]</strong><p>baz</blockquote>",
+ [["outdent",""]],
+ "<p><strong>foo[bar]</strong></p><blockquote><p>baz</p></blockquote>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote><p><span>foo[bar]</span><p>baz</blockquote>",
+ [["outdent",""]],
+ "<p><span>foo[bar]</span></p><blockquote><p>baz</p></blockquote>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote><blockquote style=\"color: blue\"><p>foo[bar]</blockquote><p>baz</blockquote>",
+ [["outdent",""]],
+ "<blockquote style=\"color:rgb(0, 0, 255)\"><p>foo[bar]</p></blockquote><blockquote><p>baz</p></blockquote>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote style=\"color: blue\"><blockquote><p>foo[bar]</blockquote><p>baz</blockquote>",
+ [["outdent",""]],
+ "<blockquote style=\"color:rgb(0, 0, 255)\"><p>foo[bar]</p><p>baz</p></blockquote>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>[bar]<li>baz</ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<ol><li>foo</li></ol><div>[bar]</div><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>[bar]<li>baz</ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<ol><li>foo</li></ol><p>[bar]</p><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol data-start=1 data-end=2><li>foo<li>bar<li>baz</ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<ol><li>foo</li>{</ol><div>bar</div>}<ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol data-start=1 data-end=2><li>foo<li>bar<li>baz</ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<ol><li>foo</li>{</ol><p>bar</p>}<ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>[bar]",
+ [["outdent",""]],
+ "<ol><li>foo</li></ol>[bar]",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo]<br>bar<li>baz</ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<div>[foo]<br>bar</div><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo]<br>bar<li>baz</ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<p>[foo]<br>bar</p><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<br>[bar]<li>baz</ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<div>foo<br>[bar]</div><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<br>[bar]<li>baz</ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<p>foo<br>[bar]</p><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li><div>[foo]</div>bar<li>baz</ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<div>[foo]</div><div>bar</div><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li><div>[foo]</div>bar<li>baz</ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<div>[foo]</div><p>bar</p><ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>[bar]<li>baz</ol><li>quz</ol>",
+ [["outdent",""]],
+ "<ol><li>foo</li><li>[bar]</li><ol><li>baz</li></ol><li>quz</li></ol>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>bar<li>[baz]</ol><li>quz</ol>",
+ [["outdent",""]],
+ "<ol><li>foo</li><ol><li>bar</li></ol><li>[baz]</li><li>quz</li></ol>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol><li>[bar]<li>baz</ol><li>quz</ol>",
+ [["outdent",""]],
+ "<ol><li>foo</li><li>[bar]</li><ol><li>baz</li></ol><li>quz</li></ol>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol data-start=0 data-end=1><li>bar<li>baz</ol><li>quz</ol>",
+ [["outdent",""]],
+ "<ol><li>foo</li>{<li>bar</li>}<ol><li>baz</li></ol><li>quz</li></ol>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol><li>bar<li>[baz]</ol><li>quz</ol>",
+ [["outdent",""]],
+ "<ol><li>foo</li><ol><li>bar</li></ol><li>[baz]</li><li>quz</li></ol>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol data-start=1 data-end=2><li>bar<li>baz</ol><li>quz</ol>",
+ [["outdent",""]],
+ "<ol><li>foo</li><ol><li>bar</li></ol>{<li>baz</li>}<li>quz</li></ol>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>b[a]r</ol><li>baz</ol>",
+ [["outdent",""]],
+ "<ol><li>foo</li><li>b[a]r</li><li>baz</li></ol>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol><li>b[a]r</ol><li>baz</ol>",
+ [["outdent",""]],
+ "<ol><li>foo</li><li>b[a]r</li><li>baz</li></ol>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo{<ol><li>bar</ol>}<li>baz</ol>",
+ [["outdent",""]],
+ "<ol><li>foo</li>{<li>bar</li>}<li>baz</li></ol>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li>{<ol><li>bar</ol>}<li>baz</ol>",
+ [["outdent",""]],
+ "<ol><li>foo</li>{<li>bar</li>}<li>baz</li></ol>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo]<ol><li>bar</ol><li>baz</ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<div>[foo]</div><ol><ol><li>bar</li></ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo]<ol><li>bar</ol><li>baz</ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<p>[foo]</p><ol><ol><li>bar</li></ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo]</li><ol><li>bar</ol><li>baz</ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<div>[foo]</div><ol><ol><li>bar</li></ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo]</li><ol><li>bar</ol><li>baz</ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<p>[foo]</p><ol><ol><li>bar</li></ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>[bar]<ol><li>baz</ol><li>quz</ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<ol><li>foo</li></ol><div>[bar]</div><ol><ol><li>baz</li></ol><li>quz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>[bar]<ol><li>baz</ol><li>quz</ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<ol><li>foo</li></ol><p>[bar]</p><ol><ol><li>baz</li></ol><li>quz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>[bar]</li><ol><li>baz</ol><li>quz</ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<ol><li>foo</li></ol><div>[bar]</div><ol><ol><li>baz</li></ol><li>quz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>[bar]</li><ol><li>baz</ol><li>quz</ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<ol><li>foo</li></ol><p>[bar]</p><ol><ol><li>baz</li></ol><li>quz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>bar<li>baz</ol><li>[quz]</ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<ol><li>foo<ol><li>bar</li><li>baz</li></ol></li></ol><div>[quz]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>bar<li>baz</ol><li>[quz]</ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<ol><li>foo<ol><li>bar</li><li>baz</li></ol></li></ol><p>[quz]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol><li>bar<li>baz</ol><li>[quz]</ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<ol><li>foo</li><ol><li>bar</li><li>baz</li></ol></ol><div>[quz]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol><li>bar<li>baz</ol><li>[quz]</ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<ol><li>foo</li><ol><li>bar</li><li>baz</li></ol></ol><p>[quz]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>b[ar<li>baz]</ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<ol><li>foo</li></ol><div>b[ar</div><div>baz]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<li>b[ar<li>baz]</ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<ol><li>foo</li></ol><p>b[ar</p><p>baz]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo<ol><li>bar]</ol><li>baz</ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<div>[foo</div><ol><li>bar]</li><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo<ol><li>bar]</ol><li>baz</ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<p>[foo</p><ol><li>bar]</li><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo</li><ol><li>bar]</ol><li>baz</ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<div>[foo</div><ol><li>bar]</li><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo</li><ol><li>bar]</ol><li>baz</ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<p>[foo</p><ol><li>bar]</li><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>b[ar</ol><li>b]az</ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<ol><li>foo</li><li>b[ar</li></ol><div>b]az</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>b[ar</ol><li>b]az</ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<ol><li>foo</li><li>b[ar</li></ol><p>b]az</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol><li>b[ar</ol><li>b]az</ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<ol><li>foo</li><li>b[ar</li></ol><div>b]az</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol><li>b[ar</ol><li>b]az</ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<ol><li>foo</li><li>b[ar</li></ol><p>b]az</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo<ol><li>bar</ol><li>baz]</ol><p>extra",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<div>[foo</div><ol><li>bar</li></ol><div>baz]</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo<ol><li>bar</ol><li>baz]</ol><p>extra",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<p>[foo</p><ol><li>bar</li></ol><p>baz]</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo</li><ol><li>bar</ol><li>baz]</ol><p>extra",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<div>[foo</div><ol><li>bar</li></ol><div>baz]</div><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo</li><ol><li>bar</ol><li>baz]</ol><p>extra",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<p>[foo</p><ol><li>bar</li></ol><p>baz]</p><p>extra</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo]<ol><li>bar</ol>baz</ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<div>[foo]</div><ol><ol><li>bar</li></ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo]<ol><li>bar</ol>baz</ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<p>[foo]</p><ol><ol><li>bar</li></ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>[bar]</ol>baz</ol>",
+ [["outdent",""]],
+ "<ol><li>foo</li><li>[bar]</li><li>baz</li></ol>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>bar</ol>[baz]</ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<ol><li>foo</li><ol><li>bar</li></ol></ol><div>[baz]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo<ol><li>bar</ol>[baz]</ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<ol><li>foo</li><ol><li>bar</li></ol></ol><p>[baz]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo<ol><li>bar]</ol>baz</ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<div>[foo</div><ol><li>bar]</li><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo<ol><li>bar]</ol>baz</ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<p>[foo</p><ol><li>bar]</li><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["foo<ol start=5><li>[bar]</ol>baz",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "foo<div>[bar]</div>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["foo<ol start=5><li>[bar]</ol>baz",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "foo<p>[bar]</p>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["foo<ol id=abc><li>[bar]</ol>baz",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "foo<div id=\"abc\"><div>[bar]</div></div>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["foo<ol id=abc><li>[bar]</ol>baz",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "foo<div id=\"abc\"><p>[bar]</p></div>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["foo<ol style=color:blue><li>[bar]</ol>baz",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "foo<div style=\"color:rgb(0, 0, 255)\"><div>[bar]</div></div>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["foo<ol style=color:blue><li>[bar]</ol>baz",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "foo<div style=\"color:rgb(0, 0, 255)\"><p>[bar]</p></div>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["foo<ol><li value=5>[bar]</ol>baz",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "foo<div value=\"5\">[bar]</div>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["foo<ol><li value=5>[bar]</ol>baz",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "foo<p value=\"5\">[bar]</p>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["foo<ol><li id=abc>[bar]</ol>baz",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "foo<div id=\"abc\">[bar]</div>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["foo<ol><li id=abc>[bar]</ol>baz",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "foo<p id=\"abc\">[bar]</p>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["foo<ol><li style=color:blue>[bar]</ol>baz",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "foo<div style=\"color:rgb(0, 0, 255)\">[bar]</div>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["foo<ol><li style=color:blue>[bar]</ol>baz",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "foo<p style=\"color:rgb(0, 0, 255)\">[bar]</p>baz",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol><li value=5>[bar]</ol></ol>",
+ [["outdent",""]],
+ "<ol><li>foo</li><li value=\"5\">[bar]</li></ol>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ul><li>foo</li><ol><li value=5>[bar]</ol></ul>",
+ [["outdent",""]],
+ "<ul><li>foo</li><li value=\"5\">[bar]</li></ul>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol start=5><li>[bar]</ol><li>baz</ol>",
+ [["outdent",""]],
+ "<ol><li>foo</li><li>[bar]</li><li>baz</li></ol>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol id=abc><li>[bar]</ol><li>baz</ol>",
+ [["outdent",""]],
+ "<ol><li>foo</li><li>[bar]</li><li>baz</li></ol>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol style=color:blue><li>[bar]</ol><li>baz</ol>",
+ [["stylewithcss","true"],["outdent",""]],
+ "<ol><li>foo</li><li><span style=\"color:rgb(0, 0, 255)\">[bar]</span></li><li>baz</li></ol>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol style=color:blue><li>[bar]</ol><li>baz</ol>",
+ [["stylewithcss","false"],["outdent",""]],
+ "<ol><li>foo</li><li><font color=\"#0000ff\">[bar]</font></li><li>baz</li></ol>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol style=text-indent:1em><li>[bar]</ol><li>baz</ol>",
+ [["stylewithcss","true"],["outdent",""]],
+ "<ol><li>foo</li><li>[bar]</li><li>baz</li></ol>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol style=text-indent:1em><li>[bar]</ol><li>baz</ol>",
+ [["stylewithcss","false"],["outdent",""]],
+ "<ol><li>foo</li><li>[bar]</li><li>baz</li></ol>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol start=5><li>[bar<li>baz]</ol><li>quz</ol>",
+ [["outdent",""]],
+ "<ol><li>foo</li><li>[bar</li><li>baz]</li><li>quz</li></ol>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol id=abc><li>[bar<li>baz]</ol><li>quz</ol>",
+ [["outdent",""]],
+ "<ol><li>foo</li><li>[bar</li><li>baz]</li><li>quz</li></ol>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol style=color:blue><li>[bar<li>baz]</ol><li>quz</ol>",
+ [["stylewithcss","true"],["outdent",""]],
+ "<ol><li>foo</li><li><span style=\"color:rgb(0, 0, 255)\">[bar</span></li><li><span style=\"color:rgb(0, 0, 255)\">baz]</span></li><li>quz</li></ol>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol style=color:blue><li>[bar<li>baz]</ol><li>quz</ol>",
+ [["stylewithcss","false"],["outdent",""]],
+ "<ol><li>foo</li><li><font color=\"#0000ff\">[bar</font></li><li><font color=\"#0000ff\">baz]</font></li><li>quz</li></ol>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol style=text-indent:1em><li>[bar<li>baz]</ol><li>quz</ol>",
+ [["stylewithcss","true"],["outdent",""]],
+ "<ol><li>foo</li><li>[bar</li><li>baz]</li><li>quz</li></ol>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>foo</li><ol style=text-indent:1em><li>[bar<li>baz]</ol><li>quz</ol>",
+ [["stylewithcss","false"],["outdent",""]],
+ "<ol><li>foo</li><li>[bar</li><li>baz]</li><li>quz</li></ol>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"outdent":[false,false,"",false,false,""]}],
+["<blockquote><ol><li>[foo]</ol></blockquote><p>extra",
+ [["outdent",""]],
+ "<ol><li>[foo]</li></ol><p>extra</p>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote>foo<ol><li>[bar]</ol>baz</blockquote><p>extra",
+ [["outdent",""]],
+ "<blockquote>foo</blockquote><ol><li>[bar]</li></ol><blockquote>baz</blockquote><p>extra</p>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote><ol><li>foo</li><ol><li>[bar]</ol><li>baz</ol></blockquote><p>extra",
+ [["outdent",""]],
+ "<blockquote><ol><li>foo</li><li>[bar]</li><li>baz</li></ol></blockquote><p>extra</p>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li><h1>[foo]</h1></ol>",
+ [["outdent",""]],
+ "<h1>[foo]</h1>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol><li><xmp>[foo]</xmp></li></ol>",
+ [["outdent",""]],
+ "<xmp>[foo]</xmp>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote><ol><li>foo<div><ol><li>[bar]</ol></div><li>baz</ol></blockquote>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<blockquote><ol><li>foo</li><li>[bar]</li><li>baz</li></ol></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote><ol><li>foo<div><ol><li>[bar]</ol></div><li>baz</ol></blockquote>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<blockquote><ol><li>foo</li><li>[bar]</li><li>baz</li></ol></blockquote>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote> <p>[foo]</p></blockquote>",
+ [["outdent",""]],
+ " <p>[foo]</p>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote><p>[foo]</p> </blockquote>",
+ [["outdent",""]],
+ "<p>[foo]</p> ",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote> <p>[foo]</p> </blockquote>",
+ [["outdent",""]],
+ " <p>[foo]</p> ",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol> <li>[foo]</li></ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ " <div>[foo]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol> <li>[foo]</li></ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ " <p>[foo]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo]</li> </ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<div>[foo]</div> ",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[foo]</li> </ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<p>[foo]</p> ",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol> <li>[foo]</li> </ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ " <div>[foo]</div> ",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol> <li>[foo]</li> </ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ " <p>[foo]</p> ",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ul> <li>[foo]</li></ul>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ " <div>[foo]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ul> <li>[foo]</li></ul>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ " <p>[foo]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ul><li>[foo]</li> </ul>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<div>[foo]</div> ",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ul><li>[foo]</li> </ul>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<p>[foo]</p> ",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ul> <li>[foo]</li> </ul>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ " <div>[foo]</div> ",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ul> <li>[foo]</li> </ul>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ " <p>[foo]</p> ",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote> <p>[foo]</p> <p>bar</p> <p>baz</p></blockquote>",
+ [["outdent",""]],
+ " <p>[foo]</p><blockquote> <p>bar</p> <p>baz</p></blockquote>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote> <p>foo</p> <p>[bar]</p> <p>baz</p></blockquote>",
+ [["outdent",""]],
+ "<blockquote> <p>foo</p> </blockquote><p>[bar]</p><blockquote> <p>baz</p></blockquote>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<blockquote> <p>foo</p> <p>bar</p> <p>[baz]</p></blockquote>",
+ [["outdent",""]],
+ "<blockquote> <p>foo</p> <p>bar</p> </blockquote><p>[baz]</p>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}],
+["<ol> <li>[foo]</li> <li>bar</li> <li>baz</li></ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ " <div>[foo]</div> <ol><li>bar</li> <li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol> <li>[foo]</li> <li>bar</li> <li>baz</li></ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ " <p>[foo]</p> <ol><li>bar</li> <li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol> <li>foo</li> <li>[bar]</li> <li>baz</li></ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<ol> <li>foo</li></ol> <div>[bar]</div> <ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol> <li>foo</li> <li>[bar]</li> <li>baz</li></ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<ol> <li>foo</li></ol> <p>[bar]</p> <ol><li>baz</li></ol>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol> <li>foo</li> <li>bar</li> <li>[baz]</li></ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<ol> <li>foo</li> <li>bar</li></ol> <div>[baz]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol> <li>foo</li> <li>bar</li> <li>[baz]</li></ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<ol> <li>foo</li> <li>bar</li></ol> <p>[baz]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ul> <li>[foo]</li> <li>bar</li> <li>baz</li></ul>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ " <div>[foo]</div> <ul><li>bar</li> <li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ul> <li>[foo]</li> <li>bar</li> <li>baz</li></ul>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ " <p>[foo]</p> <ul><li>bar</li> <li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ul> <li>foo</li> <li>[bar]</li> <li>baz</li></ul>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<ul> <li>foo</li></ul> <div>[bar]</div> <ul><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ul> <li>foo</li> <li>[bar]</li> <li>baz</li></ul>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<ul> <li>foo</li></ul> <p>[bar]</p> <ul><li>baz</li></ul>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ul> <li>foo</li> <li>bar</li> <li>[baz]</li></ul>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<ul> <li>foo</li> <li>bar</li></ul> <div>[baz]</div>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ul> <li>foo</li> <li>bar</li> <li>[baz]</li></ul>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<ul> <li>foo</li> <li>bar</li></ul> <p>[baz]</p>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[]a<table><tr><td><br></table></ol>",
+ [["defaultparagraphseparator","div"],["outdent",""]],
+ "<div>[]a</div><table><tbody><tr><td><br></td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"outdent":[false,false,"",false,false,""]}],
+["<ol><li>[]a<table><tr><td><br></table></ol>",
+ [["defaultparagraphseparator","p"],["outdent",""]],
+ "<p>[]a</p><table><tbody><tr><td><br></td></tr></tbody></table>",
+ [true,true],
+ {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
+["<blockquote><span>foo<br>[bar]</span></blockquote>",
+ [["outdent",""]],
+ "<blockquote>foo</blockquote><span>[bar]</span>",
+ [true],
+ {"outdent":[false,false,"",false,false,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/removeformat.js b/testing/web-platform/tests/editing/data/removeformat.js
new file mode 100644
index 000000000..b11ee52cc
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/removeformat.js
@@ -0,0 +1,717 @@
+var browserTests = [
+["foo[]bar",
+ [["removeformat",""]],
+ "foo[]bar",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["<span>foo</span>{}<span>bar</span>",
+ [["removeformat",""]],
+ "<span>foo</span>{}<span>bar</span>",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["<span>foo[</span><span>]bar</span>",
+ [["removeformat",""]],
+ "<span>foo[</span><span>]bar</span>",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<b>bar</b>baz]",
+ [["stylewithcss","true"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<b>bar</b>baz]",
+ [["stylewithcss","false"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["foo[<b>bar</b>baz]",
+ [["stylewithcss","true"],["removeformat",""]],
+ "foo[barbaz]",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["foo[<b>bar</b>baz]",
+ [["stylewithcss","false"],["removeformat",""]],
+ "foo[barbaz]",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["foo[<b>bar</b>]baz",
+ [["stylewithcss","true"],["removeformat",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["foo[<b>bar</b>]baz",
+ [["stylewithcss","false"],["removeformat",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<b>[bar]</b>baz",
+ [["stylewithcss","true"],["removeformat",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<b>[bar]</b>baz",
+ [["stylewithcss","false"],["removeformat",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<b>b[a]r</b>baz",
+ [["stylewithcss","true"],["removeformat",""]],
+ "foo<b>b</b>[a]<b>r</b>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<b>b[a]r</b>baz",
+ [["stylewithcss","false"],["removeformat",""]],
+ "foo<b>b</b>[a]<b>r</b>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<strong>bar</strong>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<span style=\"font-weight: bold\">bar</span>baz]",
+ [["stylewithcss","true"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<span style=\"font-weight: bold\">bar</span>baz]",
+ [["stylewithcss","false"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<span style=\"font-weight: bold\">b[a]r</span>baz",
+ [["stylewithcss","true"],["removeformat",""]],
+ "foo<span style=\"font-weight:bold\">b</span>[a]<span style=\"font-weight:bold\">r</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<span style=\"font-weight: bold\">b[a]r</span>baz",
+ [["stylewithcss","false"],["removeformat",""]],
+ "foo<span style=\"font-weight:bold\">b</span>[a]<span style=\"font-weight:bold\">r</span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<span style=\"font-variant: small-caps\">bar</span>baz]",
+ [["stylewithcss","true"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<span style=\"font-variant: small-caps\">bar</span>baz]",
+ [["stylewithcss","false"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<span style=\"font-variant: small-caps\">b[a]r</span>baz",
+ [["stylewithcss","true"],["removeformat",""]],
+ "foo<span style=\"font-variant:small-caps\">b</span>[a]<span style=\"font-variant:small-caps\">r</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<span style=\"font-variant: small-caps\">b[a]r</span>baz",
+ [["stylewithcss","false"],["removeformat",""]],
+ "foo<span style=\"font-variant:small-caps\">b</span>[a]<span style=\"font-variant:small-caps\">r</span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<b id=foo>bar</b>baz]",
+ [["stylewithcss","true"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<b id=foo>bar</b>baz]",
+ [["stylewithcss","false"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<b id=foo>b[a]r</b>baz",
+ [["stylewithcss","true"],["removeformat",""]],
+ "foo<b id=\"foo\">b</b>[a]<b>r</b>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<b id=foo>b[a]r</b>baz",
+ [["stylewithcss","false"],["removeformat",""]],
+ "foo<b id=\"foo\">b</b>[a]<b>r</b>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<a>bar</a>baz]",
+ [["removeformat",""]],
+ "[foo<a>bar</a>baz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<a>b[a]r</a>baz",
+ [["removeformat",""]],
+ "foo<a>b[a]r</a>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<a href=foo>bar</a>baz]",
+ [["removeformat",""]],
+ "[foo<a href=\"foo\">bar</a>baz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<a href=foo>b[a]r</a>baz",
+ [["removeformat",""]],
+ "foo<a href=\"foo\">b[a]r</a>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<abbr>bar</abbr>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<abbr>b[a]r</abbr>baz",
+ [["removeformat",""]],
+ "foo<abbr>b</abbr>[a]<abbr>r</abbr>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<acronym>bar</acronym>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<acronym>b[a]r</acronym>baz",
+ [["removeformat",""]],
+ "foo<acronym>b</acronym>[a]<acronym>r</acronym>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<b>bar</b>baz]",
+ [["stylewithcss","true"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<b>bar</b>baz]",
+ [["stylewithcss","false"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<b>b[a]r</b>baz",
+ [["stylewithcss","true"],["removeformat",""]],
+ "foo<b>b</b>[a]<b>r</b>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<b>b[a]r</b>baz",
+ [["stylewithcss","false"],["removeformat",""]],
+ "foo<b>b</b>[a]<b>r</b>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<bdi dir=rtl>bar</bdi>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<bdi dir=rtl>b[a]r</bdi>baz",
+ [["removeformat",""]],
+ "foo<bdi dir=\"rtl\">b</bdi>[a]<bdi dir=\"rtl\">r</bdi>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<bdo dir=rtl>bar</bdo>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<bdo dir=rtl>b[a]r</bdo>baz",
+ [["removeformat",""]],
+ "foo<bdo dir=\"rtl\">b</bdo>[a]<bdo dir=\"rtl\">r</bdo>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<big>bar</big>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<big>b[a]r</big>baz",
+ [["removeformat",""]],
+ "foo<big>b</big>[a]<big>r</big>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<blink>bar</blink>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<blink>b[a]r</blink>baz",
+ [["removeformat",""]],
+ "foo<blink>b</blink>[a]<blink>r</blink>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<cite>bar</cite>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<cite>b[a]r</cite>baz",
+ [["removeformat",""]],
+ "foo<cite>b</cite>[a]<cite>r</cite>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<code>bar</code>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<code>b[a]r</code>baz",
+ [["removeformat",""]],
+ "foo<code>b</code>[a]<code>r</code>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<del>bar</del>baz]",
+ [["removeformat",""]],
+ "[foo<del>bar</del>baz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<del>b[a]r</del>baz",
+ [["removeformat",""]],
+ "foo<del>b[a]r</del>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<dfn>bar</dfn>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<dfn>b[a]r</dfn>baz",
+ [["removeformat",""]],
+ "foo<dfn>b</dfn>[a]<dfn>r</dfn>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<em>bar</em>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<em>b[a]r</em>baz",
+ [["removeformat",""]],
+ "foo<em>b</em>[a]<em>r</em>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<font>bar</font>baz]",
+ [["stylewithcss","true"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<font>bar</font>baz]",
+ [["stylewithcss","false"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<font>b[a]r</font>baz",
+ [["stylewithcss","true"],["removeformat",""]],
+ "foo<font>b</font>[a]<font>r</font>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<font>b[a]r</font>baz",
+ [["stylewithcss","false"],["removeformat",""]],
+ "foo<font>b</font>[a]<font>r</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<font color=blue>bar</font>baz]",
+ [["stylewithcss","true"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<font color=blue>bar</font>baz]",
+ [["stylewithcss","false"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<font color=blue>b[a]r</font>baz",
+ [["stylewithcss","true"],["removeformat",""]],
+ "foo<font color=\"blue\">b</font>[a]<font color=\"blue\">r</font>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<font color=blue>b[a]r</font>baz",
+ [["stylewithcss","false"],["removeformat",""]],
+ "foo<font color=\"blue\">b</font>[a]<font color=\"blue\">r</font>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<i>bar</i>baz]",
+ [["stylewithcss","true"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<i>bar</i>baz]",
+ [["stylewithcss","false"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<i>b[a]r</i>baz",
+ [["stylewithcss","true"],["removeformat",""]],
+ "foo<i>b</i>[a]<i>r</i>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<i>b[a]r</i>baz",
+ [["stylewithcss","false"],["removeformat",""]],
+ "foo<i>b</i>[a]<i>r</i>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<ins>bar</ins>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<ins>b[a]r</ins>baz",
+ [["removeformat",""]],
+ "foo<ins>b</ins>[a]<ins>r</ins>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<kbd>bar</kbd>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<kbd>b[a]r</kbd>baz",
+ [["removeformat",""]],
+ "foo<kbd>b</kbd>[a]<kbd>r</kbd>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<mark>bar</mark>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<mark>b[a]r</mark>baz",
+ [["removeformat",""]],
+ "foo<mark>b</mark>[a]<mark>r</mark>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<nobr>bar</nobr>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<nobr>b[a]r</nobr>baz",
+ [["removeformat",""]],
+ "foo<nobr>b</nobr>[a]<nobr>r</nobr>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<q>bar</q>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<q>b[a]r</q>baz",
+ [["removeformat",""]],
+ "foo<q>b</q>[a]<q>r</q>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<samp>bar</samp>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<samp>b[a]r</samp>baz",
+ [["removeformat",""]],
+ "foo<samp>b</samp>[a]<samp>r</samp>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<s>bar</s>baz]",
+ [["stylewithcss","true"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<s>bar</s>baz]",
+ [["stylewithcss","false"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<s>b[a]r</s>baz",
+ [["stylewithcss","true"],["removeformat",""]],
+ "foo<s>b</s>[a]<s>r</s>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<s>b[a]r</s>baz",
+ [["stylewithcss","false"],["removeformat",""]],
+ "foo<s>b</s>[a]<s>r</s>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<small>bar</small>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<small>b[a]r</small>baz",
+ [["removeformat",""]],
+ "foo<small>b</small>[a]<small>r</small>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<span>bar</span>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<span>b[a]r</span>baz",
+ [["removeformat",""]],
+ "foo<span>b</span>[a]<span>r</span>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<strike>bar</strike>baz]",
+ [["stylewithcss","true"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<strike>bar</strike>baz]",
+ [["stylewithcss","false"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<strike>b[a]r</strike>baz",
+ [["stylewithcss","true"],["removeformat",""]],
+ "foo<strike>b</strike>[a]<strike>r</strike>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<strike>b[a]r</strike>baz",
+ [["stylewithcss","false"],["removeformat",""]],
+ "foo<strike>b</strike>[a]<strike>r</strike>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<strong>bar</strong>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<strong>b[a]r</strong>baz",
+ [["removeformat",""]],
+ "foo<strong>b</strong>[a]<strong>r</strong>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<sub>bar</sub>baz]",
+ [["stylewithcss","true"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<sub>bar</sub>baz]",
+ [["stylewithcss","false"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<sub>b[a]r</sub>baz",
+ [["stylewithcss","true"],["removeformat",""]],
+ "foo<sub>b</sub>[a]<sub>r</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<sub>b[a]r</sub>baz",
+ [["stylewithcss","false"],["removeformat",""]],
+ "foo<sub>b</sub>[a]<sub>r</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<sup>bar</sup>baz]",
+ [["stylewithcss","true"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<sup>bar</sup>baz]",
+ [["stylewithcss","false"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<sup>b[a]r</sup>baz",
+ [["stylewithcss","true"],["removeformat",""]],
+ "foo<sup>b</sup>[a]<sup>r</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<sup>b[a]r</sup>baz",
+ [["stylewithcss","false"],["removeformat",""]],
+ "foo<sup>b</sup>[a]<sup>r</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<tt>bar</tt>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<tt>b[a]r</tt>baz",
+ [["removeformat",""]],
+ "foo<tt>b</tt>[a]<tt>r</tt>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<u>bar</u>baz]",
+ [["stylewithcss","true"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<u>bar</u>baz]",
+ [["stylewithcss","false"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<u>b[a]r</u>baz",
+ [["stylewithcss","true"],["removeformat",""]],
+ "foo<u>b</u>[a]<u>r</u>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<u>b[a]r</u>baz",
+ [["stylewithcss","false"],["removeformat",""]],
+ "foo<u>b</u>[a]<u>r</u>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<var>bar</var>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<var>b[a]r</var>baz",
+ [["removeformat",""]],
+ "foo<var>b</var>[a]<var>r</var>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<br>bar]",
+ [["removeformat",""]],
+ "[foo<br>bar]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<hr>bar]",
+ [["removeformat",""]],
+ "[foo<hr>bar]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<wbr>bar]",
+ [["removeformat",""]],
+ "[foo<wbr>bar]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<img>bar]",
+ [["removeformat",""]],
+ "[foo<img>bar]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<img src=abc>bar]",
+ [["removeformat",""]],
+ "[foo<img src=\"abc\">bar]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<video></video>bar]",
+ [["removeformat",""]],
+ "[foo<video></video>bar]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<video src=abc></video>bar]",
+ [["removeformat",""]],
+ "[foo<video src=\"abc\"></video>bar]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<svg><circle fill=blue r=20 cx=20 cy=20 /></svg>bar]",
+ [["removeformat",""]],
+ "[foo<svg><circle fill=\"blue\" r=\"20\" cx=\"20\" cy=\"20\"></circle></svg>bar]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<nonexistentelement>bar</nonexistentelement>baz]",
+ [["removeformat",""]],
+ "[foo<nonexistentelement>bar</nonexistentelement>baz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<nonexistentelement>b[a]r</nonexistentelement>baz",
+ [["removeformat",""]],
+ "foo<nonexistentelement>b[a]r</nonexistentelement>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<nonexistentelement style=\"display: block\">bar</nonexistentelement>baz]",
+ [["removeformat",""]],
+ "[foo<nonexistentelement style=\"display:block\">bar</nonexistentelement>baz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<nonexistentelement style=\"display: block\">b[a]r</nonexistentelement>baz",
+ [["removeformat",""]],
+ "foo<nonexistentelement style=\"display:block\">b[a]r</nonexistentelement>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<span id=foo>bar</span>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<span id=foo>b[a]r</span>baz",
+ [["removeformat",""]],
+ "foo<span id=\"foo\">b</span>[a]<span>r</span>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<span class=foo>bar</span>baz]",
+ [["removeformat",""]],
+ "[foobarbaz]",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["foo<span class=foo>b[a]r</span>baz",
+ [["removeformat",""]],
+ "foo<span class=\"foo\">b</span>[a]<span class=\"foo\">r</span>baz",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["[foo<b style=\"font-weight: normal\">bar</b>baz]",
+ [["stylewithcss","true"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["[foo<b style=\"font-weight: normal\">bar</b>baz]",
+ [["stylewithcss","false"],["removeformat",""]],
+ "[foobarbaz]",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<b style=\"font-weight: normal\">b[a]r</b>baz",
+ [["stylewithcss","true"],["removeformat",""]],
+ "foo<b style=\"font-weight:normal\">b</b>[a]<b style=\"font-weight:normal\">r</b>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["foo<b style=\"font-weight: normal\">b[a]r</b>baz",
+ [["stylewithcss","false"],["removeformat",""]],
+ "foo<b style=\"font-weight:normal\">b</b>[a]<b style=\"font-weight:normal\">r</b>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["<p style=\"background-color: aqua\">foo[bar]baz</p>",
+ [["removeformat",""]],
+ "<p style=\"background-color:rgb(0, 255, 255)\">foo[bar]baz</p>",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["<p><span style=\"background-color: aqua\">foo[bar]baz</span></p>",
+ [["stylewithcss","true"],["removeformat",""]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">foo</span>[bar]<span style=\"background-color:rgb(0, 255, 255)\">baz</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["<p><span style=\"background-color: aqua\">foo[bar]baz</span></p>",
+ [["stylewithcss","false"],["removeformat",""]],
+ "<p><span style=\"background-color:rgb(0, 255, 255)\">foo</span>[bar]<span style=\"background-color:rgb(0, 255, 255)\">baz</span></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["<p style=\"font-weight: bold\">foo[bar]baz</p>",
+ [["stylewithcss","true"],["removeformat",""]],
+ "<p><span style=\"font-weight:bold\">foo</span>[bar]<span style=\"font-weight:bold\">baz</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["<p style=\"font-weight: bold\">foo[bar]baz</p>",
+ [["stylewithcss","false"],["removeformat",""]],
+ "<p><b>foo</b>[bar]<b>baz</b></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["<b><p style=\"font-weight: bold\">foo[bar]baz</p></b>",
+ [["stylewithcss","true"],["removeformat",""]],
+ "<p><span style=\"font-weight:bold\">foo</span>[bar]<span style=\"font-weight:bold\">baz</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["<b><p style=\"font-weight: bold\">foo[bar]baz</p></b>",
+ [["stylewithcss","false"],["removeformat",""]],
+ "<p><b>foo</b>[bar]<b>baz</b></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}],
+["<p style=\"font-variant: small-caps\">foo[bar]baz</p>",
+ [["removeformat",""]],
+ "<p style=\"font-variant:small-caps\">foo[bar]baz</p>",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["{<p style=\"font-variant: small-caps\">foobarbaz</p>}",
+ [["removeformat",""]],
+ "{<p style=\"font-variant:small-caps\">foobarbaz</p>}",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["<p style=\"text-indent: 2em\">foo[bar]baz</p>",
+ [["removeformat",""]],
+ "<p style=\"text-indent:2em\">foo[bar]baz</p>",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["{<p style=\"text-indent: 2em\">foobarbaz</p>}",
+ [["removeformat",""]],
+ "{<p style=\"text-indent:2em\">foobarbaz</p>}",
+ [true],
+ {"removeformat":[false,false,"",false,false,""]}],
+["<table data-start=0 data-end=1><tr><td><b>foo</b></table>",
+ [["stylewithcss","true"],["removeformat",""]],
+ "<table>{<tbody><tr><td>foo</td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"removeformat":[false,false,"",false,false,""]}],
+["<table data-start=0 data-end=1><tr><td><b>foo</b></table>",
+ [["stylewithcss","false"],["removeformat",""]],
+ "<table>{<tbody><tr><td>foo</td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"removeformat":[false,false,"",false,false,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/strikethrough.js b/testing/web-platform/tests/editing/data/strikethrough.js
new file mode 100644
index 000000000..6cacb5d23
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/strikethrough.js
@@ -0,0 +1,727 @@
+var browserTests = [
+["foo[]bar",
+ [["strikethrough",""]],
+ "foo[]bar",
+ [true],
+ {"strikethrough":[false,false,"",false,true,""]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<p><span style=\"text-decoration:line-through\">[foo</span></p> <p><span style=\"text-decoration:line-through\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<p><s>[foo</s></p> <p><s>bar]</s></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<span style=\"text-decoration:line-through\"><span>[foo</span> <span>bar]</span></span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<s><span>[foo</span> <span>bar]</span></s>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<p><span style=\"text-decoration:line-through\">[foo</span></p><p> <span style=\"text-decoration:line-through\"><span>bar</span></span> </p><p><span style=\"text-decoration:line-through\">baz]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<p><s>[foo</s></p><p> <s><span>bar</span></s> </p><p><s>baz]</s></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<p><span style=\"text-decoration:line-through\">[foo</span></p><p><span style=\"text-decoration:line-through\"><br></span></p><p><span style=\"text-decoration:line-through\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<p><s>[foo</s></p><p><s><br></s></p><p><s>bar]</s></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<b>foo[]bar</b>",
+ [["strikethrough",""]],
+ "<b>foo[]bar</b>",
+ [true],
+ {"strikethrough":[false,false,"",false,true,""]}],
+["<i>foo[]bar</i>",
+ [["strikethrough",""]],
+ "<i>foo[]bar</i>",
+ [true],
+ {"strikethrough":[false,false,"",false,true,""]}],
+["<span>foo</span>{}<span>bar</span>",
+ [["strikethrough",""]],
+ "<span>foo</span>{}<span>bar</span>",
+ [true],
+ {"strikethrough":[false,false,"",false,true,""]}],
+["<span>foo[</span><span>]bar</span>",
+ [["strikethrough",""]],
+ "<span>foo[</span><span>]bar</span>",
+ [true],
+ {"strikethrough":[false,false,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo<span style=\"text-decoration:line-through\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo<s>[bar]</s>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo<span style=\"text-decoration:line-through\">[bar</span><b><span style=\"text-decoration:line-through\">baz]</span>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo<s>[bar</s><b><s>baz]</s>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo<span style=\"text-decoration:line-through\">[bar</span><i><span style=\"text-decoration:line-through\">baz]</span>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo<s>[bar</s><i><s>baz]</s>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "{<p></p><p> </p><p><span style=\"text-decoration:line-through\">foo</span></p>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "{<p></p><p> </p><p><s>foo</s></p>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<table><tbody><tr><td>foo</td><td>b<span style=\"text-decoration:line-through\">[a]</span>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<table><tbody><tr><td>foo</td><td>b<s>[a]</s>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<table><tbody><tr><td>foo</td>{<td><span style=\"text-decoration:line-through\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<table><tbody><tr><td>foo</td>{<td><s>bar</s></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<table><tbody><tr>{<td><span style=\"text-decoration:line-through\">foo</span></td><td><span style=\"text-decoration:line-through\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<table><tbody><tr>{<td><s>foo</s></td><td><s>bar</s></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<table><tbody>{<tr><td><span style=\"text-decoration:line-through\">foo</span></td><td><span style=\"text-decoration:line-through\">bar</span></td><td><span style=\"text-decoration:line-through\">baz</span></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<table><tbody>{<tr><td><s>foo</s></td><td><s>bar</s></td><td><s>baz</s></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<table>{<tbody><tr><td><span style=\"text-decoration:line-through\">foo</span></td><td><span style=\"text-decoration:line-through\">bar</span></td><td><span style=\"text-decoration:line-through\">baz</span></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<table>{<tbody><tr><td><s>foo</s></td><td><s>bar</s></td><td><s>baz</s></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "{<table><tbody><tr><td><span style=\"text-decoration:line-through\">foo</span></td><td><span style=\"text-decoration:line-through\">bar</span></td><td><span style=\"text-decoration:line-through\">baz</span></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "{<table><tbody><tr><td><s>foo</s></td><td><s>bar</s></td><td><s>baz</s></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<u>[bar]</u>baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo<span style=\"text-decoration:line-through\"><u>[bar]</u></span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<u>[bar]</u>baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo<s><u>[bar]</u></s>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<span style=\"text-decoration: underline\">[bar]</span>baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo<span style=\"text-decoration:line-through\"><span style=\"text-decoration:underline\">[bar]</span></span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<span style=\"text-decoration: underline\">[bar]</span>baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo<s><span style=\"text-decoration:underline\">[bar]</span></s>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<u>foo[bar]baz</u>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<u>foo<span style=\"text-decoration:line-through\">[bar]</span>baz</u>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<u>foo[bar]baz</u>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<u>foo<s>[bar]</s>baz</u>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<u>foo[b<span style=\"color:blue\">ar]ba</span>z</u>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<u>foo<span style=\"text-decoration:line-through\">[b</span><span style=\"color:rgb(0, 0, 255)\"><span style=\"text-decoration:line-through\">ar]</span>ba</span>z</u>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<u>foo[b<span style=\"color:blue\">ar]ba</span>z</u>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<u>foo<s>[b</s><span style=\"color:rgb(0, 0, 255)\"><s>ar]</s>ba</span>z</u>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<u>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</u>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<u>foo<span style=\"text-decoration:line-through\">[b</span><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><span style=\"text-decoration:line-through\">ar]</span>ba</span>z</u>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<u>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</u>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<u>foo<s>[b</s><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><s>ar]</s>ba</span>z</u>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<u>foo[b<span style=\"font-size:3em\">ar]ba</span>z</u>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<u>foo<span style=\"text-decoration:line-through\">[b</span><span style=\"font-size:3em\"><span style=\"text-decoration:line-through\">ar]</span>ba</span>z</u>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<u>foo[b<span style=\"font-size:3em\">ar]ba</span>z</u>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<u>foo<s>[b</s><span style=\"font-size:3em\"><s>ar]</s>ba</span>z</u>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<u>foo[b<i>ar]ba</i>z</u>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<u>foo<span style=\"text-decoration:line-through\">[b</span><i><span style=\"text-decoration:line-through\">ar]</span>ba</i>z</u>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<u>foo[b<i>ar]ba</i>z</u>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<u>foo<s>[b</s><i><s>ar]</s>ba</i>z</u>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<p style=\"text-decoration: underline\">foo[bar]baz</p>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<p style=\"text-decoration:underline\">foo<span style=\"text-decoration:line-through\">[bar]</span>baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<p style=\"text-decoration: underline\">foo[bar]baz</p>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<p style=\"text-decoration:underline\">foo<s>[bar]</s>baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<s>[bar]</s>baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo<s>[bar]</s>baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo<span style=\"text-decoration: line-through\">[bar]</span>baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo<span style=\"text-decoration: line-through\">[bar]</span>baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["<s>foo[bar]baz</s>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<span style=\"text-decoration:line-through\">foo</span>[bar]<span style=\"text-decoration:line-through\">baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["<s>foo[bar]baz</s>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<s>foo</s>[bar]<s>baz</s>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["<s>foo[b<span style=\"color:blue\">ar]ba</span>z</s>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<span style=\"text-decoration:line-through\">foo</span>[b<span style=\"color:rgb(0, 0, 255)\">ar]<span style=\"text-decoration:line-through\">ba</span></span><span style=\"text-decoration:line-through\">z</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["<s>foo[b<span style=\"color:blue\">ar]ba</span>z</s>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<s>foo</s>[b<span style=\"color:rgb(0, 0, 255)\">ar]<s>ba</s></span><s>z</s>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["<s>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</s>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<span style=\"text-decoration:line-through\">foo</span>[b<span style=\"color:rgb(0, 0, 255)\" id=\"foo\">ar]<span style=\"text-decoration:line-through\">ba</span></span><span style=\"text-decoration:line-through\">z</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["<s>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</s>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<s>foo</s>[b<span style=\"color:rgb(0, 0, 255)\" id=\"foo\">ar]<s>ba</s></span><s>z</s>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["<s>foo[b<span style=\"font-size:3em\">ar]ba</span>z</s>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<span style=\"text-decoration:line-through\">foo</span>[b<span style=\"font-size:3em\">ar]<span style=\"text-decoration:line-through\">ba</span></span><span style=\"text-decoration:line-through\">z</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["<s>foo[b<span style=\"font-size:3em\">ar]ba</span>z</s>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<s>foo</s>[b<span style=\"font-size:3em\">ar]<s>ba</s></span><s>z</s>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["<s>foo[b<i>ar]ba</i>z</s>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<span style=\"text-decoration:line-through\">foo</span>[b<i>ar]<span style=\"text-decoration:line-through\">ba</span></i><span style=\"text-decoration:line-through\">z</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["<s>foo[b<i>ar]ba</i>z</s>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<s>foo</s>[b<i>ar]<s>ba</s></i><s>z</s>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["<p style=\"text-decoration: line-through\">foo[bar]baz</p>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<p><span style=\"text-decoration:line-through\">foo</span>[bar]<span style=\"text-decoration:line-through\">baz</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["<p style=\"text-decoration: line-through\">foo[bar]baz</p>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<p><s>foo</s>[bar]<s>baz</s></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo<strike>[bar]</strike>baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo<strike>[bar]</strike>baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["<strike>foo[bar]baz</strike>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<span style=\"text-decoration:line-through\">foo</span>[bar]<span style=\"text-decoration:line-through\">baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["<strike>foo[bar]baz</strike>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<s>foo</s>[bar]<s>baz</s>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["<strike>foo[b<span style=\"color:blue\">ar]ba</span>z</strike>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<span style=\"text-decoration:line-through\">foo</span>[b<span style=\"color:rgb(0, 0, 255)\">ar]<span style=\"text-decoration:line-through\">ba</span></span><span style=\"text-decoration:line-through\">z</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["<strike>foo[b<span style=\"color:blue\">ar]ba</span>z</strike>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<s>foo</s>[b<span style=\"color:rgb(0, 0, 255)\">ar]<s>ba</s></span><s>z</s>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["<strike>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</strike>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<span style=\"text-decoration:line-through\">foo</span>[b<span style=\"color:rgb(0, 0, 255)\" id=\"foo\">ar]<span style=\"text-decoration:line-through\">ba</span></span><span style=\"text-decoration:line-through\">z</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["<strike>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</strike>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<s>foo</s>[b<span style=\"color:rgb(0, 0, 255)\" id=\"foo\">ar]<s>ba</s></span><s>z</s>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["<strike>foo[b<span style=\"font-size:3em\">ar]ba</span>z</strike>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<span style=\"text-decoration:line-through\">foo</span>[b<span style=\"font-size:3em\">ar]<span style=\"text-decoration:line-through\">ba</span></span><span style=\"text-decoration:line-through\">z</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["<strike>foo[b<span style=\"font-size:3em\">ar]ba</span>z</strike>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<s>foo</s>[b<span style=\"font-size:3em\">ar]<s>ba</s></span><s>z</s>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["<strike>foo[b<i>ar]ba</i>z</strike>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<span style=\"text-decoration:line-through\">foo</span>[b<i>ar]<span style=\"text-decoration:line-through\">ba</span></i><span style=\"text-decoration:line-through\">z</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["<strike>foo[b<i>ar]ba</i>z</strike>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<s>foo</s>[b<i>ar]<s>ba</s></i><s>z</s>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo<ins>[bar]</ins>baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo<span style=\"text-decoration:line-through\"><ins>[bar]</ins></span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<ins>[bar]</ins>baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo<s><ins>[bar]</ins></s>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<ins>foo[bar]baz</ins>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<ins>foo<span style=\"text-decoration:line-through\">[bar]</span>baz</ins>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<ins>foo[bar]baz</ins>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<ins>foo<s>[bar]</s>baz</ins>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<ins>foo[b<span style=\"color:blue\">ar]ba</span>z</ins>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<ins>foo<span style=\"text-decoration:line-through\">[b</span><span style=\"color:rgb(0, 0, 255)\"><span style=\"text-decoration:line-through\">ar]</span>ba</span>z</ins>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<ins>foo[b<span style=\"color:blue\">ar]ba</span>z</ins>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<ins>foo<s>[b</s><span style=\"color:rgb(0, 0, 255)\"><s>ar]</s>ba</span>z</ins>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<ins>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</ins>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<ins>foo<span style=\"text-decoration:line-through\">[b</span><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><span style=\"text-decoration:line-through\">ar]</span>ba</span>z</ins>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<ins>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</ins>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<ins>foo<s>[b</s><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><s>ar]</s>ba</span>z</ins>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<ins>foo[b<span style=\"font-size:3em\">ar]ba</span>z</ins>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<ins>foo<span style=\"text-decoration:line-through\">[b</span><span style=\"font-size:3em\"><span style=\"text-decoration:line-through\">ar]</span>ba</span>z</ins>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<ins>foo[b<span style=\"font-size:3em\">ar]ba</span>z</ins>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<ins>foo<s>[b</s><span style=\"font-size:3em\"><s>ar]</s>ba</span>z</ins>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<ins>foo[b<i>ar]ba</i>z</ins>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<ins>foo<span style=\"text-decoration:line-through\">[b</span><i><span style=\"text-decoration:line-through\">ar]</span>ba</i>z</ins>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<ins>foo[b<i>ar]ba</i>z</ins>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<ins>foo<s>[b</s><i><s>ar]</s>ba</i>z</ins>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<del>[bar]</del>baz",
+ [["strikethrough",""]],
+ "foo<del>[bar]</del>baz",
+ [true],
+ {"strikethrough":[false,true,"",false,true,""]}],
+["<del>foo[bar]baz</del>",
+ [["strikethrough",""]],
+ "<del>foo[bar]baz</del>",
+ [true],
+ {"strikethrough":[false,true,"",false,true,""]}],
+["<del>foo[b<span style=\"color:blue\">ar]ba</span>z</del>",
+ [["strikethrough",""]],
+ "<del>foo[b<span style=\"color:rgb(0, 0, 255)\">ar]ba</span>z</del>",
+ [true],
+ {"strikethrough":[false,true,"",false,true,""]}],
+["<del>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</del>",
+ [["strikethrough",""]],
+ "<del>foo[b<span style=\"color:rgb(0, 0, 255)\" id=\"foo\">ar]ba</span>z</del>",
+ [true],
+ {"strikethrough":[false,true,"",false,true,""]}],
+["<del>foo[b<span style=\"font-size:3em\">ar]ba</span>z</del>",
+ [["strikethrough",""]],
+ "<del>foo[b<span style=\"font-size:3em\">ar]ba</span>z</del>",
+ [true],
+ {"strikethrough":[false,true,"",false,true,""]}],
+["<del>foo[b<i>ar]ba</i>z</del>",
+ [["strikethrough",""]],
+ "<del>foo[b<i>ar]ba</i>z</del>",
+ [true],
+ {"strikethrough":[false,true,"",false,true,""]}],
+["foo<span style=\"text-decoration: underline line-through\">[bar]</span>baz",
+ [["strikethrough",""]],
+ "foo<span style=\"text-decoration:underline\">[bar]</span>baz",
+ [true],
+ {"strikethrough":[false,true,"",false,false,""]}],
+["foo<span style=\"text-decoration: underline line-through\">b[a]r</span>baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo<span style=\"text-decoration:underline\"><span style=\"text-decoration:line-through\">b</span>[a]<span style=\"text-decoration:line-through\">r</span></span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo<span style=\"text-decoration: underline line-through\">b[a]r</span>baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo<span style=\"text-decoration:underline\"><s>b</s>[a]<s>r</s></span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo<s style=\"text-decoration: underline\">[bar]</s>baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo<span style=\"text-decoration:line-through\"><s style=\"text-decoration:underline\">[bar]</s></span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<s style=\"text-decoration: underline\">[bar]</s>baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo<s><s style=\"text-decoration:underline\">[bar]</s></s>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<s style=\"text-decoration: underline\">b[a]r</s>baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo<s style=\"text-decoration:underline\">b<span style=\"text-decoration:line-through\">[a]</span>r</s>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<s style=\"text-decoration: underline\">b[a]r</s>baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo<s style=\"text-decoration:underline\">b<s>[a]</s>r</s>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<u style=\"text-decoration: line-through\">[bar]</u>baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo<u style=\"text-decoration: line-through\">[bar]</u>baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo<u style=\"text-decoration: line-through\">b[a]r</u>baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo<span style=\"text-decoration:line-through\">b</span>[a]<span style=\"text-decoration:line-through\">r</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo<u style=\"text-decoration: line-through\">b[a]r</u>baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo<s>b</s>[a]<s>r</s>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo<s style=\"text-decoration: overline\">[bar]</s>baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo<span style=\"text-decoration:line-through\"><s style=\"text-decoration:overline\">[bar]</s></span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<s style=\"text-decoration: overline\">[bar]</s>baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo<s><s style=\"text-decoration:overline\">[bar]</s></s>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<s style=\"text-decoration: overline\">b[a]r</s>baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo<s style=\"text-decoration:overline\">b<span style=\"text-decoration:line-through\">[a]</span>r</s>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<s style=\"text-decoration: overline\">b[a]r</s>baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo<s style=\"text-decoration:overline\">b<s>[a]</s>r</s>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<u style=\"text-decoration: overline\">[bar]</u>baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo<span style=\"text-decoration:line-through\"><u style=\"text-decoration:overline\">[bar]</u></span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<u style=\"text-decoration: overline\">[bar]</u>baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo<s><u style=\"text-decoration:overline\">[bar]</u></s>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<u style=\"text-decoration: overline\">b[a]r</u>baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo<u style=\"text-decoration:overline\">b<span style=\"text-decoration:line-through\">[a]</span>r</u>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<u style=\"text-decoration: overline\">b[a]r</u>baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo<u style=\"text-decoration:overline\">b<s>[a]</s>r</u>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["<p style=\"text-decoration: line-through\">foo[bar]baz</p>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<p><span style=\"text-decoration:line-through\">foo</span>[bar]<span style=\"text-decoration:line-through\">baz</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["<p style=\"text-decoration: line-through\">foo[bar]baz</p>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<p><s>foo</s>[bar]<s>baz</s></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["<p style=\"text-decoration: overline\">foo[bar]baz</p>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<p style=\"text-decoration:overline\">foo<span style=\"text-decoration:line-through\">[bar]</span>baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["<p style=\"text-decoration: overline\">foo[bar]baz</p>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<p style=\"text-decoration:overline\">foo<s>[bar]</s>baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<span class=\"underline\">[bar]</span>baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo<span style=\"text-decoration:line-through\"><span class=\"underline\">[bar]</span></span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<span class=\"underline\">[bar]</span>baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo<s><span class=\"underline\">[bar]</span></s>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<span class=\"underline\">b[a]r</span>baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo<span class=\"underline\">b<span style=\"text-decoration:line-through\">[a]</span>r</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<span class=\"underline\">b[a]r</span>baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo<span class=\"underline\">b<s>[a]</s>r</span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}],
+["foo<span class=\"line-through\">[bar]</span>baz",
+ [["strikethrough",""]],
+ "foo<span class=\"line-through\">[bar]</span>baz",
+ [true],
+ {"strikethrough":[false,true,"",false,true,""]}],
+["foo<span class=\"line-through\">b[a]r</span>baz",
+ [["strikethrough",""]],
+ "foo<span class=\"line-through\">b[a]r</span>baz",
+ [true],
+ {"strikethrough":[false,true,"",false,true,""]}],
+["foo<span class=\"underline-and-line-through\">[bar]</span>baz",
+ [["strikethrough",""]],
+ "foo<span class=\"underline-and-line-through\">[bar]</span>baz",
+ [true],
+ {"strikethrough":[false,true,"",false,true,""]}],
+["foo<span class=\"underline-and-line-through\">b[a]r</span>baz",
+ [["strikethrough",""]],
+ "foo<span class=\"underline-and-line-through\">b[a]r</span>baz",
+ [true],
+ {"strikethrough":[false,true,"",false,true,""]}],
+["fo[o<s>b]ar</s>baz",
+ [["strikethrough",""]],
+ "fo<s>[ob]ar</s>baz",
+ [true],
+ {"strikethrough":[true,false,"",false,true,""]}],
+["foo<s>ba[r</s>b]az",
+ [["strikethrough",""]],
+ "foo<s>ba[rb]</s>az",
+ [true],
+ {"strikethrough":[true,false,"",false,true,""]}],
+["fo[o<s>bar</s>b]az",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "fo<span style=\"text-decoration:line-through\">[obarb]</span>az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[true,false,"",false,true,""]}],
+["fo[o<s>bar</s>b]az",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "fo<s>[obarb]</s>az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[true,false,"",false,true,""]}],
+["foo[<s>b]ar</s>baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo[b]<span style=\"text-decoration:line-through\">ar</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo[<s>b]ar</s>baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo[b]<s>ar</s>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo<s>ba[r</s>]baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo<span style=\"text-decoration:line-through\">ba</span>[r]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo<s>ba[r</s>]baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo<s>ba</s>[r]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo[<s>bar</s>]baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo[<s>bar</s>]baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo<s>[bar]</s>baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo<s>[bar]</s>baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo{<s>bar</s>}baz",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "foo{bar}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["foo{<s>bar</s>}baz",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "foo{bar}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["fo[o<span style=text-decoration:line-through>b]ar</span>baz",
+ [["strikethrough",""]],
+ "fo<span style=\"text-decoration:line-through\">[ob]ar</span>baz",
+ [true],
+ {"strikethrough":[true,false,"",false,true,""]}],
+["<strike>fo[o</strike><s>b]ar</s>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<span style=\"text-decoration:line-through\">fo</span>[ob]<span style=\"text-decoration:line-through\">ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}],
+["<strike>fo[o</strike><s>b]ar</s>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<s>fo</s>[ob]<s>ar</s>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}],
+["<s>fo[o</s><del>b]ar</del>",
+ [["stylewithcss","true"],["strikethrough",""]],
+ "<span style=\"text-decoration:line-through\">fo</span>[o<del>b]ar</del>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",true,false,""]}],
+["<s>fo[o</s><del>b]ar</del>",
+ [["stylewithcss","false"],["strikethrough",""]],
+ "<s>fo</s>[o<del>b]ar</del>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",true,false,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/subscript.js b/testing/web-platform/tests/editing/data/subscript.js
new file mode 100644
index 000000000..45c779f94
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/subscript.js
@@ -0,0 +1,427 @@
+var browserTests = [
+["foo[]bar",
+ [["subscript",""]],
+ "foo[]bar",
+ [true],
+ {"subscript":[false,false,"",false,true,""]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","true"],["subscript",""]],
+ "<p><sub>[foo</sub></p> <p><sub>bar]</sub></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","false"],["subscript",""]],
+ "<p><sub>[foo</sub></p> <p><sub>bar]</sub></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","true"],["subscript",""]],
+ "<sub><span>[foo</span> <span>bar]</span></sub>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","false"],["subscript",""]],
+ "<sub><span>[foo</span> <span>bar]</span></sub>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","true"],["subscript",""]],
+ "<p><sub>[foo</sub></p><p> <sub><span>bar</span></sub> </p><p><sub>baz]</sub></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","false"],["subscript",""]],
+ "<p><sub>[foo</sub></p><p> <sub><span>bar</span></sub> </p><p><sub>baz]</sub></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","true"],["subscript",""]],
+ "<p><sub>[foo</sub></p><p><sub><br></sub></p><p><sub>bar]</sub></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","false"],["subscript",""]],
+ "<p><sub>[foo</sub></p><p><sub><br></sub></p><p><sub>bar]</sub></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["<b>foo[]bar</b>",
+ [["subscript",""]],
+ "<b>foo[]bar</b>",
+ [true],
+ {"subscript":[false,false,"",false,true,""]}],
+["<i>foo[]bar</i>",
+ [["subscript",""]],
+ "<i>foo[]bar</i>",
+ [true],
+ {"subscript":[false,false,"",false,true,""]}],
+["<span>foo</span>{}<span>bar</span>",
+ [["subscript",""]],
+ "<span>foo</span>{}<span>bar</span>",
+ [true],
+ {"subscript":[false,false,"",false,true,""]}],
+["<span>foo[</span><span>]bar</span>",
+ [["subscript",""]],
+ "<span>foo[</span><span>]bar</span>",
+ [true],
+ {"subscript":[false,false,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo<sub>[bar]</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo<sub>[bar]</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo<sub>[bar</sub><b><sub>baz]</sub>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo<sub>[bar</sub><b><sub>baz]</sub>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo<sub>[bar</sub><i><sub>baz]</sub>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo<sub>[bar</sub><i><sub>baz]</sub>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","true"],["subscript",""]],
+ "{<p></p><p> </p><p><sub>foo</sub></p>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","false"],["subscript",""]],
+ "{<p></p><p> </p><p><sub>foo</sub></p>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","true"],["subscript",""]],
+ "<table><tbody><tr><td>foo</td><td>b<sub>[a]</sub>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","false"],["subscript",""]],
+ "<table><tbody><tr><td>foo</td><td>b<sub>[a]</sub>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["subscript",""]],
+ "<table><tbody><tr><td>foo</td>{<td><sub>bar</sub></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["subscript",""]],
+ "<table><tbody><tr><td>foo</td>{<td><sub>bar</sub></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["subscript",""]],
+ "<table><tbody><tr>{<td><sub>foo</sub></td><td><sub>bar</sub></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["subscript",""]],
+ "<table><tbody><tr>{<td><sub>foo</sub></td><td><sub>bar</sub></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["subscript",""]],
+ "<table><tbody>{<tr><td><sub>foo</sub></td><td><sub>bar</sub></td><td><sub>baz</sub></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["subscript",""]],
+ "<table><tbody>{<tr><td><sub>foo</sub></td><td><sub>bar</sub></td><td><sub>baz</sub></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["subscript",""]],
+ "<table>{<tbody><tr><td><sub>foo</sub></td><td><sub>bar</sub></td><td><sub>baz</sub></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["subscript",""]],
+ "<table>{<tbody><tr><td><sub>foo</sub></td><td><sub>bar</sub></td><td><sub>baz</sub></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","true"],["subscript",""]],
+ "{<table><tbody><tr><td><sub>foo</sub></td><td><sub>bar</sub></td><td><sub>baz</sub></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","false"],["subscript",""]],
+ "{<table><tbody><tr><td><sub>foo</sub></td><td><sub>bar</sub></td><td><sub>baz</sub></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["foo<sub>[bar]</sub>baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,true,"",false,false,""]}],
+["foo<sub>[bar]</sub>baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,true,"",false,false,""]}],
+["foo<sub>b[a]r</sub>baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo<sub>b</sub>[a]<sub>r</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,true,"",false,false,""]}],
+["foo<sub>b[a]r</sub>baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo<sub>b</sub>[a]<sub>r</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,true,"",false,false,""]}],
+["foo<sup>[bar]</sup>baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo<sub>[bar]</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["foo<sup>[bar]</sup>baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo<sub>[bar]</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["foo<sup>b[a]r</sup>baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo<sup>b</sup><sub>[a]</sub><sup>r</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["foo<sup>b[a]r</sup>baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo<sup>b</sup><sub>[a]</sub><sup>r</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["foo<span style=vertical-align:sub>[bar]</span>baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo<sub><span style=\"vertical-align:sub\">[bar]</span></sub>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["foo<span style=vertical-align:sub>[bar]</span>baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo<sub><span style=\"vertical-align:sub\">[bar]</span></sub>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["foo<span style=vertical-align:super>[bar]</span>baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo<sub><span style=\"vertical-align:super\">[bar]</span></sub>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["foo<span style=vertical-align:super>[bar]</span>baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo<sub><span style=\"vertical-align:super\">[bar]</span></sub>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["foo<sub><sub>[bar]</sub></sub>baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,true,"",false,false,""]}],
+["foo<sub><sub>[bar]</sub></sub>baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,true,"",false,false,""]}],
+["foo<sub><sub>b[a]r</sub></sub>baz",
+ [["subscript",""]],
+ "foo<sub>b</sub>[a]<sub>r</sub>baz",
+ [true],
+ {"subscript":[false,true,"",false,false,""]}],
+["foo<sub>b<sub>[a]</sub>r</sub>baz",
+ [["subscript",""]],
+ "foo<sub>b</sub>[a]<sub>r</sub>baz",
+ [true],
+ {"subscript":[false,true,"",false,false,""]}],
+["foo<sup><sup>[bar]</sup></sup>baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo<sub>[bar]</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["foo<sup><sup>[bar]</sup></sup>baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo<sub>[bar]</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["foo<sup><sup>b[a]r</sup></sup>baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo<sup>b</sup><sub>[a]</sub><sup>r</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["foo<sup><sup>b[a]r</sup></sup>baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo<sup>b</sup><sub>[a]</sub><sup>r</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["foo<sup>b<sup>[a]</sup>r</sup>baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo<sup>b</sup><sub>[a]</sub><sup>r</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["foo<sup>b<sup>[a]</sup>r</sup>baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo<sup>b</sup><sub>[a]</sub><sup>r</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["foo<sub><sup>[bar]</sup></sub>baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo<sub>[bar]</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[true,false,"",false,true,""]}],
+["foo<sub><sup>[bar]</sup></sub>baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo<sub>[bar]</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[true,false,"",false,true,""]}],
+["foo<sub><sup>b[a]r</sup></sub>baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo<sup>b</sup><sub>[a]</sub><sup>r</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[true,false,"",false,true,""]}],
+["foo<sub><sup>b[a]r</sup></sub>baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo<sup>b</sup><sub>[a]</sub><sup>r</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[true,false,"",false,true,""]}],
+["foo<sub>b<sup>[a]</sup>r</sub>baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo<sub>b[a]r</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[true,false,"",false,true,""]}],
+["foo<sub>b<sup>[a]</sup>r</sub>baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo<sub>b[a]r</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[true,false,"",false,true,""]}],
+["foo<sup><sub>[bar]</sub></sup>baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo<sub>[bar]</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[true,false,"",false,true,""]}],
+["foo<sup><sub>[bar]</sub></sup>baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo<sub>[bar]</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[true,false,"",false,true,""]}],
+["foo<sup><sub>b[a]r</sub></sup>baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo<sub>b[a]r</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[true,false,"",false,true,""]}],
+["foo<sup><sub>b[a]r</sub></sup>baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo<sub>b[a]r</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[true,false,"",false,true,""]}],
+["foo<sup>b<sub>[a]</sub>r</sup>baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo<sup>b</sup><sub>[a]</sub><sup>r</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[true,false,"",false,true,""]}],
+["foo<sup>b<sub>[a]</sub>r</sup>baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo<sup>b</sup><sub>[a]</sub><sup>r</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[true,false,"",false,true,""]}],
+["fo[o<sub>b]ar</sub>baz",
+ [["subscript",""]],
+ "fo<sub>[ob]ar</sub>baz",
+ [true],
+ {"subscript":[true,false,"",false,true,""]}],
+["foo<sub>ba[r</sub>b]az",
+ [["subscript",""]],
+ "foo<sub>ba[rb]</sub>az",
+ [true],
+ {"subscript":[true,false,"",false,true,""]}],
+["fo[o<sub>bar</sub>b]az",
+ [["subscript",""]],
+ "fo<sub>[obarb]</sub>az",
+ [true],
+ {"subscript":[true,false,"",false,true,""]}],
+["foo[<sub>b]ar</sub>baz",
+ [["subscript",""]],
+ "foo[b]<sub>ar</sub>baz",
+ [true],
+ {"subscript":[false,true,"",false,false,""]}],
+["foo<sub>ba[r</sub>]baz",
+ [["subscript",""]],
+ "foo<sub>ba</sub>[r]baz",
+ [true],
+ {"subscript":[false,true,"",false,false,""]}],
+["foo[<sub>bar</sub>]baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,true,"",false,false,""]}],
+["foo[<sub>bar</sub>]baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,true,"",false,false,""]}],
+["foo<sub>[bar]</sub>baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,true,"",false,false,""]}],
+["foo<sub>[bar]</sub>baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,true,"",false,false,""]}],
+["foo{<sub>bar</sub>}baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo{bar}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,true,"",false,false,""]}],
+["foo{<sub>bar</sub>}baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo{bar}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,true,"",false,false,""]}],
+["<sub>fo[o</sub><sup>b]ar</sup>",
+ [["subscript",""]],
+ "<sub>fo[ob]</sub><sup>ar</sup>",
+ [true],
+ {"subscript":[true,false,"",false,true,""]}],
+["<sub>fo[o</sub><span style=vertical-align:sub>b]ar</span>",
+ [["stylewithcss","true"],["subscript",""]],
+ "<sub>fo[o</sub><span style=\"vertical-align:sub\"><sub>b]</sub>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[true,false,"",false,true,""]}],
+["<sub>fo[o</sub><span style=vertical-align:sub>b]ar</span>",
+ [["stylewithcss","false"],["subscript",""]],
+ "<sub>fo[o</sub><span style=\"vertical-align:sub\"><sub>b]</sub>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[true,false,"",false,true,""]}],
+["foo<span style=vertical-align:top>[bar]</span>baz",
+ [["stylewithcss","true"],["subscript",""]],
+ "foo<sub><span style=\"vertical-align:top\">[bar]</span></sub>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[false,false,"",false,true,""]}],
+["foo<span style=vertical-align:top>[bar]</span>baz",
+ [["stylewithcss","false"],["subscript",""]],
+ "foo<sub><span style=\"vertical-align:top\">[bar]</span></sub>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[false,false,"",false,true,""]}],
+["<sub>fo[o</sub><span style=vertical-align:top>b]ar</span>",
+ [["stylewithcss","true"],["subscript",""]],
+ "<sub>fo[o</sub><span style=\"vertical-align:top\"><sub>b]</sub>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"subscript":[true,false,"",false,true,""]}],
+["<sub>fo[o</sub><span style=vertical-align:top>b]ar</span>",
+ [["stylewithcss","false"],["subscript",""]],
+ "<sub>fo[o</sub><span style=\"vertical-align:top\"><sub>b]</sub>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"subscript":[true,false,"",false,true,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/superscript.js b/testing/web-platform/tests/editing/data/superscript.js
new file mode 100644
index 000000000..505857c5f
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/superscript.js
@@ -0,0 +1,437 @@
+var browserTests = [
+["foo[]bar",
+ [["superscript",""]],
+ "foo[]bar",
+ [true],
+ {"superscript":[false,false,"",false,true,""]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","true"],["superscript",""]],
+ "<p><sup>[foo</sup></p> <p><sup>bar]</sup></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","false"],["superscript",""]],
+ "<p><sup>[foo</sup></p> <p><sup>bar]</sup></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","true"],["superscript",""]],
+ "<sup><span>[foo</span> <span>bar]</span></sup>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","false"],["superscript",""]],
+ "<sup><span>[foo</span> <span>bar]</span></sup>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","true"],["superscript",""]],
+ "<p><sup>[foo</sup></p><p> <sup><span>bar</span></sup> </p><p><sup>baz]</sup></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","false"],["superscript",""]],
+ "<p><sup>[foo</sup></p><p> <sup><span>bar</span></sup> </p><p><sup>baz]</sup></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","true"],["superscript",""]],
+ "<p><sup>[foo</sup></p><p><sup><br></sup></p><p><sup>bar]</sup></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","false"],["superscript",""]],
+ "<p><sup>[foo</sup></p><p><sup><br></sup></p><p><sup>bar]</sup></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["<b>foo[]bar</b>",
+ [["superscript",""]],
+ "<b>foo[]bar</b>",
+ [true],
+ {"superscript":[false,false,"",false,true,""]}],
+["<i>foo[]bar</i>",
+ [["superscript",""]],
+ "<i>foo[]bar</i>",
+ [true],
+ {"superscript":[false,false,"",false,true,""]}],
+["<span>foo</span>{}<span>bar</span>",
+ [["superscript",""]],
+ "<span>foo</span>{}<span>bar</span>",
+ [true],
+ {"superscript":[false,false,"",false,true,""]}],
+["<span>foo[</span><span>]bar</span>",
+ [["superscript",""]],
+ "<span>foo[</span><span>]bar</span>",
+ [true],
+ {"superscript":[false,false,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo<sup>[bar]</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo<sup>[bar]</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo<sup>[bar</sup><b><sup>baz]</sup>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo<sup>[bar</sup><b><sup>baz]</sup>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo<sup>[bar</sup><i><sup>baz]</sup>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo<sup>[bar</sup><i><sup>baz]</sup>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","true"],["superscript",""]],
+ "{<p></p><p> </p><p><sup>foo</sup></p>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","false"],["superscript",""]],
+ "{<p></p><p> </p><p><sup>foo</sup></p>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","true"],["superscript",""]],
+ "<table><tbody><tr><td>foo</td><td>b<sup>[a]</sup>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","false"],["superscript",""]],
+ "<table><tbody><tr><td>foo</td><td>b<sup>[a]</sup>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["superscript",""]],
+ "<table><tbody><tr><td>foo</td>{<td><sup>bar</sup></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["superscript",""]],
+ "<table><tbody><tr><td>foo</td>{<td><sup>bar</sup></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["superscript",""]],
+ "<table><tbody><tr>{<td><sup>foo</sup></td><td><sup>bar</sup></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["superscript",""]],
+ "<table><tbody><tr>{<td><sup>foo</sup></td><td><sup>bar</sup></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["superscript",""]],
+ "<table><tbody>{<tr><td><sup>foo</sup></td><td><sup>bar</sup></td><td><sup>baz</sup></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["superscript",""]],
+ "<table><tbody>{<tr><td><sup>foo</sup></td><td><sup>bar</sup></td><td><sup>baz</sup></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["superscript",""]],
+ "<table>{<tbody><tr><td><sup>foo</sup></td><td><sup>bar</sup></td><td><sup>baz</sup></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["superscript",""]],
+ "<table>{<tbody><tr><td><sup>foo</sup></td><td><sup>bar</sup></td><td><sup>baz</sup></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","true"],["superscript",""]],
+ "{<table><tbody><tr><td><sup>foo</sup></td><td><sup>bar</sup></td><td><sup>baz</sup></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","false"],["superscript",""]],
+ "{<table><tbody><tr><td><sup>foo</sup></td><td><sup>bar</sup></td><td><sup>baz</sup></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["foo<sub>[bar]</sub>baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo<sup>[bar]</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["foo<sub>[bar]</sub>baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo<sup>[bar]</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["foo<sub>b[a]r</sub>baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["foo<sub>b[a]r</sub>baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["foo<sup>[bar]</sup>baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,true,"",false,false,""]}],
+["foo<sup>[bar]</sup>baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,true,"",false,false,""]}],
+["foo<sup>b[a]r</sup>baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo<sup>b</sup>[a]<sup>r</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,true,"",false,false,""]}],
+["foo<sup>b[a]r</sup>baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo<sup>b</sup>[a]<sup>r</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,true,"",false,false,""]}],
+["foo<span style=vertical-align:sub>[bar]</span>baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo<sup><span style=\"vertical-align:sub\">[bar]</span></sup>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["foo<span style=vertical-align:sub>[bar]</span>baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo<sup><span style=\"vertical-align:sub\">[bar]</span></sup>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["foo<span style=vertical-align:super>[bar]</span>baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo<sup><span style=\"vertical-align:super\">[bar]</span></sup>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["foo<span style=vertical-align:super>[bar]</span>baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo<sup><span style=\"vertical-align:super\">[bar]</span></sup>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["foo<sub><sub>[bar]</sub></sub>baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo<sup>[bar]</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["foo<sub><sub>[bar]</sub></sub>baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo<sup>[bar]</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["foo<sub><sub>b[a]r</sub></sub>baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["foo<sub><sub>b[a]r</sub></sub>baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["foo<sub>b<sub>[a]</sub>r</sub>baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["foo<sub>b<sub>[a]</sub>r</sub>baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["foo<sup><sup>[bar]</sup></sup>baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,true,"",false,false,""]}],
+["foo<sup><sup>[bar]</sup></sup>baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,true,"",false,false,""]}],
+["foo<sup><sup>b[a]r</sup></sup>baz",
+ [["superscript",""]],
+ "foo<sup>b</sup>[a]<sup>r</sup>baz",
+ [true],
+ {"superscript":[false,true,"",false,false,""]}],
+["foo<sup>b<sup>[a]</sup>r</sup>baz",
+ [["superscript",""]],
+ "foo<sup>b</sup>[a]<sup>r</sup>baz",
+ [true],
+ {"superscript":[false,true,"",false,false,""]}],
+["foo<sub><sup>[bar]</sup></sub>baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo<sup>[bar]</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}],
+["foo<sub><sup>[bar]</sup></sub>baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo<sup>[bar]</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}],
+["foo<sub><sup>b[a]r</sup></sub>baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo<sup>b[a]r</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}],
+["foo<sub><sup>b[a]r</sup></sub>baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo<sup>b[a]r</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}],
+["foo<sub>b<sup>[a]</sup>r</sub>baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}],
+["foo<sub>b<sup>[a]</sup>r</sub>baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}],
+["foo<sup><sub>[bar]</sub></sup>baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo<sup>[bar]</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}],
+["foo<sup><sub>[bar]</sub></sup>baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo<sup>[bar]</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}],
+["foo<sup><sub>b[a]r</sub></sup>baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}],
+["foo<sup><sub>b[a]r</sub></sup>baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}],
+["foo<sup>b<sub>[a]</sub>r</sup>baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo<sup>b[a]r</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}],
+["foo<sup>b<sub>[a]</sub>r</sup>baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo<sup>b[a]r</sup>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}],
+["fo[o<sup>b]ar</sup>baz",
+ [["superscript",""]],
+ "fo<sup>[ob]ar</sup>baz",
+ [true],
+ {"superscript":[true,false,"",false,true,""]}],
+["foo<sup>ba[r</sup>b]az",
+ [["superscript",""]],
+ "foo<sup>ba[rb]</sup>az",
+ [true],
+ {"superscript":[true,false,"",false,true,""]}],
+["fo[o<sup>bar</sup>b]az",
+ [["superscript",""]],
+ "fo<sup>[obarb]</sup>az",
+ [true],
+ {"superscript":[true,false,"",false,true,""]}],
+["foo[<sup>b]ar</sup>baz",
+ [["superscript",""]],
+ "foo[b]<sup>ar</sup>baz",
+ [true],
+ {"superscript":[false,true,"",false,false,""]}],
+["foo<sup>ba[r</sup>]baz",
+ [["superscript",""]],
+ "foo<sup>ba</sup>[r]baz",
+ [true],
+ {"superscript":[false,true,"",false,false,""]}],
+["foo[<sup>bar</sup>]baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,true,"",false,false,""]}],
+["foo[<sup>bar</sup>]baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,true,"",false,false,""]}],
+["foo<sup>[bar]</sup>baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,true,"",false,false,""]}],
+["foo<sup>[bar]</sup>baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,true,"",false,false,""]}],
+["foo{<sup>bar</sup>}baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo{bar}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,true,"",false,false,""]}],
+["foo{<sup>bar</sup>}baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo{bar}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,true,"",false,false,""]}],
+["<sup>fo[o</sup><sub>b]ar</sub>",
+ [["superscript",""]],
+ "<sup>fo[ob]</sup><sub>ar</sub>",
+ [true],
+ {"superscript":[true,false,"",false,true,""]}],
+["<sup>fo[o</sup><span style=vertical-align:super>b]ar</span>",
+ [["stylewithcss","true"],["superscript",""]],
+ "<sup>fo[o</sup><span style=\"vertical-align:super\"><sup>b]</sup>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}],
+["<sup>fo[o</sup><span style=vertical-align:super>b]ar</span>",
+ [["stylewithcss","false"],["superscript",""]],
+ "<sup>fo[o</sup><span style=\"vertical-align:super\"><sup>b]</sup>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}],
+["foo<span style=vertical-align:bottom>[bar]</span>baz",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo<sup><span style=\"vertical-align:bottom\">[bar]</span></sup>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}],
+["foo<span style=vertical-align:bottom>[bar]</span>baz",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo<sup><span style=\"vertical-align:bottom\">[bar]</span></sup>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}],
+["<sup>fo[o</sup><span style=vertical-align:bottom>b]ar</span>",
+ [["stylewithcss","true"],["superscript",""]],
+ "<sup>fo[o</sup><span style=\"vertical-align:bottom\"><sup>b]</sup>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}],
+["<sup>fo[o</sup><span style=vertical-align:bottom>b]ar</span>",
+ [["stylewithcss","false"],["superscript",""]],
+ "<sup>fo[o</sup><span style=\"vertical-align:bottom\"><sup>b]</sup>ar</span>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}],
+["foo<sup>[bar]<br></sup>",
+ [["stylewithcss","true"],["superscript",""]],
+ "foo[bar]<br>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,true,"",false,false,""]}],
+["foo<sup>[bar]<br></sup>",
+ [["stylewithcss","false"],["superscript",""]],
+ "foo[bar]<br>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,true,"",false,false,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/underline.js b/testing/web-platform/tests/editing/data/underline.js
new file mode 100644
index 000000000..17a6063e8
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/underline.js
@@ -0,0 +1,727 @@
+var browserTests = [
+["foo[]bar",
+ [["underline",""]],
+ "foo[]bar",
+ [true],
+ {"underline":[false,false,"",false,true,""]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","true"],["underline",""]],
+ "<p><span style=\"text-decoration:underline\">[foo</span></p> <p><span style=\"text-decoration:underline\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["stylewithcss","false"],["underline",""]],
+ "<p><u>[foo</u></p> <p><u>bar]</u></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","true"],["underline",""]],
+ "<span style=\"text-decoration:underline\"><span>[foo</span> <span>bar]</span></span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["stylewithcss","false"],["underline",""]],
+ "<u><span>[foo</span> <span>bar]</span></u>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","true"],["underline",""]],
+ "<p><span style=\"text-decoration:underline\">[foo</span></p><p> <span style=\"text-decoration:underline\"><span>bar</span></span> </p><p><span style=\"text-decoration:underline\">baz]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["stylewithcss","false"],["underline",""]],
+ "<p><u>[foo</u></p><p> <u><span>bar</span></u> </p><p><u>baz]</u></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","true"],["underline",""]],
+ "<p><span style=\"text-decoration:underline\">[foo</span></p><p><span style=\"text-decoration:underline\"><br></span></p><p><span style=\"text-decoration:underline\">bar]</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<p>[foo<p><br><p>bar]",
+ [["stylewithcss","false"],["underline",""]],
+ "<p><u>[foo</u></p><p><u><br></u></p><p><u>bar]</u></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<b>foo[]bar</b>",
+ [["underline",""]],
+ "<b>foo[]bar</b>",
+ [true],
+ {"underline":[false,false,"",false,true,""]}],
+["<i>foo[]bar</i>",
+ [["underline",""]],
+ "<i>foo[]bar</i>",
+ [true],
+ {"underline":[false,false,"",false,true,""]}],
+["<span>foo</span>{}<span>bar</span>",
+ [["underline",""]],
+ "<span>foo</span>{}<span>bar</span>",
+ [true],
+ {"underline":[false,false,"",false,true,""]}],
+["<span>foo[</span><span>]bar</span>",
+ [["underline",""]],
+ "<span>foo[</span><span>]bar</span>",
+ [true],
+ {"underline":[false,false,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo<span style=\"text-decoration:underline\">[bar]</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["foo[bar]baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo<u>[bar]</u>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo<span style=\"text-decoration:underline\">[bar</span><b><span style=\"text-decoration:underline\">baz]</span>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo<u>[bar</u><b><u>baz]</u>qoz</b>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo<span style=\"text-decoration:underline\">[bar</span><i><span style=\"text-decoration:underline\">baz]</span>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo<u>[bar</u><i><u>baz]</u>qoz</i>quz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","true"],["underline",""]],
+ "{<p></p><p> </p><p><span style=\"text-decoration:underline\">foo</span></p>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["{<p><p> <p>foo</p>}",
+ [["stylewithcss","false"],["underline",""]],
+ "{<p></p><p> </p><p><u>foo</u></p>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","true"],["underline",""]],
+ "<table><tbody><tr><td>foo</td><td>b<span style=\"text-decoration:underline\">[a]</span>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
+ [["stylewithcss","false"],["underline",""]],
+ "<table><tbody><tr><td>foo</td><td>b<u>[a]</u>r</td><td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["underline",""]],
+ "<table><tbody><tr><td>foo</td>{<td><span style=\"text-decoration:underline\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["underline",""]],
+ "<table><tbody><tr><td>foo</td>{<td><u>bar</u></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["underline",""]],
+ "<table><tbody><tr>{<td><span style=\"text-decoration:underline\">foo</span></td><td><span style=\"text-decoration:underline\">bar</span></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["underline",""]],
+ "<table><tbody><tr>{<td><u>foo</u></td><td><u>bar</u></td>}<td>baz</td></tr></tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["underline",""]],
+ "<table><tbody>{<tr><td><span style=\"text-decoration:underline\">foo</span></td><td><span style=\"text-decoration:underline\">bar</span></td><td><span style=\"text-decoration:underline\">baz</span></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["underline",""]],
+ "<table><tbody>{<tr><td><u>foo</u></td><td><u>bar</u></td><td><u>baz</u></td></tr>}</tbody></table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","true"],["underline",""]],
+ "<table>{<tbody><tr><td><span style=\"text-decoration:underline\">foo</span></td><td><span style=\"text-decoration:underline\">bar</span></td><td><span style=\"text-decoration:underline\">baz</span></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>",
+ [["stylewithcss","false"],["underline",""]],
+ "<table>{<tbody><tr><td><u>foo</u></td><td><u>bar</u></td><td><u>baz</u></td></tr></tbody>}</table>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","true"],["underline",""]],
+ "{<table><tbody><tr><td><span style=\"text-decoration:underline\">foo</span></td><td><span style=\"text-decoration:underline\">bar</span></td><td><span style=\"text-decoration:underline\">baz</span></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["{<table><tr><td>foo<td>bar<td>baz</table>}",
+ [["stylewithcss","false"],["underline",""]],
+ "{<table><tbody><tr><td><u>foo</u></td><td><u>bar</u></td><td><u>baz</u></td></tr></tbody></table>}",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["foo<u>[bar]</u>baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
+["foo<u>[bar]</u>baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
+["foo<span style=\"text-decoration: underline\">[bar]</span>baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
+["foo<span style=\"text-decoration: underline\">[bar]</span>baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
+["<u>foo[bar]baz</u>",
+ [["stylewithcss","true"],["underline",""]],
+ "<span style=\"text-decoration:underline\">foo</span>[bar]<span style=\"text-decoration:underline\">baz</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
+["<u>foo[bar]baz</u>",
+ [["stylewithcss","false"],["underline",""]],
+ "<u>foo</u>[bar]<u>baz</u>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
+["<u>foo[b<span style=\"color:blue\">ar]ba</span>z</u>",
+ [["stylewithcss","true"],["underline",""]],
+ "<span style=\"text-decoration:underline\">foo</span>[b<span style=\"color:rgb(0, 0, 255)\">ar]<span style=\"text-decoration:underline\">ba</span></span><span style=\"text-decoration:underline\">z</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
+["<u>foo[b<span style=\"color:blue\">ar]ba</span>z</u>",
+ [["stylewithcss","false"],["underline",""]],
+ "<u>foo</u>[b<span style=\"color:rgb(0, 0, 255)\">ar]<u>ba</u></span><u>z</u>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
+["<u>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</u>",
+ [["stylewithcss","true"],["underline",""]],
+ "<span style=\"text-decoration:underline\">foo</span>[b<span style=\"color:rgb(0, 0, 255)\" id=\"foo\">ar]<span style=\"text-decoration:underline\">ba</span></span><span style=\"text-decoration:underline\">z</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
+["<u>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</u>",
+ [["stylewithcss","false"],["underline",""]],
+ "<u>foo</u>[b<span style=\"color:rgb(0, 0, 255)\" id=\"foo\">ar]<u>ba</u></span><u>z</u>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
+["<u>foo[b<span style=\"font-size:3em\">ar]ba</span>z</u>",
+ [["stylewithcss","true"],["underline",""]],
+ "<span style=\"text-decoration:underline\">foo</span>[b<span style=\"font-size:3em\">ar]<span style=\"text-decoration:underline\">ba</span></span><span style=\"text-decoration:underline\">z</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
+["<u>foo[b<span style=\"font-size:3em\">ar]ba</span>z</u>",
+ [["stylewithcss","false"],["underline",""]],
+ "<u>foo</u>[b<span style=\"font-size:3em\">ar]<u>ba</u></span><u>z</u>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
+["<u>foo[b<i>ar]ba</i>z</u>",
+ [["stylewithcss","true"],["underline",""]],
+ "<span style=\"text-decoration:underline\">foo</span>[b<i>ar]<span style=\"text-decoration:underline\">ba</span></i><span style=\"text-decoration:underline\">z</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
+["<u>foo[b<i>ar]ba</i>z</u>",
+ [["stylewithcss","false"],["underline",""]],
+ "<u>foo</u>[b<i>ar]<u>ba</u></i><u>z</u>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
+["<p style=\"text-decoration: underline\">foo[bar]baz</p>",
+ [["stylewithcss","true"],["underline",""]],
+ "<p><span style=\"text-decoration:underline\">foo</span>[bar]<span style=\"text-decoration:underline\">baz</span></p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
+["<p style=\"text-decoration: underline\">foo[bar]baz</p>",
+ [["stylewithcss","false"],["underline",""]],
+ "<p><u>foo</u>[bar]<u>baz</u></p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
+["foo<s>[bar]</s>baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo<span style=\"text-decoration:underline\"><s>[bar]</s></span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["foo<s>[bar]</s>baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo<u><s>[bar]</s></u>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["foo<span style=\"text-decoration: line-through\">[bar]</span>baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo<span style=\"text-decoration:underline\"><span style=\"text-decoration:line-through\">[bar]</span></span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["foo<span style=\"text-decoration: line-through\">[bar]</span>baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo<u><span style=\"text-decoration:line-through\">[bar]</span></u>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<s>foo[bar]baz</s>",
+ [["stylewithcss","true"],["underline",""]],
+ "<s>foo<span style=\"text-decoration:underline\">[bar]</span>baz</s>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<s>foo[bar]baz</s>",
+ [["stylewithcss","false"],["underline",""]],
+ "<s>foo<u>[bar]</u>baz</s>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<s>foo[b<span style=\"color:blue\">ar]ba</span>z</s>",
+ [["stylewithcss","true"],["underline",""]],
+ "<s>foo<span style=\"text-decoration:underline\">[b</span><span style=\"color:rgb(0, 0, 255)\"><span style=\"text-decoration:underline\">ar]</span>ba</span>z</s>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<s>foo[b<span style=\"color:blue\">ar]ba</span>z</s>",
+ [["stylewithcss","false"],["underline",""]],
+ "<s>foo<u>[b</u><span style=\"color:rgb(0, 0, 255)\"><u>ar]</u>ba</span>z</s>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<s>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</s>",
+ [["stylewithcss","true"],["underline",""]],
+ "<s>foo<span style=\"text-decoration:underline\">[b</span><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><span style=\"text-decoration:underline\">ar]</span>ba</span>z</s>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<s>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</s>",
+ [["stylewithcss","false"],["underline",""]],
+ "<s>foo<u>[b</u><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><u>ar]</u>ba</span>z</s>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<s>foo[b<span style=\"font-size:3em\">ar]ba</span>z</s>",
+ [["stylewithcss","true"],["underline",""]],
+ "<s>foo<span style=\"text-decoration:underline\">[b</span><span style=\"font-size:3em\"><span style=\"text-decoration:underline\">ar]</span>ba</span>z</s>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<s>foo[b<span style=\"font-size:3em\">ar]ba</span>z</s>",
+ [["stylewithcss","false"],["underline",""]],
+ "<s>foo<u>[b</u><span style=\"font-size:3em\"><u>ar]</u>ba</span>z</s>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<s>foo[b<i>ar]ba</i>z</s>",
+ [["stylewithcss","true"],["underline",""]],
+ "<s>foo<span style=\"text-decoration:underline\">[b</span><i><span style=\"text-decoration:underline\">ar]</span>ba</i>z</s>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<s>foo[b<i>ar]ba</i>z</s>",
+ [["stylewithcss","false"],["underline",""]],
+ "<s>foo<u>[b</u><i><u>ar]</u>ba</i>z</s>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<p style=\"text-decoration: line-through\">foo[bar]baz</p>",
+ [["stylewithcss","true"],["underline",""]],
+ "<p style=\"text-decoration:line-through\">foo<span style=\"text-decoration:underline\">[bar]</span>baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<p style=\"text-decoration: line-through\">foo[bar]baz</p>",
+ [["stylewithcss","false"],["underline",""]],
+ "<p style=\"text-decoration:line-through\">foo<u>[bar]</u>baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["foo<strike>[bar]</strike>baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo<span style=\"text-decoration:underline\"><strike>[bar]</strike></span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["foo<strike>[bar]</strike>baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo<u><strike>[bar]</strike></u>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<strike>foo[bar]baz</strike>",
+ [["stylewithcss","true"],["underline",""]],
+ "<strike>foo<span style=\"text-decoration:underline\">[bar]</span>baz</strike>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<strike>foo[bar]baz</strike>",
+ [["stylewithcss","false"],["underline",""]],
+ "<strike>foo<u>[bar]</u>baz</strike>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<strike>foo[b<span style=\"color:blue\">ar]ba</span>z</strike>",
+ [["stylewithcss","true"],["underline",""]],
+ "<strike>foo<span style=\"text-decoration:underline\">[b</span><span style=\"color:rgb(0, 0, 255)\"><span style=\"text-decoration:underline\">ar]</span>ba</span>z</strike>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<strike>foo[b<span style=\"color:blue\">ar]ba</span>z</strike>",
+ [["stylewithcss","false"],["underline",""]],
+ "<strike>foo<u>[b</u><span style=\"color:rgb(0, 0, 255)\"><u>ar]</u>ba</span>z</strike>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<strike>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</strike>",
+ [["stylewithcss","true"],["underline",""]],
+ "<strike>foo<span style=\"text-decoration:underline\">[b</span><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><span style=\"text-decoration:underline\">ar]</span>ba</span>z</strike>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<strike>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</strike>",
+ [["stylewithcss","false"],["underline",""]],
+ "<strike>foo<u>[b</u><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><u>ar]</u>ba</span>z</strike>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<strike>foo[b<span style=\"font-size:3em\">ar]ba</span>z</strike>",
+ [["stylewithcss","true"],["underline",""]],
+ "<strike>foo<span style=\"text-decoration:underline\">[b</span><span style=\"font-size:3em\"><span style=\"text-decoration:underline\">ar]</span>ba</span>z</strike>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<strike>foo[b<span style=\"font-size:3em\">ar]ba</span>z</strike>",
+ [["stylewithcss","false"],["underline",""]],
+ "<strike>foo<u>[b</u><span style=\"font-size:3em\"><u>ar]</u>ba</span>z</strike>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<strike>foo[b<i>ar]ba</i>z</strike>",
+ [["stylewithcss","true"],["underline",""]],
+ "<strike>foo<span style=\"text-decoration:underline\">[b</span><i><span style=\"text-decoration:underline\">ar]</span>ba</i>z</strike>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<strike>foo[b<i>ar]ba</i>z</strike>",
+ [["stylewithcss","false"],["underline",""]],
+ "<strike>foo<u>[b</u><i><u>ar]</u>ba</i>z</strike>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["foo<ins>[bar]</ins>baz",
+ [["underline",""]],
+ "foo<ins>[bar]</ins>baz",
+ [true],
+ {"underline":[false,true,"",false,true,""]}],
+["<ins>foo[bar]baz</ins>",
+ [["underline",""]],
+ "<ins>foo[bar]baz</ins>",
+ [true],
+ {"underline":[false,true,"",false,true,""]}],
+["<ins>foo[b<span style=\"color:blue\">ar]ba</span>z</ins>",
+ [["underline",""]],
+ "<ins>foo[b<span style=\"color:rgb(0, 0, 255)\">ar]ba</span>z</ins>",
+ [true],
+ {"underline":[false,true,"",false,true,""]}],
+["<ins>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</ins>",
+ [["underline",""]],
+ "<ins>foo[b<span style=\"color:rgb(0, 0, 255)\" id=\"foo\">ar]ba</span>z</ins>",
+ [true],
+ {"underline":[false,true,"",false,true,""]}],
+["<ins>foo[b<span style=\"font-size:3em\">ar]ba</span>z</ins>",
+ [["underline",""]],
+ "<ins>foo[b<span style=\"font-size:3em\">ar]ba</span>z</ins>",
+ [true],
+ {"underline":[false,true,"",false,true,""]}],
+["<ins>foo[b<i>ar]ba</i>z</ins>",
+ [["underline",""]],
+ "<ins>foo[b<i>ar]ba</i>z</ins>",
+ [true],
+ {"underline":[false,true,"",false,true,""]}],
+["foo<del>[bar]</del>baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo<span style=\"text-decoration:underline\"><del>[bar]</del></span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["foo<del>[bar]</del>baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo<u><del>[bar]</del></u>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<del>foo[bar]baz</del>",
+ [["stylewithcss","true"],["underline",""]],
+ "<del>foo<span style=\"text-decoration:underline\">[bar]</span>baz</del>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<del>foo[bar]baz</del>",
+ [["stylewithcss","false"],["underline",""]],
+ "<del>foo<u>[bar]</u>baz</del>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<del>foo[b<span style=\"color:blue\">ar]ba</span>z</del>",
+ [["stylewithcss","true"],["underline",""]],
+ "<del>foo<span style=\"text-decoration:underline\">[b</span><span style=\"color:rgb(0, 0, 255)\"><span style=\"text-decoration:underline\">ar]</span>ba</span>z</del>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<del>foo[b<span style=\"color:blue\">ar]ba</span>z</del>",
+ [["stylewithcss","false"],["underline",""]],
+ "<del>foo<u>[b</u><span style=\"color:rgb(0, 0, 255)\"><u>ar]</u>ba</span>z</del>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<del>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</del>",
+ [["stylewithcss","true"],["underline",""]],
+ "<del>foo<span style=\"text-decoration:underline\">[b</span><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><span style=\"text-decoration:underline\">ar]</span>ba</span>z</del>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<del>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</del>",
+ [["stylewithcss","false"],["underline",""]],
+ "<del>foo<u>[b</u><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><u>ar]</u>ba</span>z</del>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<del>foo[b<span style=\"font-size:3em\">ar]ba</span>z</del>",
+ [["stylewithcss","true"],["underline",""]],
+ "<del>foo<span style=\"text-decoration:underline\">[b</span><span style=\"font-size:3em\"><span style=\"text-decoration:underline\">ar]</span>ba</span>z</del>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<del>foo[b<span style=\"font-size:3em\">ar]ba</span>z</del>",
+ [["stylewithcss","false"],["underline",""]],
+ "<del>foo<u>[b</u><span style=\"font-size:3em\"><u>ar]</u>ba</span>z</del>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<del>foo[b<i>ar]ba</i>z</del>",
+ [["stylewithcss","true"],["underline",""]],
+ "<del>foo<span style=\"text-decoration:underline\">[b</span><i><span style=\"text-decoration:underline\">ar]</span>ba</i>z</del>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<del>foo[b<i>ar]ba</i>z</del>",
+ [["stylewithcss","false"],["underline",""]],
+ "<del>foo<u>[b</u><i><u>ar]</u>ba</i>z</del>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["foo<span style=\"text-decoration: underline line-through\">[bar]</span>baz",
+ [["underline",""]],
+ "foo<span style=\"text-decoration:line-through\">[bar]</span>baz",
+ [true],
+ {"underline":[false,true,"",false,false,""]}],
+["foo<span style=\"text-decoration: underline line-through\">b[a]r</span>baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo<span style=\"text-decoration:line-through\"><span style=\"text-decoration:underline\">b</span>[a]<span style=\"text-decoration:underline\">r</span></span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
+["foo<span style=\"text-decoration: underline line-through\">b[a]r</span>baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo<span style=\"text-decoration:line-through\"><u>b</u>[a]<u>r</u></span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
+["foo<s style=\"text-decoration: underline\">[bar]</s>baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
+["foo<s style=\"text-decoration: underline\">[bar]</s>baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
+["foo<s style=\"text-decoration: underline\">b[a]r</s>baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo<span style=\"text-decoration:underline\">b</span>[a]<span style=\"text-decoration:underline\">r</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
+["foo<s style=\"text-decoration: underline\">b[a]r</s>baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo<u>b</u>[a]<u>r</u>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
+["foo<u style=\"text-decoration: line-through\">[bar]</u>baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:line-through\">[bar]</u></span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["foo<u style=\"text-decoration: line-through\">[bar]</u>baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo<u><u style=\"text-decoration:line-through\">[bar]</u></u>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["foo<u style=\"text-decoration: line-through\">b[a]r</u>baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo<u style=\"text-decoration:line-through\">b<span style=\"text-decoration:underline\">[a]</span>r</u>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["foo<u style=\"text-decoration: line-through\">b[a]r</u>baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo<u style=\"text-decoration:line-through\">b<u>[a]</u>r</u>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["foo<s style=\"text-decoration: overline\">[bar]</s>baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo<span style=\"text-decoration:underline\"><s style=\"text-decoration:overline\">[bar]</s></span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["foo<s style=\"text-decoration: overline\">[bar]</s>baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo<u><s style=\"text-decoration:overline\">[bar]</s></u>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["foo<s style=\"text-decoration: overline\">b[a]r</s>baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo<s style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">[a]</span>r</s>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["foo<s style=\"text-decoration: overline\">b[a]r</s>baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo<s style=\"text-decoration:overline\">b<u>[a]</u>r</s>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["foo<u style=\"text-decoration: overline\">[bar]</u>baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:overline\">[bar]</u></span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["foo<u style=\"text-decoration: overline\">[bar]</u>baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo<u><u style=\"text-decoration:overline\">[bar]</u></u>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["foo<u style=\"text-decoration: overline\">b[a]r</u>baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo<u style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">[a]</span>r</u>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["foo<u style=\"text-decoration: overline\">b[a]r</u>baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo<u style=\"text-decoration:overline\">b<u>[a]</u>r</u>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<p style=\"text-decoration: line-through\">foo[bar]baz</p>",
+ [["stylewithcss","true"],["underline",""]],
+ "<p style=\"text-decoration:line-through\">foo<span style=\"text-decoration:underline\">[bar]</span>baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<p style=\"text-decoration: line-through\">foo[bar]baz</p>",
+ [["stylewithcss","false"],["underline",""]],
+ "<p style=\"text-decoration:line-through\">foo<u>[bar]</u>baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["<p style=\"text-decoration: overline\">foo[bar]baz</p>",
+ [["stylewithcss","true"],["underline",""]],
+ "<p style=\"text-decoration:overline\">foo<span style=\"text-decoration:underline\">[bar]</span>baz</p>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["<p style=\"text-decoration: overline\">foo[bar]baz</p>",
+ [["stylewithcss","false"],["underline",""]],
+ "<p style=\"text-decoration:overline\">foo<u>[bar]</u>baz</p>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["foo<span class=\"underline\">[bar]</span>baz",
+ [["underline",""]],
+ "foo<span class=\"underline\">[bar]</span>baz",
+ [true],
+ {"underline":[false,true,"",false,true,""]}],
+["foo<span class=\"underline\">b[a]r</span>baz",
+ [["underline",""]],
+ "foo<span class=\"underline\">b[a]r</span>baz",
+ [true],
+ {"underline":[false,true,"",false,true,""]}],
+["foo<span class=\"line-through\">[bar]</span>baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo<span style=\"text-decoration:underline\"><span class=\"line-through\">[bar]</span></span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["foo<span class=\"line-through\">[bar]</span>baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo<u><span class=\"line-through\">[bar]</span></u>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["foo<span class=\"line-through\">b[a]r</span>baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo<span class=\"line-through\">b<span style=\"text-decoration:underline\">[a]</span>r</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,false,"",false,true,""]}],
+["foo<span class=\"line-through\">b[a]r</span>baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo<span class=\"line-through\">b<u>[a]</u>r</span>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,false,"",false,true,""]}],
+["foo<span class=\"underline-and-line-through\">[bar]</span>baz",
+ [["underline",""]],
+ "foo<span class=\"underline-and-line-through\">[bar]</span>baz",
+ [true],
+ {"underline":[false,true,"",false,true,""]}],
+["foo<span class=\"underline-and-line-through\">b[a]r</span>baz",
+ [["underline",""]],
+ "foo<span class=\"underline-and-line-through\">b[a]r</span>baz",
+ [true],
+ {"underline":[false,true,"",false,true,""]}],
+["fo[o<u>b]ar</u>baz",
+ [["underline",""]],
+ "fo<u>[ob]ar</u>baz",
+ [true],
+ {"underline":[true,false,"",false,true,""]}],
+["foo<u>ba[r</u>b]az",
+ [["underline",""]],
+ "foo<u>ba[rb]</u>az",
+ [true],
+ {"underline":[true,false,"",false,true,""]}],
+["fo[o<u>bar</u>b]az",
+ [["stylewithcss","true"],["underline",""]],
+ "fo<span style=\"text-decoration:underline\">[obarb]</span>az",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[true,false,"",false,true,""]}],
+["fo[o<u>bar</u>b]az",
+ [["stylewithcss","false"],["underline",""]],
+ "fo<u>[obarb]</u>az",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[true,false,"",false,true,""]}],
+["foo[<u>b]ar</u>baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo[b]<span style=\"text-decoration:underline\">ar</span>baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
+["foo[<u>b]ar</u>baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo[b]<u>ar</u>baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
+["foo<u>ba[r</u>]baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo<span style=\"text-decoration:underline\">ba</span>[r]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
+["foo<u>ba[r</u>]baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo<u>ba</u>[r]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
+["foo[<u>bar</u>]baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
+["foo[<u>bar</u>]baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
+["foo<u>[bar]</u>baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
+["foo<u>[bar]</u>baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo[bar]baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
+["foo{<u>bar</u>}baz",
+ [["stylewithcss","true"],["underline",""]],
+ "foo{bar}baz",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",false,false,""]}],
+["foo{<u>bar</u>}baz",
+ [["stylewithcss","false"],["underline",""]],
+ "foo{bar}baz",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",false,false,""]}],
+["fo[o<span style=text-decoration:underline>b]ar</span>baz",
+ [["underline",""]],
+ "fo<span style=\"text-decoration:underline\">[ob]ar</span>baz",
+ [true],
+ {"underline":[true,false,"",false,true,""]}],
+["<ins>fo[o</ins><u>b]ar</u>",
+ [["stylewithcss","true"],["underline",""]],
+ "<ins>fo[o</ins>b]<span style=\"text-decoration:underline\">ar</span>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",true,false,""]}],
+["<ins>fo[o</ins><u>b]ar</u>",
+ [["stylewithcss","false"],["underline",""]],
+ "<ins>fo[o</ins>b]<u>ar</u>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",true,false,""]}],
+["<u>fo[o</u><ins>b]ar</ins>",
+ [["stylewithcss","true"],["underline",""]],
+ "<span style=\"text-decoration:underline\">fo</span>[o<ins>b]ar</ins>",
+ [true,true],
+ {"stylewithcss":[false,false,"",false,true,""],"underline":[false,true,"",true,false,""]}],
+["<u>fo[o</u><ins>b]ar</ins>",
+ [["stylewithcss","false"],["underline",""]],
+ "<u>fo</u>[o<ins>b]ar</ins>",
+ [true,true],
+ {"stylewithcss":[false,true,"",false,false,""],"underline":[false,true,"",true,false,""]}]
+]
diff --git a/testing/web-platform/tests/editing/data/unlink.js b/testing/web-platform/tests/editing/data/unlink.js
new file mode 100644
index 000000000..8e5ea4489
--- /dev/null
+++ b/testing/web-platform/tests/editing/data/unlink.js
@@ -0,0 +1,177 @@
+var browserTests = [
+["foo[]bar",
+ [["unlink",""]],
+ "foo[]bar",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["<p>[foo</p> <p>bar]</p>",
+ [["unlink",""]],
+ "<p>[foo</p> <p>bar]</p>",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["<span>[foo</span> <span>bar]</span>",
+ [["unlink",""]],
+ "<span>[foo</span> <span>bar]</span>",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [["unlink",""]],
+ "<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["<b>foo[]bar</b>",
+ [["unlink",""]],
+ "<b>foo[]bar</b>",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["<i>foo[]bar</i>",
+ [["unlink",""]],
+ "<i>foo[]bar</i>",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["<span>foo</span>{}<span>bar</span>",
+ [["unlink",""]],
+ "<span>foo</span>{}<span>bar</span>",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["<span>foo[</span><span>]bar</span>",
+ [["unlink",""]],
+ "<span>foo[</span><span>]bar</span>",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["foo[bar]baz",
+ [["unlink",""]],
+ "foo[bar]baz",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["foo[bar<b>baz]qoz</b>quz",
+ [["unlink",""]],
+ "foo[bar<b>baz]qoz</b>quz",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["foo[bar<i>baz]qoz</i>quz",
+ [["unlink",""]],
+ "foo[bar<i>baz]qoz</i>quz",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["{<p><p> <p>foo</p>}",
+ [["unlink",""]],
+ "{<p></p><p> </p><p>foo</p>}",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["<a href=http://www.google.com/>foo[bar]baz</a>",
+ [["unlink",""]],
+ "foo[bar]baz",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["<a href=http://www.google.com/>foo[barbaz</a>}",
+ [["unlink",""]],
+ "foo[barbaz}",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["{<a href=http://www.google.com/>foobar]baz</a>",
+ [["unlink",""]],
+ "{foobar]baz",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["{<a href=http://www.google.com/>foobarbaz</a>}",
+ [["unlink",""]],
+ "{foobarbaz}",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["<a href=http://www.google.com/>[foobarbaz]</a>",
+ [["unlink",""]],
+ "[foobarbaz]",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com/>b[]ar</a>baz",
+ [["unlink",""]],
+ "foob[]arbaz",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com/>[bar]</a>baz",
+ [["unlink",""]],
+ "foo[bar]baz",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["foo[<a href=http://www.google.com/>bar</a>]baz",
+ [["unlink",""]],
+ "foo[bar]baz",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["foo<a href=http://www.google.com/>[bar</a>baz]",
+ [["unlink",""]],
+ "foo[barbaz]",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["[foo<a href=http://www.google.com/>bar]</a>baz",
+ [["unlink",""]],
+ "[foobar]baz",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["[foo<a href=http://www.google.com/>bar</a>baz]",
+ [["unlink",""]],
+ "[foobarbaz]",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["<a id=foo href=http://www.google.com/>foobar[]baz</a>",
+ [["unlink",""]],
+ "<a id=\"foo\">foobar[]baz</a>",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["<a id=foo href=http://www.google.com/>foo[bar]baz</a>",
+ [["unlink",""]],
+ "<a id=\"foo\">foo[bar]baz</a>",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["<a id=foo href=http://www.google.com/>[foobarbaz]</a>",
+ [["unlink",""]],
+ "<a id=\"foo\">[foobarbaz]</a>",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["foo<a id=foo href=http://www.google.com/>[bar]</a>baz",
+ [["unlink",""]],
+ "foo<a id=\"foo\">[bar]</a>baz",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["foo[<a id=foo href=http://www.google.com/>bar</a>]baz",
+ [["unlink",""]],
+ "foo[<a id=\"foo\">bar</a>]baz",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["[foo<a id=foo href=http://www.google.com/>bar</a>baz]",
+ [["unlink",""]],
+ "[foo<a id=\"foo\">bar</a>baz]",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["<a name=foo>foobar[]baz</a>",
+ [["unlink",""]],
+ "<a name=\"foo\">foobar[]baz</a>",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["<a name=foo>foo[bar]baz</a>",
+ [["unlink",""]],
+ "<a name=\"foo\">foo[bar]baz</a>",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["<a name=foo>[foobarbaz]</a>",
+ [["unlink",""]],
+ "<a name=\"foo\">[foobarbaz]</a>",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["foo<a name=foo>[bar]</a>baz",
+ [["unlink",""]],
+ "foo<a name=\"foo\">[bar]</a>baz",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["foo[<a name=foo>bar</a>]baz",
+ [["unlink",""]],
+ "foo[<a name=\"foo\">bar</a>]baz",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}],
+["[foo<a name=foo>bar</a>baz]",
+ [["unlink",""]],
+ "[foo<a name=\"foo\">bar</a>baz]",
+ [true],
+ {"unlink":[false,false,"",false,false,""]}]
+]
diff --git a/testing/web-platform/tests/editing/event.html b/testing/web-platform/tests/editing/event.html
new file mode 100644
index 000000000..16d640be2
--- /dev/null
+++ b/testing/web-platform/tests/editing/event.html
@@ -0,0 +1,224 @@
+<!doctype html>
+<title>Editing event tests</title>
+<style>body { font-family: serif }</style>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<div id=test></div>
+<div id=log></div>
+<script>
+"use strict";
+
+var div = document.querySelector("#test");
+add_completion_callback(function() { div.parentNode.removeChild(div) });
+
+function copyEvent(e) {
+ var ret = {};
+ ret.original = e;
+ ["type", "target", "currentTarget", "eventPhase", "bubbles", "cancelable",
+ "defaultPrevented", "isTrusted", "command", "value"].forEach(function(k) {
+ ret[k] = e[k];
+ });
+ return ret;
+}
+
+var tests = [
+ {
+ name: "Simple editable div",
+ html: "<div contenteditable>foo<b>bar</b>baz</div>",
+ initRange: function(range) {
+ range.setStart(div.querySelector("b").firstChild, 0);
+ range.setEnd(div.querySelector("b"), 1);
+ },
+ target: function() { return div.firstChild },
+ command: "bold",
+ value: "",
+ },
+ {
+ name: "Editable b",
+ html: "foo<b contenteditable>bar</b>baz",
+ initRange: function(range) {
+ range.setStart(div.querySelector("b").firstChild, 0);
+ range.setEnd(div.querySelector("b"), 1);
+ },
+ target: function() { return div.querySelector("b") },
+ command: "bold",
+ value: "",
+ },
+ {
+ name: "No editable content",
+ html: "foo<b>bar</b>baz",
+ initRange: function(range) {
+ range.setStart(div.querySelector("b").firstChild, 0);
+ range.setEnd(div.querySelector("b"), 1);
+ },
+ target: function() { return null },
+ command: "bold",
+ value: "",
+ },
+ {
+ name: "Partially-selected editable content",
+ html: "foo<b contenteditable>bar</b>baz",
+ initRange: function(range) {
+ range.setStart(div.querySelector("b").firstChild, 0);
+ range.setEnd(div, 3);
+ },
+ target: function() { return null },
+ command: "bold",
+ value: "",
+ },
+ {
+ name: "Selection spans two editing hosts",
+ html: "<div contenteditable>foo</div><div contenteditable>bar</div>",
+ initRange: function(range) {
+ range.setStart(div.querySelector("div").firstChild, 2);
+ range.setEnd(div.querySelector("div + div").firstChild, 1);
+ },
+ target: function() { return null },
+ command: "bold",
+ value: "",
+ },
+ {
+ name: "Selection includes two editing hosts",
+ html: "foo<div contenteditable>bar</div>baz<div contenteditable>quz</div>qoz",
+ initRange: function(range) {
+ range.setStart(div.firstChild, 2);
+ range.setEnd(div.lastChild, 1);
+ },
+ target: function() { return null },
+ command: "bold",
+ value: "",
+ },
+ {
+ name: "Changing selection from handler",
+ html: "<div contenteditable>foo</div><div contenteditable>bar</div>",
+ initRange: function(range) {
+ range.setStart(div.querySelector("div").firstChild, 0);
+ range.setEnd(div.querySelector("div").firstChild, 3);
+ },
+ target: function() { return div.firstChild },
+ finalTarget: function() { return div.lastChild },
+ command: "bold",
+ value: "",
+ },
+];
+
+var commandTests = {
+ backColor: ["green"],
+ createLink: ["http://www.w3.org/community/editing/"],
+ fontName: ["serif", "Helvetica"],
+ fontSize: ["6", "15px"],
+ foreColor: ["green"],
+ hiliteColor: ["green"],
+ italic: [],
+ removeFormat: [],
+ strikeThrough: [],
+ subscript: [],
+ superscript: [],
+ underline: [],
+ unlink: [],
+ delete: [],
+ formatBlock: ["p"],
+ forwardDelete: [],
+ indent: [],
+ insertHorizontalRule: ["id"],
+ insertHTML: ["<b>hi</b>"],
+ insertImage: ["../images/green.png"],
+ insertLineBreak: [],
+ insertOrderedList: [],
+ insertParagraph: [],
+ insertText: ["abc"],
+ insertUnorderedList: [],
+ justifyCenter: [],
+ justifyFull: [],
+ justifyLeft: [],
+ justifyRight: [],
+ outdent: [],
+ redo: [],
+ selectAll: [],
+ styleWithCSS: [],
+ undo: [],
+ useCSS: [],
+};
+
+Object.keys(commandTests).forEach(function(command) {
+ commandTests[command] = ["", "quasit"].concat(commandTests[command]);
+ commandTests[command].forEach(function(value) {
+ tests.push({
+ name: "Command " + command + ", value " + format_value(value),
+ html: "<div contenteditable>foo<b>bar</b>baz</div>",
+ initRange: function(range) {
+ range.setStart(div.querySelector("b").firstChild, 0);
+ range.setEnd(div.querySelector("b"), 1);
+ },
+ target: function() {
+ return ["redo", "selectAll", "styleWithCSS", "undo", "useCSS"]
+ .indexOf(command) == -1 ? div.firstChild : null;
+ },
+ command: command,
+ value: value,
+ });
+ });
+});
+
+tests.forEach(function(obj) {
+ // Kill all event handlers first
+ var newDiv = div.cloneNode(false);
+ div.parentNode.insertBefore(newDiv, div);
+ div.parentNode.removeChild(div);
+ div = newDiv;
+
+ div.innerHTML = obj.html;
+
+ var originalContents = div.cloneNode(true);
+
+ getSelection().removeAllRanges();
+ var range = document.createRange();
+ obj.initRange(range);
+ getSelection().addRange(range);
+
+ var target = obj.target();
+ var finalTarget = "finalTarget" in obj ? obj.finalTarget() : target;
+ var command = obj.command;
+ var value = obj.value;
+
+ var inputEvents = [];
+ div.addEventListener("input", function(e) { inputEvents.push(copyEvent(e)) });
+
+ var exception = null;
+ try {
+ document.execCommand(command, false, value);
+ } catch(e) {
+ exception = e;
+ }
+
+ test(function() {
+ assert_equals(exception, null, "Unexpected exception");
+ }, obj.name + ": execCommand() must not throw");
+
+ test(function() {
+ assert_equals(inputEvents.length, target ? 1 : 0,
+ "number of input events fired");
+ if (!target) {
+ assert_true(originalContents.isEqualNode(div),
+ "div contents must not be changed");
+ return;
+ }
+ var e = inputEvents[0];
+ assert_equals(e.type, "input", "event.type");
+ assert_equals(e.target, finalTarget, "event.target");
+ assert_equals(e.currentTarget, div, "event.currentTarget");
+ assert_equals(e.eventPhase, Event.BUBBLING_PHASE, "event.eventPhase");
+ assert_equals(e.bubbles, true, "event.bubbles");
+ assert_equals(e.cancelable, false, "event.cancelable");
+ assert_equals(e.defaultPrevented, false, "event.defaultPrevented");
+ assert_own_property(window, "InputEvent",
+ "window.InputEvent must exist");
+ assert_equals(Object.getPrototypeOf(e.original), InputEvent.prototype,
+ "event prototype");
+ assert_equals(e.isTrusted, true, "event.isTrusted");
+ }, obj.name + ": input event");
+});
+
+// Thanks, Gecko.
+document.body.bgColor = "";
+</script>
diff --git a/testing/web-platform/tests/editing/include/implementation.js b/testing/web-platform/tests/editing/include/implementation.js
new file mode 100644
index 000000000..44a7afd82
--- /dev/null
+++ b/testing/web-platform/tests/editing/include/implementation.js
@@ -0,0 +1,8526 @@
+"use strict";
+
+var htmlNamespace = "http://www.w3.org/1999/xhtml";
+
+var cssStylingFlag = false;
+
+var defaultSingleLineContainerName = "div";
+
+// This is bad :(
+var globalRange = null;
+
+// Commands are stored in a dictionary where we call their actions and such
+var commands = {};
+
+///////////////////////////////////////////////////////////////////////////////
+////////////////////////////// Utility functions //////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+//@{
+
+function nextNode(node) {
+ if (node.hasChildNodes()) {
+ return node.firstChild;
+ }
+ return nextNodeDescendants(node);
+}
+
+function previousNode(node) {
+ if (node.previousSibling) {
+ node = node.previousSibling;
+ while (node.hasChildNodes()) {
+ node = node.lastChild;
+ }
+ return node;
+ }
+ if (node.parentNode
+ && node.parentNode.nodeType == Node.ELEMENT_NODE) {
+ return node.parentNode;
+ }
+ return null;
+}
+
+function nextNodeDescendants(node) {
+ while (node && !node.nextSibling) {
+ node = node.parentNode;
+ }
+ if (!node) {
+ return null;
+ }
+ return node.nextSibling;
+}
+
+/**
+ * Returns true if ancestor is an ancestor of descendant, false otherwise.
+ */
+function isAncestor(ancestor, descendant) {
+ return ancestor
+ && descendant
+ && Boolean(ancestor.compareDocumentPosition(descendant) & Node.DOCUMENT_POSITION_CONTAINED_BY);
+}
+
+/**
+ * Returns true if ancestor is an ancestor of or equal to descendant, false
+ * otherwise.
+ */
+function isAncestorContainer(ancestor, descendant) {
+ return (ancestor || descendant)
+ && (ancestor == descendant || isAncestor(ancestor, descendant));
+}
+
+/**
+ * Returns true if descendant is a descendant of ancestor, false otherwise.
+ */
+function isDescendant(descendant, ancestor) {
+ return ancestor
+ && descendant
+ && Boolean(ancestor.compareDocumentPosition(descendant) & Node.DOCUMENT_POSITION_CONTAINED_BY);
+}
+
+/**
+ * Returns true if node1 is before node2 in tree order, false otherwise.
+ */
+function isBefore(node1, node2) {
+ return Boolean(node1.compareDocumentPosition(node2) & Node.DOCUMENT_POSITION_FOLLOWING);
+}
+
+/**
+ * Returns true if node1 is after node2 in tree order, false otherwise.
+ */
+function isAfter(node1, node2) {
+ return Boolean(node1.compareDocumentPosition(node2) & Node.DOCUMENT_POSITION_PRECEDING);
+}
+
+function getAncestors(node) {
+ var ancestors = [];
+ while (node.parentNode) {
+ ancestors.unshift(node.parentNode);
+ node = node.parentNode;
+ }
+ return ancestors;
+}
+
+function getInclusiveAncestors(node) {
+ return getAncestors(node).concat(node);
+}
+
+function getDescendants(node) {
+ var descendants = [];
+ var stop = nextNodeDescendants(node);
+ while ((node = nextNode(node))
+ && node != stop) {
+ descendants.push(node);
+ }
+ return descendants;
+}
+
+function getInclusiveDescendants(node) {
+ return [node].concat(getDescendants(node));
+}
+
+function convertProperty(property) {
+ // Special-case for now
+ var map = {
+ "fontFamily": "font-family",
+ "fontSize": "font-size",
+ "fontStyle": "font-style",
+ "fontWeight": "font-weight",
+ "textDecoration": "text-decoration",
+ };
+ if (typeof map[property] != "undefined") {
+ return map[property];
+ }
+
+ return property;
+}
+
+// Return the <font size=X> value for the given CSS size, or undefined if there
+// is none.
+function cssSizeToLegacy(cssVal) {
+ return {
+ "x-small": 1,
+ "small": 2,
+ "medium": 3,
+ "large": 4,
+ "x-large": 5,
+ "xx-large": 6,
+ "xxx-large": 7
+ }[cssVal];
+}
+
+// Return the CSS size given a legacy size.
+function legacySizeToCss(legacyVal) {
+ return {
+ 1: "x-small",
+ 2: "small",
+ 3: "medium",
+ 4: "large",
+ 5: "x-large",
+ 6: "xx-large",
+ 7: "xxx-large",
+ }[legacyVal];
+}
+
+// Opera 11 puts HTML elements in the null namespace, it seems.
+function isHtmlNamespace(ns) {
+ return ns === null
+ || ns === htmlNamespace;
+}
+
+// "the directionality" from HTML. I don't bother caring about non-HTML
+// elements.
+//
+// "The directionality of an element is either 'ltr' or 'rtl', and is
+// determined as per the first appropriate set of steps from the following
+// list:"
+function getDirectionality(element) {
+ // "If the element's dir attribute is in the ltr state
+ // The directionality of the element is 'ltr'."
+ if (element.dir == "ltr") {
+ return "ltr";
+ }
+
+ // "If the element's dir attribute is in the rtl state
+ // The directionality of the element is 'rtl'."
+ if (element.dir == "rtl") {
+ return "rtl";
+ }
+
+ // "If the element's dir attribute is in the auto state
+ // "If the element is a bdi element and the dir attribute is not in a
+ // defined state (i.e. it is not present or has an invalid value)
+ // [lots of complicated stuff]
+ //
+ // Skip this, since no browser implements it anyway.
+
+ // "If the element is a root element and the dir attribute is not in a
+ // defined state (i.e. it is not present or has an invalid value)
+ // The directionality of the element is 'ltr'."
+ if (!isHtmlElement(element.parentNode)) {
+ return "ltr";
+ }
+
+ // "If the element has a parent element and the dir attribute is not in a
+ // defined state (i.e. it is not present or has an invalid value)
+ // The directionality of the element is the same as the element's
+ // parent element's directionality."
+ return getDirectionality(element.parentNode);
+}
+
+//@}
+
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////// DOM Range functions /////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+//@{
+
+function getNodeIndex(node) {
+ var ret = 0;
+ while (node.previousSibling) {
+ ret++;
+ node = node.previousSibling;
+ }
+ return ret;
+}
+
+// "The length of a Node node is the following, depending on node:
+//
+// ProcessingInstruction
+// DocumentType
+// Always 0.
+// Text
+// Comment
+// node's length.
+// Any other node
+// node's childNodes's length."
+function getNodeLength(node) {
+ switch (node.nodeType) {
+ case Node.PROCESSING_INSTRUCTION_NODE:
+ case Node.DOCUMENT_TYPE_NODE:
+ return 0;
+
+ case Node.TEXT_NODE:
+ case Node.COMMENT_NODE:
+ return node.length;
+
+ default:
+ return node.childNodes.length;
+ }
+}
+
+/**
+ * The position of two boundary points relative to one another, as defined by
+ * DOM Range.
+ */
+function getPosition(nodeA, offsetA, nodeB, offsetB) {
+ // "If node A is the same as node B, return equal if offset A equals offset
+ // B, before if offset A is less than offset B, and after if offset A is
+ // greater than offset B."
+ if (nodeA == nodeB) {
+ if (offsetA == offsetB) {
+ return "equal";
+ }
+ if (offsetA < offsetB) {
+ return "before";
+ }
+ if (offsetA > offsetB) {
+ return "after";
+ }
+ }
+
+ // "If node A is after node B in tree order, compute the position of (node
+ // B, offset B) relative to (node A, offset A). If it is before, return
+ // after. If it is after, return before."
+ if (nodeB.compareDocumentPosition(nodeA) & Node.DOCUMENT_POSITION_FOLLOWING) {
+ var pos = getPosition(nodeB, offsetB, nodeA, offsetA);
+ if (pos == "before") {
+ return "after";
+ }
+ if (pos == "after") {
+ return "before";
+ }
+ }
+
+ // "If node A is an ancestor of node B:"
+ if (nodeB.compareDocumentPosition(nodeA) & Node.DOCUMENT_POSITION_CONTAINS) {
+ // "Let child equal node B."
+ var child = nodeB;
+
+ // "While child is not a child of node A, set child to its parent."
+ while (child.parentNode != nodeA) {
+ child = child.parentNode;
+ }
+
+ // "If the index of child is less than offset A, return after."
+ if (getNodeIndex(child) < offsetA) {
+ return "after";
+ }
+ }
+
+ // "Return before."
+ return "before";
+}
+
+/**
+ * Returns the furthest ancestor of a Node as defined by DOM Range.
+ */
+function getFurthestAncestor(node) {
+ var root = node;
+ while (root.parentNode != null) {
+ root = root.parentNode;
+ }
+ return root;
+}
+
+/**
+ * "contained" as defined by DOM Range: "A Node node is contained in a range
+ * range if node's furthest ancestor is the same as range's root, and (node, 0)
+ * is after range's start, and (node, length of node) is before range's end."
+ */
+function isContained(node, range) {
+ var pos1 = getPosition(node, 0, range.startContainer, range.startOffset);
+ var pos2 = getPosition(node, getNodeLength(node), range.endContainer, range.endOffset);
+
+ return getFurthestAncestor(node) == getFurthestAncestor(range.startContainer)
+ && pos1 == "after"
+ && pos2 == "before";
+}
+
+/**
+ * Return all nodes contained in range that the provided function returns true
+ * for, omitting any with an ancestor already being returned.
+ */
+function getContainedNodes(range, condition) {
+ if (typeof condition == "undefined") {
+ condition = function() { return true };
+ }
+ var node = range.startContainer;
+ if (node.hasChildNodes()
+ && range.startOffset < node.childNodes.length) {
+ // A child is contained
+ node = node.childNodes[range.startOffset];
+ } else if (range.startOffset == getNodeLength(node)) {
+ // No descendant can be contained
+ node = nextNodeDescendants(node);
+ } else {
+ // No children; this node at least can't be contained
+ node = nextNode(node);
+ }
+
+ var stop = range.endContainer;
+ if (stop.hasChildNodes()
+ && range.endOffset < stop.childNodes.length) {
+ // The node after the last contained node is a child
+ stop = stop.childNodes[range.endOffset];
+ } else {
+ // This node and/or some of its children might be contained
+ stop = nextNodeDescendants(stop);
+ }
+
+ var nodeList = [];
+ while (isBefore(node, stop)) {
+ if (isContained(node, range)
+ && condition(node)) {
+ nodeList.push(node);
+ node = nextNodeDescendants(node);
+ continue;
+ }
+ node = nextNode(node);
+ }
+ return nodeList;
+}
+
+/**
+ * As above, but includes nodes with an ancestor that's already been returned.
+ */
+function getAllContainedNodes(range, condition) {
+ if (typeof condition == "undefined") {
+ condition = function() { return true };
+ }
+ var node = range.startContainer;
+ if (node.hasChildNodes()
+ && range.startOffset < node.childNodes.length) {
+ // A child is contained
+ node = node.childNodes[range.startOffset];
+ } else if (range.startOffset == getNodeLength(node)) {
+ // No descendant can be contained
+ node = nextNodeDescendants(node);
+ } else {
+ // No children; this node at least can't be contained
+ node = nextNode(node);
+ }
+
+ var stop = range.endContainer;
+ if (stop.hasChildNodes()
+ && range.endOffset < stop.childNodes.length) {
+ // The node after the last contained node is a child
+ stop = stop.childNodes[range.endOffset];
+ } else {
+ // This node and/or some of its children might be contained
+ stop = nextNodeDescendants(stop);
+ }
+
+ var nodeList = [];
+ while (isBefore(node, stop)) {
+ if (isContained(node, range)
+ && condition(node)) {
+ nodeList.push(node);
+ }
+ node = nextNode(node);
+ }
+ return nodeList;
+}
+
+// Returns either null, or something of the form rgb(x, y, z), or something of
+// the form rgb(x, y, z, w) with w != 0.
+function normalizeColor(color) {
+ if (color.toLowerCase() == "currentcolor") {
+ return null;
+ }
+
+ if (normalizeColor.resultCache === undefined) {
+ normalizeColor.resultCache = {};
+ }
+
+ if (normalizeColor.resultCache[color] !== undefined) {
+ return normalizeColor.resultCache[color];
+ }
+
+ var originalColor = color;
+
+ var outerSpan = document.createElement("span");
+ document.body.appendChild(outerSpan);
+ outerSpan.style.color = "black";
+
+ var innerSpan = document.createElement("span");
+ outerSpan.appendChild(innerSpan);
+ innerSpan.style.color = color;
+ color = getComputedStyle(innerSpan).color;
+
+ if (color == "rgb(0, 0, 0)") {
+ // Maybe it's really black, maybe it's invalid.
+ outerSpan.color = "white";
+ color = getComputedStyle(innerSpan).color;
+ if (color != "rgb(0, 0, 0)") {
+ return normalizeColor.resultCache[originalColor] = null;
+ }
+ }
+
+ document.body.removeChild(outerSpan);
+
+ // I rely on the fact that browsers generally provide consistent syntax for
+ // getComputedStyle(), although it's not standardized. There are only
+ // three exceptions I found:
+ if (/^rgba\([0-9]+, [0-9]+, [0-9]+, 1\)$/.test(color)) {
+ // IE10PP2 seems to do this sometimes.
+ return normalizeColor.resultCache[originalColor] =
+ color.replace("rgba", "rgb").replace(", 1)", ")");
+ }
+ if (color == "transparent") {
+ // IE10PP2, Firefox 7.0a2, and Opera 11.50 all return "transparent" if
+ // the specified value is "transparent".
+ return normalizeColor.resultCache[originalColor] =
+ "rgba(0, 0, 0, 0)";
+ }
+ // Chrome 15 dev adds way too many significant figures. This isn't a full
+ // fix, it just fixes one case that comes up in tests.
+ color = color.replace(/, 0.496094\)$/, ", 0.5)");
+ return normalizeColor.resultCache[originalColor] = color;
+}
+
+// Returns either null, or something of the form #xxxxxx.
+function parseSimpleColor(color) {
+ color = normalizeColor(color);
+ var matches = /^rgb\(([0-9]+), ([0-9]+), ([0-9]+)\)$/.exec(color);
+ if (matches) {
+ return "#"
+ + parseInt(matches[1]).toString(16).replace(/^.$/, "0$&")
+ + parseInt(matches[2]).toString(16).replace(/^.$/, "0$&")
+ + parseInt(matches[3]).toString(16).replace(/^.$/, "0$&");
+ }
+ return null;
+}
+
+//@}
+
+//////////////////////////////////////////////////////////////////////////////
+/////////////////////////// Edit command functions ///////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////
+///// Methods of the HTMLDocument interface /////
+/////////////////////////////////////////////////
+//@{
+
+var executionStackDepth = 0;
+
+// Helper function for common behavior.
+function editCommandMethod(command, range, callback) {
+ // Set up our global range magic, but only if we're the outermost function
+ if (executionStackDepth == 0 && typeof range != "undefined") {
+ globalRange = range;
+ } else if (executionStackDepth == 0) {
+ globalRange = null;
+ globalRange = getActiveRange();
+ }
+
+ executionStackDepth++;
+ try {
+ var ret = callback();
+ } catch(e) {
+ executionStackDepth--;
+ throw e;
+ }
+ executionStackDepth--;
+ return ret;
+}
+
+function myExecCommand(command, showUi, value, range) {
+ // "All of these methods must treat their command argument ASCII
+ // case-insensitively."
+ command = command.toLowerCase();
+
+ // "If only one argument was provided, let show UI be false."
+ //
+ // If range was passed, I can't actually detect how many args were passed
+ // . . .
+ if (arguments.length == 1
+ || (arguments.length >=4 && typeof showUi == "undefined")) {
+ showUi = false;
+ }
+
+ // "If only one or two arguments were provided, let value be the empty
+ // string."
+ if (arguments.length <= 2
+ || (arguments.length >=4 && typeof value == "undefined")) {
+ value = "";
+ }
+
+ return editCommandMethod(command, range, (function(command, showUi, value) { return function() {
+ // "If command is not supported or not enabled, return false."
+ if (!(command in commands) || !myQueryCommandEnabled(command)) {
+ return false;
+ }
+
+ // "Take the action for command, passing value to the instructions as an
+ // argument."
+ var ret = commands[command].action(value);
+
+ // Check for bugs
+ if (ret !== true && ret !== false) {
+ throw "execCommand() didn't return true or false: " + ret;
+ }
+
+ // "If the previous step returned false, return false."
+ if (ret === false) {
+ return false;
+ }
+
+ // "Return true."
+ return true;
+ }})(command, showUi, value));
+}
+
+function myQueryCommandEnabled(command, range) {
+ // "All of these methods must treat their command argument ASCII
+ // case-insensitively."
+ command = command.toLowerCase();
+
+ return editCommandMethod(command, range, (function(command) { return function() {
+ // "Return true if command is both supported and enabled, false
+ // otherwise."
+ if (!(command in commands)) {
+ return false;
+ }
+
+ // "Among commands defined in this specification, those listed in
+ // Miscellaneous commands are always enabled, except for the cut
+ // command and the paste command. The other commands defined here are
+ // enabled if the active range is not null, its start node is either
+ // editable or an editing host, its end node is either editable or an
+ // editing host, and there is some editing host that is an inclusive
+ // ancestor of both its start node and its end node."
+ return ["copy", "defaultparagraphseparator", "selectall", "stylewithcss",
+ "usecss"].indexOf(command) != -1
+ || (
+ getActiveRange() !== null
+ && (isEditable(getActiveRange().startContainer) || isEditingHost(getActiveRange().startContainer))
+ && (isEditable(getActiveRange().endContainer) || isEditingHost(getActiveRange().endContainer))
+ && (getInclusiveAncestors(getActiveRange().commonAncestorContainer).some(isEditingHost))
+ );
+ }})(command));
+}
+
+function myQueryCommandIndeterm(command, range) {
+ // "All of these methods must treat their command argument ASCII
+ // case-insensitively."
+ command = command.toLowerCase();
+
+ return editCommandMethod(command, range, (function(command) { return function() {
+ // "If command is not supported or has no indeterminacy, return false."
+ if (!(command in commands) || !("indeterm" in commands[command])) {
+ return false;
+ }
+
+ // "Return true if command is indeterminate, otherwise false."
+ return commands[command].indeterm();
+ }})(command));
+}
+
+function myQueryCommandState(command, range) {
+ // "All of these methods must treat their command argument ASCII
+ // case-insensitively."
+ command = command.toLowerCase();
+
+ return editCommandMethod(command, range, (function(command) { return function() {
+ // "If command is not supported or has no state, return false."
+ if (!(command in commands) || !("state" in commands[command])) {
+ return false;
+ }
+
+ // "If the state override for command is set, return it."
+ if (typeof getStateOverride(command) != "undefined") {
+ return getStateOverride(command);
+ }
+
+ // "Return true if command's state is true, otherwise false."
+ return commands[command].state();
+ }})(command));
+}
+
+// "When the queryCommandSupported(command) method on the HTMLDocument
+// interface is invoked, the user agent must return true if command is
+// supported, and false otherwise."
+function myQueryCommandSupported(command) {
+ // "All of these methods must treat their command argument ASCII
+ // case-insensitively."
+ command = command.toLowerCase();
+
+ return command in commands;
+}
+
+function myQueryCommandValue(command, range) {
+ // "All of these methods must treat their command argument ASCII
+ // case-insensitively."
+ command = command.toLowerCase();
+
+ return editCommandMethod(command, range, function() {
+ // "If command is not supported or has no value, return the empty string."
+ if (!(command in commands) || !("value" in commands[command])) {
+ return "";
+ }
+
+ // "If command is "fontSize" and its value override is set, convert the
+ // value override to an integer number of pixels and return the legacy
+ // font size for the result."
+ if (command == "fontsize"
+ && getValueOverride("fontsize") !== undefined) {
+ return getLegacyFontSize(getValueOverride("fontsize"));
+ }
+
+ // "If the value override for command is set, return it."
+ if (typeof getValueOverride(command) != "undefined") {
+ return getValueOverride(command);
+ }
+
+ // "Return command's value."
+ return commands[command].value();
+ });
+}
+//@}
+
+//////////////////////////////
+///// Common definitions /////
+//////////////////////////////
+//@{
+
+// "An HTML element is an Element whose namespace is the HTML namespace."
+//
+// I allow an extra argument to more easily check whether something is a
+// particular HTML element, like isHtmlElement(node, "OL"). It accepts arrays
+// too, like isHtmlElement(node, ["OL", "UL"]) to check if it's an ol or ul.
+function isHtmlElement(node, tags) {
+ if (typeof tags == "string") {
+ tags = [tags];
+ }
+ if (typeof tags == "object") {
+ tags = tags.map(function(tag) { return tag.toUpperCase() });
+ }
+ return node
+ && node.nodeType == Node.ELEMENT_NODE
+ && isHtmlNamespace(node.namespaceURI)
+ && (typeof tags == "undefined" || tags.indexOf(node.tagName) != -1);
+}
+
+// "A prohibited paragraph child name is "address", "article", "aside",
+// "blockquote", "caption", "center", "col", "colgroup", "dd", "details",
+// "dir", "div", "dl", "dt", "fieldset", "figcaption", "figure", "footer",
+// "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "li",
+// "listing", "menu", "nav", "ol", "p", "plaintext", "pre", "section",
+// "summary", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "ul", or
+// "xmp"."
+var prohibitedParagraphChildNames = ["address", "article", "aside",
+ "blockquote", "caption", "center", "col", "colgroup", "dd", "details",
+ "dir", "div", "dl", "dt", "fieldset", "figcaption", "figure", "footer",
+ "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "li",
+ "listing", "menu", "nav", "ol", "p", "plaintext", "pre", "section",
+ "summary", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "ul",
+ "xmp"];
+
+// "A prohibited paragraph child is an HTML element whose local name is a
+// prohibited paragraph child name."
+function isProhibitedParagraphChild(node) {
+ return isHtmlElement(node, prohibitedParagraphChildNames);
+}
+
+// "A block node is either an Element whose "display" property does not have
+// resolved value "inline" or "inline-block" or "inline-table" or "none", or a
+// Document, or a DocumentFragment."
+function isBlockNode(node) {
+ return node
+ && ((node.nodeType == Node.ELEMENT_NODE && ["inline", "inline-block", "inline-table", "none"].indexOf(getComputedStyle(node).display) == -1)
+ || node.nodeType == Node.DOCUMENT_NODE
+ || node.nodeType == Node.DOCUMENT_FRAGMENT_NODE);
+}
+
+// "An inline node is a node that is not a block node."
+function isInlineNode(node) {
+ return node && !isBlockNode(node);
+}
+
+// "An editing host is a node that is either an HTML element with a
+// contenteditable attribute set to the true state, or the HTML element child
+// of a Document whose designMode is enabled."
+function isEditingHost(node) {
+ return node
+ && isHtmlElement(node)
+ && (node.contentEditable == "true"
+ || (node.parentNode
+ && node.parentNode.nodeType == Node.DOCUMENT_NODE
+ && node.parentNode.designMode == "on"));
+}
+
+// "Something is editable if it is a node; it is not an editing host; it does
+// not have a contenteditable attribute set to the false state; its parent is
+// an editing host or editable; and either it is an HTML element, or it is an
+// svg or math element, or it is not an Element and its parent is an HTML
+// element."
+function isEditable(node) {
+ return node
+ && !isEditingHost(node)
+ && (node.nodeType != Node.ELEMENT_NODE || node.contentEditable != "false")
+ && (isEditingHost(node.parentNode) || isEditable(node.parentNode))
+ && (isHtmlElement(node)
+ || (node.nodeType == Node.ELEMENT_NODE && node.namespaceURI == "http://www.w3.org/2000/svg" && node.localName == "svg")
+ || (node.nodeType == Node.ELEMENT_NODE && node.namespaceURI == "http://www.w3.org/1998/Math/MathML" && node.localName == "math")
+ || (node.nodeType != Node.ELEMENT_NODE && isHtmlElement(node.parentNode)));
+}
+
+// Helper function, not defined in the spec
+function hasEditableDescendants(node) {
+ for (var i = 0; i < node.childNodes.length; i++) {
+ if (isEditable(node.childNodes[i])
+ || hasEditableDescendants(node.childNodes[i])) {
+ return true;
+ }
+ }
+ return false;
+}
+
+// "The editing host of node is null if node is neither editable nor an editing
+// host; node itself, if node is an editing host; or the nearest ancestor of
+// node that is an editing host, if node is editable."
+function getEditingHostOf(node) {
+ if (isEditingHost(node)) {
+ return node;
+ } else if (isEditable(node)) {
+ var ancestor = node.parentNode;
+ while (!isEditingHost(ancestor)) {
+ ancestor = ancestor.parentNode;
+ }
+ return ancestor;
+ } else {
+ return null;
+ }
+}
+
+// "Two nodes are in the same editing host if the editing host of the first is
+// non-null and the same as the editing host of the second."
+function inSameEditingHost(node1, node2) {
+ return getEditingHostOf(node1)
+ && getEditingHostOf(node1) == getEditingHostOf(node2);
+}
+
+// "A collapsed line break is a br that begins a line box which has nothing
+// else in it, and therefore has zero height."
+function isCollapsedLineBreak(br) {
+ if (!isHtmlElement(br, "br")) {
+ return false;
+ }
+
+ // Add a zwsp after it and see if that changes the height of the nearest
+ // non-inline parent. Note: this is not actually reliable, because the
+ // parent might have a fixed height or something.
+ var ref = br.parentNode;
+ while (getComputedStyle(ref).display == "inline") {
+ ref = ref.parentNode;
+ }
+ var refStyle = ref.hasAttribute("style") ? ref.getAttribute("style") : null;
+ ref.style.height = "auto";
+ ref.style.maxHeight = "none";
+ ref.style.minHeight = "0";
+ var space = document.createTextNode("\u200b");
+ var origHeight = ref.offsetHeight;
+ if (origHeight == 0) {
+ throw "isCollapsedLineBreak: original height is zero, bug?";
+ }
+ br.parentNode.insertBefore(space, br.nextSibling);
+ var finalHeight = ref.offsetHeight;
+ space.parentNode.removeChild(space);
+ if (refStyle === null) {
+ // Without the setAttribute() line, removeAttribute() doesn't work in
+ // Chrome 14 dev. I have no idea why.
+ ref.setAttribute("style", "");
+ ref.removeAttribute("style");
+ } else {
+ ref.setAttribute("style", refStyle);
+ }
+
+ // Allow some leeway in case the zwsp didn't create a whole new line, but
+ // only made an existing line slightly higher. Firefox 6.0a2 shows this
+ // behavior when the first line is bold.
+ return origHeight < finalHeight - 5;
+}
+
+// "An extraneous line break is a br that has no visual effect, in that
+// removing it from the DOM would not change layout, except that a br that is
+// the sole child of an li is not extraneous."
+//
+// FIXME: This doesn't work in IE, since IE ignores display: none in
+// contenteditable.
+function isExtraneousLineBreak(br) {
+ if (!isHtmlElement(br, "br")) {
+ return false;
+ }
+
+ if (isHtmlElement(br.parentNode, "li")
+ && br.parentNode.childNodes.length == 1) {
+ return false;
+ }
+
+ // Make the line break disappear and see if that changes the block's
+ // height. Yes, this is an absurd hack. We have to reset height etc. on
+ // the reference node because otherwise its height won't change if it's not
+ // auto.
+ var ref = br.parentNode;
+ while (getComputedStyle(ref).display == "inline") {
+ ref = ref.parentNode;
+ }
+ var refStyle = ref.hasAttribute("style") ? ref.getAttribute("style") : null;
+ ref.style.height = "auto";
+ ref.style.maxHeight = "none";
+ ref.style.minHeight = "0";
+ var brStyle = br.hasAttribute("style") ? br.getAttribute("style") : null;
+ var origHeight = ref.offsetHeight;
+ if (origHeight == 0) {
+ throw "isExtraneousLineBreak: original height is zero, bug?";
+ }
+ br.setAttribute("style", "display:none");
+ var finalHeight = ref.offsetHeight;
+ if (refStyle === null) {
+ // Without the setAttribute() line, removeAttribute() doesn't work in
+ // Chrome 14 dev. I have no idea why.
+ ref.setAttribute("style", "");
+ ref.removeAttribute("style");
+ } else {
+ ref.setAttribute("style", refStyle);
+ }
+ if (brStyle === null) {
+ br.removeAttribute("style");
+ } else {
+ br.setAttribute("style", brStyle);
+ }
+
+ return origHeight == finalHeight;
+}
+
+// "A whitespace node is either a Text node whose data is the empty string; or
+// a Text node whose data consists only of one or more tabs (0x0009), line
+// feeds (0x000A), carriage returns (0x000D), and/or spaces (0x0020), and whose
+// parent is an Element whose resolved value for "white-space" is "normal" or
+// "nowrap"; or a Text node whose data consists only of one or more tabs
+// (0x0009), carriage returns (0x000D), and/or spaces (0x0020), and whose
+// parent is an Element whose resolved value for "white-space" is "pre-line"."
+function isWhitespaceNode(node) {
+ return node
+ && node.nodeType == Node.TEXT_NODE
+ && (node.data == ""
+ || (
+ /^[\t\n\r ]+$/.test(node.data)
+ && node.parentNode
+ && node.parentNode.nodeType == Node.ELEMENT_NODE
+ && ["normal", "nowrap"].indexOf(getComputedStyle(node.parentNode).whiteSpace) != -1
+ ) || (
+ /^[\t\r ]+$/.test(node.data)
+ && node.parentNode
+ && node.parentNode.nodeType == Node.ELEMENT_NODE
+ && getComputedStyle(node.parentNode).whiteSpace == "pre-line"
+ ));
+}
+
+// "node is a collapsed whitespace node if the following algorithm returns
+// true:"
+function isCollapsedWhitespaceNode(node) {
+ // "If node is not a whitespace node, return false."
+ if (!isWhitespaceNode(node)) {
+ return false;
+ }
+
+ // "If node's data is the empty string, return true."
+ if (node.data == "") {
+ return true;
+ }
+
+ // "Let ancestor be node's parent."
+ var ancestor = node.parentNode;
+
+ // "If ancestor is null, return true."
+ if (!ancestor) {
+ return true;
+ }
+
+ // "If the "display" property of some ancestor of node has resolved value
+ // "none", return true."
+ if (getAncestors(node).some(function(ancestor) {
+ return ancestor.nodeType == Node.ELEMENT_NODE
+ && getComputedStyle(ancestor).display == "none";
+ })) {
+ return true;
+ }
+
+ // "While ancestor is not a block node and its parent is not null, set
+ // ancestor to its parent."
+ while (!isBlockNode(ancestor)
+ && ancestor.parentNode) {
+ ancestor = ancestor.parentNode;
+ }
+
+ // "Let reference be node."
+ var reference = node;
+
+ // "While reference is a descendant of ancestor:"
+ while (reference != ancestor) {
+ // "Let reference be the node before it in tree order."
+ reference = previousNode(reference);
+
+ // "If reference is a block node or a br, return true."
+ if (isBlockNode(reference)
+ || isHtmlElement(reference, "br")) {
+ return true;
+ }
+
+ // "If reference is a Text node that is not a whitespace node, or is an
+ // img, break from this loop."
+ if ((reference.nodeType == Node.TEXT_NODE && !isWhitespaceNode(reference))
+ || isHtmlElement(reference, "img")) {
+ break;
+ }
+ }
+
+ // "Let reference be node."
+ reference = node;
+
+ // "While reference is a descendant of ancestor:"
+ var stop = nextNodeDescendants(ancestor);
+ while (reference != stop) {
+ // "Let reference be the node after it in tree order, or null if there
+ // is no such node."
+ reference = nextNode(reference);
+
+ // "If reference is a block node or a br, return true."
+ if (isBlockNode(reference)
+ || isHtmlElement(reference, "br")) {
+ return true;
+ }
+
+ // "If reference is a Text node that is not a whitespace node, or is an
+ // img, break from this loop."
+ if ((reference && reference.nodeType == Node.TEXT_NODE && !isWhitespaceNode(reference))
+ || isHtmlElement(reference, "img")) {
+ break;
+ }
+ }
+
+ // "Return false."
+ return false;
+}
+
+// "Something is visible if it is a node that either is a block node, or a Text
+// node that is not a collapsed whitespace node, or an img, or a br that is not
+// an extraneous line break, or any node with a visible descendant; excluding
+// any node with an ancestor container Element whose "display" property has
+// resolved value "none"."
+function isVisible(node) {
+ if (!node) {
+ return false;
+ }
+
+ if (getAncestors(node).concat(node)
+ .filter(function(node) { return node.nodeType == Node.ELEMENT_NODE })
+ .some(function(node) { return getComputedStyle(node).display == "none" })) {
+ return false;
+ }
+
+ if (isBlockNode(node)
+ || (node.nodeType == Node.TEXT_NODE && !isCollapsedWhitespaceNode(node))
+ || isHtmlElement(node, "img")
+ || (isHtmlElement(node, "br") && !isExtraneousLineBreak(node))) {
+ return true;
+ }
+
+ for (var i = 0; i < node.childNodes.length; i++) {
+ if (isVisible(node.childNodes[i])) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+// "Something is invisible if it is a node that is not visible."
+function isInvisible(node) {
+ return node && !isVisible(node);
+}
+
+// "A collapsed block prop is either a collapsed line break that is not an
+// extraneous line break, or an Element that is an inline node and whose
+// children are all either invisible or collapsed block props and that has at
+// least one child that is a collapsed block prop."
+function isCollapsedBlockProp(node) {
+ if (isCollapsedLineBreak(node)
+ && !isExtraneousLineBreak(node)) {
+ return true;
+ }
+
+ if (!isInlineNode(node)
+ || node.nodeType != Node.ELEMENT_NODE) {
+ return false;
+ }
+
+ var hasCollapsedBlockPropChild = false;
+ for (var i = 0; i < node.childNodes.length; i++) {
+ if (!isInvisible(node.childNodes[i])
+ && !isCollapsedBlockProp(node.childNodes[i])) {
+ return false;
+ }
+ if (isCollapsedBlockProp(node.childNodes[i])) {
+ hasCollapsedBlockPropChild = true;
+ }
+ }
+
+ return hasCollapsedBlockPropChild;
+}
+
+// "The active range is the range of the selection given by calling
+// getSelection() on the context object. (Thus the active range may be null.)"
+//
+// We cheat and return globalRange if that's defined. We also ensure that the
+// active range meets the requirements that selection boundary points are
+// supposed to meet, i.e., that the nodes are both Text or Element nodes that
+// descend from a Document.
+function getActiveRange() {
+ var ret;
+ if (globalRange) {
+ ret = globalRange;
+ } else if (getSelection().rangeCount) {
+ ret = getSelection().getRangeAt(0);
+ } else {
+ return null;
+ }
+ if ([Node.TEXT_NODE, Node.ELEMENT_NODE].indexOf(ret.startContainer.nodeType) == -1
+ || [Node.TEXT_NODE, Node.ELEMENT_NODE].indexOf(ret.endContainer.nodeType) == -1
+ || !ret.startContainer.ownerDocument
+ || !ret.endContainer.ownerDocument
+ || !isDescendant(ret.startContainer, ret.startContainer.ownerDocument)
+ || !isDescendant(ret.endContainer, ret.endContainer.ownerDocument)) {
+ throw "Invalid active range; test bug?";
+ }
+ return ret;
+}
+
+// "For some commands, each HTMLDocument must have a boolean state override
+// and/or a string value override. These do not change the command's state or
+// value, but change the way some algorithms behave, as specified in those
+// algorithms' definitions. Initially, both must be unset for every command.
+// Whenever the number of ranges in the Selection changes to something
+// different, and whenever a boundary point of the range at a given index in
+// the Selection changes to something different, the state override and value
+// override must be unset for every command."
+//
+// We implement this crudely by using setters and getters. To verify that the
+// selection hasn't changed, we copy the active range and just check the
+// endpoints match. This isn't really correct, but it's good enough for us.
+// Unset state/value overrides are undefined. We put everything in a function
+// so no one can access anything except via the provided functions, since
+// otherwise callers might mistakenly use outdated overrides (if the selection
+// has changed).
+var getStateOverride, setStateOverride, unsetStateOverride,
+ getValueOverride, setValueOverride, unsetValueOverride;
+(function() {
+ var stateOverrides = {};
+ var valueOverrides = {};
+ var storedRange = null;
+
+ function resetOverrides() {
+ if (!storedRange
+ || storedRange.startContainer != getActiveRange().startContainer
+ || storedRange.endContainer != getActiveRange().endContainer
+ || storedRange.startOffset != getActiveRange().startOffset
+ || storedRange.endOffset != getActiveRange().endOffset) {
+ stateOverrides = {};
+ valueOverrides = {};
+ storedRange = getActiveRange().cloneRange();
+ }
+ }
+
+ getStateOverride = function(command) {
+ resetOverrides();
+ return stateOverrides[command];
+ };
+
+ setStateOverride = function(command, newState) {
+ resetOverrides();
+ stateOverrides[command] = newState;
+ };
+
+ unsetStateOverride = function(command) {
+ resetOverrides();
+ delete stateOverrides[command];
+ }
+
+ getValueOverride = function(command) {
+ resetOverrides();
+ return valueOverrides[command];
+ }
+
+ // "The value override for the backColor command must be the same as the
+ // value override for the hiliteColor command, such that setting one sets
+ // the other to the same thing and unsetting one unsets the other."
+ setValueOverride = function(command, newValue) {
+ resetOverrides();
+ valueOverrides[command] = newValue;
+ if (command == "backcolor") {
+ valueOverrides.hilitecolor = newValue;
+ } else if (command == "hilitecolor") {
+ valueOverrides.backcolor = newValue;
+ }
+ }
+
+ unsetValueOverride = function(command) {
+ resetOverrides();
+ delete valueOverrides[command];
+ if (command == "backcolor") {
+ delete valueOverrides.hilitecolor;
+ } else if (command == "hilitecolor") {
+ delete valueOverrides.backcolor;
+ }
+ }
+})();
+
+//@}
+
+/////////////////////////////
+///// Common algorithms /////
+/////////////////////////////
+
+///// Assorted common algorithms /////
+//@{
+
+// Magic array of extra ranges whose endpoints we want to preserve.
+var extraRanges = [];
+
+function movePreservingRanges(node, newParent, newIndex) {
+ // For convenience, I allow newIndex to be -1 to mean "insert at the end".
+ if (newIndex == -1) {
+ newIndex = newParent.childNodes.length;
+ }
+
+ // "When the user agent is to move a Node to a new location, preserving
+ // ranges, it must remove the Node from its original parent (if any), then
+ // insert it in the new location. In doing so, however, it must ignore the
+ // regular range mutation rules, and instead follow these rules:"
+
+ // "Let node be the moved Node, old parent and old index be the old parent
+ // (which may be null) and index, and new parent and new index be the new
+ // parent and index."
+ var oldParent = node.parentNode;
+ var oldIndex = getNodeIndex(node);
+
+ // We preserve the global range object, the ranges in the selection, and
+ // any range that's in the extraRanges array. Any other ranges won't get
+ // updated, because we have no references to them.
+ var ranges = [globalRange].concat(extraRanges);
+ for (var i = 0; i < getSelection().rangeCount; i++) {
+ ranges.push(getSelection().getRangeAt(i));
+ }
+ var boundaryPoints = [];
+ ranges.forEach(function(range) {
+ boundaryPoints.push([range.startContainer, range.startOffset]);
+ boundaryPoints.push([range.endContainer, range.endOffset]);
+ });
+
+ boundaryPoints.forEach(function(boundaryPoint) {
+ // "If a boundary point's node is the same as or a descendant of node,
+ // leave it unchanged, so it moves to the new location."
+ //
+ // No modifications necessary.
+
+ // "If a boundary point's node is new parent and its offset is greater
+ // than new index, add one to its offset."
+ if (boundaryPoint[0] == newParent
+ && boundaryPoint[1] > newIndex) {
+ boundaryPoint[1]++;
+ }
+
+ // "If a boundary point's node is old parent and its offset is old index or
+ // old index + 1, set its node to new parent and add new index − old index
+ // to its offset."
+ if (boundaryPoint[0] == oldParent
+ && (boundaryPoint[1] == oldIndex
+ || boundaryPoint[1] == oldIndex + 1)) {
+ boundaryPoint[0] = newParent;
+ boundaryPoint[1] += newIndex - oldIndex;
+ }
+
+ // "If a boundary point's node is old parent and its offset is greater than
+ // old index + 1, subtract one from its offset."
+ if (boundaryPoint[0] == oldParent
+ && boundaryPoint[1] > oldIndex + 1) {
+ boundaryPoint[1]--;
+ }
+ });
+
+ // Now actually move it and preserve the ranges.
+ if (newParent.childNodes.length == newIndex) {
+ newParent.appendChild(node);
+ } else {
+ newParent.insertBefore(node, newParent.childNodes[newIndex]);
+ }
+
+ globalRange.setStart(boundaryPoints[0][0], boundaryPoints[0][1]);
+ globalRange.setEnd(boundaryPoints[1][0], boundaryPoints[1][1]);
+
+ for (var i = 0; i < extraRanges.length; i++) {
+ extraRanges[i].setStart(boundaryPoints[2*i + 2][0], boundaryPoints[2*i + 2][1]);
+ extraRanges[i].setEnd(boundaryPoints[2*i + 3][0], boundaryPoints[2*i + 3][1]);
+ }
+
+ getSelection().removeAllRanges();
+ for (var i = 1 + extraRanges.length; i < ranges.length; i++) {
+ var newRange = document.createRange();
+ newRange.setStart(boundaryPoints[2*i][0], boundaryPoints[2*i][1]);
+ newRange.setEnd(boundaryPoints[2*i + 1][0], boundaryPoints[2*i + 1][1]);
+ getSelection().addRange(newRange);
+ }
+}
+
+function setTagName(element, newName) {
+ // "If element is an HTML element with local name equal to new name, return
+ // element."
+ if (isHtmlElement(element, newName.toUpperCase())) {
+ return element;
+ }
+
+ // "If element's parent is null, return element."
+ if (!element.parentNode) {
+ return element;
+ }
+
+ // "Let replacement element be the result of calling createElement(new
+ // name) on the ownerDocument of element."
+ var replacementElement = element.ownerDocument.createElement(newName);
+
+ // "Insert replacement element into element's parent immediately before
+ // element."
+ element.parentNode.insertBefore(replacementElement, element);
+
+ // "Copy all attributes of element to replacement element, in order."
+ for (var i = 0; i < element.attributes.length; i++) {
+ replacementElement.setAttributeNS(element.attributes[i].namespaceURI, element.attributes[i].name, element.attributes[i].value);
+ }
+
+ // "While element has children, append the first child of element as the
+ // last child of replacement element, preserving ranges."
+ while (element.childNodes.length) {
+ movePreservingRanges(element.firstChild, replacementElement, replacementElement.childNodes.length);
+ }
+
+ // "Remove element from its parent."
+ element.parentNode.removeChild(element);
+
+ // "Return replacement element."
+ return replacementElement;
+}
+
+function removeExtraneousLineBreaksBefore(node) {
+ // "Let ref be the previousSibling of node."
+ var ref = node.previousSibling;
+
+ // "If ref is null, abort these steps."
+ if (!ref) {
+ return;
+ }
+
+ // "While ref has children, set ref to its lastChild."
+ while (ref.hasChildNodes()) {
+ ref = ref.lastChild;
+ }
+
+ // "While ref is invisible but not an extraneous line break, and ref does
+ // not equal node's parent, set ref to the node before it in tree order."
+ while (isInvisible(ref)
+ && !isExtraneousLineBreak(ref)
+ && ref != node.parentNode) {
+ ref = previousNode(ref);
+ }
+
+ // "If ref is an editable extraneous line break, remove it from its
+ // parent."
+ if (isEditable(ref)
+ && isExtraneousLineBreak(ref)) {
+ ref.parentNode.removeChild(ref);
+ }
+}
+
+function removeExtraneousLineBreaksAtTheEndOf(node) {
+ // "Let ref be node."
+ var ref = node;
+
+ // "While ref has children, set ref to its lastChild."
+ while (ref.hasChildNodes()) {
+ ref = ref.lastChild;
+ }
+
+ // "While ref is invisible but not an extraneous line break, and ref does
+ // not equal node, set ref to the node before it in tree order."
+ while (isInvisible(ref)
+ && !isExtraneousLineBreak(ref)
+ && ref != node) {
+ ref = previousNode(ref);
+ }
+
+ // "If ref is an editable extraneous line break:"
+ if (isEditable(ref)
+ && isExtraneousLineBreak(ref)) {
+ // "While ref's parent is editable and invisible, set ref to its
+ // parent."
+ while (isEditable(ref.parentNode)
+ && isInvisible(ref.parentNode)) {
+ ref = ref.parentNode;
+ }
+
+ // "Remove ref from its parent."
+ ref.parentNode.removeChild(ref);
+ }
+}
+
+// "To remove extraneous line breaks from a node, first remove extraneous line
+// breaks before it, then remove extraneous line breaks at the end of it."
+function removeExtraneousLineBreaksFrom(node) {
+ removeExtraneousLineBreaksBefore(node);
+ removeExtraneousLineBreaksAtTheEndOf(node);
+}
+
+//@}
+///// Wrapping a list of nodes /////
+//@{
+
+function wrap(nodeList, siblingCriteria, newParentInstructions) {
+ // "If not provided, sibling criteria returns false and new parent
+ // instructions returns null."
+ if (typeof siblingCriteria == "undefined") {
+ siblingCriteria = function() { return false };
+ }
+ if (typeof newParentInstructions == "undefined") {
+ newParentInstructions = function() { return null };
+ }
+
+ // "If every member of node list is invisible, and none is a br, return
+ // null and abort these steps."
+ if (nodeList.every(isInvisible)
+ && !nodeList.some(function(node) { return isHtmlElement(node, "br") })) {
+ return null;
+ }
+
+ // "If node list's first member's parent is null, return null and abort
+ // these steps."
+ if (!nodeList[0].parentNode) {
+ return null;
+ }
+
+ // "If node list's last member is an inline node that's not a br, and node
+ // list's last member's nextSibling is a br, append that br to node list."
+ if (isInlineNode(nodeList[nodeList.length - 1])
+ && !isHtmlElement(nodeList[nodeList.length - 1], "br")
+ && isHtmlElement(nodeList[nodeList.length - 1].nextSibling, "br")) {
+ nodeList.push(nodeList[nodeList.length - 1].nextSibling);
+ }
+
+ // "While node list's first member's previousSibling is invisible, prepend
+ // it to node list."
+ while (isInvisible(nodeList[0].previousSibling)) {
+ nodeList.unshift(nodeList[0].previousSibling);
+ }
+
+ // "While node list's last member's nextSibling is invisible, append it to
+ // node list."
+ while (isInvisible(nodeList[nodeList.length - 1].nextSibling)) {
+ nodeList.push(nodeList[nodeList.length - 1].nextSibling);
+ }
+
+ // "If the previousSibling of the first member of node list is editable and
+ // running sibling criteria on it returns true, let new parent be the
+ // previousSibling of the first member of node list."
+ var newParent;
+ if (isEditable(nodeList[0].previousSibling)
+ && siblingCriteria(nodeList[0].previousSibling)) {
+ newParent = nodeList[0].previousSibling;
+
+ // "Otherwise, if the nextSibling of the last member of node list is
+ // editable and running sibling criteria on it returns true, let new parent
+ // be the nextSibling of the last member of node list."
+ } else if (isEditable(nodeList[nodeList.length - 1].nextSibling)
+ && siblingCriteria(nodeList[nodeList.length - 1].nextSibling)) {
+ newParent = nodeList[nodeList.length - 1].nextSibling;
+
+ // "Otherwise, run new parent instructions, and let new parent be the
+ // result."
+ } else {
+ newParent = newParentInstructions();
+ }
+
+ // "If new parent is null, abort these steps and return null."
+ if (!newParent) {
+ return null;
+ }
+
+ // "If new parent's parent is null:"
+ if (!newParent.parentNode) {
+ // "Insert new parent into the parent of the first member of node list
+ // immediately before the first member of node list."
+ nodeList[0].parentNode.insertBefore(newParent, nodeList[0]);
+
+ // "If any range has a boundary point with node equal to the parent of
+ // new parent and offset equal to the index of new parent, add one to
+ // that boundary point's offset."
+ //
+ // Only try to fix the global range.
+ if (globalRange.startContainer == newParent.parentNode
+ && globalRange.startOffset == getNodeIndex(newParent)) {
+ globalRange.setStart(globalRange.startContainer, globalRange.startOffset + 1);
+ }
+ if (globalRange.endContainer == newParent.parentNode
+ && globalRange.endOffset == getNodeIndex(newParent)) {
+ globalRange.setEnd(globalRange.endContainer, globalRange.endOffset + 1);
+ }
+ }
+
+ // "Let original parent be the parent of the first member of node list."
+ var originalParent = nodeList[0].parentNode;
+
+ // "If new parent is before the first member of node list in tree order:"
+ if (isBefore(newParent, nodeList[0])) {
+ // "If new parent is not an inline node, but the last visible child of
+ // new parent and the first visible member of node list are both inline
+ // nodes, and the last child of new parent is not a br, call
+ // createElement("br") on the ownerDocument of new parent and append
+ // the result as the last child of new parent."
+ if (!isInlineNode(newParent)
+ && isInlineNode([].filter.call(newParent.childNodes, isVisible).slice(-1)[0])
+ && isInlineNode(nodeList.filter(isVisible)[0])
+ && !isHtmlElement(newParent.lastChild, "BR")) {
+ newParent.appendChild(newParent.ownerDocument.createElement("br"));
+ }
+
+ // "For each node in node list, append node as the last child of new
+ // parent, preserving ranges."
+ for (var i = 0; i < nodeList.length; i++) {
+ movePreservingRanges(nodeList[i], newParent, -1);
+ }
+
+ // "Otherwise:"
+ } else {
+ // "If new parent is not an inline node, but the first visible child of
+ // new parent and the last visible member of node list are both inline
+ // nodes, and the last member of node list is not a br, call
+ // createElement("br") on the ownerDocument of new parent and insert
+ // the result as the first child of new parent."
+ if (!isInlineNode(newParent)
+ && isInlineNode([].filter.call(newParent.childNodes, isVisible)[0])
+ && isInlineNode(nodeList.filter(isVisible).slice(-1)[0])
+ && !isHtmlElement(nodeList[nodeList.length - 1], "BR")) {
+ newParent.insertBefore(newParent.ownerDocument.createElement("br"), newParent.firstChild);
+ }
+
+ // "For each node in node list, in reverse order, insert node as the
+ // first child of new parent, preserving ranges."
+ for (var i = nodeList.length - 1; i >= 0; i--) {
+ movePreservingRanges(nodeList[i], newParent, 0);
+ }
+ }
+
+ // "If original parent is editable and has no children, remove it from its
+ // parent."
+ if (isEditable(originalParent) && !originalParent.hasChildNodes()) {
+ originalParent.parentNode.removeChild(originalParent);
+ }
+
+ // "If new parent's nextSibling is editable and running sibling criteria on
+ // it returns true:"
+ if (isEditable(newParent.nextSibling)
+ && siblingCriteria(newParent.nextSibling)) {
+ // "If new parent is not an inline node, but new parent's last child
+ // and new parent's nextSibling's first child are both inline nodes,
+ // and new parent's last child is not a br, call createElement("br") on
+ // the ownerDocument of new parent and append the result as the last
+ // child of new parent."
+ if (!isInlineNode(newParent)
+ && isInlineNode(newParent.lastChild)
+ && isInlineNode(newParent.nextSibling.firstChild)
+ && !isHtmlElement(newParent.lastChild, "BR")) {
+ newParent.appendChild(newParent.ownerDocument.createElement("br"));
+ }
+
+ // "While new parent's nextSibling has children, append its first child
+ // as the last child of new parent, preserving ranges."
+ while (newParent.nextSibling.hasChildNodes()) {
+ movePreservingRanges(newParent.nextSibling.firstChild, newParent, -1);
+ }
+
+ // "Remove new parent's nextSibling from its parent."
+ newParent.parentNode.removeChild(newParent.nextSibling);
+ }
+
+ // "Remove extraneous line breaks from new parent."
+ removeExtraneousLineBreaksFrom(newParent);
+
+ // "Return new parent."
+ return newParent;
+}
+
+
+//@}
+///// Allowed children /////
+//@{
+
+// "A name of an element with inline contents is "a", "abbr", "b", "bdi",
+// "bdo", "cite", "code", "dfn", "em", "h1", "h2", "h3", "h4", "h5", "h6", "i",
+// "kbd", "mark", "p", "pre", "q", "rp", "rt", "ruby", "s", "samp", "small",
+// "span", "strong", "sub", "sup", "u", "var", "acronym", "listing", "strike",
+// "xmp", "big", "blink", "font", "marquee", "nobr", or "tt"."
+var namesOfElementsWithInlineContents = ["a", "abbr", "b", "bdi", "bdo",
+ "cite", "code", "dfn", "em", "h1", "h2", "h3", "h4", "h5", "h6", "i",
+ "kbd", "mark", "p", "pre", "q", "rp", "rt", "ruby", "s", "samp", "small",
+ "span", "strong", "sub", "sup", "u", "var", "acronym", "listing", "strike",
+ "xmp", "big", "blink", "font", "marquee", "nobr", "tt"];
+
+// "An element with inline contents is an HTML element whose local name is a
+// name of an element with inline contents."
+function isElementWithInlineContents(node) {
+ return isHtmlElement(node, namesOfElementsWithInlineContents);
+}
+
+function isAllowedChild(child, parent_) {
+ // "If parent is "colgroup", "table", "tbody", "tfoot", "thead", "tr", or
+ // an HTML element with local name equal to one of those, and child is a
+ // Text node whose data does not consist solely of space characters, return
+ // false."
+ if ((["colgroup", "table", "tbody", "tfoot", "thead", "tr"].indexOf(parent_) != -1
+ || isHtmlElement(parent_, ["colgroup", "table", "tbody", "tfoot", "thead", "tr"]))
+ && typeof child == "object"
+ && child.nodeType == Node.TEXT_NODE
+ && !/^[ \t\n\f\r]*$/.test(child.data)) {
+ return false;
+ }
+
+ // "If parent is "script", "style", "plaintext", or "xmp", or an HTML
+ // element with local name equal to one of those, and child is not a Text
+ // node, return false."
+ if ((["script", "style", "plaintext", "xmp"].indexOf(parent_) != -1
+ || isHtmlElement(parent_, ["script", "style", "plaintext", "xmp"]))
+ && (typeof child != "object" || child.nodeType != Node.TEXT_NODE)) {
+ return false;
+ }
+
+ // "If child is a Document, DocumentFragment, or DocumentType, return
+ // false."
+ if (typeof child == "object"
+ && (child.nodeType == Node.DOCUMENT_NODE
+ || child.nodeType == Node.DOCUMENT_FRAGMENT_NODE
+ || child.nodeType == Node.DOCUMENT_TYPE_NODE)) {
+ return false;
+ }
+
+ // "If child is an HTML element, set child to the local name of child."
+ if (isHtmlElement(child)) {
+ child = child.tagName.toLowerCase();
+ }
+
+ // "If child is not a string, return true."
+ if (typeof child != "string") {
+ return true;
+ }
+
+ // "If parent is an HTML element:"
+ if (isHtmlElement(parent_)) {
+ // "If child is "a", and parent or some ancestor of parent is an a,
+ // return false."
+ //
+ // "If child is a prohibited paragraph child name and parent or some
+ // ancestor of parent is an element with inline contents, return
+ // false."
+ //
+ // "If child is "h1", "h2", "h3", "h4", "h5", or "h6", and parent or
+ // some ancestor of parent is an HTML element with local name "h1",
+ // "h2", "h3", "h4", "h5", or "h6", return false."
+ var ancestor = parent_;
+ while (ancestor) {
+ if (child == "a" && isHtmlElement(ancestor, "a")) {
+ return false;
+ }
+ if (prohibitedParagraphChildNames.indexOf(child) != -1
+ && isElementWithInlineContents(ancestor)) {
+ return false;
+ }
+ if (/^h[1-6]$/.test(child)
+ && isHtmlElement(ancestor)
+ && /^H[1-6]$/.test(ancestor.tagName)) {
+ return false;
+ }
+ ancestor = ancestor.parentNode;
+ }
+
+ // "Let parent be the local name of parent."
+ parent_ = parent_.tagName.toLowerCase();
+ }
+
+ // "If parent is an Element or DocumentFragment, return true."
+ if (typeof parent_ == "object"
+ && (parent_.nodeType == Node.ELEMENT_NODE
+ || parent_.nodeType == Node.DOCUMENT_FRAGMENT_NODE)) {
+ return true;
+ }
+
+ // "If parent is not a string, return false."
+ if (typeof parent_ != "string") {
+ return false;
+ }
+
+ // "If parent is on the left-hand side of an entry on the following list,
+ // then return true if child is listed on the right-hand side of that
+ // entry, and false otherwise."
+ switch (parent_) {
+ case "colgroup":
+ return child == "col";
+ case "table":
+ return ["caption", "col", "colgroup", "tbody", "td", "tfoot", "th", "thead", "tr"].indexOf(child) != -1;
+ case "tbody":
+ case "thead":
+ case "tfoot":
+ return ["td", "th", "tr"].indexOf(child) != -1;
+ case "tr":
+ return ["td", "th"].indexOf(child) != -1;
+ case "dl":
+ return ["dt", "dd"].indexOf(child) != -1;
+ case "dir":
+ case "ol":
+ case "ul":
+ return ["dir", "li", "ol", "ul"].indexOf(child) != -1;
+ case "hgroup":
+ return /^h[1-6]$/.test(child);
+ }
+
+ // "If child is "body", "caption", "col", "colgroup", "frame", "frameset",
+ // "head", "html", "tbody", "td", "tfoot", "th", "thead", or "tr", return
+ // false."
+ if (["body", "caption", "col", "colgroup", "frame", "frameset", "head",
+ "html", "tbody", "td", "tfoot", "th", "thead", "tr"].indexOf(child) != -1) {
+ return false;
+ }
+
+ // "If child is "dd" or "dt" and parent is not "dl", return false."
+ if (["dd", "dt"].indexOf(child) != -1
+ && parent_ != "dl") {
+ return false;
+ }
+
+ // "If child is "li" and parent is not "ol" or "ul", return false."
+ if (child == "li"
+ && parent_ != "ol"
+ && parent_ != "ul") {
+ return false;
+ }
+
+ // "If parent is on the left-hand side of an entry on the following list
+ // and child is listed on the right-hand side of that entry, return false."
+ var table = [
+ [["a"], ["a"]],
+ [["dd", "dt"], ["dd", "dt"]],
+ [["h1", "h2", "h3", "h4", "h5", "h6"], ["h1", "h2", "h3", "h4", "h5", "h6"]],
+ [["li"], ["li"]],
+ [["nobr"], ["nobr"]],
+ [namesOfElementsWithInlineContents, prohibitedParagraphChildNames],
+ [["td", "th"], ["caption", "col", "colgroup", "tbody", "td", "tfoot", "th", "thead", "tr"]],
+ ];
+ for (var i = 0; i < table.length; i++) {
+ if (table[i][0].indexOf(parent_) != -1
+ && table[i][1].indexOf(child) != -1) {
+ return false;
+ }
+ }
+
+ // "Return true."
+ return true;
+}
+
+
+//@}
+
+//////////////////////////////////////
+///// Inline formatting commands /////
+//////////////////////////////////////
+
+///// Inline formatting command definitions /////
+//@{
+
+// "A node node is effectively contained in a range range if range is not
+// collapsed, and at least one of the following holds:"
+function isEffectivelyContained(node, range) {
+ if (range.collapsed) {
+ return false;
+ }
+
+ // "node is contained in range."
+ if (isContained(node, range)) {
+ return true;
+ }
+
+ // "node is range's start node, it is a Text node, and its length is
+ // different from range's start offset."
+ if (node == range.startContainer
+ && node.nodeType == Node.TEXT_NODE
+ && getNodeLength(node) != range.startOffset) {
+ return true;
+ }
+
+ // "node is range's end node, it is a Text node, and range's end offset is
+ // not 0."
+ if (node == range.endContainer
+ && node.nodeType == Node.TEXT_NODE
+ && range.endOffset != 0) {
+ return true;
+ }
+
+ // "node has at least one child; and all its children are effectively
+ // contained in range; and either range's start node is not a descendant of
+ // node or is not a Text node or range's start offset is zero; and either
+ // range's end node is not a descendant of node or is not a Text node or
+ // range's end offset is its end node's length."
+ if (node.hasChildNodes()
+ && [].every.call(node.childNodes, function(child) { return isEffectivelyContained(child, range) })
+ && (!isDescendant(range.startContainer, node)
+ || range.startContainer.nodeType != Node.TEXT_NODE
+ || range.startOffset == 0)
+ && (!isDescendant(range.endContainer, node)
+ || range.endContainer.nodeType != Node.TEXT_NODE
+ || range.endOffset == getNodeLength(range.endContainer))) {
+ return true;
+ }
+
+ return false;
+}
+
+// Like get(All)ContainedNodes(), but for effectively contained nodes.
+function getEffectivelyContainedNodes(range, condition) {
+ if (typeof condition == "undefined") {
+ condition = function() { return true };
+ }
+ var node = range.startContainer;
+ while (isEffectivelyContained(node.parentNode, range)) {
+ node = node.parentNode;
+ }
+
+ var stop = nextNodeDescendants(range.endContainer);
+
+ var nodeList = [];
+ while (isBefore(node, stop)) {
+ if (isEffectivelyContained(node, range)
+ && condition(node)) {
+ nodeList.push(node);
+ node = nextNodeDescendants(node);
+ continue;
+ }
+ node = nextNode(node);
+ }
+ return nodeList;
+}
+
+function getAllEffectivelyContainedNodes(range, condition) {
+ if (typeof condition == "undefined") {
+ condition = function() { return true };
+ }
+ var node = range.startContainer;
+ while (isEffectivelyContained(node.parentNode, range)) {
+ node = node.parentNode;
+ }
+
+ var stop = nextNodeDescendants(range.endContainer);
+
+ var nodeList = [];
+ while (isBefore(node, stop)) {
+ if (isEffectivelyContained(node, range)
+ && condition(node)) {
+ nodeList.push(node);
+ }
+ node = nextNode(node);
+ }
+ return nodeList;
+}
+
+// "A modifiable element is a b, em, i, s, span, strong, sub, sup, or u element
+// with no attributes except possibly style; or a font element with no
+// attributes except possibly style, color, face, and/or size; or an a element
+// with no attributes except possibly style and/or href."
+function isModifiableElement(node) {
+ if (!isHtmlElement(node)) {
+ return false;
+ }
+
+ if (["B", "EM", "I", "S", "SPAN", "STRIKE", "STRONG", "SUB", "SUP", "U"].indexOf(node.tagName) != -1) {
+ if (node.attributes.length == 0) {
+ return true;
+ }
+
+ if (node.attributes.length == 1
+ && node.hasAttribute("style")) {
+ return true;
+ }
+ }
+
+ if (node.tagName == "FONT" || node.tagName == "A") {
+ var numAttrs = node.attributes.length;
+
+ if (node.hasAttribute("style")) {
+ numAttrs--;
+ }
+
+ if (node.tagName == "FONT") {
+ if (node.hasAttribute("color")) {
+ numAttrs--;
+ }
+
+ if (node.hasAttribute("face")) {
+ numAttrs--;
+ }
+
+ if (node.hasAttribute("size")) {
+ numAttrs--;
+ }
+ }
+
+ if (node.tagName == "A"
+ && node.hasAttribute("href")) {
+ numAttrs--;
+ }
+
+ if (numAttrs == 0) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function isSimpleModifiableElement(node) {
+ // "A simple modifiable element is an HTML element for which at least one
+ // of the following holds:"
+ if (!isHtmlElement(node)) {
+ return false;
+ }
+
+ // Only these elements can possibly be a simple modifiable element.
+ if (["A", "B", "EM", "FONT", "I", "S", "SPAN", "STRIKE", "STRONG", "SUB", "SUP", "U"].indexOf(node.tagName) == -1) {
+ return false;
+ }
+
+ // "It is an a, b, em, font, i, s, span, strike, strong, sub, sup, or u
+ // element with no attributes."
+ if (node.attributes.length == 0) {
+ return true;
+ }
+
+ // If it's got more than one attribute, everything after this fails.
+ if (node.attributes.length > 1) {
+ return false;
+ }
+
+ // "It is an a, b, em, font, i, s, span, strike, strong, sub, sup, or u
+ // element with exactly one attribute, which is style, which sets no CSS
+ // properties (including invalid or unrecognized properties)."
+ //
+ // Not gonna try for invalid or unrecognized.
+ if (node.hasAttribute("style")
+ && node.style.length == 0) {
+ return true;
+ }
+
+ // "It is an a element with exactly one attribute, which is href."
+ if (node.tagName == "A"
+ && node.hasAttribute("href")) {
+ return true;
+ }
+
+ // "It is a font element with exactly one attribute, which is either color,
+ // face, or size."
+ if (node.tagName == "FONT"
+ && (node.hasAttribute("color")
+ || node.hasAttribute("face")
+ || node.hasAttribute("size")
+ )) {
+ return true;
+ }
+
+ // "It is a b or strong element with exactly one attribute, which is style,
+ // and the style attribute sets exactly one CSS property (including invalid
+ // or unrecognized properties), which is "font-weight"."
+ if ((node.tagName == "B" || node.tagName == "STRONG")
+ && node.hasAttribute("style")
+ && node.style.length == 1
+ && node.style.fontWeight != "") {
+ return true;
+ }
+
+ // "It is an i or em element with exactly one attribute, which is style,
+ // and the style attribute sets exactly one CSS property (including invalid
+ // or unrecognized properties), which is "font-style"."
+ if ((node.tagName == "I" || node.tagName == "EM")
+ && node.hasAttribute("style")
+ && node.style.length == 1
+ && node.style.fontStyle != "") {
+ return true;
+ }
+
+ // "It is an a, font, or span element with exactly one attribute, which is
+ // style, and the style attribute sets exactly one CSS property (including
+ // invalid or unrecognized properties), and that property is not
+ // "text-decoration"."
+ if ((node.tagName == "A" || node.tagName == "FONT" || node.tagName == "SPAN")
+ && node.hasAttribute("style")
+ && node.style.length == 1
+ && node.style.textDecoration == "") {
+ return true;
+ }
+
+ // "It is an a, font, s, span, strike, or u element with exactly one
+ // attribute, which is style, and the style attribute sets exactly one CSS
+ // property (including invalid or unrecognized properties), which is
+ // "text-decoration", which is set to "line-through" or "underline" or
+ // "overline" or "none"."
+ //
+ // The weird extra node.style.length check is for Firefox, which as of
+ // 8.0a2 has annoying and weird behavior here.
+ if (["A", "FONT", "S", "SPAN", "STRIKE", "U"].indexOf(node.tagName) != -1
+ && node.hasAttribute("style")
+ && (node.style.length == 1
+ || (node.style.length == 4
+ && "MozTextBlink" in node.style
+ && "MozTextDecorationColor" in node.style
+ && "MozTextDecorationLine" in node.style
+ && "MozTextDecorationStyle" in node.style)
+ || (node.style.length == 4
+ && "MozTextBlink" in node.style
+ && "textDecorationColor" in node.style
+ && "textDecorationLine" in node.style
+ && "textDecorationStyle" in node.style)
+ )
+ && (node.style.textDecoration == "line-through"
+ || node.style.textDecoration == "underline"
+ || node.style.textDecoration == "overline"
+ || node.style.textDecoration == "none")) {
+ return true;
+ }
+
+ return false;
+}
+
+// "A formattable node is an editable visible node that is either a Text node,
+// an img, or a br."
+function isFormattableNode(node) {
+ return isEditable(node)
+ && isVisible(node)
+ && (node.nodeType == Node.TEXT_NODE
+ || isHtmlElement(node, ["img", "br"]));
+}
+
+// "Two quantities are equivalent values for a command if either both are null,
+// or both are strings and they're equal and the command does not define any
+// equivalent values, or both are strings and the command defines equivalent
+// values and they match the definition."
+function areEquivalentValues(command, val1, val2) {
+ if (val1 === null && val2 === null) {
+ return true;
+ }
+
+ if (typeof val1 == "string"
+ && typeof val2 == "string"
+ && val1 == val2
+ && !("equivalentValues" in commands[command])) {
+ return true;
+ }
+
+ if (typeof val1 == "string"
+ && typeof val2 == "string"
+ && "equivalentValues" in commands[command]
+ && commands[command].equivalentValues(val1, val2)) {
+ return true;
+ }
+
+ return false;
+}
+
+// "Two quantities are loosely equivalent values for a command if either they
+// are equivalent values for the command, or if the command is the fontSize
+// command; one of the quantities is one of "x-small", "small", "medium",
+// "large", "x-large", "xx-large", or "xxx-large"; and the other quantity is
+// the resolved value of "font-size" on a font element whose size attribute has
+// the corresponding value set ("1" through "7" respectively)."
+function areLooselyEquivalentValues(command, val1, val2) {
+ if (areEquivalentValues(command, val1, val2)) {
+ return true;
+ }
+
+ if (command != "fontsize"
+ || typeof val1 != "string"
+ || typeof val2 != "string") {
+ return false;
+ }
+
+ // Static variables in JavaScript?
+ var callee = areLooselyEquivalentValues;
+ if (callee.sizeMap === undefined) {
+ callee.sizeMap = {};
+ var font = document.createElement("font");
+ document.body.appendChild(font);
+ ["x-small", "small", "medium", "large", "x-large", "xx-large",
+ "xxx-large"].forEach(function(keyword) {
+ font.size = cssSizeToLegacy(keyword);
+ callee.sizeMap[keyword] = getComputedStyle(font).fontSize;
+ });
+ document.body.removeChild(font);
+ }
+
+ return val1 === callee.sizeMap[val2]
+ || val2 === callee.sizeMap[val1];
+}
+
+//@}
+///// Assorted inline formatting command algorithms /////
+//@{
+
+function getEffectiveCommandValue(node, command) {
+ // "If neither node nor its parent is an Element, return null."
+ if (node.nodeType != Node.ELEMENT_NODE
+ && (!node.parentNode || node.parentNode.nodeType != Node.ELEMENT_NODE)) {
+ return null;
+ }
+
+ // "If node is not an Element, return the effective command value of its
+ // parent for command."
+ if (node.nodeType != Node.ELEMENT_NODE) {
+ return getEffectiveCommandValue(node.parentNode, command);
+ }
+
+ // "If command is "createLink" or "unlink":"
+ if (command == "createlink" || command == "unlink") {
+ // "While node is not null, and is not an a element that has an href
+ // attribute, set node to its parent."
+ while (node
+ && (!isHtmlElement(node)
+ || node.tagName != "A"
+ || !node.hasAttribute("href"))) {
+ node = node.parentNode;
+ }
+
+ // "If node is null, return null."
+ if (!node) {
+ return null;
+ }
+
+ // "Return the value of node's href attribute."
+ return node.getAttribute("href");
+ }
+
+ // "If command is "backColor" or "hiliteColor":"
+ if (command == "backcolor"
+ || command == "hilitecolor") {
+ // "While the resolved value of "background-color" on node is any
+ // fully transparent value, and node's parent is an Element, set
+ // node to its parent."
+ //
+ // Another lame hack to avoid flawed APIs.
+ while ((getComputedStyle(node).backgroundColor == "rgba(0, 0, 0, 0)"
+ || getComputedStyle(node).backgroundColor === ""
+ || getComputedStyle(node).backgroundColor == "transparent")
+ && node.parentNode
+ && node.parentNode.nodeType == Node.ELEMENT_NODE) {
+ node = node.parentNode;
+ }
+
+ // "Return the resolved value of "background-color" for node."
+ return getComputedStyle(node).backgroundColor;
+ }
+
+ // "If command is "subscript" or "superscript":"
+ if (command == "subscript" || command == "superscript") {
+ // "Let affected by subscript and affected by superscript be two
+ // boolean variables, both initially false."
+ var affectedBySubscript = false;
+ var affectedBySuperscript = false;
+
+ // "While node is an inline node:"
+ while (isInlineNode(node)) {
+ var verticalAlign = getComputedStyle(node).verticalAlign;
+
+ // "If node is a sub, set affected by subscript to true."
+ if (isHtmlElement(node, "sub")) {
+ affectedBySubscript = true;
+ // "Otherwise, if node is a sup, set affected by superscript to
+ // true."
+ } else if (isHtmlElement(node, "sup")) {
+ affectedBySuperscript = true;
+ }
+
+ // "Set node to its parent."
+ node = node.parentNode;
+ }
+
+ // "If affected by subscript and affected by superscript are both true,
+ // return the string "mixed"."
+ if (affectedBySubscript && affectedBySuperscript) {
+ return "mixed";
+ }
+
+ // "If affected by subscript is true, return "subscript"."
+ if (affectedBySubscript) {
+ return "subscript";
+ }
+
+ // "If affected by superscript is true, return "superscript"."
+ if (affectedBySuperscript) {
+ return "superscript";
+ }
+
+ // "Return null."
+ return null;
+ }
+
+ // "If command is "strikethrough", and the "text-decoration" property of
+ // node or any of its ancestors has resolved value containing
+ // "line-through", return "line-through". Otherwise, return null."
+ if (command == "strikethrough") {
+ do {
+ if (getComputedStyle(node).textDecoration.indexOf("line-through") != -1) {
+ return "line-through";
+ }
+ node = node.parentNode;
+ } while (node && node.nodeType == Node.ELEMENT_NODE);
+ return null;
+ }
+
+ // "If command is "underline", and the "text-decoration" property of node
+ // or any of its ancestors has resolved value containing "underline",
+ // return "underline". Otherwise, return null."
+ if (command == "underline") {
+ do {
+ if (getComputedStyle(node).textDecoration.indexOf("underline") != -1) {
+ return "underline";
+ }
+ node = node.parentNode;
+ } while (node && node.nodeType == Node.ELEMENT_NODE);
+ return null;
+ }
+
+ if (!("relevantCssProperty" in commands[command])) {
+ throw "Bug: no relevantCssProperty for " + command + " in getEffectiveCommandValue";
+ }
+
+ // "Return the resolved value for node of the relevant CSS property for
+ // command."
+ return getComputedStyle(node)[commands[command].relevantCssProperty];
+}
+
+function getSpecifiedCommandValue(element, command) {
+ // "If command is "backColor" or "hiliteColor" and element's display
+ // property does not have resolved value "inline", return null."
+ if ((command == "backcolor" || command == "hilitecolor")
+ && getComputedStyle(element).display != "inline") {
+ return null;
+ }
+
+ // "If command is "createLink" or "unlink":"
+ if (command == "createlink" || command == "unlink") {
+ // "If element is an a element and has an href attribute, return the
+ // value of that attribute."
+ if (isHtmlElement(element)
+ && element.tagName == "A"
+ && element.hasAttribute("href")) {
+ return element.getAttribute("href");
+ }
+
+ // "Return null."
+ return null;
+ }
+
+ // "If command is "subscript" or "superscript":"
+ if (command == "subscript" || command == "superscript") {
+ // "If element is a sup, return "superscript"."
+ if (isHtmlElement(element, "sup")) {
+ return "superscript";
+ }
+
+ // "If element is a sub, return "subscript"."
+ if (isHtmlElement(element, "sub")) {
+ return "subscript";
+ }
+
+ // "Return null."
+ return null;
+ }
+
+ // "If command is "strikethrough", and element has a style attribute set,
+ // and that attribute sets "text-decoration":"
+ if (command == "strikethrough"
+ && element.style.textDecoration != "") {
+ // "If element's style attribute sets "text-decoration" to a value
+ // containing "line-through", return "line-through"."
+ if (element.style.textDecoration.indexOf("line-through") != -1) {
+ return "line-through";
+ }
+
+ // "Return null."
+ return null;
+ }
+
+ // "If command is "strikethrough" and element is a s or strike element,
+ // return "line-through"."
+ if (command == "strikethrough"
+ && isHtmlElement(element, ["S", "STRIKE"])) {
+ return "line-through";
+ }
+
+ // "If command is "underline", and element has a style attribute set, and
+ // that attribute sets "text-decoration":"
+ if (command == "underline"
+ && element.style.textDecoration != "") {
+ // "If element's style attribute sets "text-decoration" to a value
+ // containing "underline", return "underline"."
+ if (element.style.textDecoration.indexOf("underline") != -1) {
+ return "underline";
+ }
+
+ // "Return null."
+ return null;
+ }
+
+ // "If command is "underline" and element is a u element, return
+ // "underline"."
+ if (command == "underline"
+ && isHtmlElement(element, "U")) {
+ return "underline";
+ }
+
+ // "Let property be the relevant CSS property for command."
+ var property = commands[command].relevantCssProperty;
+
+ // "If property is null, return null."
+ if (property === null) {
+ return null;
+ }
+
+ // "If element has a style attribute set, and that attribute has the
+ // effect of setting property, return the value that it sets property to."
+ if (element.style[property] != "") {
+ return element.style[property];
+ }
+
+ // "If element is a font element that has an attribute whose effect is
+ // to create a presentational hint for property, return the value that the
+ // hint sets property to. (For a size of 7, this will be the non-CSS value
+ // "xxx-large".)"
+ if (isHtmlNamespace(element.namespaceURI)
+ && element.tagName == "FONT") {
+ if (property == "color" && element.hasAttribute("color")) {
+ return element.color;
+ }
+ if (property == "fontFamily" && element.hasAttribute("face")) {
+ return element.face;
+ }
+ if (property == "fontSize" && element.hasAttribute("size")) {
+ // This is not even close to correct in general.
+ var size = parseInt(element.size);
+ if (size < 1) {
+ size = 1;
+ }
+ if (size > 7) {
+ size = 7;
+ }
+ return {
+ 1: "x-small",
+ 2: "small",
+ 3: "medium",
+ 4: "large",
+ 5: "x-large",
+ 6: "xx-large",
+ 7: "xxx-large"
+ }[size];
+ }
+ }
+
+ // "If element is in the following list, and property is equal to the
+ // CSS property name listed for it, return the string listed for it."
+ //
+ // A list follows, whose meaning is copied here.
+ if (property == "fontWeight"
+ && (element.tagName == "B" || element.tagName == "STRONG")) {
+ return "bold";
+ }
+ if (property == "fontStyle"
+ && (element.tagName == "I" || element.tagName == "EM")) {
+ return "italic";
+ }
+
+ // "Return null."
+ return null;
+}
+
+function reorderModifiableDescendants(node, command, newValue) {
+ // "Let candidate equal node."
+ var candidate = node;
+
+ // "While candidate is a modifiable element, and candidate has exactly one
+ // child, and that child is also a modifiable element, and candidate is not
+ // a simple modifiable element or candidate's specified command value for
+ // command is not equivalent to new value, set candidate to its child."
+ while (isModifiableElement(candidate)
+ && candidate.childNodes.length == 1
+ && isModifiableElement(candidate.firstChild)
+ && (!isSimpleModifiableElement(candidate)
+ || !areEquivalentValues(command, getSpecifiedCommandValue(candidate, command), newValue))) {
+ candidate = candidate.firstChild;
+ }
+
+ // "If candidate is node, or is not a simple modifiable element, or its
+ // specified command value is not equivalent to new value, or its effective
+ // command value is not loosely equivalent to new value, abort these
+ // steps."
+ if (candidate == node
+ || !isSimpleModifiableElement(candidate)
+ || !areEquivalentValues(command, getSpecifiedCommandValue(candidate, command), newValue)
+ || !areLooselyEquivalentValues(command, getEffectiveCommandValue(candidate, command), newValue)) {
+ return;
+ }
+
+ // "While candidate has children, insert the first child of candidate into
+ // candidate's parent immediately before candidate, preserving ranges."
+ while (candidate.hasChildNodes()) {
+ movePreservingRanges(candidate.firstChild, candidate.parentNode, getNodeIndex(candidate));
+ }
+
+ // "Insert candidate into node's parent immediately after node."
+ node.parentNode.insertBefore(candidate, node.nextSibling);
+
+ // "Append the node as the last child of candidate, preserving ranges."
+ movePreservingRanges(node, candidate, -1);
+}
+
+function recordValues(nodeList) {
+ // "Let values be a list of (node, command, specified command value)
+ // triples, initially empty."
+ var values = [];
+
+ // "For each node in node list, for each command in the list "subscript",
+ // "bold", "fontName", "fontSize", "foreColor", "hiliteColor", "italic",
+ // "strikethrough", and "underline" in that order:"
+ nodeList.forEach(function(node) {
+ ["subscript", "bold", "fontname", "fontsize", "forecolor",
+ "hilitecolor", "italic", "strikethrough", "underline"].forEach(function(command) {
+ // "Let ancestor equal node."
+ var ancestor = node;
+
+ // "If ancestor is not an Element, set it to its parent."
+ if (ancestor.nodeType != Node.ELEMENT_NODE) {
+ ancestor = ancestor.parentNode;
+ }
+
+ // "While ancestor is an Element and its specified command value
+ // for command is null, set it to its parent."
+ while (ancestor
+ && ancestor.nodeType == Node.ELEMENT_NODE
+ && getSpecifiedCommandValue(ancestor, command) === null) {
+ ancestor = ancestor.parentNode;
+ }
+
+ // "If ancestor is an Element, add (node, command, ancestor's
+ // specified command value for command) to values. Otherwise add
+ // (node, command, null) to values."
+ if (ancestor && ancestor.nodeType == Node.ELEMENT_NODE) {
+ values.push([node, command, getSpecifiedCommandValue(ancestor, command)]);
+ } else {
+ values.push([node, command, null]);
+ }
+ });
+ });
+
+ // "Return values."
+ return values;
+}
+
+function restoreValues(values) {
+ // "For each (node, command, value) triple in values:"
+ values.forEach(function(triple) {
+ var node = triple[0];
+ var command = triple[1];
+ var value = triple[2];
+
+ // "Let ancestor equal node."
+ var ancestor = node;
+
+ // "If ancestor is not an Element, set it to its parent."
+ if (!ancestor || ancestor.nodeType != Node.ELEMENT_NODE) {
+ ancestor = ancestor.parentNode;
+ }
+
+ // "While ancestor is an Element and its specified command value for
+ // command is null, set it to its parent."
+ while (ancestor
+ && ancestor.nodeType == Node.ELEMENT_NODE
+ && getSpecifiedCommandValue(ancestor, command) === null) {
+ ancestor = ancestor.parentNode;
+ }
+
+ // "If value is null and ancestor is an Element, push down values on
+ // node for command, with new value null."
+ if (value === null
+ && ancestor
+ && ancestor.nodeType == Node.ELEMENT_NODE) {
+ pushDownValues(node, command, null);
+
+ // "Otherwise, if ancestor is an Element and its specified command
+ // value for command is not equivalent to value, or if ancestor is not
+ // an Element and value is not null, force the value of command to
+ // value on node."
+ } else if ((ancestor
+ && ancestor.nodeType == Node.ELEMENT_NODE
+ && !areEquivalentValues(command, getSpecifiedCommandValue(ancestor, command), value))
+ || ((!ancestor || ancestor.nodeType != Node.ELEMENT_NODE)
+ && value !== null)) {
+ forceValue(node, command, value);
+ }
+ });
+}
+
+
+//@}
+///// Clearing an element's value /////
+//@{
+
+function clearValue(element, command) {
+ // "If element is not editable, return the empty list."
+ if (!isEditable(element)) {
+ return [];
+ }
+
+ // "If element's specified command value for command is null, return the
+ // empty list."
+ if (getSpecifiedCommandValue(element, command) === null) {
+ return [];
+ }
+
+ // "If element is a simple modifiable element:"
+ if (isSimpleModifiableElement(element)) {
+ // "Let children be the children of element."
+ var children = Array.prototype.slice.call(element.childNodes);
+
+ // "For each child in children, insert child into element's parent
+ // immediately before element, preserving ranges."
+ for (var i = 0; i < children.length; i++) {
+ movePreservingRanges(children[i], element.parentNode, getNodeIndex(element));
+ }
+
+ // "Remove element from its parent."
+ element.parentNode.removeChild(element);
+
+ // "Return children."
+ return children;
+ }
+
+ // "If command is "strikethrough", and element has a style attribute that
+ // sets "text-decoration" to some value containing "line-through", delete
+ // "line-through" from the value."
+ if (command == "strikethrough"
+ && element.style.textDecoration.indexOf("line-through") != -1) {
+ if (element.style.textDecoration == "line-through") {
+ element.style.textDecoration = "";
+ } else {
+ element.style.textDecoration = element.style.textDecoration.replace("line-through", "");
+ }
+ if (element.getAttribute("style") == "") {
+ element.removeAttribute("style");
+ }
+ }
+
+ // "If command is "underline", and element has a style attribute that sets
+ // "text-decoration" to some value containing "underline", delete
+ // "underline" from the value."
+ if (command == "underline"
+ && element.style.textDecoration.indexOf("underline") != -1) {
+ if (element.style.textDecoration == "underline") {
+ element.style.textDecoration = "";
+ } else {
+ element.style.textDecoration = element.style.textDecoration.replace("underline", "");
+ }
+ if (element.getAttribute("style") == "") {
+ element.removeAttribute("style");
+ }
+ }
+
+ // "If the relevant CSS property for command is not null, unset the CSS
+ // property property of element."
+ if (commands[command].relevantCssProperty !== null) {
+ element.style[commands[command].relevantCssProperty] = '';
+ if (element.getAttribute("style") == "") {
+ element.removeAttribute("style");
+ }
+ }
+
+ // "If element is a font element:"
+ if (isHtmlNamespace(element.namespaceURI) && element.tagName == "FONT") {
+ // "If command is "foreColor", unset element's color attribute, if set."
+ if (command == "forecolor") {
+ element.removeAttribute("color");
+ }
+
+ // "If command is "fontName", unset element's face attribute, if set."
+ if (command == "fontname") {
+ element.removeAttribute("face");
+ }
+
+ // "If command is "fontSize", unset element's size attribute, if set."
+ if (command == "fontsize") {
+ element.removeAttribute("size");
+ }
+ }
+
+ // "If element is an a element and command is "createLink" or "unlink",
+ // unset the href property of element."
+ if (isHtmlElement(element, "A")
+ && (command == "createlink" || command == "unlink")) {
+ element.removeAttribute("href");
+ }
+
+ // "If element's specified command value for command is null, return the
+ // empty list."
+ if (getSpecifiedCommandValue(element, command) === null) {
+ return [];
+ }
+
+ // "Set the tag name of element to "span", and return the one-node list
+ // consisting of the result."
+ return [setTagName(element, "span")];
+}
+
+
+//@}
+///// Pushing down values /////
+//@{
+
+function pushDownValues(node, command, newValue) {
+ // "If node's parent is not an Element, abort this algorithm."
+ if (!node.parentNode
+ || node.parentNode.nodeType != Node.ELEMENT_NODE) {
+ return;
+ }
+
+ // "If the effective command value of command is loosely equivalent to new
+ // value on node, abort this algorithm."
+ if (areLooselyEquivalentValues(command, getEffectiveCommandValue(node, command), newValue)) {
+ return;
+ }
+
+ // "Let current ancestor be node's parent."
+ var currentAncestor = node.parentNode;
+
+ // "Let ancestor list be a list of Nodes, initially empty."
+ var ancestorList = [];
+
+ // "While current ancestor is an editable Element and the effective command
+ // value of command is not loosely equivalent to new value on it, append
+ // current ancestor to ancestor list, then set current ancestor to its
+ // parent."
+ while (isEditable(currentAncestor)
+ && currentAncestor.nodeType == Node.ELEMENT_NODE
+ && !areLooselyEquivalentValues(command, getEffectiveCommandValue(currentAncestor, command), newValue)) {
+ ancestorList.push(currentAncestor);
+ currentAncestor = currentAncestor.parentNode;
+ }
+
+ // "If ancestor list is empty, abort this algorithm."
+ if (!ancestorList.length) {
+ return;
+ }
+
+ // "Let propagated value be the specified command value of command on the
+ // last member of ancestor list."
+ var propagatedValue = getSpecifiedCommandValue(ancestorList[ancestorList.length - 1], command);
+
+ // "If propagated value is null and is not equal to new value, abort this
+ // algorithm."
+ if (propagatedValue === null && propagatedValue != newValue) {
+ return;
+ }
+
+ // "If the effective command value for the parent of the last member of
+ // ancestor list is not loosely equivalent to new value, and new value is
+ // not null, abort this algorithm."
+ if (newValue !== null
+ && !areLooselyEquivalentValues(command, getEffectiveCommandValue(ancestorList[ancestorList.length - 1].parentNode, command), newValue)) {
+ return;
+ }
+
+ // "While ancestor list is not empty:"
+ while (ancestorList.length) {
+ // "Let current ancestor be the last member of ancestor list."
+ // "Remove the last member from ancestor list."
+ var currentAncestor = ancestorList.pop();
+
+ // "If the specified command value of current ancestor for command is
+ // not null, set propagated value to that value."
+ if (getSpecifiedCommandValue(currentAncestor, command) !== null) {
+ propagatedValue = getSpecifiedCommandValue(currentAncestor, command);
+ }
+
+ // "Let children be the children of current ancestor."
+ var children = Array.prototype.slice.call(currentAncestor.childNodes);
+
+ // "If the specified command value of current ancestor for command is
+ // not null, clear the value of current ancestor."
+ if (getSpecifiedCommandValue(currentAncestor, command) !== null) {
+ clearValue(currentAncestor, command);
+ }
+
+ // "For every child in children:"
+ for (var i = 0; i < children.length; i++) {
+ var child = children[i];
+
+ // "If child is node, continue with the next child."
+ if (child == node) {
+ continue;
+ }
+
+ // "If child is an Element whose specified command value for
+ // command is neither null nor equivalent to propagated value,
+ // continue with the next child."
+ if (child.nodeType == Node.ELEMENT_NODE
+ && getSpecifiedCommandValue(child, command) !== null
+ && !areEquivalentValues(command, propagatedValue, getSpecifiedCommandValue(child, command))) {
+ continue;
+ }
+
+ // "If child is the last member of ancestor list, continue with the
+ // next child."
+ if (child == ancestorList[ancestorList.length - 1]) {
+ continue;
+ }
+
+ // "Force the value of child, with command as in this algorithm
+ // and new value equal to propagated value."
+ forceValue(child, command, propagatedValue);
+ }
+ }
+}
+
+
+//@}
+///// Forcing the value of a node /////
+//@{
+
+function forceValue(node, command, newValue) {
+ // "If node's parent is null, abort this algorithm."
+ if (!node.parentNode) {
+ return;
+ }
+
+ // "If new value is null, abort this algorithm."
+ if (newValue === null) {
+ return;
+ }
+
+ // "If node is an allowed child of "span":"
+ if (isAllowedChild(node, "span")) {
+ // "Reorder modifiable descendants of node's previousSibling."
+ reorderModifiableDescendants(node.previousSibling, command, newValue);
+
+ // "Reorder modifiable descendants of node's nextSibling."
+ reorderModifiableDescendants(node.nextSibling, command, newValue);
+
+ // "Wrap the one-node list consisting of node, with sibling criteria
+ // returning true for a simple modifiable element whose specified
+ // command value is equivalent to new value and whose effective command
+ // value is loosely equivalent to new value and false otherwise, and
+ // with new parent instructions returning null."
+ wrap([node],
+ function(node) {
+ return isSimpleModifiableElement(node)
+ && areEquivalentValues(command, getSpecifiedCommandValue(node, command), newValue)
+ && areLooselyEquivalentValues(command, getEffectiveCommandValue(node, command), newValue);
+ },
+ function() { return null }
+ );
+ }
+
+ // "If node is invisible, abort this algorithm."
+ if (isInvisible(node)) {
+ return;
+ }
+
+ // "If the effective command value of command is loosely equivalent to new
+ // value on node, abort this algorithm."
+ if (areLooselyEquivalentValues(command, getEffectiveCommandValue(node, command), newValue)) {
+ return;
+ }
+
+ // "If node is not an allowed child of "span":"
+ if (!isAllowedChild(node, "span")) {
+ // "Let children be all children of node, omitting any that are
+ // Elements whose specified command value for command is neither null
+ // nor equivalent to new value."
+ var children = [];
+ for (var i = 0; i < node.childNodes.length; i++) {
+ if (node.childNodes[i].nodeType == Node.ELEMENT_NODE) {
+ var specifiedValue = getSpecifiedCommandValue(node.childNodes[i], command);
+
+ if (specifiedValue !== null
+ && !areEquivalentValues(command, newValue, specifiedValue)) {
+ continue;
+ }
+ }
+ children.push(node.childNodes[i]);
+ }
+
+ // "Force the value of each Node in children, with command and new
+ // value as in this invocation of the algorithm."
+ for (var i = 0; i < children.length; i++) {
+ forceValue(children[i], command, newValue);
+ }
+
+ // "Abort this algorithm."
+ return;
+ }
+
+ // "If the effective command value of command is loosely equivalent to new
+ // value on node, abort this algorithm."
+ if (areLooselyEquivalentValues(command, getEffectiveCommandValue(node, command), newValue)) {
+ return;
+ }
+
+ // "Let new parent be null."
+ var newParent = null;
+
+ // "If the CSS styling flag is false:"
+ if (!cssStylingFlag) {
+ // "If command is "bold" and new value is "bold", let new parent be the
+ // result of calling createElement("b") on the ownerDocument of node."
+ if (command == "bold" && (newValue == "bold" || newValue == "700")) {
+ newParent = node.ownerDocument.createElement("b");
+ }
+
+ // "If command is "italic" and new value is "italic", let new parent be
+ // the result of calling createElement("i") on the ownerDocument of
+ // node."
+ if (command == "italic" && newValue == "italic") {
+ newParent = node.ownerDocument.createElement("i");
+ }
+
+ // "If command is "strikethrough" and new value is "line-through", let
+ // new parent be the result of calling createElement("s") on the
+ // ownerDocument of node."
+ if (command == "strikethrough" && newValue == "line-through") {
+ newParent = node.ownerDocument.createElement("s");
+ }
+
+ // "If command is "underline" and new value is "underline", let new
+ // parent be the result of calling createElement("u") on the
+ // ownerDocument of node."
+ if (command == "underline" && newValue == "underline") {
+ newParent = node.ownerDocument.createElement("u");
+ }
+
+ // "If command is "foreColor", and new value is fully opaque with red,
+ // green, and blue components in the range 0 to 255:"
+ if (command == "forecolor" && parseSimpleColor(newValue)) {
+ // "Let new parent be the result of calling createElement("font")
+ // on the ownerDocument of node."
+ newParent = node.ownerDocument.createElement("font");
+
+ // "Set the color attribute of new parent to the result of applying
+ // the rules for serializing simple color values to new value
+ // (interpreted as a simple color)."
+ newParent.setAttribute("color", parseSimpleColor(newValue));
+ }
+
+ // "If command is "fontName", let new parent be the result of calling
+ // createElement("font") on the ownerDocument of node, then set the
+ // face attribute of new parent to new value."
+ if (command == "fontname") {
+ newParent = node.ownerDocument.createElement("font");
+ newParent.face = newValue;
+ }
+ }
+
+ // "If command is "createLink" or "unlink":"
+ if (command == "createlink" || command == "unlink") {
+ // "Let new parent be the result of calling createElement("a") on the
+ // ownerDocument of node."
+ newParent = node.ownerDocument.createElement("a");
+
+ // "Set the href attribute of new parent to new value."
+ newParent.setAttribute("href", newValue);
+
+ // "Let ancestor be node's parent."
+ var ancestor = node.parentNode;
+
+ // "While ancestor is not null:"
+ while (ancestor) {
+ // "If ancestor is an a, set the tag name of ancestor to "span",
+ // and let ancestor be the result."
+ if (isHtmlElement(ancestor, "A")) {
+ ancestor = setTagName(ancestor, "span");
+ }
+
+ // "Set ancestor to its parent."
+ ancestor = ancestor.parentNode;
+ }
+ }
+
+ // "If command is "fontSize"; and new value is one of "x-small", "small",
+ // "medium", "large", "x-large", "xx-large", or "xxx-large"; and either the
+ // CSS styling flag is false, or new value is "xxx-large": let new parent
+ // be the result of calling createElement("font") on the ownerDocument of
+ // node, then set the size attribute of new parent to the number from the
+ // following table based on new value: [table omitted]"
+ if (command == "fontsize"
+ && ["x-small", "small", "medium", "large", "x-large", "xx-large", "xxx-large"].indexOf(newValue) != -1
+ && (!cssStylingFlag || newValue == "xxx-large")) {
+ newParent = node.ownerDocument.createElement("font");
+ newParent.size = cssSizeToLegacy(newValue);
+ }
+
+ // "If command is "subscript" or "superscript" and new value is
+ // "subscript", let new parent be the result of calling
+ // createElement("sub") on the ownerDocument of node."
+ if ((command == "subscript" || command == "superscript")
+ && newValue == "subscript") {
+ newParent = node.ownerDocument.createElement("sub");
+ }
+
+ // "If command is "subscript" or "superscript" and new value is
+ // "superscript", let new parent be the result of calling
+ // createElement("sup") on the ownerDocument of node."
+ if ((command == "subscript" || command == "superscript")
+ && newValue == "superscript") {
+ newParent = node.ownerDocument.createElement("sup");
+ }
+
+ // "If new parent is null, let new parent be the result of calling
+ // createElement("span") on the ownerDocument of node."
+ if (!newParent) {
+ newParent = node.ownerDocument.createElement("span");
+ }
+
+ // "Insert new parent in node's parent before node."
+ node.parentNode.insertBefore(newParent, node);
+
+ // "If the effective command value of command for new parent is not loosely
+ // equivalent to new value, and the relevant CSS property for command is
+ // not null, set that CSS property of new parent to new value (if the new
+ // value would be valid)."
+ var property = commands[command].relevantCssProperty;
+ if (property !== null
+ && !areLooselyEquivalentValues(command, getEffectiveCommandValue(newParent, command), newValue)) {
+ newParent.style[property] = newValue;
+ }
+
+ // "If command is "strikethrough", and new value is "line-through", and the
+ // effective command value of "strikethrough" for new parent is not
+ // "line-through", set the "text-decoration" property of new parent to
+ // "line-through"."
+ if (command == "strikethrough"
+ && newValue == "line-through"
+ && getEffectiveCommandValue(newParent, "strikethrough") != "line-through") {
+ newParent.style.textDecoration = "line-through";
+ }
+
+ // "If command is "underline", and new value is "underline", and the
+ // effective command value of "underline" for new parent is not
+ // "underline", set the "text-decoration" property of new parent to
+ // "underline"."
+ if (command == "underline"
+ && newValue == "underline"
+ && getEffectiveCommandValue(newParent, "underline") != "underline") {
+ newParent.style.textDecoration = "underline";
+ }
+
+ // "Append node to new parent as its last child, preserving ranges."
+ movePreservingRanges(node, newParent, newParent.childNodes.length);
+
+ // "If node is an Element and the effective command value of command for
+ // node is not loosely equivalent to new value:"
+ if (node.nodeType == Node.ELEMENT_NODE
+ && !areEquivalentValues(command, getEffectiveCommandValue(node, command), newValue)) {
+ // "Insert node into the parent of new parent before new parent,
+ // preserving ranges."
+ movePreservingRanges(node, newParent.parentNode, getNodeIndex(newParent));
+
+ // "Remove new parent from its parent."
+ newParent.parentNode.removeChild(newParent);
+
+ // "Let children be all children of node, omitting any that are
+ // Elements whose specified command value for command is neither null
+ // nor equivalent to new value."
+ var children = [];
+ for (var i = 0; i < node.childNodes.length; i++) {
+ if (node.childNodes[i].nodeType == Node.ELEMENT_NODE) {
+ var specifiedValue = getSpecifiedCommandValue(node.childNodes[i], command);
+
+ if (specifiedValue !== null
+ && !areEquivalentValues(command, newValue, specifiedValue)) {
+ continue;
+ }
+ }
+ children.push(node.childNodes[i]);
+ }
+
+ // "Force the value of each Node in children, with command and new
+ // value as in this invocation of the algorithm."
+ for (var i = 0; i < children.length; i++) {
+ forceValue(children[i], command, newValue);
+ }
+ }
+}
+
+
+//@}
+///// Setting the selection's value /////
+//@{
+
+function setSelectionValue(command, newValue) {
+ // "If there is no formattable node effectively contained in the active
+ // range:"
+ if (!getAllEffectivelyContainedNodes(getActiveRange())
+ .some(isFormattableNode)) {
+ // "If command has inline command activated values, set the state
+ // override to true if new value is among them and false if it's not."
+ if ("inlineCommandActivatedValues" in commands[command]) {
+ setStateOverride(command, commands[command].inlineCommandActivatedValues
+ .indexOf(newValue) != -1);
+ }
+
+ // "If command is "subscript", unset the state override for
+ // "superscript"."
+ if (command == "subscript") {
+ unsetStateOverride("superscript");
+ }
+
+ // "If command is "superscript", unset the state override for
+ // "subscript"."
+ if (command == "superscript") {
+ unsetStateOverride("subscript");
+ }
+
+ // "If new value is null, unset the value override (if any)."
+ if (newValue === null) {
+ unsetValueOverride(command);
+
+ // "Otherwise, if command is "createLink" or it has a value specified,
+ // set the value override to new value."
+ } else if (command == "createlink" || "value" in commands[command]) {
+ setValueOverride(command, newValue);
+ }
+
+ // "Abort these steps."
+ return;
+ }
+
+ // "If the active range's start node is an editable Text node, and its
+ // start offset is neither zero nor its start node's length, call
+ // splitText() on the active range's start node, with argument equal to the
+ // active range's start offset. Then set the active range's start node to
+ // the result, and its start offset to zero."
+ if (isEditable(getActiveRange().startContainer)
+ && getActiveRange().startContainer.nodeType == Node.TEXT_NODE
+ && getActiveRange().startOffset != 0
+ && getActiveRange().startOffset != getNodeLength(getActiveRange().startContainer)) {
+ // Account for browsers not following range mutation rules
+ var newActiveRange = document.createRange();
+ var newNode;
+ if (getActiveRange().startContainer == getActiveRange().endContainer) {
+ var newEndOffset = getActiveRange().endOffset - getActiveRange().startOffset;
+ newNode = getActiveRange().startContainer.splitText(getActiveRange().startOffset);
+ newActiveRange.setEnd(newNode, newEndOffset);
+ getActiveRange().setEnd(newNode, newEndOffset);
+ } else {
+ newNode = getActiveRange().startContainer.splitText(getActiveRange().startOffset);
+ }
+ newActiveRange.setStart(newNode, 0);
+ getSelection().removeAllRanges();
+ getSelection().addRange(newActiveRange);
+
+ getActiveRange().setStart(newNode, 0);
+ }
+
+ // "If the active range's end node is an editable Text node, and its end
+ // offset is neither zero nor its end node's length, call splitText() on
+ // the active range's end node, with argument equal to the active range's
+ // end offset."
+ if (isEditable(getActiveRange().endContainer)
+ && getActiveRange().endContainer.nodeType == Node.TEXT_NODE
+ && getActiveRange().endOffset != 0
+ && getActiveRange().endOffset != getNodeLength(getActiveRange().endContainer)) {
+ // IE seems to mutate the range incorrectly here, so we need correction
+ // here as well. The active range will be temporarily in orphaned
+ // nodes, so calling getActiveRange() after splitText() but before
+ // fixing the range will throw an exception.
+ var activeRange = getActiveRange();
+ var newStart = [activeRange.startContainer, activeRange.startOffset];
+ var newEnd = [activeRange.endContainer, activeRange.endOffset];
+ activeRange.endContainer.splitText(activeRange.endOffset);
+ activeRange.setStart(newStart[0], newStart[1]);
+ activeRange.setEnd(newEnd[0], newEnd[1]);
+
+ getSelection().removeAllRanges();
+ getSelection().addRange(activeRange);
+ }
+
+ // "Let element list be all editable Elements effectively contained in the
+ // active range.
+ //
+ // "For each element in element list, clear the value of element."
+ getAllEffectivelyContainedNodes(getActiveRange(), function(node) {
+ return isEditable(node) && node.nodeType == Node.ELEMENT_NODE;
+ }).forEach(function(element) {
+ clearValue(element, command);
+ });
+
+ // "Let node list be all editable nodes effectively contained in the active
+ // range.
+ //
+ // "For each node in node list:"
+ getAllEffectivelyContainedNodes(getActiveRange(), isEditable).forEach(function(node) {
+ // "Push down values on node."
+ pushDownValues(node, command, newValue);
+
+ // "If node is an allowed child of span, force the value of node."
+ if (isAllowedChild(node, "span")) {
+ forceValue(node, command, newValue);
+ }
+ });
+}
+
+
+//@}
+///// The backColor command /////
+//@{
+commands.backcolor = {
+ // Copy-pasted, same as hiliteColor
+ action: function(value) {
+ // Action is further copy-pasted, same as foreColor
+
+ // "If value is not a valid CSS color, prepend "#" to it."
+ //
+ // "If value is still not a valid CSS color, or if it is currentColor,
+ // return false."
+ //
+ // Cheap hack for testing, no attempt to be comprehensive.
+ if (/^([0-9a-fA-F]{3}){1,2}$/.test(value)) {
+ value = "#" + value;
+ }
+ if (!/^(rgba?|hsla?)\(.*\)$/.test(value)
+ && !parseSimpleColor(value)
+ && value.toLowerCase() != "transparent") {
+ return false;
+ }
+
+ // "Set the selection's value to value."
+ setSelectionValue("backcolor", value);
+
+ // "Return true."
+ return true;
+ }, standardInlineValueCommand: true, relevantCssProperty: "backgroundColor",
+ equivalentValues: function(val1, val2) {
+ // "Either both strings are valid CSS colors and have the same red,
+ // green, blue, and alpha components, or neither string is a valid CSS
+ // color."
+ return normalizeColor(val1) === normalizeColor(val2);
+ },
+};
+
+//@}
+///// The bold command /////
+//@{
+commands.bold = {
+ action: function() {
+ // "If queryCommandState("bold") returns true, set the selection's
+ // value to "normal". Otherwise set the selection's value to "bold".
+ // Either way, return true."
+ if (myQueryCommandState("bold")) {
+ setSelectionValue("bold", "normal");
+ } else {
+ setSelectionValue("bold", "bold");
+ }
+ return true;
+ }, inlineCommandActivatedValues: ["bold", "600", "700", "800", "900"],
+ relevantCssProperty: "fontWeight",
+ equivalentValues: function(val1, val2) {
+ // "Either the two strings are equal, or one is "bold" and the other is
+ // "700", or one is "normal" and the other is "400"."
+ return val1 == val2
+ || (val1 == "bold" && val2 == "700")
+ || (val1 == "700" && val2 == "bold")
+ || (val1 == "normal" && val2 == "400")
+ || (val1 == "400" && val2 == "normal");
+ },
+};
+
+//@}
+///// The createLink command /////
+//@{
+commands.createlink = {
+ action: function(value) {
+ // "If value is the empty string, return false."
+ if (value === "") {
+ return false;
+ }
+
+ // "For each editable a element that has an href attribute and is an
+ // ancestor of some node effectively contained in the active range, set
+ // that a element's href attribute to value."
+ //
+ // TODO: We don't actually do this in tree order, not that it matters
+ // unless you're spying with mutation events.
+ getAllEffectivelyContainedNodes(getActiveRange()).forEach(function(node) {
+ getAncestors(node).forEach(function(ancestor) {
+ if (isEditable(ancestor)
+ && isHtmlElement(ancestor, "a")
+ && ancestor.hasAttribute("href")) {
+ ancestor.setAttribute("href", value);
+ }
+ });
+ });
+
+ // "Set the selection's value to value."
+ setSelectionValue("createlink", value);
+
+ // "Return true."
+ return true;
+ }
+};
+
+//@}
+///// The fontName command /////
+//@{
+commands.fontname = {
+ action: function(value) {
+ // "Set the selection's value to value, then return true."
+ setSelectionValue("fontname", value);
+ return true;
+ }, standardInlineValueCommand: true, relevantCssProperty: "fontFamily"
+};
+
+//@}
+///// The fontSize command /////
+//@{
+
+// Helper function for fontSize's action plus queryOutputHelper. It's just the
+// middle of fontSize's action, ripped out into its own function. Returns null
+// if the size is invalid.
+function normalizeFontSize(value) {
+ // "Strip leading and trailing whitespace from value."
+ //
+ // Cheap hack, not following the actual algorithm.
+ value = value.trim();
+
+ // "If value is not a valid floating point number, and would not be a valid
+ // floating point number if a single leading "+" character were stripped,
+ // return false."
+ if (!/^[-+]?[0-9]+(\.[0-9]+)?([eE][-+]?[0-9]+)?$/.test(value)) {
+ return null;
+ }
+
+ var mode;
+
+ // "If the first character of value is "+", delete the character and let
+ // mode be "relative-plus"."
+ if (value[0] == "+") {
+ value = value.slice(1);
+ mode = "relative-plus";
+ // "Otherwise, if the first character of value is "-", delete the character
+ // and let mode be "relative-minus"."
+ } else if (value[0] == "-") {
+ value = value.slice(1);
+ mode = "relative-minus";
+ // "Otherwise, let mode be "absolute"."
+ } else {
+ mode = "absolute";
+ }
+
+ // "Apply the rules for parsing non-negative integers to value, and let
+ // number be the result."
+ //
+ // Another cheap hack.
+ var num = parseInt(value);
+
+ // "If mode is "relative-plus", add three to number."
+ if (mode == "relative-plus") {
+ num += 3;
+ }
+
+ // "If mode is "relative-minus", negate number, then add three to it."
+ if (mode == "relative-minus") {
+ num = 3 - num;
+ }
+
+ // "If number is less than one, let number equal 1."
+ if (num < 1) {
+ num = 1;
+ }
+
+ // "If number is greater than seven, let number equal 7."
+ if (num > 7) {
+ num = 7;
+ }
+
+ // "Set value to the string here corresponding to number:" [table omitted]
+ value = {
+ 1: "x-small",
+ 2: "small",
+ 3: "medium",
+ 4: "large",
+ 5: "x-large",
+ 6: "xx-large",
+ 7: "xxx-large"
+ }[num];
+
+ return value;
+}
+
+commands.fontsize = {
+ action: function(value) {
+ value = normalizeFontSize(value);
+ if (value === null) {
+ return false;
+ }
+
+ // "Set the selection's value to value."
+ setSelectionValue("fontsize", value);
+
+ // "Return true."
+ return true;
+ }, indeterm: function() {
+ // "True if among formattable nodes that are effectively contained in
+ // the active range, there are two that have distinct effective command
+ // values. Otherwise false."
+ return getAllEffectivelyContainedNodes(getActiveRange(), isFormattableNode)
+ .map(function(node) {
+ return getEffectiveCommandValue(node, "fontsize");
+ }).filter(function(value, i, arr) {
+ return arr.slice(0, i).indexOf(value) == -1;
+ }).length >= 2;
+ }, value: function() {
+ // "If the active range is null, return the empty string."
+ if (!getActiveRange()) {
+ return "";
+ }
+
+ // "Let pixel size be the effective command value of the first
+ // formattable node that is effectively contained in the active range,
+ // or if there is no such node, the effective command value of the
+ // active range's start node, in either case interpreted as a number of
+ // pixels."
+ var node = getAllEffectivelyContainedNodes(getActiveRange(), isFormattableNode)[0];
+ if (node === undefined) {
+ node = getActiveRange().startContainer;
+ }
+ var pixelSize = getEffectiveCommandValue(node, "fontsize");
+
+ // "Return the legacy font size for pixel size."
+ return getLegacyFontSize(pixelSize);
+ }, relevantCssProperty: "fontSize"
+};
+
+function getLegacyFontSize(size) {
+ if (getLegacyFontSize.resultCache === undefined) {
+ getLegacyFontSize.resultCache = {};
+ }
+
+ if (getLegacyFontSize.resultCache[size] !== undefined) {
+ return getLegacyFontSize.resultCache[size];
+ }
+
+ // For convenience in other places in my code, I handle all sizes, not just
+ // pixel sizes as the spec says. This means pixel sizes have to be passed
+ // in suffixed with "px", not as plain numbers.
+ if (normalizeFontSize(size) !== null) {
+ return getLegacyFontSize.resultCache[size] = cssSizeToLegacy(normalizeFontSize(size));
+ }
+
+ if (["x-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "xxx-large"].indexOf(size) == -1
+ && !/^[0-9]+(\.[0-9]+)?(cm|mm|in|pt|pc|px)$/.test(size)) {
+ // There is no sensible legacy size for things like "2em".
+ return getLegacyFontSize.resultCache[size] = null;
+ }
+
+ var font = document.createElement("font");
+ document.body.appendChild(font);
+ if (size == "xxx-large") {
+ font.size = 7;
+ } else {
+ font.style.fontSize = size;
+ }
+ var pixelSize = parseInt(getComputedStyle(font).fontSize);
+ document.body.removeChild(font);
+
+ // "Let returned size be 1."
+ var returnedSize = 1;
+
+ // "While returned size is less than 7:"
+ while (returnedSize < 7) {
+ // "Let lower bound be the resolved value of "font-size" in pixels
+ // of a font element whose size attribute is set to returned size."
+ var font = document.createElement("font");
+ font.size = returnedSize;
+ document.body.appendChild(font);
+ var lowerBound = parseInt(getComputedStyle(font).fontSize);
+
+ // "Let upper bound be the resolved value of "font-size" in pixels
+ // of a font element whose size attribute is set to one plus
+ // returned size."
+ font.size = 1 + returnedSize;
+ var upperBound = parseInt(getComputedStyle(font).fontSize);
+ document.body.removeChild(font);
+
+ // "Let average be the average of upper bound and lower bound."
+ var average = (upperBound + lowerBound)/2;
+
+ // "If pixel size is less than average, return the one-element
+ // string consisting of the digit returned size."
+ if (pixelSize < average) {
+ return getLegacyFontSize.resultCache[size] = String(returnedSize);
+ }
+
+ // "Add one to returned size."
+ returnedSize++;
+ }
+
+ // "Return "7"."
+ return getLegacyFontSize.resultCache[size] = "7";
+}
+
+//@}
+///// The foreColor command /////
+//@{
+commands.forecolor = {
+ action: function(value) {
+ // Copy-pasted, same as backColor and hiliteColor
+
+ // "If value is not a valid CSS color, prepend "#" to it."
+ //
+ // "If value is still not a valid CSS color, or if it is currentColor,
+ // return false."
+ //
+ // Cheap hack for testing, no attempt to be comprehensive.
+ if (/^([0-9a-fA-F]{3}){1,2}$/.test(value)) {
+ value = "#" + value;
+ }
+ if (!/^(rgba?|hsla?)\(.*\)$/.test(value)
+ && !parseSimpleColor(value)
+ && value.toLowerCase() != "transparent") {
+ return false;
+ }
+
+ // "Set the selection's value to value."
+ setSelectionValue("forecolor", value);
+
+ // "Return true."
+ return true;
+ }, standardInlineValueCommand: true, relevantCssProperty: "color",
+ equivalentValues: function(val1, val2) {
+ // "Either both strings are valid CSS colors and have the same red,
+ // green, blue, and alpha components, or neither string is a valid CSS
+ // color."
+ return normalizeColor(val1) === normalizeColor(val2);
+ },
+};
+
+//@}
+///// The hiliteColor command /////
+//@{
+commands.hilitecolor = {
+ // Copy-pasted, same as backColor
+ action: function(value) {
+ // Action is further copy-pasted, same as foreColor
+
+ // "If value is not a valid CSS color, prepend "#" to it."
+ //
+ // "If value is still not a valid CSS color, or if it is currentColor,
+ // return false."
+ //
+ // Cheap hack for testing, no attempt to be comprehensive.
+ if (/^([0-9a-fA-F]{3}){1,2}$/.test(value)) {
+ value = "#" + value;
+ }
+ if (!/^(rgba?|hsla?)\(.*\)$/.test(value)
+ && !parseSimpleColor(value)
+ && value.toLowerCase() != "transparent") {
+ return false;
+ }
+
+ // "Set the selection's value to value."
+ setSelectionValue("hilitecolor", value);
+
+ // "Return true."
+ return true;
+ }, indeterm: function() {
+ // "True if among editable Text nodes that are effectively contained in
+ // the active range, there are two that have distinct effective command
+ // values. Otherwise false."
+ return getAllEffectivelyContainedNodes(getActiveRange(), function(node) {
+ return isEditable(node) && node.nodeType == Node.TEXT_NODE;
+ }).map(function(node) {
+ return getEffectiveCommandValue(node, "hilitecolor");
+ }).filter(function(value, i, arr) {
+ return arr.slice(0, i).indexOf(value) == -1;
+ }).length >= 2;
+ }, standardInlineValueCommand: true, relevantCssProperty: "backgroundColor",
+ equivalentValues: function(val1, val2) {
+ // "Either both strings are valid CSS colors and have the same red,
+ // green, blue, and alpha components, or neither string is a valid CSS
+ // color."
+ return normalizeColor(val1) === normalizeColor(val2);
+ },
+};
+
+//@}
+///// The italic command /////
+//@{
+commands.italic = {
+ action: function() {
+ // "If queryCommandState("italic") returns true, set the selection's
+ // value to "normal". Otherwise set the selection's value to "italic".
+ // Either way, return true."
+ if (myQueryCommandState("italic")) {
+ setSelectionValue("italic", "normal");
+ } else {
+ setSelectionValue("italic", "italic");
+ }
+ return true;
+ }, inlineCommandActivatedValues: ["italic", "oblique"],
+ relevantCssProperty: "fontStyle"
+};
+
+//@}
+///// The removeFormat command /////
+//@{
+commands.removeformat = {
+ action: function() {
+ // "A removeFormat candidate is an editable HTML element with local
+ // name "abbr", "acronym", "b", "bdi", "bdo", "big", "blink", "cite",
+ // "code", "dfn", "em", "font", "i", "ins", "kbd", "mark", "nobr", "q",
+ // "s", "samp", "small", "span", "strike", "strong", "sub", "sup",
+ // "tt", "u", or "var"."
+ function isRemoveFormatCandidate(node) {
+ return isEditable(node)
+ && isHtmlElement(node, ["abbr", "acronym", "b", "bdi", "bdo",
+ "big", "blink", "cite", "code", "dfn", "em", "font", "i",
+ "ins", "kbd", "mark", "nobr", "q", "s", "samp", "small",
+ "span", "strike", "strong", "sub", "sup", "tt", "u", "var"]);
+ }
+
+ // "Let elements to remove be a list of every removeFormat candidate
+ // effectively contained in the active range."
+ var elementsToRemove = getAllEffectivelyContainedNodes(getActiveRange(), isRemoveFormatCandidate);
+
+ // "For each element in elements to remove:"
+ elementsToRemove.forEach(function(element) {
+ // "While element has children, insert the first child of element
+ // into the parent of element immediately before element,
+ // preserving ranges."
+ while (element.hasChildNodes()) {
+ movePreservingRanges(element.firstChild, element.parentNode, getNodeIndex(element));
+ }
+
+ // "Remove element from its parent."
+ element.parentNode.removeChild(element);
+ });
+
+ // "If the active range's start node is an editable Text node, and its
+ // start offset is neither zero nor its start node's length, call
+ // splitText() on the active range's start node, with argument equal to
+ // the active range's start offset. Then set the active range's start
+ // node to the result, and its start offset to zero."
+ if (isEditable(getActiveRange().startContainer)
+ && getActiveRange().startContainer.nodeType == Node.TEXT_NODE
+ && getActiveRange().startOffset != 0
+ && getActiveRange().startOffset != getNodeLength(getActiveRange().startContainer)) {
+ // Account for browsers not following range mutation rules
+ if (getActiveRange().startContainer == getActiveRange().endContainer) {
+ var newEnd = getActiveRange().endOffset - getActiveRange().startOffset;
+ var newNode = getActiveRange().startContainer.splitText(getActiveRange().startOffset);
+ getActiveRange().setStart(newNode, 0);
+ getActiveRange().setEnd(newNode, newEnd);
+ } else {
+ getActiveRange().setStart(getActiveRange().startContainer.splitText(getActiveRange().startOffset), 0);
+ }
+ }
+
+ // "If the active range's end node is an editable Text node, and its
+ // end offset is neither zero nor its end node's length, call
+ // splitText() on the active range's end node, with argument equal to
+ // the active range's end offset."
+ if (isEditable(getActiveRange().endContainer)
+ && getActiveRange().endContainer.nodeType == Node.TEXT_NODE
+ && getActiveRange().endOffset != 0
+ && getActiveRange().endOffset != getNodeLength(getActiveRange().endContainer)) {
+ // IE seems to mutate the range incorrectly here, so we need
+ // correction here as well. Have to be careful to set the range to
+ // something not including the text node so that getActiveRange()
+ // doesn't throw an exception due to a temporarily detached
+ // endpoint.
+ var newStart = [getActiveRange().startContainer, getActiveRange().startOffset];
+ var newEnd = [getActiveRange().endContainer, getActiveRange().endOffset];
+ getActiveRange().setEnd(document.documentElement, 0);
+ newEnd[0].splitText(newEnd[1]);
+ getActiveRange().setStart(newStart[0], newStart[1]);
+ getActiveRange().setEnd(newEnd[0], newEnd[1]);
+ }
+
+ // "Let node list consist of all editable nodes effectively contained
+ // in the active range."
+ //
+ // "For each node in node list, while node's parent is a removeFormat
+ // candidate in the same editing host as node, split the parent of the
+ // one-node list consisting of node."
+ getAllEffectivelyContainedNodes(getActiveRange(), isEditable).forEach(function(node) {
+ while (isRemoveFormatCandidate(node.parentNode)
+ && inSameEditingHost(node.parentNode, node)) {
+ splitParent([node]);
+ }
+ });
+
+ // "For each of the entries in the following list, in the given order,
+ // set the selection's value to null, with command as given."
+ [
+ "subscript",
+ "bold",
+ "fontname",
+ "fontsize",
+ "forecolor",
+ "hilitecolor",
+ "italic",
+ "strikethrough",
+ "underline",
+ ].forEach(function(command) {
+ setSelectionValue(command, null);
+ });
+
+ // "Return true."
+ return true;
+ }
+};
+
+//@}
+///// The strikethrough command /////
+//@{
+commands.strikethrough = {
+ action: function() {
+ // "If queryCommandState("strikethrough") returns true, set the
+ // selection's value to null. Otherwise set the selection's value to
+ // "line-through". Either way, return true."
+ if (myQueryCommandState("strikethrough")) {
+ setSelectionValue("strikethrough", null);
+ } else {
+ setSelectionValue("strikethrough", "line-through");
+ }
+ return true;
+ }, inlineCommandActivatedValues: ["line-through"]
+};
+
+//@}
+///// The subscript command /////
+//@{
+commands.subscript = {
+ action: function() {
+ // "Call queryCommandState("subscript"), and let state be the result."
+ var state = myQueryCommandState("subscript");
+
+ // "Set the selection's value to null."
+ setSelectionValue("subscript", null);
+
+ // "If state is false, set the selection's value to "subscript"."
+ if (!state) {
+ setSelectionValue("subscript", "subscript");
+ }
+
+ // "Return true."
+ return true;
+ }, indeterm: function() {
+ // "True if either among formattable nodes that are effectively
+ // contained in the active range, there is at least one with effective
+ // command value "subscript" and at least one with some other effective
+ // command value; or if there is some formattable node effectively
+ // contained in the active range with effective command value "mixed".
+ // Otherwise false."
+ var nodes = getAllEffectivelyContainedNodes(getActiveRange(), isFormattableNode);
+ return (nodes.some(function(node) { return getEffectiveCommandValue(node, "subscript") == "subscript" })
+ && nodes.some(function(node) { return getEffectiveCommandValue(node, "subscript") != "subscript" }))
+ || nodes.some(function(node) { return getEffectiveCommandValue(node, "subscript") == "mixed" });
+ }, inlineCommandActivatedValues: ["subscript"],
+};
+
+//@}
+///// The superscript command /////
+//@{
+commands.superscript = {
+ action: function() {
+ // "Call queryCommandState("superscript"), and let state be the
+ // result."
+ var state = myQueryCommandState("superscript");
+
+ // "Set the selection's value to null."
+ setSelectionValue("superscript", null);
+
+ // "If state is false, set the selection's value to "superscript"."
+ if (!state) {
+ setSelectionValue("superscript", "superscript");
+ }
+
+ // "Return true."
+ return true;
+ }, indeterm: function() {
+ // "True if either among formattable nodes that are effectively
+ // contained in the active range, there is at least one with effective
+ // command value "superscript" and at least one with some other
+ // effective command value; or if there is some formattable node
+ // effectively contained in the active range with effective command
+ // value "mixed". Otherwise false."
+ var nodes = getAllEffectivelyContainedNodes(getActiveRange(), isFormattableNode);
+ return (nodes.some(function(node) { return getEffectiveCommandValue(node, "superscript") == "superscript" })
+ && nodes.some(function(node) { return getEffectiveCommandValue(node, "superscript") != "superscript" }))
+ || nodes.some(function(node) { return getEffectiveCommandValue(node, "superscript") == "mixed" });
+ }, inlineCommandActivatedValues: ["superscript"],
+};
+
+//@}
+///// The underline command /////
+//@{
+commands.underline = {
+ action: function() {
+ // "If queryCommandState("underline") returns true, set the selection's
+ // value to null. Otherwise set the selection's value to "underline".
+ // Either way, return true."
+ if (myQueryCommandState("underline")) {
+ setSelectionValue("underline", null);
+ } else {
+ setSelectionValue("underline", "underline");
+ }
+ return true;
+ }, inlineCommandActivatedValues: ["underline"]
+};
+
+//@}
+///// The unlink command /////
+//@{
+commands.unlink = {
+ action: function() {
+ // "Let hyperlinks be a list of every a element that has an href
+ // attribute and is contained in the active range or is an ancestor of
+ // one of its boundary points."
+ //
+ // As usual, take care to ensure it's tree order. The correctness of
+ // the following is left as an exercise for the reader.
+ var range = getActiveRange();
+ var hyperlinks = [];
+ for (
+ var node = range.startContainer;
+ node;
+ node = node.parentNode
+ ) {
+ if (isHtmlElement(node, "A")
+ && node.hasAttribute("href")) {
+ hyperlinks.unshift(node);
+ }
+ }
+ for (
+ var node = range.startContainer;
+ node != nextNodeDescendants(range.endContainer);
+ node = nextNode(node)
+ ) {
+ if (isHtmlElement(node, "A")
+ && node.hasAttribute("href")
+ && (isContained(node, range)
+ || isAncestor(node, range.endContainer)
+ || node == range.endContainer)) {
+ hyperlinks.push(node);
+ }
+ }
+
+ // "Clear the value of each member of hyperlinks."
+ for (var i = 0; i < hyperlinks.length; i++) {
+ clearValue(hyperlinks[i], "unlink");
+ }
+
+ // "Return true."
+ return true;
+ }
+};
+
+//@}
+
+/////////////////////////////////////
+///// Block formatting commands /////
+/////////////////////////////////////
+
+///// Block formatting command definitions /////
+//@{
+
+// "An indentation element is either a blockquote, or a div that has a style
+// attribute that sets "margin" or some subproperty of it."
+function isIndentationElement(node) {
+ if (!isHtmlElement(node)) {
+ return false;
+ }
+
+ if (node.tagName == "BLOCKQUOTE") {
+ return true;
+ }
+
+ if (node.tagName != "DIV") {
+ return false;
+ }
+
+ for (var i = 0; i < node.style.length; i++) {
+ // Approximate check
+ if (/^(-[a-z]+-)?margin/.test(node.style[i])) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+// "A simple indentation element is an indentation element that has no
+// attributes except possibly
+//
+// * "a style attribute that sets no properties other than "margin",
+// "border", "padding", or subproperties of those; and/or
+// * "a dir attribute."
+function isSimpleIndentationElement(node) {
+ if (!isIndentationElement(node)) {
+ return false;
+ }
+
+ for (var i = 0; i < node.attributes.length; i++) {
+ if (!isHtmlNamespace(node.attributes[i].namespaceURI)
+ || ["style", "dir"].indexOf(node.attributes[i].name) == -1) {
+ return false;
+ }
+ }
+
+ for (var i = 0; i < node.style.length; i++) {
+ // This is approximate, but it works well enough for my purposes.
+ if (!/^(-[a-z]+-)?(margin|border|padding)/.test(node.style[i])) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+// "A non-list single-line container is an HTML element with local name
+// "address", "div", "h1", "h2", "h3", "h4", "h5", "h6", "listing", "p", "pre",
+// or "xmp"."
+function isNonListSingleLineContainer(node) {
+ return isHtmlElement(node, ["address", "div", "h1", "h2", "h3", "h4", "h5",
+ "h6", "listing", "p", "pre", "xmp"]);
+}
+
+// "A single-line container is either a non-list single-line container, or an
+// HTML element with local name "li", "dt", or "dd"."
+function isSingleLineContainer(node) {
+ return isNonListSingleLineContainer(node)
+ || isHtmlElement(node, ["li", "dt", "dd"]);
+}
+
+function getBlockNodeOf(node) {
+ // "While node is an inline node, set node to its parent."
+ while (isInlineNode(node)) {
+ node = node.parentNode;
+ }
+
+ // "Return node."
+ return node;
+}
+
+//@}
+///// Assorted block formatting command algorithms /////
+//@{
+
+function fixDisallowedAncestors(node) {
+ // "If node is not editable, abort these steps."
+ if (!isEditable(node)) {
+ return;
+ }
+
+ // "If node is not an allowed child of any of its ancestors in the same
+ // editing host:"
+ if (getAncestors(node).every(function(ancestor) {
+ return !inSameEditingHost(node, ancestor)
+ || !isAllowedChild(node, ancestor)
+ })) {
+ // "If node is a dd or dt, wrap the one-node list consisting of node,
+ // with sibling criteria returning true for any dl with no attributes
+ // and false otherwise, and new parent instructions returning the
+ // result of calling createElement("dl") on the context object. Then
+ // abort these steps."
+ if (isHtmlElement(node, ["dd", "dt"])) {
+ wrap([node],
+ function(sibling) { return isHtmlElement(sibling, "dl") && !sibling.attributes.length },
+ function() { return document.createElement("dl") });
+ return;
+ }
+
+ // "If "p" is not an allowed child of the editing host of node, abort
+ // these steps."
+ if (!isAllowedChild("p", getEditingHostOf(node))) {
+ return;
+ }
+
+ // "If node is not a prohibited paragraph child, abort these steps."
+ if (!isProhibitedParagraphChild(node)) {
+ return;
+ }
+
+ // "Set the tag name of node to the default single-line container name,
+ // and let node be the result."
+ node = setTagName(node, defaultSingleLineContainerName);
+
+ // "Fix disallowed ancestors of node."
+ fixDisallowedAncestors(node);
+
+ // "Let children be node's children."
+ var children = [].slice.call(node.childNodes);
+
+ // "For each child in children, if child is a prohibited paragraph
+ // child:"
+ children.filter(isProhibitedParagraphChild)
+ .forEach(function(child) {
+ // "Record the values of the one-node list consisting of child, and
+ // let values be the result."
+ var values = recordValues([child]);
+
+ // "Split the parent of the one-node list consisting of child."
+ splitParent([child]);
+
+ // "Restore the values from values."
+ restoreValues(values);
+ });
+
+ // "Abort these steps."
+ return;
+ }
+
+ // "Record the values of the one-node list consisting of node, and let
+ // values be the result."
+ var values = recordValues([node]);
+
+ // "While node is not an allowed child of its parent, split the parent of
+ // the one-node list consisting of node."
+ while (!isAllowedChild(node, node.parentNode)) {
+ splitParent([node]);
+ }
+
+ // "Restore the values from values."
+ restoreValues(values);
+}
+
+function normalizeSublists(item) {
+ // "If item is not an li or it is not editable or its parent is not
+ // editable, abort these steps."
+ if (!isHtmlElement(item, "LI")
+ || !isEditable(item)
+ || !isEditable(item.parentNode)) {
+ return;
+ }
+
+ // "Let new item be null."
+ var newItem = null;
+
+ // "While item has an ol or ul child:"
+ while ([].some.call(item.childNodes, function (node) { return isHtmlElement(node, ["OL", "UL"]) })) {
+ // "Let child be the last child of item."
+ var child = item.lastChild;
+
+ // "If child is an ol or ul, or new item is null and child is a Text
+ // node whose data consists of zero of more space characters:"
+ if (isHtmlElement(child, ["OL", "UL"])
+ || (!newItem && child.nodeType == Node.TEXT_NODE && /^[ \t\n\f\r]*$/.test(child.data))) {
+ // "Set new item to null."
+ newItem = null;
+
+ // "Insert child into the parent of item immediately following
+ // item, preserving ranges."
+ movePreservingRanges(child, item.parentNode, 1 + getNodeIndex(item));
+
+ // "Otherwise:"
+ } else {
+ // "If new item is null, let new item be the result of calling
+ // createElement("li") on the ownerDocument of item, then insert
+ // new item into the parent of item immediately after item."
+ if (!newItem) {
+ newItem = item.ownerDocument.createElement("li");
+ item.parentNode.insertBefore(newItem, item.nextSibling);
+ }
+
+ // "Insert child into new item as its first child, preserving
+ // ranges."
+ movePreservingRanges(child, newItem, 0);
+ }
+ }
+}
+
+function getSelectionListState() {
+ // "If the active range is null, return "none"."
+ if (!getActiveRange()) {
+ return "none";
+ }
+
+ // "Block-extend the active range, and let new range be the result."
+ var newRange = blockExtend(getActiveRange());
+
+ // "Let node list be a list of nodes, initially empty."
+ //
+ // "For each node contained in new range, append node to node list if the
+ // last member of node list (if any) is not an ancestor of node; node is
+ // editable; node is not an indentation element; and node is either an ol
+ // or ul, or the child of an ol or ul, or an allowed child of "li"."
+ var nodeList = getContainedNodes(newRange, function(node) {
+ return isEditable(node)
+ && !isIndentationElement(node)
+ && (isHtmlElement(node, ["ol", "ul"])
+ || isHtmlElement(node.parentNode, ["ol", "ul"])
+ || isAllowedChild(node, "li"));
+ });
+
+ // "If node list is empty, return "none"."
+ if (!nodeList.length) {
+ return "none";
+ }
+
+ // "If every member of node list is either an ol or the child of an ol or
+ // the child of an li child of an ol, and none is a ul or an ancestor of a
+ // ul, return "ol"."
+ if (nodeList.every(function(node) {
+ return isHtmlElement(node, "ol")
+ || isHtmlElement(node.parentNode, "ol")
+ || (isHtmlElement(node.parentNode, "li") && isHtmlElement(node.parentNode.parentNode, "ol"));
+ })
+ && !nodeList.some(function(node) { return isHtmlElement(node, "ul") || ("querySelector" in node && node.querySelector("ul")) })) {
+ return "ol";
+ }
+
+ // "If every member of node list is either a ul or the child of a ul or the
+ // child of an li child of a ul, and none is an ol or an ancestor of an ol,
+ // return "ul"."
+ if (nodeList.every(function(node) {
+ return isHtmlElement(node, "ul")
+ || isHtmlElement(node.parentNode, "ul")
+ || (isHtmlElement(node.parentNode, "li") && isHtmlElement(node.parentNode.parentNode, "ul"));
+ })
+ && !nodeList.some(function(node) { return isHtmlElement(node, "ol") || ("querySelector" in node && node.querySelector("ol")) })) {
+ return "ul";
+ }
+
+ var hasOl = nodeList.some(function(node) {
+ return isHtmlElement(node, "ol")
+ || isHtmlElement(node.parentNode, "ol")
+ || ("querySelector" in node && node.querySelector("ol"))
+ || (isHtmlElement(node.parentNode, "li") && isHtmlElement(node.parentNode.parentNode, "ol"));
+ });
+ var hasUl = nodeList.some(function(node) {
+ return isHtmlElement(node, "ul")
+ || isHtmlElement(node.parentNode, "ul")
+ || ("querySelector" in node && node.querySelector("ul"))
+ || (isHtmlElement(node.parentNode, "li") && isHtmlElement(node.parentNode.parentNode, "ul"));
+ });
+ // "If some member of node list is either an ol or the child or ancestor of
+ // an ol or the child of an li child of an ol, and some member of node list
+ // is either a ul or the child or ancestor of a ul or the child of an li
+ // child of a ul, return "mixed"."
+ if (hasOl && hasUl) {
+ return "mixed";
+ }
+
+ // "If some member of node list is either an ol or the child or ancestor of
+ // an ol or the child of an li child of an ol, return "mixed ol"."
+ if (hasOl) {
+ return "mixed ol";
+ }
+
+ // "If some member of node list is either a ul or the child or ancestor of
+ // a ul or the child of an li child of a ul, return "mixed ul"."
+ if (hasUl) {
+ return "mixed ul";
+ }
+
+ // "Return "none"."
+ return "none";
+}
+
+function getAlignmentValue(node) {
+ // "While node is neither null nor an Element, or it is an Element but its
+ // "display" property has resolved value "inline" or "none", set node to
+ // its parent."
+ while ((node && node.nodeType != Node.ELEMENT_NODE)
+ || (node.nodeType == Node.ELEMENT_NODE
+ && ["inline", "none"].indexOf(getComputedStyle(node).display) != -1)) {
+ node = node.parentNode;
+ }
+
+ // "If node is not an Element, return "left"."
+ if (!node || node.nodeType != Node.ELEMENT_NODE) {
+ return "left";
+ }
+
+ var resolvedValue = getComputedStyle(node).textAlign
+ // Hack around browser non-standardness
+ .replace(/^-(moz|webkit)-/, "")
+ .replace(/^auto$/, "start");
+
+ // "If node's "text-align" property has resolved value "start", return
+ // "left" if the directionality of node is "ltr", "right" if it is "rtl"."
+ if (resolvedValue == "start") {
+ return getDirectionality(node) == "ltr" ? "left" : "right";
+ }
+
+ // "If node's "text-align" property has resolved value "end", return
+ // "right" if the directionality of node is "ltr", "left" if it is "rtl"."
+ if (resolvedValue == "end") {
+ return getDirectionality(node) == "ltr" ? "right" : "left";
+ }
+
+ // "If node's "text-align" property has resolved value "center", "justify",
+ // "left", or "right", return that value."
+ if (["center", "justify", "left", "right"].indexOf(resolvedValue) != -1) {
+ return resolvedValue;
+ }
+
+ // "Return "left"."
+ return "left";
+}
+
+function getNextEquivalentPoint(node, offset) {
+ // "If node's length is zero, return null."
+ if (getNodeLength(node) == 0) {
+ return null;
+ }
+
+ // "If offset is node's length, and node's parent is not null, and node is
+ // an inline node, return (node's parent, 1 + node's index)."
+ if (offset == getNodeLength(node)
+ && node.parentNode
+ && isInlineNode(node)) {
+ return [node.parentNode, 1 + getNodeIndex(node)];
+ }
+
+ // "If node has a child with index offset, and that child's length is not
+ // zero, and that child is an inline node, return (that child, 0)."
+ if (0 <= offset
+ && offset < node.childNodes.length
+ && getNodeLength(node.childNodes[offset]) != 0
+ && isInlineNode(node.childNodes[offset])) {
+ return [node.childNodes[offset], 0];
+ }
+
+ // "Return null."
+ return null;
+}
+
+function getPreviousEquivalentPoint(node, offset) {
+ // "If node's length is zero, return null."
+ if (getNodeLength(node) == 0) {
+ return null;
+ }
+
+ // "If offset is 0, and node's parent is not null, and node is an inline
+ // node, return (node's parent, node's index)."
+ if (offset == 0
+ && node.parentNode
+ && isInlineNode(node)) {
+ return [node.parentNode, getNodeIndex(node)];
+ }
+
+ // "If node has a child with index offset − 1, and that child's length is
+ // not zero, and that child is an inline node, return (that child, that
+ // child's length)."
+ if (0 <= offset - 1
+ && offset - 1 < node.childNodes.length
+ && getNodeLength(node.childNodes[offset - 1]) != 0
+ && isInlineNode(node.childNodes[offset - 1])) {
+ return [node.childNodes[offset - 1], getNodeLength(node.childNodes[offset - 1])];
+ }
+
+ // "Return null."
+ return null;
+}
+
+function getFirstEquivalentPoint(node, offset) {
+ // "While (node, offset)'s previous equivalent point is not null, set
+ // (node, offset) to its previous equivalent point."
+ var prev;
+ while (prev = getPreviousEquivalentPoint(node, offset)) {
+ node = prev[0];
+ offset = prev[1];
+ }
+
+ // "Return (node, offset)."
+ return [node, offset];
+}
+
+function getLastEquivalentPoint(node, offset) {
+ // "While (node, offset)'s next equivalent point is not null, set (node,
+ // offset) to its next equivalent point."
+ var next;
+ while (next = getNextEquivalentPoint(node, offset)) {
+ node = next[0];
+ offset = next[1];
+ }
+
+ // "Return (node, offset)."
+ return [node, offset];
+}
+
+//@}
+///// Block-extending a range /////
+//@{
+
+// "A boundary point (node, offset) is a block start point if either node's
+// parent is null and offset is zero; or node has a child with index offset −
+// 1, and that child is either a visible block node or a visible br."
+function isBlockStartPoint(node, offset) {
+ return (!node.parentNode && offset == 0)
+ || (0 <= offset - 1
+ && offset - 1 < node.childNodes.length
+ && isVisible(node.childNodes[offset - 1])
+ && (isBlockNode(node.childNodes[offset - 1])
+ || isHtmlElement(node.childNodes[offset - 1], "br")));
+}
+
+// "A boundary point (node, offset) is a block end point if either node's
+// parent is null and offset is node's length; or node has a child with index
+// offset, and that child is a visible block node."
+function isBlockEndPoint(node, offset) {
+ return (!node.parentNode && offset == getNodeLength(node))
+ || (offset < node.childNodes.length
+ && isVisible(node.childNodes[offset])
+ && isBlockNode(node.childNodes[offset]));
+}
+
+// "A boundary point is a block boundary point if it is either a block start
+// point or a block end point."
+function isBlockBoundaryPoint(node, offset) {
+ return isBlockStartPoint(node, offset)
+ || isBlockEndPoint(node, offset);
+}
+
+function blockExtend(range) {
+ // "Let start node, start offset, end node, and end offset be the start
+ // and end nodes and offsets of the range."
+ var startNode = range.startContainer;
+ var startOffset = range.startOffset;
+ var endNode = range.endContainer;
+ var endOffset = range.endOffset;
+
+ // "If some ancestor container of start node is an li, set start offset to
+ // the index of the last such li in tree order, and set start node to that
+ // li's parent."
+ var liAncestors = getAncestors(startNode).concat(startNode)
+ .filter(function(ancestor) { return isHtmlElement(ancestor, "li") })
+ .slice(-1);
+ if (liAncestors.length) {
+ startOffset = getNodeIndex(liAncestors[0]);
+ startNode = liAncestors[0].parentNode;
+ }
+
+ // "If (start node, start offset) is not a block start point, repeat the
+ // following steps:"
+ if (!isBlockStartPoint(startNode, startOffset)) do {
+ // "If start offset is zero, set it to start node's index, then set
+ // start node to its parent."
+ if (startOffset == 0) {
+ startOffset = getNodeIndex(startNode);
+ startNode = startNode.parentNode;
+
+ // "Otherwise, subtract one from start offset."
+ } else {
+ startOffset--;
+ }
+
+ // "If (start node, start offset) is a block boundary point, break from
+ // this loop."
+ } while (!isBlockBoundaryPoint(startNode, startOffset));
+
+ // "While start offset is zero and start node's parent is not null, set
+ // start offset to start node's index, then set start node to its parent."
+ while (startOffset == 0
+ && startNode.parentNode) {
+ startOffset = getNodeIndex(startNode);
+ startNode = startNode.parentNode;
+ }
+
+ // "If some ancestor container of end node is an li, set end offset to one
+ // plus the index of the last such li in tree order, and set end node to
+ // that li's parent."
+ var liAncestors = getAncestors(endNode).concat(endNode)
+ .filter(function(ancestor) { return isHtmlElement(ancestor, "li") })
+ .slice(-1);
+ if (liAncestors.length) {
+ endOffset = 1 + getNodeIndex(liAncestors[0]);
+ endNode = liAncestors[0].parentNode;
+ }
+
+ // "If (end node, end offset) is not a block end point, repeat the
+ // following steps:"
+ if (!isBlockEndPoint(endNode, endOffset)) do {
+ // "If end offset is end node's length, set it to one plus end node's
+ // index, then set end node to its parent."
+ if (endOffset == getNodeLength(endNode)) {
+ endOffset = 1 + getNodeIndex(endNode);
+ endNode = endNode.parentNode;
+
+ // "Otherwise, add one to end offset.
+ } else {
+ endOffset++;
+ }
+
+ // "If (end node, end offset) is a block boundary point, break from
+ // this loop."
+ } while (!isBlockBoundaryPoint(endNode, endOffset));
+
+ // "While end offset is end node's length and end node's parent is not
+ // null, set end offset to one plus end node's index, then set end node to
+ // its parent."
+ while (endOffset == getNodeLength(endNode)
+ && endNode.parentNode) {
+ endOffset = 1 + getNodeIndex(endNode);
+ endNode = endNode.parentNode;
+ }
+
+ // "Let new range be a new range whose start and end nodes and offsets
+ // are start node, start offset, end node, and end offset."
+ var newRange = startNode.ownerDocument.createRange();
+ newRange.setStart(startNode, startOffset);
+ newRange.setEnd(endNode, endOffset);
+
+ // "Return new range."
+ return newRange;
+}
+
+function followsLineBreak(node) {
+ // "Let offset be zero."
+ var offset = 0;
+
+ // "While (node, offset) is not a block boundary point:"
+ while (!isBlockBoundaryPoint(node, offset)) {
+ // "If node has a visible child with index offset minus one, return
+ // false."
+ if (0 <= offset - 1
+ && offset - 1 < node.childNodes.length
+ && isVisible(node.childNodes[offset - 1])) {
+ return false;
+ }
+
+ // "If offset is zero or node has no children, set offset to node's
+ // index, then set node to its parent."
+ if (offset == 0
+ || !node.hasChildNodes()) {
+ offset = getNodeIndex(node);
+ node = node.parentNode;
+
+ // "Otherwise, set node to its child with index offset minus one, then
+ // set offset to node's length."
+ } else {
+ node = node.childNodes[offset - 1];
+ offset = getNodeLength(node);
+ }
+ }
+
+ // "Return true."
+ return true;
+}
+
+function precedesLineBreak(node) {
+ // "Let offset be node's length."
+ var offset = getNodeLength(node);
+
+ // "While (node, offset) is not a block boundary point:"
+ while (!isBlockBoundaryPoint(node, offset)) {
+ // "If node has a visible child with index offset, return false."
+ if (offset < node.childNodes.length
+ && isVisible(node.childNodes[offset])) {
+ return false;
+ }
+
+ // "If offset is node's length or node has no children, set offset to
+ // one plus node's index, then set node to its parent."
+ if (offset == getNodeLength(node)
+ || !node.hasChildNodes()) {
+ offset = 1 + getNodeIndex(node);
+ node = node.parentNode;
+
+ // "Otherwise, set node to its child with index offset and set offset
+ // to zero."
+ } else {
+ node = node.childNodes[offset];
+ offset = 0;
+ }
+ }
+
+ // "Return true."
+ return true;
+}
+
+//@}
+///// Recording and restoring overrides /////
+//@{
+
+function recordCurrentOverrides() {
+ // "Let overrides be a list of (string, string or boolean) ordered pairs,
+ // initially empty."
+ var overrides = [];
+
+ // "If there is a value override for "createLink", add ("createLink", value
+ // override for "createLink") to overrides."
+ if (getValueOverride("createlink") !== undefined) {
+ overrides.push(["createlink", getValueOverride("createlink")]);
+ }
+
+ // "For each command in the list "bold", "italic", "strikethrough",
+ // "subscript", "superscript", "underline", in order: if there is a state
+ // override for command, add (command, command's state override) to
+ // overrides."
+ ["bold", "italic", "strikethrough", "subscript", "superscript",
+ "underline"].forEach(function(command) {
+ if (getStateOverride(command) !== undefined) {
+ overrides.push([command, getStateOverride(command)]);
+ }
+ });
+
+ // "For each command in the list "fontName", "fontSize", "foreColor",
+ // "hiliteColor", in order: if there is a value override for command, add
+ // (command, command's value override) to overrides."
+ ["fontname", "fontsize", "forecolor",
+ "hilitecolor"].forEach(function(command) {
+ if (getValueOverride(command) !== undefined) {
+ overrides.push([command, getValueOverride(command)]);
+ }
+ });
+
+ // "Return overrides."
+ return overrides;
+}
+
+function recordCurrentStatesAndValues() {
+ // "Let overrides be a list of (string, string or boolean) ordered pairs,
+ // initially empty."
+ var overrides = [];
+
+ // "Let node be the first formattable node effectively contained in the
+ // active range, or null if there is none."
+ var node = getAllEffectivelyContainedNodes(getActiveRange())
+ .filter(isFormattableNode)[0];
+
+ // "If node is null, return overrides."
+ if (!node) {
+ return overrides;
+ }
+
+ // "Add ("createLink", node's effective command value for "createLink") to
+ // overrides."
+ overrides.push(["createlink", getEffectiveCommandValue(node, "createlink")]);
+
+ // "For each command in the list "bold", "italic", "strikethrough",
+ // "subscript", "superscript", "underline", in order: if node's effective
+ // command value for command is one of its inline command activated values,
+ // add (command, true) to overrides, and otherwise add (command, false) to
+ // overrides."
+ ["bold", "italic", "strikethrough", "subscript", "superscript",
+ "underline"].forEach(function(command) {
+ if (commands[command].inlineCommandActivatedValues
+ .indexOf(getEffectiveCommandValue(node, command)) != -1) {
+ overrides.push([command, true]);
+ } else {
+ overrides.push([command, false]);
+ }
+ });
+
+ // "For each command in the list "fontName", "foreColor", "hiliteColor", in
+ // order: add (command, command's value) to overrides."
+ ["fontname", "fontsize", "forecolor", "hilitecolor"].forEach(function(command) {
+ overrides.push([command, commands[command].value()]);
+ });
+
+ // "Add ("fontSize", node's effective command value for "fontSize") to
+ // overrides."
+ overrides.push(["fontsize", getEffectiveCommandValue(node, "fontsize")]);
+
+ // "Return overrides."
+ return overrides;
+}
+
+function restoreStatesAndValues(overrides) {
+ // "Let node be the first formattable node effectively contained in the
+ // active range, or null if there is none."
+ var node = getAllEffectivelyContainedNodes(getActiveRange())
+ .filter(isFormattableNode)[0];
+
+ // "If node is not null, then for each (command, override) pair in
+ // overrides, in order:"
+ if (node) {
+ for (var i = 0; i < overrides.length; i++) {
+ var command = overrides[i][0];
+ var override = overrides[i][1];
+
+ // "If override is a boolean, and queryCommandState(command)
+ // returns something different from override, take the action for
+ // command, with value equal to the empty string."
+ if (typeof override == "boolean"
+ && myQueryCommandState(command) != override) {
+ commands[command].action("");
+
+ // "Otherwise, if override is a string, and command is neither
+ // "createLink" nor "fontSize", and queryCommandValue(command)
+ // returns something not equivalent to override, take the action
+ // for command, with value equal to override."
+ } else if (typeof override == "string"
+ && command != "createlink"
+ && command != "fontsize"
+ && !areEquivalentValues(command, myQueryCommandValue(command), override)) {
+ commands[command].action(override);
+
+ // "Otherwise, if override is a string; and command is
+ // "createLink"; and either there is a value override for
+ // "createLink" that is not equal to override, or there is no value
+ // override for "createLink" and node's effective command value for
+ // "createLink" is not equal to override: take the action for
+ // "createLink", with value equal to override."
+ } else if (typeof override == "string"
+ && command == "createlink"
+ && (
+ (
+ getValueOverride("createlink") !== undefined
+ && getValueOverride("createlink") !== override
+ ) || (
+ getValueOverride("createlink") === undefined
+ && getEffectiveCommandValue(node, "createlink") !== override
+ )
+ )) {
+ commands.createlink.action(override);
+
+ // "Otherwise, if override is a string; and command is "fontSize";
+ // and either there is a value override for "fontSize" that is not
+ // equal to override, or there is no value override for "fontSize"
+ // and node's effective command value for "fontSize" is not loosely
+ // equivalent to override:"
+ } else if (typeof override == "string"
+ && command == "fontsize"
+ && (
+ (
+ getValueOverride("fontsize") !== undefined
+ && getValueOverride("fontsize") !== override
+ ) || (
+ getValueOverride("fontsize") === undefined
+ && !areLooselyEquivalentValues(command, getEffectiveCommandValue(node, "fontsize"), override)
+ )
+ )) {
+ // "Convert override to an integer number of pixels, and set
+ // override to the legacy font size for the result."
+ override = getLegacyFontSize(override);
+
+ // "Take the action for "fontSize", with value equal to
+ // override."
+ commands.fontsize.action(override);
+
+ // "Otherwise, continue this loop from the beginning."
+ } else {
+ continue;
+ }
+
+ // "Set node to the first formattable node effectively contained in
+ // the active range, if there is one."
+ node = getAllEffectivelyContainedNodes(getActiveRange())
+ .filter(isFormattableNode)[0]
+ || node;
+ }
+
+ // "Otherwise, for each (command, override) pair in overrides, in order:"
+ } else {
+ for (var i = 0; i < overrides.length; i++) {
+ var command = overrides[i][0];
+ var override = overrides[i][1];
+
+ // "If override is a boolean, set the state override for command to
+ // override."
+ if (typeof override == "boolean") {
+ setStateOverride(command, override);
+ }
+
+ // "If override is a string, set the value override for command to
+ // override."
+ if (typeof override == "string") {
+ setValueOverride(command, override);
+ }
+ }
+ }
+}
+
+//@}
+///// Deleting the selection /////
+//@{
+
+// The flags argument is a dictionary that can have blockMerging,
+// stripWrappers, and/or direction as keys.
+function deleteSelection(flags) {
+ if (flags === undefined) {
+ flags = {};
+ }
+
+ var blockMerging = "blockMerging" in flags ? Boolean(flags.blockMerging) : true;
+ var stripWrappers = "stripWrappers" in flags ? Boolean(flags.stripWrappers) : true;
+ var direction = "direction" in flags ? flags.direction : "forward";
+
+ // "If the active range is null, abort these steps and do nothing."
+ if (!getActiveRange()) {
+ return;
+ }
+
+ // "Canonicalize whitespace at the active range's start."
+ canonicalizeWhitespace(getActiveRange().startContainer, getActiveRange().startOffset);
+
+ // "Canonicalize whitespace at the active range's end."
+ canonicalizeWhitespace(getActiveRange().endContainer, getActiveRange().endOffset);
+
+ // "Let (start node, start offset) be the last equivalent point for the
+ // active range's start."
+ var start = getLastEquivalentPoint(getActiveRange().startContainer, getActiveRange().startOffset);
+ var startNode = start[0];
+ var startOffset = start[1];
+
+ // "Let (end node, end offset) be the first equivalent point for the active
+ // range's end."
+ var end = getFirstEquivalentPoint(getActiveRange().endContainer, getActiveRange().endOffset);
+ var endNode = end[0];
+ var endOffset = end[1];
+
+ // "If (end node, end offset) is not after (start node, start offset):"
+ if (getPosition(endNode, endOffset, startNode, startOffset) !== "after") {
+ // "If direction is "forward", call collapseToStart() on the context
+ // object's Selection."
+ //
+ // Here and in a few other places, we check rangeCount to work around a
+ // WebKit bug: it will sometimes incorrectly remove ranges from the
+ // selection if nodes are removed, so collapseToStart() will throw.
+ // This will break everything if we're using an actual selection, but
+ // if getActiveRange() is really just returning globalRange and that's
+ // all we care about, it will work fine. I only add the extra check
+ // for errors I actually hit in testing.
+ if (direction == "forward") {
+ if (getSelection().rangeCount) {
+ getSelection().collapseToStart();
+ }
+ getActiveRange().collapse(true);
+
+ // "Otherwise, call collapseToEnd() on the context object's Selection."
+ } else {
+ getSelection().collapseToEnd();
+ getActiveRange().collapse(false);
+ }
+
+ // "Abort these steps."
+ return;
+ }
+
+ // "If start node is a Text node and start offset is 0, set start offset to
+ // the index of start node, then set start node to its parent."
+ if (startNode.nodeType == Node.TEXT_NODE
+ && startOffset == 0) {
+ startOffset = getNodeIndex(startNode);
+ startNode = startNode.parentNode;
+ }
+
+ // "If end node is a Text node and end offset is its length, set end offset
+ // to one plus the index of end node, then set end node to its parent."
+ if (endNode.nodeType == Node.TEXT_NODE
+ && endOffset == getNodeLength(endNode)) {
+ endOffset = 1 + getNodeIndex(endNode);
+ endNode = endNode.parentNode;
+ }
+
+ // "Call collapse(start node, start offset) on the context object's
+ // Selection."
+ getSelection().collapse(startNode, startOffset);
+ getActiveRange().setStart(startNode, startOffset);
+
+ // "Call extend(end node, end offset) on the context object's Selection."
+ getSelection().extend(endNode, endOffset);
+ getActiveRange().setEnd(endNode, endOffset);
+
+ // "Let start block be the active range's start node."
+ var startBlock = getActiveRange().startContainer;
+
+ // "While start block's parent is in the same editing host and start block
+ // is an inline node, set start block to its parent."
+ while (inSameEditingHost(startBlock, startBlock.parentNode)
+ && isInlineNode(startBlock)) {
+ startBlock = startBlock.parentNode;
+ }
+
+ // "If start block is neither a block node nor an editing host, or "span"
+ // is not an allowed child of start block, or start block is a td or th,
+ // set start block to null."
+ if ((!isBlockNode(startBlock) && !isEditingHost(startBlock))
+ || !isAllowedChild("span", startBlock)
+ || isHtmlElement(startBlock, ["td", "th"])) {
+ startBlock = null;
+ }
+
+ // "Let end block be the active range's end node."
+ var endBlock = getActiveRange().endContainer;
+
+ // "While end block's parent is in the same editing host and end block is
+ // an inline node, set end block to its parent."
+ while (inSameEditingHost(endBlock, endBlock.parentNode)
+ && isInlineNode(endBlock)) {
+ endBlock = endBlock.parentNode;
+ }
+
+ // "If end block is neither a block node nor an editing host, or "span" is
+ // not an allowed child of end block, or end block is a td or th, set end
+ // block to null."
+ if ((!isBlockNode(endBlock) && !isEditingHost(endBlock))
+ || !isAllowedChild("span", endBlock)
+ || isHtmlElement(endBlock, ["td", "th"])) {
+ endBlock = null;
+ }
+
+ // "Record current states and values, and let overrides be the result."
+ var overrides = recordCurrentStatesAndValues();
+
+ // "If start node and end node are the same, and start node is an editable
+ // Text node:"
+ if (startNode == endNode
+ && isEditable(startNode)
+ && startNode.nodeType == Node.TEXT_NODE) {
+ // "Call deleteData(start offset, end offset − start offset) on start
+ // node."
+ startNode.deleteData(startOffset, endOffset - startOffset);
+
+ // "Canonicalize whitespace at (start node, start offset), with fix
+ // collapsed space false."
+ canonicalizeWhitespace(startNode, startOffset, false);
+
+ // "If direction is "forward", call collapseToStart() on the context
+ // object's Selection."
+ if (direction == "forward") {
+ if (getSelection().rangeCount) {
+ getSelection().collapseToStart();
+ }
+ getActiveRange().collapse(true);
+
+ // "Otherwise, call collapseToEnd() on the context object's Selection."
+ } else {
+ getSelection().collapseToEnd();
+ getActiveRange().collapse(false);
+ }
+
+ // "Restore states and values from overrides."
+ restoreStatesAndValues(overrides);
+
+ // "Abort these steps."
+ return;
+ }
+
+ // "If start node is an editable Text node, call deleteData() on it, with
+ // start offset as the first argument and (length of start node − start
+ // offset) as the second argument."
+ if (isEditable(startNode)
+ && startNode.nodeType == Node.TEXT_NODE) {
+ startNode.deleteData(startOffset, getNodeLength(startNode) - startOffset);
+ }
+
+ // "Let node list be a list of nodes, initially empty."
+ //
+ // "For each node contained in the active range, append node to node list
+ // if the last member of node list (if any) is not an ancestor of node;
+ // node is editable; and node is not a thead, tbody, tfoot, tr, th, or td."
+ var nodeList = getContainedNodes(getActiveRange(),
+ function(node) {
+ return isEditable(node)
+ && !isHtmlElement(node, ["thead", "tbody", "tfoot", "tr", "th", "td"]);
+ }
+ );
+
+ // "For each node in node list:"
+ for (var i = 0; i < nodeList.length; i++) {
+ var node = nodeList[i];
+
+ // "Let parent be the parent of node."
+ var parent_ = node.parentNode;
+
+ // "Remove node from parent."
+ parent_.removeChild(node);
+
+ // "If the block node of parent has no visible children, and parent is
+ // editable or an editing host, call createElement("br") on the context
+ // object and append the result as the last child of parent."
+ if (![].some.call(getBlockNodeOf(parent_).childNodes, isVisible)
+ && (isEditable(parent_) || isEditingHost(parent_))) {
+ parent_.appendChild(document.createElement("br"));
+ }
+
+ // "If strip wrappers is true or parent is not an ancestor container of
+ // start node, while parent is an editable inline node with length 0,
+ // let grandparent be the parent of parent, then remove parent from
+ // grandparent, then set parent to grandparent."
+ if (stripWrappers
+ || (!isAncestor(parent_, startNode) && parent_ != startNode)) {
+ while (isEditable(parent_)
+ && isInlineNode(parent_)
+ && getNodeLength(parent_) == 0) {
+ var grandparent = parent_.parentNode;
+ grandparent.removeChild(parent_);
+ parent_ = grandparent;
+ }
+ }
+ }
+
+ // "If end node is an editable Text node, call deleteData(0, end offset) on
+ // it."
+ if (isEditable(endNode)
+ && endNode.nodeType == Node.TEXT_NODE) {
+ endNode.deleteData(0, endOffset);
+ }
+
+ // "Canonicalize whitespace at the active range's start, with fix collapsed
+ // space false."
+ canonicalizeWhitespace(getActiveRange().startContainer, getActiveRange().startOffset, false);
+
+ // "Canonicalize whitespace at the active range's end, with fix collapsed
+ // space false."
+ canonicalizeWhitespace(getActiveRange().endContainer, getActiveRange().endOffset, false);
+
+ // "If block merging is false, or start block or end block is null, or
+ // start block is not in the same editing host as end block, or start block
+ // and end block are the same:"
+ if (!blockMerging
+ || !startBlock
+ || !endBlock
+ || !inSameEditingHost(startBlock, endBlock)
+ || startBlock == endBlock) {
+ // "If direction is "forward", call collapseToStart() on the context
+ // object's Selection."
+ if (direction == "forward") {
+ if (getSelection().rangeCount) {
+ getSelection().collapseToStart();
+ }
+ getActiveRange().collapse(true);
+
+ // "Otherwise, call collapseToEnd() on the context object's Selection."
+ } else {
+ if (getSelection().rangeCount) {
+ getSelection().collapseToEnd();
+ }
+ getActiveRange().collapse(false);
+ }
+
+ // "Restore states and values from overrides."
+ restoreStatesAndValues(overrides);
+
+ // "Abort these steps."
+ return;
+ }
+
+ // "If start block has one child, which is a collapsed block prop, remove
+ // its child from it."
+ if (startBlock.children.length == 1
+ && isCollapsedBlockProp(startBlock.firstChild)) {
+ startBlock.removeChild(startBlock.firstChild);
+ }
+
+ // "If start block is an ancestor of end block:"
+ if (isAncestor(startBlock, endBlock)) {
+ // "Let reference node be end block."
+ var referenceNode = endBlock;
+
+ // "While reference node is not a child of start block, set reference
+ // node to its parent."
+ while (referenceNode.parentNode != startBlock) {
+ referenceNode = referenceNode.parentNode;
+ }
+
+ // "Call collapse() on the context object's Selection, with first
+ // argument start block and second argument the index of reference
+ // node."
+ getSelection().collapse(startBlock, getNodeIndex(referenceNode));
+ getActiveRange().setStart(startBlock, getNodeIndex(referenceNode));
+ getActiveRange().collapse(true);
+
+ // "If end block has no children:"
+ if (!endBlock.hasChildNodes()) {
+ // "While end block is editable and is the only child of its parent
+ // and is not a child of start block, let parent equal end block,
+ // then remove end block from parent, then set end block to
+ // parent."
+ while (isEditable(endBlock)
+ && endBlock.parentNode.childNodes.length == 1
+ && endBlock.parentNode != startBlock) {
+ var parent_ = endBlock;
+ parent_.removeChild(endBlock);
+ endBlock = parent_;
+ }
+
+ // "If end block is editable and is not an inline node, and its
+ // previousSibling and nextSibling are both inline nodes, call
+ // createElement("br") on the context object and insert it into end
+ // block's parent immediately after end block."
+ if (isEditable(endBlock)
+ && !isInlineNode(endBlock)
+ && isInlineNode(endBlock.previousSibling)
+ && isInlineNode(endBlock.nextSibling)) {
+ endBlock.parentNode.insertBefore(document.createElement("br"), endBlock.nextSibling);
+ }
+
+ // "If end block is editable, remove it from its parent."
+ if (isEditable(endBlock)) {
+ endBlock.parentNode.removeChild(endBlock);
+ }
+
+ // "Restore states and values from overrides."
+ restoreStatesAndValues(overrides);
+
+ // "Abort these steps."
+ return;
+ }
+
+ // "If end block's firstChild is not an inline node, restore states and
+ // values from overrides, then abort these steps."
+ if (!isInlineNode(endBlock.firstChild)) {
+ restoreStatesAndValues(overrides);
+ return;
+ }
+
+ // "Let children be a list of nodes, initially empty."
+ var children = [];
+
+ // "Append the first child of end block to children."
+ children.push(endBlock.firstChild);
+
+ // "While children's last member is not a br, and children's last
+ // member's nextSibling is an inline node, append children's last
+ // member's nextSibling to children."
+ while (!isHtmlElement(children[children.length - 1], "br")
+ && isInlineNode(children[children.length - 1].nextSibling)) {
+ children.push(children[children.length - 1].nextSibling);
+ }
+
+ // "Record the values of children, and let values be the result."
+ var values = recordValues(children);
+
+ // "While children's first member's parent is not start block, split
+ // the parent of children."
+ while (children[0].parentNode != startBlock) {
+ splitParent(children);
+ }
+
+ // "If children's first member's previousSibling is an editable br,
+ // remove that br from its parent."
+ if (isEditable(children[0].previousSibling)
+ && isHtmlElement(children[0].previousSibling, "br")) {
+ children[0].parentNode.removeChild(children[0].previousSibling);
+ }
+
+ // "Otherwise, if start block is a descendant of end block:"
+ } else if (isDescendant(startBlock, endBlock)) {
+ // "Call collapse() on the context object's Selection, with first
+ // argument start block and second argument start block's length."
+ getSelection().collapse(startBlock, getNodeLength(startBlock));
+ getActiveRange().setStart(startBlock, getNodeLength(startBlock));
+ getActiveRange().collapse(true);
+
+ // "Let reference node be start block."
+ var referenceNode = startBlock;
+
+ // "While reference node is not a child of end block, set reference
+ // node to its parent."
+ while (referenceNode.parentNode != endBlock) {
+ referenceNode = referenceNode.parentNode;
+ }
+
+ // "If reference node's nextSibling is an inline node and start block's
+ // lastChild is a br, remove start block's lastChild from it."
+ if (isInlineNode(referenceNode.nextSibling)
+ && isHtmlElement(startBlock.lastChild, "br")) {
+ startBlock.removeChild(startBlock.lastChild);
+ }
+
+ // "Let nodes to move be a list of nodes, initially empty."
+ var nodesToMove = [];
+
+ // "If reference node's nextSibling is neither null nor a block node,
+ // append it to nodes to move."
+ if (referenceNode.nextSibling
+ && !isBlockNode(referenceNode.nextSibling)) {
+ nodesToMove.push(referenceNode.nextSibling);
+ }
+
+ // "While nodes to move is nonempty and its last member isn't a br and
+ // its last member's nextSibling is neither null nor a block node,
+ // append its last member's nextSibling to nodes to move."
+ if (nodesToMove.length
+ && !isHtmlElement(nodesToMove[nodesToMove.length - 1], "br")
+ && nodesToMove[nodesToMove.length - 1].nextSibling
+ && !isBlockNode(nodesToMove[nodesToMove.length - 1].nextSibling)) {
+ nodesToMove.push(nodesToMove[nodesToMove.length - 1].nextSibling);
+ }
+
+ // "Record the values of nodes to move, and let values be the result."
+ var values = recordValues(nodesToMove);
+
+ // "For each node in nodes to move, append node as the last child of
+ // start block, preserving ranges."
+ nodesToMove.forEach(function(node) {
+ movePreservingRanges(node, startBlock, -1);
+ });
+
+ // "Otherwise:"
+ } else {
+ // "Call collapse() on the context object's Selection, with first
+ // argument start block and second argument start block's length."
+ getSelection().collapse(startBlock, getNodeLength(startBlock));
+ getActiveRange().setStart(startBlock, getNodeLength(startBlock));
+ getActiveRange().collapse(true);
+
+ // "If end block's firstChild is an inline node and start block's
+ // lastChild is a br, remove start block's lastChild from it."
+ if (isInlineNode(endBlock.firstChild)
+ && isHtmlElement(startBlock.lastChild, "br")) {
+ startBlock.removeChild(startBlock.lastChild);
+ }
+
+ // "Record the values of end block's children, and let values be the
+ // result."
+ var values = recordValues([].slice.call(endBlock.childNodes));
+
+ // "While end block has children, append the first child of end block
+ // to start block, preserving ranges."
+ while (endBlock.hasChildNodes()) {
+ movePreservingRanges(endBlock.firstChild, startBlock, -1);
+ }
+
+ // "While end block has no children, let parent be the parent of end
+ // block, then remove end block from parent, then set end block to
+ // parent."
+ while (!endBlock.hasChildNodes()) {
+ var parent_ = endBlock.parentNode;
+ parent_.removeChild(endBlock);
+ endBlock = parent_;
+ }
+ }
+
+ // "Let ancestor be start block."
+ var ancestor = startBlock;
+
+ // "While ancestor has an inclusive ancestor ol in the same editing host
+ // whose nextSibling is also an ol in the same editing host, or an
+ // inclusive ancestor ul in the same editing host whose nextSibling is also
+ // a ul in the same editing host:"
+ while (getInclusiveAncestors(ancestor).some(function(node) {
+ return inSameEditingHost(ancestor, node)
+ && (
+ (isHtmlElement(node, "ol") && isHtmlElement(node.nextSibling, "ol"))
+ || (isHtmlElement(node, "ul") && isHtmlElement(node.nextSibling, "ul"))
+ ) && inSameEditingHost(ancestor, node.nextSibling);
+ })) {
+ // "While ancestor and its nextSibling are not both ols in the same
+ // editing host, and are also not both uls in the same editing host,
+ // set ancestor to its parent."
+ while (!(
+ isHtmlElement(ancestor, "ol")
+ && isHtmlElement(ancestor.nextSibling, "ol")
+ && inSameEditingHost(ancestor, ancestor.nextSibling)
+ ) && !(
+ isHtmlElement(ancestor, "ul")
+ && isHtmlElement(ancestor.nextSibling, "ul")
+ && inSameEditingHost(ancestor, ancestor.nextSibling)
+ )) {
+ ancestor = ancestor.parentNode;
+ }
+
+ // "While ancestor's nextSibling has children, append ancestor's
+ // nextSibling's firstChild as the last child of ancestor, preserving
+ // ranges."
+ while (ancestor.nextSibling.hasChildNodes()) {
+ movePreservingRanges(ancestor.nextSibling.firstChild, ancestor, -1);
+ }
+
+ // "Remove ancestor's nextSibling from its parent."
+ ancestor.parentNode.removeChild(ancestor.nextSibling);
+ }
+
+ // "Restore the values from values."
+ restoreValues(values);
+
+ // "If start block has no children, call createElement("br") on the context
+ // object and append the result as the last child of start block."
+ if (!startBlock.hasChildNodes()) {
+ startBlock.appendChild(document.createElement("br"));
+ }
+
+ // "Remove extraneous line breaks at the end of start block."
+ removeExtraneousLineBreaksAtTheEndOf(startBlock);
+
+ // "Restore states and values from overrides."
+ restoreStatesAndValues(overrides);
+}
+
+
+//@}
+///// Splitting a node list's parent /////
+//@{
+
+function splitParent(nodeList) {
+ // "Let original parent be the parent of the first member of node list."
+ var originalParent = nodeList[0].parentNode;
+
+ // "If original parent is not editable or its parent is null, do nothing
+ // and abort these steps."
+ if (!isEditable(originalParent)
+ || !originalParent.parentNode) {
+ return;
+ }
+
+ // "If the first child of original parent is in node list, remove
+ // extraneous line breaks before original parent."
+ if (nodeList.indexOf(originalParent.firstChild) != -1) {
+ removeExtraneousLineBreaksBefore(originalParent);
+ }
+
+ // "If the first child of original parent is in node list, and original
+ // parent follows a line break, set follows line break to true. Otherwise,
+ // set follows line break to false."
+ var followsLineBreak_ = nodeList.indexOf(originalParent.firstChild) != -1
+ && followsLineBreak(originalParent);
+
+ // "If the last child of original parent is in node list, and original
+ // parent precedes a line break, set precedes line break to true.
+ // Otherwise, set precedes line break to false."
+ var precedesLineBreak_ = nodeList.indexOf(originalParent.lastChild) != -1
+ && precedesLineBreak(originalParent);
+
+ // "If the first child of original parent is not in node list, but its last
+ // child is:"
+ if (nodeList.indexOf(originalParent.firstChild) == -1
+ && nodeList.indexOf(originalParent.lastChild) != -1) {
+ // "For each node in node list, in reverse order, insert node into the
+ // parent of original parent immediately after original parent,
+ // preserving ranges."
+ for (var i = nodeList.length - 1; i >= 0; i--) {
+ movePreservingRanges(nodeList[i], originalParent.parentNode, 1 + getNodeIndex(originalParent));
+ }
+
+ // "If precedes line break is true, and the last member of node list
+ // does not precede a line break, call createElement("br") on the
+ // context object and insert the result immediately after the last
+ // member of node list."
+ if (precedesLineBreak_
+ && !precedesLineBreak(nodeList[nodeList.length - 1])) {
+ nodeList[nodeList.length - 1].parentNode.insertBefore(document.createElement("br"), nodeList[nodeList.length - 1].nextSibling);
+ }
+
+ // "Remove extraneous line breaks at the end of original parent."
+ removeExtraneousLineBreaksAtTheEndOf(originalParent);
+
+ // "Abort these steps."
+ return;
+ }
+
+ // "If the first child of original parent is not in node list:"
+ if (nodeList.indexOf(originalParent.firstChild) == -1) {
+ // "Let cloned parent be the result of calling cloneNode(false) on
+ // original parent."
+ var clonedParent = originalParent.cloneNode(false);
+
+ // "If original parent has an id attribute, unset it."
+ originalParent.removeAttribute("id");
+
+ // "Insert cloned parent into the parent of original parent immediately
+ // before original parent."
+ originalParent.parentNode.insertBefore(clonedParent, originalParent);
+
+ // "While the previousSibling of the first member of node list is not
+ // null, append the first child of original parent as the last child of
+ // cloned parent, preserving ranges."
+ while (nodeList[0].previousSibling) {
+ movePreservingRanges(originalParent.firstChild, clonedParent, clonedParent.childNodes.length);
+ }
+ }
+
+ // "For each node in node list, insert node into the parent of original
+ // parent immediately before original parent, preserving ranges."
+ for (var i = 0; i < nodeList.length; i++) {
+ movePreservingRanges(nodeList[i], originalParent.parentNode, getNodeIndex(originalParent));
+ }
+
+ // "If follows line break is true, and the first member of node list does
+ // not follow a line break, call createElement("br") on the context object
+ // and insert the result immediately before the first member of node list."
+ if (followsLineBreak_
+ && !followsLineBreak(nodeList[0])) {
+ nodeList[0].parentNode.insertBefore(document.createElement("br"), nodeList[0]);
+ }
+
+ // "If the last member of node list is an inline node other than a br, and
+ // the first child of original parent is a br, and original parent is not
+ // an inline node, remove the first child of original parent from original
+ // parent."
+ if (isInlineNode(nodeList[nodeList.length - 1])
+ && !isHtmlElement(nodeList[nodeList.length - 1], "br")
+ && isHtmlElement(originalParent.firstChild, "br")
+ && !isInlineNode(originalParent)) {
+ originalParent.removeChild(originalParent.firstChild);
+ }
+
+ // "If original parent has no children:"
+ if (!originalParent.hasChildNodes()) {
+ // "Remove original parent from its parent."
+ originalParent.parentNode.removeChild(originalParent);
+
+ // "If precedes line break is true, and the last member of node list
+ // does not precede a line break, call createElement("br") on the
+ // context object and insert the result immediately after the last
+ // member of node list."
+ if (precedesLineBreak_
+ && !precedesLineBreak(nodeList[nodeList.length - 1])) {
+ nodeList[nodeList.length - 1].parentNode.insertBefore(document.createElement("br"), nodeList[nodeList.length - 1].nextSibling);
+ }
+
+ // "Otherwise, remove extraneous line breaks before original parent."
+ } else {
+ removeExtraneousLineBreaksBefore(originalParent);
+ }
+
+ // "If node list's last member's nextSibling is null, but its parent is not
+ // null, remove extraneous line breaks at the end of node list's last
+ // member's parent."
+ if (!nodeList[nodeList.length - 1].nextSibling
+ && nodeList[nodeList.length - 1].parentNode) {
+ removeExtraneousLineBreaksAtTheEndOf(nodeList[nodeList.length - 1].parentNode);
+ }
+}
+
+// "To remove a node node while preserving its descendants, split the parent of
+// node's children if it has any. If it has no children, instead remove it from
+// its parent."
+function removePreservingDescendants(node) {
+ if (node.hasChildNodes()) {
+ splitParent([].slice.call(node.childNodes));
+ } else {
+ node.parentNode.removeChild(node);
+ }
+}
+
+
+//@}
+///// Canonical space sequences /////
+//@{
+
+function canonicalSpaceSequence(n, nonBreakingStart, nonBreakingEnd) {
+ // "If n is zero, return the empty string."
+ if (n == 0) {
+ return "";
+ }
+
+ // "If n is one and both non-breaking start and non-breaking end are false,
+ // return a single space (U+0020)."
+ if (n == 1 && !nonBreakingStart && !nonBreakingEnd) {
+ return " ";
+ }
+
+ // "If n is one, return a single non-breaking space (U+00A0)."
+ if (n == 1) {
+ return "\xa0";
+ }
+
+ // "Let buffer be the empty string."
+ var buffer = "";
+
+ // "If non-breaking start is true, let repeated pair be U+00A0 U+0020.
+ // Otherwise, let it be U+0020 U+00A0."
+ var repeatedPair;
+ if (nonBreakingStart) {
+ repeatedPair = "\xa0 ";
+ } else {
+ repeatedPair = " \xa0";
+ }
+
+ // "While n is greater than three, append repeated pair to buffer and
+ // subtract two from n."
+ while (n > 3) {
+ buffer += repeatedPair;
+ n -= 2;
+ }
+
+ // "If n is three, append a three-element string to buffer depending on
+ // non-breaking start and non-breaking end:"
+ if (n == 3) {
+ buffer +=
+ !nonBreakingStart && !nonBreakingEnd ? " \xa0 "
+ : nonBreakingStart && !nonBreakingEnd ? "\xa0\xa0 "
+ : !nonBreakingStart && nonBreakingEnd ? " \xa0\xa0"
+ : nonBreakingStart && nonBreakingEnd ? "\xa0 \xa0"
+ : "impossible";
+
+ // "Otherwise, append a two-element string to buffer depending on
+ // non-breaking start and non-breaking end:"
+ } else {
+ buffer +=
+ !nonBreakingStart && !nonBreakingEnd ? "\xa0 "
+ : nonBreakingStart && !nonBreakingEnd ? "\xa0 "
+ : !nonBreakingStart && nonBreakingEnd ? " \xa0"
+ : nonBreakingStart && nonBreakingEnd ? "\xa0\xa0"
+ : "impossible";
+ }
+
+ // "Return buffer."
+ return buffer;
+}
+
+function canonicalizeWhitespace(node, offset, fixCollapsedSpace) {
+ if (fixCollapsedSpace === undefined) {
+ // "an optional boolean argument fix collapsed space that defaults to
+ // true"
+ fixCollapsedSpace = true;
+ }
+
+ // "If node is neither editable nor an editing host, abort these steps."
+ if (!isEditable(node) && !isEditingHost(node)) {
+ return;
+ }
+
+ // "Let start node equal node and let start offset equal offset."
+ var startNode = node;
+ var startOffset = offset;
+
+ // "Repeat the following steps:"
+ while (true) {
+ // "If start node has a child in the same editing host with index start
+ // offset minus one, set start node to that child, then set start
+ // offset to start node's length."
+ if (0 <= startOffset - 1
+ && inSameEditingHost(startNode, startNode.childNodes[startOffset - 1])) {
+ startNode = startNode.childNodes[startOffset - 1];
+ startOffset = getNodeLength(startNode);
+
+ // "Otherwise, if start offset is zero and start node does not follow a
+ // line break and start node's parent is in the same editing host, set
+ // start offset to start node's index, then set start node to its
+ // parent."
+ } else if (startOffset == 0
+ && !followsLineBreak(startNode)
+ && inSameEditingHost(startNode, startNode.parentNode)) {
+ startOffset = getNodeIndex(startNode);
+ startNode = startNode.parentNode;
+
+ // "Otherwise, if start node is a Text node and its parent's resolved
+ // value for "white-space" is neither "pre" nor "pre-wrap" and start
+ // offset is not zero and the (start offset − 1)st element of start
+ // node's data is a space (0x0020) or non-breaking space (0x00A0),
+ // subtract one from start offset."
+ } else if (startNode.nodeType == Node.TEXT_NODE
+ && ["pre", "pre-wrap"].indexOf(getComputedStyle(startNode.parentNode).whiteSpace) == -1
+ && startOffset != 0
+ && /[ \xa0]/.test(startNode.data[startOffset - 1])) {
+ startOffset--;
+
+ // "Otherwise, break from this loop."
+ } else {
+ break;
+ }
+ }
+
+ // "Let end node equal start node and end offset equal start offset."
+ var endNode = startNode;
+ var endOffset = startOffset;
+
+ // "Let length equal zero."
+ var length = 0;
+
+ // "Let collapse spaces be true if start offset is zero and start node
+ // follows a line break, otherwise false."
+ var collapseSpaces = startOffset == 0 && followsLineBreak(startNode);
+
+ // "Repeat the following steps:"
+ while (true) {
+ // "If end node has a child in the same editing host with index end
+ // offset, set end node to that child, then set end offset to zero."
+ if (endOffset < endNode.childNodes.length
+ && inSameEditingHost(endNode, endNode.childNodes[endOffset])) {
+ endNode = endNode.childNodes[endOffset];
+ endOffset = 0;
+
+ // "Otherwise, if end offset is end node's length and end node does not
+ // precede a line break and end node's parent is in the same editing
+ // host, set end offset to one plus end node's index, then set end node
+ // to its parent."
+ } else if (endOffset == getNodeLength(endNode)
+ && !precedesLineBreak(endNode)
+ && inSameEditingHost(endNode, endNode.parentNode)) {
+ endOffset = 1 + getNodeIndex(endNode);
+ endNode = endNode.parentNode;
+
+ // "Otherwise, if end node is a Text node and its parent's resolved
+ // value for "white-space" is neither "pre" nor "pre-wrap" and end
+ // offset is not end node's length and the end offsetth element of
+ // end node's data is a space (0x0020) or non-breaking space (0x00A0):"
+ } else if (endNode.nodeType == Node.TEXT_NODE
+ && ["pre", "pre-wrap"].indexOf(getComputedStyle(endNode.parentNode).whiteSpace) == -1
+ && endOffset != getNodeLength(endNode)
+ && /[ \xa0]/.test(endNode.data[endOffset])) {
+ // "If fix collapsed space is true, and collapse spaces is true,
+ // and the end offsetth code unit of end node's data is a space
+ // (0x0020): call deleteData(end offset, 1) on end node, then
+ // continue this loop from the beginning."
+ if (fixCollapsedSpace
+ && collapseSpaces
+ && " " == endNode.data[endOffset]) {
+ endNode.deleteData(endOffset, 1);
+ continue;
+ }
+
+ // "Set collapse spaces to true if the end offsetth element of end
+ // node's data is a space (0x0020), false otherwise."
+ collapseSpaces = " " == endNode.data[endOffset];
+
+ // "Add one to end offset."
+ endOffset++;
+
+ // "Add one to length."
+ length++;
+
+ // "Otherwise, break from this loop."
+ } else {
+ break;
+ }
+ }
+
+ // "If fix collapsed space is true, then while (start node, start offset)
+ // is before (end node, end offset):"
+ if (fixCollapsedSpace) {
+ while (getPosition(startNode, startOffset, endNode, endOffset) == "before") {
+ // "If end node has a child in the same editing host with index end
+ // offset − 1, set end node to that child, then set end offset to end
+ // node's length."
+ if (0 <= endOffset - 1
+ && endOffset - 1 < endNode.childNodes.length
+ && inSameEditingHost(endNode, endNode.childNodes[endOffset - 1])) {
+ endNode = endNode.childNodes[endOffset - 1];
+ endOffset = getNodeLength(endNode);
+
+ // "Otherwise, if end offset is zero and end node's parent is in the
+ // same editing host, set end offset to end node's index, then set end
+ // node to its parent."
+ } else if (endOffset == 0
+ && inSameEditingHost(endNode, endNode.parentNode)) {
+ endOffset = getNodeIndex(endNode);
+ endNode = endNode.parentNode;
+
+ // "Otherwise, if end node is a Text node and its parent's resolved
+ // value for "white-space" is neither "pre" nor "pre-wrap" and end
+ // offset is end node's length and the last code unit of end node's
+ // data is a space (0x0020) and end node precedes a line break:"
+ } else if (endNode.nodeType == Node.TEXT_NODE
+ && ["pre", "pre-wrap"].indexOf(getComputedStyle(endNode.parentNode).whiteSpace) == -1
+ && endOffset == getNodeLength(endNode)
+ && endNode.data[endNode.data.length - 1] == " "
+ && precedesLineBreak(endNode)) {
+ // "Subtract one from end offset."
+ endOffset--;
+
+ // "Subtract one from length."
+ length--;
+
+ // "Call deleteData(end offset, 1) on end node."
+ endNode.deleteData(endOffset, 1);
+
+ // "Otherwise, break from this loop."
+ } else {
+ break;
+ }
+ }
+ }
+
+ // "Let replacement whitespace be the canonical space sequence of length
+ // length. non-breaking start is true if start offset is zero and start
+ // node follows a line break, and false otherwise. non-breaking end is true
+ // if end offset is end node's length and end node precedes a line break,
+ // and false otherwise."
+ var replacementWhitespace = canonicalSpaceSequence(length,
+ startOffset == 0 && followsLineBreak(startNode),
+ endOffset == getNodeLength(endNode) && precedesLineBreak(endNode));
+
+ // "While (start node, start offset) is before (end node, end offset):"
+ while (getPosition(startNode, startOffset, endNode, endOffset) == "before") {
+ // "If start node has a child with index start offset, set start node
+ // to that child, then set start offset to zero."
+ if (startOffset < startNode.childNodes.length) {
+ startNode = startNode.childNodes[startOffset];
+ startOffset = 0;
+
+ // "Otherwise, if start node is not a Text node or if start offset is
+ // start node's length, set start offset to one plus start node's
+ // index, then set start node to its parent."
+ } else if (startNode.nodeType != Node.TEXT_NODE
+ || startOffset == getNodeLength(startNode)) {
+ startOffset = 1 + getNodeIndex(startNode);
+ startNode = startNode.parentNode;
+
+ // "Otherwise:"
+ } else {
+ // "Remove the first element from replacement whitespace, and let
+ // element be that element."
+ var element = replacementWhitespace[0];
+ replacementWhitespace = replacementWhitespace.slice(1);
+
+ // "If element is not the same as the start offsetth element of
+ // start node's data:"
+ if (element != startNode.data[startOffset]) {
+ // "Call insertData(start offset, element) on start node."
+ startNode.insertData(startOffset, element);
+
+ // "Call deleteData(start offset + 1, 1) on start node."
+ startNode.deleteData(startOffset + 1, 1);
+ }
+
+ // "Add one to start offset."
+ startOffset++;
+ }
+ }
+}
+
+
+//@}
+///// Indenting and outdenting /////
+//@{
+
+function indentNodes(nodeList) {
+ // "If node list is empty, do nothing and abort these steps."
+ if (!nodeList.length) {
+ return;
+ }
+
+ // "Let first node be the first member of node list."
+ var firstNode = nodeList[0];
+
+ // "If first node's parent is an ol or ul:"
+ if (isHtmlElement(firstNode.parentNode, ["OL", "UL"])) {
+ // "Let tag be the local name of the parent of first node."
+ var tag = firstNode.parentNode.tagName;
+
+ // "Wrap node list, with sibling criteria returning true for an HTML
+ // element with local name tag and false otherwise, and new parent
+ // instructions returning the result of calling createElement(tag) on
+ // the ownerDocument of first node."
+ wrap(nodeList,
+ function(node) { return isHtmlElement(node, tag) },
+ function() { return firstNode.ownerDocument.createElement(tag) });
+
+ // "Abort these steps."
+ return;
+ }
+
+ // "Wrap node list, with sibling criteria returning true for a simple
+ // indentation element and false otherwise, and new parent instructions
+ // returning the result of calling createElement("blockquote") on the
+ // ownerDocument of first node. Let new parent be the result."
+ var newParent = wrap(nodeList,
+ function(node) { return isSimpleIndentationElement(node) },
+ function() { return firstNode.ownerDocument.createElement("blockquote") });
+
+ // "Fix disallowed ancestors of new parent."
+ fixDisallowedAncestors(newParent);
+}
+
+function outdentNode(node) {
+ // "If node is not editable, abort these steps."
+ if (!isEditable(node)) {
+ return;
+ }
+
+ // "If node is a simple indentation element, remove node, preserving its
+ // descendants. Then abort these steps."
+ if (isSimpleIndentationElement(node)) {
+ removePreservingDescendants(node);
+ return;
+ }
+
+ // "If node is an indentation element:"
+ if (isIndentationElement(node)) {
+ // "Unset the dir attribute of node, if any."
+ node.removeAttribute("dir");
+
+ // "Unset the margin, padding, and border CSS properties of node."
+ node.style.margin = "";
+ node.style.padding = "";
+ node.style.border = "";
+ if (node.getAttribute("style") == ""
+ // Crazy WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=68551
+ || node.getAttribute("style") == "border-width: initial; border-color: initial; ") {
+ node.removeAttribute("style");
+ }
+
+ // "Set the tag name of node to "div"."
+ setTagName(node, "div");
+
+ // "Abort these steps."
+ return;
+ }
+
+ // "Let current ancestor be node's parent."
+ var currentAncestor = node.parentNode;
+
+ // "Let ancestor list be a list of nodes, initially empty."
+ var ancestorList = [];
+
+ // "While current ancestor is an editable Element that is neither a simple
+ // indentation element nor an ol nor a ul, append current ancestor to
+ // ancestor list and then set current ancestor to its parent."
+ while (isEditable(currentAncestor)
+ && currentAncestor.nodeType == Node.ELEMENT_NODE
+ && !isSimpleIndentationElement(currentAncestor)
+ && !isHtmlElement(currentAncestor, ["ol", "ul"])) {
+ ancestorList.push(currentAncestor);
+ currentAncestor = currentAncestor.parentNode;
+ }
+
+ // "If current ancestor is not an editable simple indentation element:"
+ if (!isEditable(currentAncestor)
+ || !isSimpleIndentationElement(currentAncestor)) {
+ // "Let current ancestor be node's parent."
+ currentAncestor = node.parentNode;
+
+ // "Let ancestor list be the empty list."
+ ancestorList = [];
+
+ // "While current ancestor is an editable Element that is neither an
+ // indentation element nor an ol nor a ul, append current ancestor to
+ // ancestor list and then set current ancestor to its parent."
+ while (isEditable(currentAncestor)
+ && currentAncestor.nodeType == Node.ELEMENT_NODE
+ && !isIndentationElement(currentAncestor)
+ && !isHtmlElement(currentAncestor, ["ol", "ul"])) {
+ ancestorList.push(currentAncestor);
+ currentAncestor = currentAncestor.parentNode;
+ }
+ }
+
+ // "If node is an ol or ul and current ancestor is not an editable
+ // indentation element:"
+ if (isHtmlElement(node, ["OL", "UL"])
+ && (!isEditable(currentAncestor)
+ || !isIndentationElement(currentAncestor))) {
+ // "Unset the reversed, start, and type attributes of node, if any are
+ // set."
+ node.removeAttribute("reversed");
+ node.removeAttribute("start");
+ node.removeAttribute("type");
+
+ // "Let children be the children of node."
+ var children = [].slice.call(node.childNodes);
+
+ // "If node has attributes, and its parent is not an ol or ul, set the
+ // tag name of node to "div"."
+ if (node.attributes.length
+ && !isHtmlElement(node.parentNode, ["OL", "UL"])) {
+ setTagName(node, "div");
+
+ // "Otherwise:"
+ } else {
+ // "Record the values of node's children, and let values be the
+ // result."
+ var values = recordValues([].slice.call(node.childNodes));
+
+ // "Remove node, preserving its descendants."
+ removePreservingDescendants(node);
+
+ // "Restore the values from values."
+ restoreValues(values);
+ }
+
+ // "Fix disallowed ancestors of each member of children."
+ for (var i = 0; i < children.length; i++) {
+ fixDisallowedAncestors(children[i]);
+ }
+
+ // "Abort these steps."
+ return;
+ }
+
+ // "If current ancestor is not an editable indentation element, abort these
+ // steps."
+ if (!isEditable(currentAncestor)
+ || !isIndentationElement(currentAncestor)) {
+ return;
+ }
+
+ // "Append current ancestor to ancestor list."
+ ancestorList.push(currentAncestor);
+
+ // "Let original ancestor be current ancestor."
+ var originalAncestor = currentAncestor;
+
+ // "While ancestor list is not empty:"
+ while (ancestorList.length) {
+ // "Let current ancestor be the last member of ancestor list."
+ //
+ // "Remove the last member of ancestor list."
+ currentAncestor = ancestorList.pop();
+
+ // "Let target be the child of current ancestor that is equal to either
+ // node or the last member of ancestor list."
+ var target = node.parentNode == currentAncestor
+ ? node
+ : ancestorList[ancestorList.length - 1];
+
+ // "If target is an inline node that is not a br, and its nextSibling
+ // is a br, remove target's nextSibling from its parent."
+ if (isInlineNode(target)
+ && !isHtmlElement(target, "BR")
+ && isHtmlElement(target.nextSibling, "BR")) {
+ target.parentNode.removeChild(target.nextSibling);
+ }
+
+ // "Let preceding siblings be the preceding siblings of target, and let
+ // following siblings be the following siblings of target."
+ var precedingSiblings = [].slice.call(currentAncestor.childNodes, 0, getNodeIndex(target));
+ var followingSiblings = [].slice.call(currentAncestor.childNodes, 1 + getNodeIndex(target));
+
+ // "Indent preceding siblings."
+ indentNodes(precedingSiblings);
+
+ // "Indent following siblings."
+ indentNodes(followingSiblings);
+ }
+
+ // "Outdent original ancestor."
+ outdentNode(originalAncestor);
+}
+
+
+//@}
+///// Toggling lists /////
+//@{
+
+function toggleLists(tagName) {
+ // "Let mode be "disable" if the selection's list state is tag name, and
+ // "enable" otherwise."
+ var mode = getSelectionListState() == tagName ? "disable" : "enable";
+
+ var range = getActiveRange();
+ tagName = tagName.toUpperCase();
+
+ // "Let other tag name be "ol" if tag name is "ul", and "ul" if tag name is
+ // "ol"."
+ var otherTagName = tagName == "OL" ? "UL" : "OL";
+
+ // "Let items be a list of all lis that are ancestor containers of the
+ // range's start and/or end node."
+ //
+ // It's annoying to get this in tree order using functional stuff without
+ // doing getDescendants(document), which is slow, so I do it imperatively.
+ var items = [];
+ (function(){
+ for (
+ var ancestorContainer = range.endContainer;
+ ancestorContainer != range.commonAncestorContainer;
+ ancestorContainer = ancestorContainer.parentNode
+ ) {
+ if (isHtmlElement(ancestorContainer, "li")) {
+ items.unshift(ancestorContainer);
+ }
+ }
+ for (
+ var ancestorContainer = range.startContainer;
+ ancestorContainer;
+ ancestorContainer = ancestorContainer.parentNode
+ ) {
+ if (isHtmlElement(ancestorContainer, "li")) {
+ items.unshift(ancestorContainer);
+ }
+ }
+ })();
+
+ // "For each item in items, normalize sublists of item."
+ items.forEach(normalizeSublists);
+
+ // "Block-extend the range, and let new range be the result."
+ var newRange = blockExtend(range);
+
+ // "If mode is "enable", then let lists to convert consist of every
+ // editable HTML element with local name other tag name that is contained
+ // in new range, and for every list in lists to convert:"
+ if (mode == "enable") {
+ getAllContainedNodes(newRange, function(node) {
+ return isEditable(node)
+ && isHtmlElement(node, otherTagName);
+ }).forEach(function(list) {
+ // "If list's previousSibling or nextSibling is an editable HTML
+ // element with local name tag name:"
+ if ((isEditable(list.previousSibling) && isHtmlElement(list.previousSibling, tagName))
+ || (isEditable(list.nextSibling) && isHtmlElement(list.nextSibling, tagName))) {
+ // "Let children be list's children."
+ var children = [].slice.call(list.childNodes);
+
+ // "Record the values of children, and let values be the
+ // result."
+ var values = recordValues(children);
+
+ // "Split the parent of children."
+ splitParent(children);
+
+ // "Wrap children, with sibling criteria returning true for an
+ // HTML element with local name tag name and false otherwise."
+ wrap(children, function(node) { return isHtmlElement(node, tagName) });
+
+ // "Restore the values from values."
+ restoreValues(values);
+
+ // "Otherwise, set the tag name of list to tag name."
+ } else {
+ setTagName(list, tagName);
+ }
+ });
+ }
+
+ // "Let node list be a list of nodes, initially empty."
+ //
+ // "For each node node contained in new range, if node is editable; the
+ // last member of node list (if any) is not an ancestor of node; node
+ // is not an indentation element; and either node is an ol or ul, or its
+ // parent is an ol or ul, or it is an allowed child of "li"; then append
+ // node to node list."
+ var nodeList = getContainedNodes(newRange, function(node) {
+ return isEditable(node)
+ && !isIndentationElement(node)
+ && (isHtmlElement(node, ["OL", "UL"])
+ || isHtmlElement(node.parentNode, ["OL", "UL"])
+ || isAllowedChild(node, "li"));
+ });
+
+ // "If mode is "enable", remove from node list any ol or ul whose parent is
+ // not also an ol or ul."
+ if (mode == "enable") {
+ nodeList = nodeList.filter(function(node) {
+ return !isHtmlElement(node, ["ol", "ul"])
+ || isHtmlElement(node.parentNode, ["ol", "ul"]);
+ });
+ }
+
+ // "If mode is "disable", then while node list is not empty:"
+ if (mode == "disable") {
+ while (nodeList.length) {
+ // "Let sublist be an empty list of nodes."
+ var sublist = [];
+
+ // "Remove the first member from node list and append it to
+ // sublist."
+ sublist.push(nodeList.shift());
+
+ // "If the first member of sublist is an HTML element with local
+ // name tag name, outdent it and continue this loop from the
+ // beginning."
+ if (isHtmlElement(sublist[0], tagName)) {
+ outdentNode(sublist[0]);
+ continue;
+ }
+
+ // "While node list is not empty, and the first member of node list
+ // is the nextSibling of the last member of sublist and is not an
+ // HTML element with local name tag name, remove the first member
+ // from node list and append it to sublist."
+ while (nodeList.length
+ && nodeList[0] == sublist[sublist.length - 1].nextSibling
+ && !isHtmlElement(nodeList[0], tagName)) {
+ sublist.push(nodeList.shift());
+ }
+
+ // "Record the values of sublist, and let values be the result."
+ var values = recordValues(sublist);
+
+ // "Split the parent of sublist."
+ splitParent(sublist);
+
+ // "Fix disallowed ancestors of each member of sublist."
+ for (var i = 0; i < sublist.length; i++) {
+ fixDisallowedAncestors(sublist[i]);
+ }
+
+ // "Restore the values from values."
+ restoreValues(values);
+ }
+
+ // "Otherwise, while node list is not empty:"
+ } else {
+ while (nodeList.length) {
+ // "Let sublist be an empty list of nodes."
+ var sublist = [];
+
+ // "While either sublist is empty, or node list is not empty and
+ // its first member is the nextSibling of sublist's last member:"
+ while (!sublist.length
+ || (nodeList.length
+ && nodeList[0] == sublist[sublist.length - 1].nextSibling)) {
+ // "If node list's first member is a p or div, set the tag name
+ // of node list's first member to "li", and append the result
+ // to sublist. Remove the first member from node list."
+ if (isHtmlElement(nodeList[0], ["p", "div"])) {
+ sublist.push(setTagName(nodeList[0], "li"));
+ nodeList.shift();
+
+ // "Otherwise, if the first member of node list is an li or ol
+ // or ul, remove it from node list and append it to sublist."
+ } else if (isHtmlElement(nodeList[0], ["li", "ol", "ul"])) {
+ sublist.push(nodeList.shift());
+
+ // "Otherwise:"
+ } else {
+ // "Let nodes to wrap be a list of nodes, initially empty."
+ var nodesToWrap = [];
+
+ // "While nodes to wrap is empty, or node list is not empty
+ // and its first member is the nextSibling of nodes to
+ // wrap's last member and the first member of node list is
+ // an inline node and the last member of nodes to wrap is
+ // an inline node other than a br, remove the first member
+ // from node list and append it to nodes to wrap."
+ while (!nodesToWrap.length
+ || (nodeList.length
+ && nodeList[0] == nodesToWrap[nodesToWrap.length - 1].nextSibling
+ && isInlineNode(nodeList[0])
+ && isInlineNode(nodesToWrap[nodesToWrap.length - 1])
+ && !isHtmlElement(nodesToWrap[nodesToWrap.length - 1], "br"))) {
+ nodesToWrap.push(nodeList.shift());
+ }
+
+ // "Wrap nodes to wrap, with new parent instructions
+ // returning the result of calling createElement("li") on
+ // the context object. Append the result to sublist."
+ sublist.push(wrap(nodesToWrap,
+ undefined,
+ function() { return document.createElement("li") }));
+ }
+ }
+
+ // "If sublist's first member's parent is an HTML element with
+ // local name tag name, or if every member of sublist is an ol or
+ // ul, continue this loop from the beginning."
+ if (isHtmlElement(sublist[0].parentNode, tagName)
+ || sublist.every(function(node) { return isHtmlElement(node, ["ol", "ul"]) })) {
+ continue;
+ }
+
+ // "If sublist's first member's parent is an HTML element with
+ // local name other tag name:"
+ if (isHtmlElement(sublist[0].parentNode, otherTagName)) {
+ // "Record the values of sublist, and let values be the
+ // result."
+ var values = recordValues(sublist);
+
+ // "Split the parent of sublist."
+ splitParent(sublist);
+
+ // "Wrap sublist, with sibling criteria returning true for an
+ // HTML element with local name tag name and false otherwise,
+ // and new parent instructions returning the result of calling
+ // createElement(tag name) on the context object."
+ wrap(sublist,
+ function(node) { return isHtmlElement(node, tagName) },
+ function() { return document.createElement(tagName) });
+
+ // "Restore the values from values."
+ restoreValues(values);
+
+ // "Continue this loop from the beginning."
+ continue;
+ }
+
+ // "Wrap sublist, with sibling criteria returning true for an HTML
+ // element with local name tag name and false otherwise, and new
+ // parent instructions being the following:"
+ // . . .
+ // "Fix disallowed ancestors of the previous step's result."
+ fixDisallowedAncestors(wrap(sublist,
+ function(node) { return isHtmlElement(node, tagName) },
+ function() {
+ // "If sublist's first member's parent is not an editable
+ // simple indentation element, or sublist's first member's
+ // parent's previousSibling is not an editable HTML element
+ // with local name tag name, call createElement(tag name)
+ // on the context object and return the result."
+ if (!isEditable(sublist[0].parentNode)
+ || !isSimpleIndentationElement(sublist[0].parentNode)
+ || !isEditable(sublist[0].parentNode.previousSibling)
+ || !isHtmlElement(sublist[0].parentNode.previousSibling, tagName)) {
+ return document.createElement(tagName);
+ }
+
+ // "Let list be sublist's first member's parent's
+ // previousSibling."
+ var list = sublist[0].parentNode.previousSibling;
+
+ // "Normalize sublists of list's lastChild."
+ normalizeSublists(list.lastChild);
+
+ // "If list's lastChild is not an editable HTML element
+ // with local name tag name, call createElement(tag name)
+ // on the context object, and append the result as the last
+ // child of list."
+ if (!isEditable(list.lastChild)
+ || !isHtmlElement(list.lastChild, tagName)) {
+ list.appendChild(document.createElement(tagName));
+ }
+
+ // "Return the last child of list."
+ return list.lastChild;
+ }
+ ));
+ }
+ }
+}
+
+
+//@}
+///// Justifying the selection /////
+//@{
+
+function justifySelection(alignment) {
+ // "Block-extend the active range, and let new range be the result."
+ var newRange = blockExtend(globalRange);
+
+ // "Let element list be a list of all editable Elements contained in new
+ // range that either has an attribute in the HTML namespace whose local
+ // name is "align", or has a style attribute that sets "text-align", or is
+ // a center."
+ var elementList = getAllContainedNodes(newRange, function(node) {
+ return node.nodeType == Node.ELEMENT_NODE
+ && isEditable(node)
+ // Ignoring namespaces here
+ && (
+ node.hasAttribute("align")
+ || node.style.textAlign != ""
+ || isHtmlElement(node, "center")
+ );
+ });
+
+ // "For each element in element list:"
+ for (var i = 0; i < elementList.length; i++) {
+ var element = elementList[i];
+
+ // "If element has an attribute in the HTML namespace whose local name
+ // is "align", remove that attribute."
+ element.removeAttribute("align");
+
+ // "Unset the CSS property "text-align" on element, if it's set by a
+ // style attribute."
+ element.style.textAlign = "";
+ if (element.getAttribute("style") == "") {
+ element.removeAttribute("style");
+ }
+
+ // "If element is a div or span or center with no attributes, remove
+ // it, preserving its descendants."
+ if (isHtmlElement(element, ["div", "span", "center"])
+ && !element.attributes.length) {
+ removePreservingDescendants(element);
+ }
+
+ // "If element is a center with one or more attributes, set the tag
+ // name of element to "div"."
+ if (isHtmlElement(element, "center")
+ && element.attributes.length) {
+ setTagName(element, "div");
+ }
+ }
+
+ // "Block-extend the active range, and let new range be the result."
+ newRange = blockExtend(globalRange);
+
+ // "Let node list be a list of nodes, initially empty."
+ var nodeList = [];
+
+ // "For each node node contained in new range, append node to node list if
+ // the last member of node list (if any) is not an ancestor of node; node
+ // is editable; node is an allowed child of "div"; and node's alignment
+ // value is not alignment."
+ nodeList = getContainedNodes(newRange, function(node) {
+ return isEditable(node)
+ && isAllowedChild(node, "div")
+ && getAlignmentValue(node) != alignment;
+ });
+
+ // "While node list is not empty:"
+ while (nodeList.length) {
+ // "Let sublist be a list of nodes, initially empty."
+ var sublist = [];
+
+ // "Remove the first member of node list and append it to sublist."
+ sublist.push(nodeList.shift());
+
+ // "While node list is not empty, and the first member of node list is
+ // the nextSibling of the last member of sublist, remove the first
+ // member of node list and append it to sublist."
+ while (nodeList.length
+ && nodeList[0] == sublist[sublist.length - 1].nextSibling) {
+ sublist.push(nodeList.shift());
+ }
+
+ // "Wrap sublist. Sibling criteria returns true for any div that has
+ // one or both of the following two attributes and no other attributes,
+ // and false otherwise:"
+ //
+ // * "An align attribute whose value is an ASCII case-insensitive
+ // match for alignment.
+ // * "A style attribute which sets exactly one CSS property
+ // (including unrecognized or invalid attributes), which is
+ // "text-align", which is set to alignment.
+ //
+ // "New parent instructions are to call createElement("div") on the
+ // context object, then set its CSS property "text-align" to alignment
+ // and return the result."
+ wrap(sublist,
+ function(node) {
+ return isHtmlElement(node, "div")
+ && [].every.call(node.attributes, function(attr) {
+ return (attr.name == "align" && attr.value.toLowerCase() == alignment)
+ || (attr.name == "style" && node.style.length == 1 && node.style.textAlign == alignment);
+ });
+ },
+ function() {
+ var newParent = document.createElement("div");
+ newParent.setAttribute("style", "text-align: " + alignment);
+ return newParent;
+ }
+ );
+ }
+}
+
+
+//@}
+///// Automatic linking /////
+//@{
+// "An autolinkable URL is a string of the following form:"
+var autolinkableUrlRegexp =
+ // "Either a string matching the scheme pattern from RFC 3986 section 3.1
+ // followed by the literal string ://, or the literal string mailto:;
+ // followed by"
+ //
+ // From the RFC: scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
+ "([a-zA-Z][a-zA-Z0-9+.-]*://|mailto:)"
+ // "Zero or more characters other than space characters; followed by"
+ + "[^ \t\n\f\r]*"
+ // "A character that is not one of the ASCII characters !"'(),-.:;<>[]`{}."
+ + "[^!\"'(),\\-.:;<>[\\]`{}]";
+
+// "A valid e-mail address is a string that matches the ABNF production 1*(
+// atext / "." ) "@" ldh-str *( "." ldh-str ) where atext is defined in RFC
+// 5322 section 3.2.3, and ldh-str is defined in RFC 1034 section 3.5."
+//
+// atext: ALPHA / DIGIT / "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" /
+// "/" / "=" / "?" / "^" / "_" / "`" / "{" / "|" / "}" / "~"
+//
+//<ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>
+//<let-dig-hyp> ::= <let-dig> | "-"
+//<let-dig> ::= <letter> | <digit>
+var validEmailRegexp =
+ "[a-zA-Z0-9!#$%&'*+\\-/=?^_`{|}~.]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*";
+
+function autolink(node, endOffset) {
+ // "While (node, end offset)'s previous equivalent point is not null, set
+ // it to its previous equivalent point."
+ while (getPreviousEquivalentPoint(node, endOffset)) {
+ var prev = getPreviousEquivalentPoint(node, endOffset);
+ node = prev[0];
+ endOffset = prev[1];
+ }
+
+ // "If node is not a Text node, or has an a ancestor, do nothing and abort
+ // these steps."
+ if (node.nodeType != Node.TEXT_NODE
+ || getAncestors(node).some(function(ancestor) { return isHtmlElement(ancestor, "a") })) {
+ return;
+ }
+
+ // "Let search be the largest substring of node's data whose end is end
+ // offset and that contains no space characters."
+ var search = /[^ \t\n\f\r]*$/.exec(node.substringData(0, endOffset))[0];
+
+ // "If some substring of search is an autolinkable URL:"
+ if (new RegExp(autolinkableUrlRegexp).test(search)) {
+ // "While there is no substring of node's data ending at end offset
+ // that is an autolinkable URL, decrement end offset."
+ while (!(new RegExp(autolinkableUrlRegexp + "$").test(node.substringData(0, endOffset)))) {
+ endOffset--;
+ }
+
+ // "Let start offset be the start index of the longest substring of
+ // node's data that is an autolinkable URL ending at end offset."
+ var startOffset = new RegExp(autolinkableUrlRegexp + "$").exec(node.substringData(0, endOffset)).index;
+
+ // "Let href be the substring of node's data starting at start offset
+ // and ending at end offset."
+ var href = node.substringData(startOffset, endOffset - startOffset);
+
+ // "Otherwise, if some substring of search is a valid e-mail address:"
+ } else if (new RegExp(validEmailRegexp).test(search)) {
+ // "While there is no substring of node's data ending at end offset
+ // that is a valid e-mail address, decrement end offset."
+ while (!(new RegExp(validEmailRegexp + "$").test(node.substringData(0, endOffset)))) {
+ endOffset--;
+ }
+
+ // "Let start offset be the start index of the longest substring of
+ // node's data that is a valid e-mail address ending at end offset."
+ var startOffset = new RegExp(validEmailRegexp + "$").exec(node.substringData(0, endOffset)).index;
+
+ // "Let href be "mailto:" concatenated with the substring of node's
+ // data starting at start offset and ending at end offset."
+ var href = "mailto:" + node.substringData(startOffset, endOffset - startOffset);
+
+ // "Otherwise, do nothing and abort these steps."
+ } else {
+ return;
+ }
+
+ // "Let original range be the active range."
+ var originalRange = getActiveRange();
+
+ // "Create a new range with start (node, start offset) and end (node, end
+ // offset), and set the context object's selection's range to it."
+ var newRange = document.createRange();
+ newRange.setStart(node, startOffset);
+ newRange.setEnd(node, endOffset);
+ getSelection().removeAllRanges();
+ getSelection().addRange(newRange);
+ globalRange = newRange;
+
+ // "Take the action for "createLink", with value equal to href."
+ commands.createlink.action(href);
+
+ // "Set the context object's selection's range to original range."
+ getSelection().removeAllRanges();
+ getSelection().addRange(originalRange);
+ globalRange = originalRange;
+}
+//@}
+///// The delete command /////
+//@{
+commands["delete"] = {
+ preservesOverrides: true,
+ action: function() {
+ // "If the active range is not collapsed, delete the selection and
+ // return true."
+ if (!getActiveRange().collapsed) {
+ deleteSelection();
+ return true;
+ }
+
+ // "Canonicalize whitespace at the active range's start."
+ canonicalizeWhitespace(getActiveRange().startContainer, getActiveRange().startOffset);
+
+ // "Let node and offset be the active range's start node and offset."
+ var node = getActiveRange().startContainer;
+ var offset = getActiveRange().startOffset;
+
+ // "Repeat the following steps:"
+ while (true) {
+ // "If offset is zero and node's previousSibling is an editable
+ // invisible node, remove node's previousSibling from its parent."
+ if (offset == 0
+ && isEditable(node.previousSibling)
+ && isInvisible(node.previousSibling)) {
+ node.parentNode.removeChild(node.previousSibling);
+
+ // "Otherwise, if node has a child with index offset − 1 and that
+ // child is an editable invisible node, remove that child from
+ // node, then subtract one from offset."
+ } else if (0 <= offset - 1
+ && offset - 1 < node.childNodes.length
+ && isEditable(node.childNodes[offset - 1])
+ && isInvisible(node.childNodes[offset - 1])) {
+ node.removeChild(node.childNodes[offset - 1]);
+ offset--;
+
+ // "Otherwise, if offset is zero and node is an inline node, or if
+ // node is an invisible node, set offset to the index of node, then
+ // set node to its parent."
+ } else if ((offset == 0
+ && isInlineNode(node))
+ || isInvisible(node)) {
+ offset = getNodeIndex(node);
+ node = node.parentNode;
+
+ // "Otherwise, if node has a child with index offset − 1 and that
+ // child is an editable a, remove that child from node, preserving
+ // its descendants. Then return true."
+ } else if (0 <= offset - 1
+ && offset - 1 < node.childNodes.length
+ && isEditable(node.childNodes[offset - 1])
+ && isHtmlElement(node.childNodes[offset - 1], "a")) {
+ removePreservingDescendants(node.childNodes[offset - 1]);
+ return true;
+
+ // "Otherwise, if node has a child with index offset − 1 and that
+ // child is not a block node or a br or an img, set node to that
+ // child, then set offset to the length of node."
+ } else if (0 <= offset - 1
+ && offset - 1 < node.childNodes.length
+ && !isBlockNode(node.childNodes[offset - 1])
+ && !isHtmlElement(node.childNodes[offset - 1], ["br", "img"])) {
+ node = node.childNodes[offset - 1];
+ offset = getNodeLength(node);
+
+ // "Otherwise, break from this loop."
+ } else {
+ break;
+ }
+ }
+
+ // "If node is a Text node and offset is not zero, or if node is a
+ // block node that has a child with index offset − 1 and that child is
+ // a br or hr or img:"
+ if ((node.nodeType == Node.TEXT_NODE
+ && offset != 0)
+ || (isBlockNode(node)
+ && 0 <= offset - 1
+ && offset - 1 < node.childNodes.length
+ && isHtmlElement(node.childNodes[offset - 1], ["br", "hr", "img"]))) {
+ // "Call collapse(node, offset) on the context object's Selection."
+ getSelection().collapse(node, offset);
+ getActiveRange().setEnd(node, offset);
+
+ // "Call extend(node, offset − 1) on the context object's
+ // Selection."
+ getSelection().extend(node, offset - 1);
+ getActiveRange().setStart(node, offset - 1);
+
+ // "Delete the selection."
+ deleteSelection();
+
+ // "Return true."
+ return true;
+ }
+
+ // "If node is an inline node, return true."
+ if (isInlineNode(node)) {
+ return true;
+ }
+
+ // "If node is an li or dt or dd and is the first child of its parent,
+ // and offset is zero:"
+ if (isHtmlElement(node, ["li", "dt", "dd"])
+ && node == node.parentNode.firstChild
+ && offset == 0) {
+ // "Let items be a list of all lis that are ancestors of node."
+ //
+ // Remember, must be in tree order.
+ var items = [];
+ for (var ancestor = node.parentNode; ancestor; ancestor = ancestor.parentNode) {
+ if (isHtmlElement(ancestor, "li")) {
+ items.unshift(ancestor);
+ }
+ }
+
+ // "Normalize sublists of each item in items."
+ for (var i = 0; i < items.length; i++) {
+ normalizeSublists(items[i]);
+ }
+
+ // "Record the values of the one-node list consisting of node, and
+ // let values be the result."
+ var values = recordValues([node]);
+
+ // "Split the parent of the one-node list consisting of node."
+ splitParent([node]);
+
+ // "Restore the values from values."
+ restoreValues(values);
+
+ // "If node is a dd or dt, and it is not an allowed child of any of
+ // its ancestors in the same editing host, set the tag name of node
+ // to the default single-line container name and let node be the
+ // result."
+ if (isHtmlElement(node, ["dd", "dt"])
+ && getAncestors(node).every(function(ancestor) {
+ return !inSameEditingHost(node, ancestor)
+ || !isAllowedChild(node, ancestor)
+ })) {
+ node = setTagName(node, defaultSingleLineContainerName);
+ }
+
+ // "Fix disallowed ancestors of node."
+ fixDisallowedAncestors(node);
+
+ // "Return true."
+ return true;
+ }
+
+ // "Let start node equal node and let start offset equal offset."
+ var startNode = node;
+ var startOffset = offset;
+
+ // "Repeat the following steps:"
+ while (true) {
+ // "If start offset is zero, set start offset to the index of start
+ // node and then set start node to its parent."
+ if (startOffset == 0) {
+ startOffset = getNodeIndex(startNode);
+ startNode = startNode.parentNode;
+
+ // "Otherwise, if start node has an editable invisible child with
+ // index start offset minus one, remove it from start node and
+ // subtract one from start offset."
+ } else if (0 <= startOffset - 1
+ && startOffset - 1 < startNode.childNodes.length
+ && isEditable(startNode.childNodes[startOffset - 1])
+ && isInvisible(startNode.childNodes[startOffset - 1])) {
+ startNode.removeChild(startNode.childNodes[startOffset - 1]);
+ startOffset--;
+
+ // "Otherwise, break from this loop."
+ } else {
+ break;
+ }
+ }
+
+ // "If offset is zero, and node has an editable ancestor container in
+ // the same editing host that's an indentation element:"
+ if (offset == 0
+ && getAncestors(node).concat(node).filter(function(ancestor) {
+ return isEditable(ancestor)
+ && inSameEditingHost(ancestor, node)
+ && isIndentationElement(ancestor);
+ }).length) {
+ // "Block-extend the range whose start and end are both (node, 0),
+ // and let new range be the result."
+ var newRange = document.createRange();
+ newRange.setStart(node, 0);
+ newRange = blockExtend(newRange);
+
+ // "Let node list be a list of nodes, initially empty."
+ //
+ // "For each node current node contained in new range, append
+ // current node to node list if the last member of node list (if
+ // any) is not an ancestor of current node, and current node is
+ // editable but has no editable descendants."
+ var nodeList = getContainedNodes(newRange, function(currentNode) {
+ return isEditable(currentNode)
+ && !hasEditableDescendants(currentNode);
+ });
+
+ // "Outdent each node in node list."
+ for (var i = 0; i < nodeList.length; i++) {
+ outdentNode(nodeList[i]);
+ }
+
+ // "Return true."
+ return true;
+ }
+
+ // "If the child of start node with index start offset is a table,
+ // return true."
+ if (isHtmlElement(startNode.childNodes[startOffset], "table")) {
+ return true;
+ }
+
+ // "If start node has a child with index start offset − 1, and that
+ // child is a table:"
+ if (0 <= startOffset - 1
+ && startOffset - 1 < startNode.childNodes.length
+ && isHtmlElement(startNode.childNodes[startOffset - 1], "table")) {
+ // "Call collapse(start node, start offset − 1) on the context
+ // object's Selection."
+ getSelection().collapse(startNode, startOffset - 1);
+ getActiveRange().setStart(startNode, startOffset - 1);
+
+ // "Call extend(start node, start offset) on the context object's
+ // Selection."
+ getSelection().extend(startNode, startOffset);
+ getActiveRange().setEnd(startNode, startOffset);
+
+ // "Return true."
+ return true;
+ }
+
+ // "If offset is zero; and either the child of start node with index
+ // start offset minus one is an hr, or the child is a br whose
+ // previousSibling is either a br or not an inline node:"
+ if (offset == 0
+ && (isHtmlElement(startNode.childNodes[startOffset - 1], "hr")
+ || (
+ isHtmlElement(startNode.childNodes[startOffset - 1], "br")
+ && (
+ isHtmlElement(startNode.childNodes[startOffset - 1].previousSibling, "br")
+ || !isInlineNode(startNode.childNodes[startOffset - 1].previousSibling)
+ )
+ )
+ )) {
+ // "Call collapse(start node, start offset − 1) on the context
+ // object's Selection."
+ getSelection().collapse(startNode, startOffset - 1);
+ getActiveRange().setStart(startNode, startOffset - 1);
+
+ // "Call extend(start node, start offset) on the context object's
+ // Selection."
+ getSelection().extend(startNode, startOffset);
+ getActiveRange().setEnd(startNode, startOffset);
+
+ // "Delete the selection."
+ deleteSelection();
+
+ // "Call collapse(node, offset) on the Selection."
+ getSelection().collapse(node, offset);
+ getActiveRange().setStart(node, offset);
+ getActiveRange().collapse(true);
+
+ // "Return true."
+ return true;
+ }
+
+ // "If the child of start node with index start offset is an li or dt
+ // or dd, and that child's firstChild is an inline node, and start
+ // offset is not zero:"
+ if (isHtmlElement(startNode.childNodes[startOffset], ["li", "dt", "dd"])
+ && isInlineNode(startNode.childNodes[startOffset].firstChild)
+ && startOffset != 0) {
+ // "Let previous item be the child of start node with index start
+ // offset minus one."
+ var previousItem = startNode.childNodes[startOffset - 1];
+
+ // "If previous item's lastChild is an inline node other than a br,
+ // call createElement("br") on the context object and append the
+ // result as the last child of previous item."
+ if (isInlineNode(previousItem.lastChild)
+ && !isHtmlElement(previousItem.lastChild, "br")) {
+ previousItem.appendChild(document.createElement("br"));
+ }
+
+ // "If previous item's lastChild is an inline node, call
+ // createElement("br") on the context object and append the result
+ // as the last child of previous item."
+ if (isInlineNode(previousItem.lastChild)) {
+ previousItem.appendChild(document.createElement("br"));
+ }
+ }
+
+ // "If start node's child with index start offset is an li or dt or dd,
+ // and that child's previousSibling is also an li or dt or dd:"
+ if (isHtmlElement(startNode.childNodes[startOffset], ["li", "dt", "dd"])
+ && isHtmlElement(startNode.childNodes[startOffset].previousSibling, ["li", "dt", "dd"])) {
+ // "Call cloneRange() on the active range, and let original range
+ // be the result."
+ //
+ // We need to add it to extraRanges so it will actually get updated
+ // when moving preserving ranges.
+ var originalRange = getActiveRange().cloneRange();
+ extraRanges.push(originalRange);
+
+ // "Set start node to its child with index start offset − 1."
+ startNode = startNode.childNodes[startOffset - 1];
+
+ // "Set start offset to start node's length."
+ startOffset = getNodeLength(startNode);
+
+ // "Set node to start node's nextSibling."
+ node = startNode.nextSibling;
+
+ // "Call collapse(start node, start offset) on the context object's
+ // Selection."
+ getSelection().collapse(startNode, startOffset);
+ getActiveRange().setStart(startNode, startOffset);
+
+ // "Call extend(node, 0) on the context object's Selection."
+ getSelection().extend(node, 0);
+ getActiveRange().setEnd(node, 0);
+
+ // "Delete the selection."
+ deleteSelection();
+
+ // "Call removeAllRanges() on the context object's Selection."
+ getSelection().removeAllRanges();
+
+ // "Call addRange(original range) on the context object's
+ // Selection."
+ getSelection().addRange(originalRange);
+ getActiveRange().setStart(originalRange.startContainer, originalRange.startOffset);
+ getActiveRange().setEnd(originalRange.endContainer, originalRange.endOffset);
+
+ // "Return true."
+ extraRanges.pop();
+ return true;
+ }
+
+ // "While start node has a child with index start offset minus one:"
+ while (0 <= startOffset - 1
+ && startOffset - 1 < startNode.childNodes.length) {
+ // "If start node's child with index start offset minus one is
+ // editable and invisible, remove it from start node, then subtract
+ // one from start offset."
+ if (isEditable(startNode.childNodes[startOffset - 1])
+ && isInvisible(startNode.childNodes[startOffset - 1])) {
+ startNode.removeChild(startNode.childNodes[startOffset - 1]);
+ startOffset--;
+
+ // "Otherwise, set start node to its child with index start offset
+ // minus one, then set start offset to the length of start node."
+ } else {
+ startNode = startNode.childNodes[startOffset - 1];
+ startOffset = getNodeLength(startNode);
+ }
+ }
+
+ // "Call collapse(start node, start offset) on the context object's
+ // Selection."
+ getSelection().collapse(startNode, startOffset);
+ getActiveRange().setStart(startNode, startOffset);
+
+ // "Call extend(node, offset) on the context object's Selection."
+ getSelection().extend(node, offset);
+ getActiveRange().setEnd(node, offset);
+
+ // "Delete the selection, with direction "backward"."
+ deleteSelection({direction: "backward"});
+
+ // "Return true."
+ return true;
+ }
+};
+
+//@}
+///// The formatBlock command /////
+//@{
+// "A formattable block name is "address", "dd", "div", "dt", "h1", "h2", "h3",
+// "h4", "h5", "h6", "p", or "pre"."
+var formattableBlockNames = ["address", "dd", "div", "dt", "h1", "h2", "h3",
+ "h4", "h5", "h6", "p", "pre"];
+
+commands.formatblock = {
+ preservesOverrides: true,
+ action: function(value) {
+ // "If value begins with a "<" character and ends with a ">" character,
+ // remove the first and last characters from it."
+ if (/^<.*>$/.test(value)) {
+ value = value.slice(1, -1);
+ }
+
+ // "Let value be converted to ASCII lowercase."
+ value = value.toLowerCase();
+
+ // "If value is not a formattable block name, return false."
+ if (formattableBlockNames.indexOf(value) == -1) {
+ return false;
+ }
+
+ // "Block-extend the active range, and let new range be the result."
+ var newRange = blockExtend(getActiveRange());
+
+ // "Let node list be an empty list of nodes."
+ //
+ // "For each node node contained in new range, append node to node list
+ // if it is editable, the last member of original node list (if any) is
+ // not an ancestor of node, node is either a non-list single-line
+ // container or an allowed child of "p" or a dd or dt, and node is not
+ // the ancestor of a prohibited paragraph child."
+ var nodeList = getContainedNodes(newRange, function(node) {
+ return isEditable(node)
+ && (isNonListSingleLineContainer(node)
+ || isAllowedChild(node, "p")
+ || isHtmlElement(node, ["dd", "dt"]))
+ && !getDescendants(node).some(isProhibitedParagraphChild);
+ });
+
+ // "Record the values of node list, and let values be the result."
+ var values = recordValues(nodeList);
+
+ // "For each node in node list, while node is the descendant of an
+ // editable HTML element in the same editing host, whose local name is
+ // a formattable block name, and which is not the ancestor of a
+ // prohibited paragraph child, split the parent of the one-node list
+ // consisting of node."
+ for (var i = 0; i < nodeList.length; i++) {
+ var node = nodeList[i];
+ while (getAncestors(node).some(function(ancestor) {
+ return isEditable(ancestor)
+ && inSameEditingHost(ancestor, node)
+ && isHtmlElement(ancestor, formattableBlockNames)
+ && !getDescendants(ancestor).some(isProhibitedParagraphChild);
+ })) {
+ splitParent([node]);
+ }
+ }
+
+ // "Restore the values from values."
+ restoreValues(values);
+
+ // "While node list is not empty:"
+ while (nodeList.length) {
+ var sublist;
+
+ // "If the first member of node list is a single-line
+ // container:"
+ if (isSingleLineContainer(nodeList[0])) {
+ // "Let sublist be the children of the first member of node
+ // list."
+ sublist = [].slice.call(nodeList[0].childNodes);
+
+ // "Record the values of sublist, and let values be the
+ // result."
+ var values = recordValues(sublist);
+
+ // "Remove the first member of node list from its parent,
+ // preserving its descendants."
+ removePreservingDescendants(nodeList[0]);
+
+ // "Restore the values from values."
+ restoreValues(values);
+
+ // "Remove the first member from node list."
+ nodeList.shift();
+
+ // "Otherwise:"
+ } else {
+ // "Let sublist be an empty list of nodes."
+ sublist = [];
+
+ // "Remove the first member of node list and append it to
+ // sublist."
+ sublist.push(nodeList.shift());
+
+ // "While node list is not empty, and the first member of
+ // node list is the nextSibling of the last member of
+ // sublist, and the first member of node list is not a
+ // single-line container, and the last member of sublist is
+ // not a br, remove the first member of node list and
+ // append it to sublist."
+ while (nodeList.length
+ && nodeList[0] == sublist[sublist.length - 1].nextSibling
+ && !isSingleLineContainer(nodeList[0])
+ && !isHtmlElement(sublist[sublist.length - 1], "BR")) {
+ sublist.push(nodeList.shift());
+ }
+ }
+
+ // "Wrap sublist. If value is "div" or "p", sibling criteria
+ // returns false; otherwise it returns true for an HTML element
+ // with local name value and no attributes, and false otherwise.
+ // New parent instructions return the result of running
+ // createElement(value) on the context object. Then fix disallowed
+ // ancestors of the result."
+ fixDisallowedAncestors(wrap(sublist,
+ ["div", "p"].indexOf(value) == - 1
+ ? function(node) { return isHtmlElement(node, value) && !node.attributes.length }
+ : function() { return false },
+ function() { return document.createElement(value) }));
+ }
+
+ // "Return true."
+ return true;
+ }, indeterm: function() {
+ // "If the active range is null, return false."
+ if (!getActiveRange()) {
+ return false;
+ }
+
+ // "Block-extend the active range, and let new range be the result."
+ var newRange = blockExtend(getActiveRange());
+
+ // "Let node list be all visible editable nodes that are contained in
+ // new range and have no children."
+ var nodeList = getAllContainedNodes(newRange, function(node) {
+ return isVisible(node)
+ && isEditable(node)
+ && !node.hasChildNodes();
+ });
+
+ // "If node list is empty, return false."
+ if (!nodeList.length) {
+ return false;
+ }
+
+ // "Let type be null."
+ var type = null;
+
+ // "For each node in node list:"
+ for (var i = 0; i < nodeList.length; i++) {
+ var node = nodeList[i];
+
+ // "While node's parent is editable and in the same editing host as
+ // node, and node is not an HTML element whose local name is a
+ // formattable block name, set node to its parent."
+ while (isEditable(node.parentNode)
+ && inSameEditingHost(node, node.parentNode)
+ && !isHtmlElement(node, formattableBlockNames)) {
+ node = node.parentNode;
+ }
+
+ // "Let current type be the empty string."
+ var currentType = "";
+
+ // "If node is an editable HTML element whose local name is a
+ // formattable block name, and node is not the ancestor of a
+ // prohibited paragraph child, set current type to node's local
+ // name."
+ if (isEditable(node)
+ && isHtmlElement(node, formattableBlockNames)
+ && !getDescendants(node).some(isProhibitedParagraphChild)) {
+ currentType = node.tagName;
+ }
+
+ // "If type is null, set type to current type."
+ if (type === null) {
+ type = currentType;
+
+ // "Otherwise, if type does not equal current type, return true."
+ } else if (type != currentType) {
+ return true;
+ }
+ }
+
+ // "Return false."
+ return false;
+ }, value: function() {
+ // "If the active range is null, return the empty string."
+ if (!getActiveRange()) {
+ return "";
+ }
+
+ // "Block-extend the active range, and let new range be the result."
+ var newRange = blockExtend(getActiveRange());
+
+ // "Let node be the first visible editable node that is contained in
+ // new range and has no children. If there is no such node, return the
+ // empty string."
+ var nodes = getAllContainedNodes(newRange, function(node) {
+ return isVisible(node)
+ && isEditable(node)
+ && !node.hasChildNodes();
+ });
+ if (!nodes.length) {
+ return "";
+ }
+ var node = nodes[0];
+
+ // "While node's parent is editable and in the same editing host as
+ // node, and node is not an HTML element whose local name is a
+ // formattable block name, set node to its parent."
+ while (isEditable(node.parentNode)
+ && inSameEditingHost(node, node.parentNode)
+ && !isHtmlElement(node, formattableBlockNames)) {
+ node = node.parentNode;
+ }
+
+ // "If node is an editable HTML element whose local name is a
+ // formattable block name, and node is not the ancestor of a prohibited
+ // paragraph child, return node's local name, converted to ASCII
+ // lowercase."
+ if (isEditable(node)
+ && isHtmlElement(node, formattableBlockNames)
+ && !getDescendants(node).some(isProhibitedParagraphChild)) {
+ return node.tagName.toLowerCase();
+ }
+
+ // "Return the empty string."
+ return "";
+ }
+};
+
+//@}
+///// The forwardDelete command /////
+//@{
+commands.forwarddelete = {
+ preservesOverrides: true,
+ action: function() {
+ // "If the active range is not collapsed, delete the selection and
+ // return true."
+ if (!getActiveRange().collapsed) {
+ deleteSelection();
+ return true;
+ }
+
+ // "Canonicalize whitespace at the active range's start."
+ canonicalizeWhitespace(getActiveRange().startContainer, getActiveRange().startOffset);
+
+ // "Let node and offset be the active range's start node and offset."
+ var node = getActiveRange().startContainer;
+ var offset = getActiveRange().startOffset;
+
+ // "Repeat the following steps:"
+ while (true) {
+ // "If offset is the length of node and node's nextSibling is an
+ // editable invisible node, remove node's nextSibling from its
+ // parent."
+ if (offset == getNodeLength(node)
+ && isEditable(node.nextSibling)
+ && isInvisible(node.nextSibling)) {
+ node.parentNode.removeChild(node.nextSibling);
+
+ // "Otherwise, if node has a child with index offset and that child
+ // is an editable invisible node, remove that child from node."
+ } else if (offset < node.childNodes.length
+ && isEditable(node.childNodes[offset])
+ && isInvisible(node.childNodes[offset])) {
+ node.removeChild(node.childNodes[offset]);
+
+ // "Otherwise, if offset is the length of node and node is an
+ // inline node, or if node is invisible, set offset to one plus the
+ // index of node, then set node to its parent."
+ } else if ((offset == getNodeLength(node)
+ && isInlineNode(node))
+ || isInvisible(node)) {
+ offset = 1 + getNodeIndex(node);
+ node = node.parentNode;
+
+ // "Otherwise, if node has a child with index offset and that child
+ // is neither a block node nor a br nor an img nor a collapsed
+ // block prop, set node to that child, then set offset to zero."
+ } else if (offset < node.childNodes.length
+ && !isBlockNode(node.childNodes[offset])
+ && !isHtmlElement(node.childNodes[offset], ["br", "img"])
+ && !isCollapsedBlockProp(node.childNodes[offset])) {
+ node = node.childNodes[offset];
+ offset = 0;
+
+ // "Otherwise, break from this loop."
+ } else {
+ break;
+ }
+ }
+
+ // "If node is a Text node and offset is not node's length:"
+ if (node.nodeType == Node.TEXT_NODE
+ && offset != getNodeLength(node)) {
+ // "Let end offset be offset plus one."
+ var endOffset = offset + 1;
+
+ // "While end offset is not node's length and the end offsetth
+ // element of node's data has general category M when interpreted
+ // as a Unicode code point, add one to end offset."
+ //
+ // TODO: Not even going to try handling anything beyond the most
+ // basic combining marks, since I couldn't find a good list. I
+ // special-case a few Hebrew diacritics too to test basic coverage
+ // of non-Latin stuff.
+ while (endOffset != node.length
+ && /^[\u0300-\u036f\u0591-\u05bd\u05c1\u05c2]$/.test(node.data[endOffset])) {
+ endOffset++;
+ }
+
+ // "Call collapse(node, offset) on the context object's Selection."
+ getSelection().collapse(node, offset);
+ getActiveRange().setStart(node, offset);
+
+ // "Call extend(node, end offset) on the context object's
+ // Selection."
+ getSelection().extend(node, endOffset);
+ getActiveRange().setEnd(node, endOffset);
+
+ // "Delete the selection."
+ deleteSelection();
+
+ // "Return true."
+ return true;
+ }
+
+ // "If node is an inline node, return true."
+ if (isInlineNode(node)) {
+ return true;
+ }
+
+ // "If node has a child with index offset and that child is a br or hr
+ // or img, but is not a collapsed block prop:"
+ if (offset < node.childNodes.length
+ && isHtmlElement(node.childNodes[offset], ["br", "hr", "img"])
+ && !isCollapsedBlockProp(node.childNodes[offset])) {
+ // "Call collapse(node, offset) on the context object's Selection."
+ getSelection().collapse(node, offset);
+ getActiveRange().setStart(node, offset);
+
+ // "Call extend(node, offset + 1) on the context object's
+ // Selection."
+ getSelection().extend(node, offset + 1);
+ getActiveRange().setEnd(node, offset + 1);
+
+ // "Delete the selection."
+ deleteSelection();
+
+ // "Return true."
+ return true;
+ }
+
+ // "Let end node equal node and let end offset equal offset."
+ var endNode = node;
+ var endOffset = offset;
+
+ // "If end node has a child with index end offset, and that child is a
+ // collapsed block prop, add one to end offset."
+ if (endOffset < endNode.childNodes.length
+ && isCollapsedBlockProp(endNode.childNodes[endOffset])) {
+ endOffset++;
+ }
+
+ // "Repeat the following steps:"
+ while (true) {
+ // "If end offset is the length of end node, set end offset to one
+ // plus the index of end node and then set end node to its parent."
+ if (endOffset == getNodeLength(endNode)) {
+ endOffset = 1 + getNodeIndex(endNode);
+ endNode = endNode.parentNode;
+
+ // "Otherwise, if end node has a an editable invisible child with
+ // index end offset, remove it from end node."
+ } else if (endOffset < endNode.childNodes.length
+ && isEditable(endNode.childNodes[endOffset])
+ && isInvisible(endNode.childNodes[endOffset])) {
+ endNode.removeChild(endNode.childNodes[endOffset]);
+
+ // "Otherwise, break from this loop."
+ } else {
+ break;
+ }
+ }
+
+ // "If the child of end node with index end offset minus one is a
+ // table, return true."
+ if (isHtmlElement(endNode.childNodes[endOffset - 1], "table")) {
+ return true;
+ }
+
+ // "If the child of end node with index end offset is a table:"
+ if (isHtmlElement(endNode.childNodes[endOffset], "table")) {
+ // "Call collapse(end node, end offset) on the context object's
+ // Selection."
+ getSelection().collapse(endNode, endOffset);
+ getActiveRange().setStart(endNode, endOffset);
+
+ // "Call extend(end node, end offset + 1) on the context object's
+ // Selection."
+ getSelection().extend(endNode, endOffset + 1);
+ getActiveRange().setEnd(endNode, endOffset + 1);
+
+ // "Return true."
+ return true;
+ }
+
+ // "If offset is the length of node, and the child of end node with
+ // index end offset is an hr or br:"
+ if (offset == getNodeLength(node)
+ && isHtmlElement(endNode.childNodes[endOffset], ["br", "hr"])) {
+ // "Call collapse(end node, end offset) on the context object's
+ // Selection."
+ getSelection().collapse(endNode, endOffset);
+ getActiveRange().setStart(endNode, endOffset);
+
+ // "Call extend(end node, end offset + 1) on the context object's
+ // Selection."
+ getSelection().extend(endNode, endOffset + 1);
+ getActiveRange().setEnd(endNode, endOffset + 1);
+
+ // "Delete the selection."
+ deleteSelection();
+
+ // "Call collapse(node, offset) on the Selection."
+ getSelection().collapse(node, offset);
+ getActiveRange().setStart(node, offset);
+ getActiveRange().collapse(true);
+
+ // "Return true."
+ return true;
+ }
+
+ // "While end node has a child with index end offset:"
+ while (endOffset < endNode.childNodes.length) {
+ // "If end node's child with index end offset is editable and
+ // invisible, remove it from end node."
+ if (isEditable(endNode.childNodes[endOffset])
+ && isInvisible(endNode.childNodes[endOffset])) {
+ endNode.removeChild(endNode.childNodes[endOffset]);
+
+ // "Otherwise, set end node to its child with index end offset and
+ // set end offset to zero."
+ } else {
+ endNode = endNode.childNodes[endOffset];
+ endOffset = 0;
+ }
+ }
+
+ // "Call collapse(node, offset) on the context object's Selection."
+ getSelection().collapse(node, offset);
+ getActiveRange().setStart(node, offset);
+
+ // "Call extend(end node, end offset) on the context object's
+ // Selection."
+ getSelection().extend(endNode, endOffset);
+ getActiveRange().setEnd(endNode, endOffset);
+
+ // "Delete the selection."
+ deleteSelection();
+
+ // "Return true."
+ return true;
+ }
+};
+
+//@}
+///// The indent command /////
+//@{
+commands.indent = {
+ preservesOverrides: true,
+ action: function() {
+ // "Let items be a list of all lis that are ancestor containers of the
+ // active range's start and/or end node."
+ //
+ // Has to be in tree order, remember!
+ var items = [];
+ for (var node = getActiveRange().endContainer; node != getActiveRange().commonAncestorContainer; node = node.parentNode) {
+ if (isHtmlElement(node, "LI")) {
+ items.unshift(node);
+ }
+ }
+ for (var node = getActiveRange().startContainer; node != getActiveRange().commonAncestorContainer; node = node.parentNode) {
+ if (isHtmlElement(node, "LI")) {
+ items.unshift(node);
+ }
+ }
+ for (var node = getActiveRange().commonAncestorContainer; node; node = node.parentNode) {
+ if (isHtmlElement(node, "LI")) {
+ items.unshift(node);
+ }
+ }
+
+ // "For each item in items, normalize sublists of item."
+ for (var i = 0; i < items.length; i++) {
+ normalizeSublists(items[i]);
+ }
+
+ // "Block-extend the active range, and let new range be the result."
+ var newRange = blockExtend(getActiveRange());
+
+ // "Let node list be a list of nodes, initially empty."
+ var nodeList = [];
+
+ // "For each node node contained in new range, if node is editable and
+ // is an allowed child of "div" or "ol" and if the last member of node
+ // list (if any) is not an ancestor of node, append node to node list."
+ nodeList = getContainedNodes(newRange, function(node) {
+ return isEditable(node)
+ && (isAllowedChild(node, "div")
+ || isAllowedChild(node, "ol"));
+ });
+
+ // "If the first visible member of node list is an li whose parent is
+ // an ol or ul:"
+ if (isHtmlElement(nodeList.filter(isVisible)[0], "li")
+ && isHtmlElement(nodeList.filter(isVisible)[0].parentNode, ["ol", "ul"])) {
+ // "Let sibling be node list's first visible member's
+ // previousSibling."
+ var sibling = nodeList.filter(isVisible)[0].previousSibling;
+
+ // "While sibling is invisible, set sibling to its
+ // previousSibling."
+ while (isInvisible(sibling)) {
+ sibling = sibling.previousSibling;
+ }
+
+ // "If sibling is an li, normalize sublists of sibling."
+ if (isHtmlElement(sibling, "li")) {
+ normalizeSublists(sibling);
+ }
+ }
+
+ // "While node list is not empty:"
+ while (nodeList.length) {
+ // "Let sublist be a list of nodes, initially empty."
+ var sublist = [];
+
+ // "Remove the first member of node list and append it to sublist."
+ sublist.push(nodeList.shift());
+
+ // "While the first member of node list is the nextSibling of the
+ // last member of sublist, remove the first member of node list and
+ // append it to sublist."
+ while (nodeList.length
+ && nodeList[0] == sublist[sublist.length - 1].nextSibling) {
+ sublist.push(nodeList.shift());
+ }
+
+ // "Indent sublist."
+ indentNodes(sublist);
+ }
+
+ // "Return true."
+ return true;
+ }
+};
+
+//@}
+///// The insertHorizontalRule command /////
+//@{
+commands.inserthorizontalrule = {
+ preservesOverrides: true,
+ action: function() {
+ // "Let start node, start offset, end node, and end offset be the
+ // active range's start and end nodes and offsets."
+ var startNode = getActiveRange().startContainer;
+ var startOffset = getActiveRange().startOffset;
+ var endNode = getActiveRange().endContainer;
+ var endOffset = getActiveRange().endOffset;
+
+ // "While start offset is 0 and start node's parent is not null, set
+ // start offset to start node's index, then set start node to its
+ // parent."
+ while (startOffset == 0
+ && startNode.parentNode) {
+ startOffset = getNodeIndex(startNode);
+ startNode = startNode.parentNode;
+ }
+
+ // "While end offset is end node's length, and end node's parent is not
+ // null, set end offset to one plus end node's index, then set end node
+ // to its parent."
+ while (endOffset == getNodeLength(endNode)
+ && endNode.parentNode) {
+ endOffset = 1 + getNodeIndex(endNode);
+ endNode = endNode.parentNode;
+ }
+
+ // "Call collapse(start node, start offset) on the context object's
+ // Selection."
+ getSelection().collapse(startNode, startOffset);
+ getActiveRange().setStart(startNode, startOffset);
+
+ // "Call extend(end node, end offset) on the context object's
+ // Selection."
+ getSelection().extend(endNode, endOffset);
+ getActiveRange().setEnd(endNode, endOffset);
+
+ // "Delete the selection, with block merging false."
+ deleteSelection({blockMerging: false});
+
+ // "If the active range's start node is neither editable nor an editing
+ // host, return true."
+ if (!isEditable(getActiveRange().startContainer)
+ && !isEditingHost(getActiveRange().startContainer)) {
+ return true;
+ }
+
+ // "If the active range's start node is a Text node and its start
+ // offset is zero, call collapse() on the context object's Selection,
+ // with first argument the active range's start node's parent and
+ // second argument the active range's start node's index."
+ if (getActiveRange().startContainer.nodeType == Node.TEXT_NODE
+ && getActiveRange().startOffset == 0) {
+ var newNode = getActiveRange().startContainer.parentNode;
+ var newOffset = getNodeIndex(getActiveRange().startContainer);
+ getSelection().collapse(newNode, newOffset);
+ getActiveRange().setStart(newNode, newOffset);
+ getActiveRange().collapse(true);
+ }
+
+ // "If the active range's start node is a Text node and its start
+ // offset is the length of its start node, call collapse() on the
+ // context object's Selection, with first argument the active range's
+ // start node's parent, and the second argument one plus the active
+ // range's start node's index."
+ if (getActiveRange().startContainer.nodeType == Node.TEXT_NODE
+ && getActiveRange().startOffset == getNodeLength(getActiveRange().startContainer)) {
+ var newNode = getActiveRange().startContainer.parentNode;
+ var newOffset = 1 + getNodeIndex(getActiveRange().startContainer);
+ getSelection().collapse(newNode, newOffset);
+ getActiveRange().setStart(newNode, newOffset);
+ getActiveRange().collapse(true);
+ }
+
+ // "Let hr be the result of calling createElement("hr") on the
+ // context object."
+ var hr = document.createElement("hr");
+
+ // "Run insertNode(hr) on the active range."
+ getActiveRange().insertNode(hr);
+
+ // "Fix disallowed ancestors of hr."
+ fixDisallowedAncestors(hr);
+
+ // "Run collapse() on the context object's Selection, with first
+ // argument hr's parent and the second argument equal to one plus hr's
+ // index."
+ getSelection().collapse(hr.parentNode, 1 + getNodeIndex(hr));
+ getActiveRange().setStart(hr.parentNode, 1 + getNodeIndex(hr));
+ getActiveRange().collapse(true);
+
+ // "Return true."
+ return true;
+ }
+};
+
+//@}
+///// The insertHTML command /////
+//@{
+commands.inserthtml = {
+ preservesOverrides: true,
+ action: function(value) {
+ // "Delete the selection."
+ deleteSelection();
+
+ // "If the active range's start node is neither editable nor an editing
+ // host, return true."
+ if (!isEditable(getActiveRange().startContainer)
+ && !isEditingHost(getActiveRange().startContainer)) {
+ return true;
+ }
+
+ // "Let frag be the result of calling createContextualFragment(value)
+ // on the active range."
+ var frag = getActiveRange().createContextualFragment(value);
+
+ // "Let last child be the lastChild of frag."
+ var lastChild = frag.lastChild;
+
+ // "If last child is null, return true."
+ if (!lastChild) {
+ return true;
+ }
+
+ // "Let descendants be all descendants of frag."
+ var descendants = getDescendants(frag);
+
+ // "If the active range's start node is a block node:"
+ if (isBlockNode(getActiveRange().startContainer)) {
+ // "Let collapsed block props be all editable collapsed block prop
+ // children of the active range's start node that have index
+ // greater than or equal to the active range's start offset."
+ //
+ // "For each node in collapsed block props, remove node from its
+ // parent."
+ [].filter.call(getActiveRange().startContainer.childNodes, function(node) {
+ return isEditable(node)
+ && isCollapsedBlockProp(node)
+ && getNodeIndex(node) >= getActiveRange().startOffset;
+ }).forEach(function(node) {
+ node.parentNode.removeChild(node);
+ });
+ }
+
+ // "Call insertNode(frag) on the active range."
+ getActiveRange().insertNode(frag);
+
+ // "If the active range's start node is a block node with no visible
+ // children, call createElement("br") on the context object and append
+ // the result as the last child of the active range's start node."
+ if (isBlockNode(getActiveRange().startContainer)
+ && ![].some.call(getActiveRange().startContainer.childNodes, isVisible)) {
+ getActiveRange().startContainer.appendChild(document.createElement("br"));
+ }
+
+ // "Call collapse() on the context object's Selection, with last
+ // child's parent as the first argument and one plus its index as the
+ // second."
+ getActiveRange().setStart(lastChild.parentNode, 1 + getNodeIndex(lastChild));
+ getActiveRange().setEnd(lastChild.parentNode, 1 + getNodeIndex(lastChild));
+
+ // "Fix disallowed ancestors of each member of descendants."
+ for (var i = 0; i < descendants.length; i++) {
+ fixDisallowedAncestors(descendants[i]);
+ }
+
+ // "Return true."
+ return true;
+ }
+};
+
+//@}
+///// The insertImage command /////
+//@{
+commands.insertimage = {
+ preservesOverrides: true,
+ action: function(value) {
+ // "If value is the empty string, return false."
+ if (value === "") {
+ return false;
+ }
+
+ // "Delete the selection, with strip wrappers false."
+ deleteSelection({stripWrappers: false});
+
+ // "Let range be the active range."
+ var range = getActiveRange();
+
+ // "If the active range's start node is neither editable nor an editing
+ // host, return true."
+ if (!isEditable(getActiveRange().startContainer)
+ && !isEditingHost(getActiveRange().startContainer)) {
+ return true;
+ }
+
+ // "If range's start node is a block node whose sole child is a br, and
+ // its start offset is 0, remove its start node's child from it."
+ if (isBlockNode(range.startContainer)
+ && range.startContainer.childNodes.length == 1
+ && isHtmlElement(range.startContainer.firstChild, "br")
+ && range.startOffset == 0) {
+ range.startContainer.removeChild(range.startContainer.firstChild);
+ }
+
+ // "Let img be the result of calling createElement("img") on the
+ // context object."
+ var img = document.createElement("img");
+
+ // "Run setAttribute("src", value) on img."
+ img.setAttribute("src", value);
+
+ // "Run insertNode(img) on the range."
+ range.insertNode(img);
+
+ // "Run collapse() on the Selection, with first argument equal to the
+ // parent of img and the second argument equal to one plus the index of
+ // img."
+ //
+ // Not everyone actually supports collapse(), so we do it manually
+ // instead. Also, we need to modify the actual range we're given as
+ // well, for the sake of autoimplementation.html's range-filling-in.
+ range.setStart(img.parentNode, 1 + getNodeIndex(img));
+ range.setEnd(img.parentNode, 1 + getNodeIndex(img));
+ getSelection().removeAllRanges();
+ getSelection().addRange(range);
+
+ // IE adds width and height attributes for some reason, so remove those
+ // to actually do what the spec says.
+ img.removeAttribute("width");
+ img.removeAttribute("height");
+
+ // "Return true."
+ return true;
+ }
+};
+
+//@}
+///// The insertLineBreak command /////
+//@{
+commands.insertlinebreak = {
+ preservesOverrides: true,
+ action: function(value) {
+ // "Delete the selection, with strip wrappers false."
+ deleteSelection({stripWrappers: false});
+
+ // "If the active range's start node is neither editable nor an editing
+ // host, return true."
+ if (!isEditable(getActiveRange().startContainer)
+ && !isEditingHost(getActiveRange().startContainer)) {
+ return true;
+ }
+
+ // "If the active range's start node is an Element, and "br" is not an
+ // allowed child of it, return true."
+ if (getActiveRange().startContainer.nodeType == Node.ELEMENT_NODE
+ && !isAllowedChild("br", getActiveRange().startContainer)) {
+ return true;
+ }
+
+ // "If the active range's start node is not an Element, and "br" is not
+ // an allowed child of the active range's start node's parent, return
+ // true."
+ if (getActiveRange().startContainer.nodeType != Node.ELEMENT_NODE
+ && !isAllowedChild("br", getActiveRange().startContainer.parentNode)) {
+ return true;
+ }
+
+ // "If the active range's start node is a Text node and its start
+ // offset is zero, call collapse() on the context object's Selection,
+ // with first argument equal to the active range's start node's parent
+ // and second argument equal to the active range's start node's index."
+ if (getActiveRange().startContainer.nodeType == Node.TEXT_NODE
+ && getActiveRange().startOffset == 0) {
+ var newNode = getActiveRange().startContainer.parentNode;
+ var newOffset = getNodeIndex(getActiveRange().startContainer);
+ getSelection().collapse(newNode, newOffset);
+ getActiveRange().setStart(newNode, newOffset);
+ getActiveRange().setEnd(newNode, newOffset);
+ }
+
+ // "If the active range's start node is a Text node and its start
+ // offset is the length of its start node, call collapse() on the
+ // context object's Selection, with first argument equal to the active
+ // range's start node's parent and second argument equal to one plus
+ // the active range's start node's index."
+ if (getActiveRange().startContainer.nodeType == Node.TEXT_NODE
+ && getActiveRange().startOffset == getNodeLength(getActiveRange().startContainer)) {
+ var newNode = getActiveRange().startContainer.parentNode;
+ var newOffset = 1 + getNodeIndex(getActiveRange().startContainer);
+ getSelection().collapse(newNode, newOffset);
+ getActiveRange().setStart(newNode, newOffset);
+ getActiveRange().setEnd(newNode, newOffset);
+ }
+
+ // "Let br be the result of calling createElement("br") on the context
+ // object."
+ var br = document.createElement("br");
+
+ // "Call insertNode(br) on the active range."
+ getActiveRange().insertNode(br);
+
+ // "Call collapse() on the context object's Selection, with br's parent
+ // as the first argument and one plus br's index as the second
+ // argument."
+ getSelection().collapse(br.parentNode, 1 + getNodeIndex(br));
+ getActiveRange().setStart(br.parentNode, 1 + getNodeIndex(br));
+ getActiveRange().setEnd(br.parentNode, 1 + getNodeIndex(br));
+
+ // "If br is a collapsed line break, call createElement("br") on the
+ // context object and let extra br be the result, then call
+ // insertNode(extra br) on the active range."
+ if (isCollapsedLineBreak(br)) {
+ getActiveRange().insertNode(document.createElement("br"));
+
+ // Compensate for nonstandard implementations of insertNode
+ getSelection().collapse(br.parentNode, 1 + getNodeIndex(br));
+ getActiveRange().setStart(br.parentNode, 1 + getNodeIndex(br));
+ getActiveRange().setEnd(br.parentNode, 1 + getNodeIndex(br));
+ }
+
+ // "Return true."
+ return true;
+ }
+};
+
+//@}
+///// The insertOrderedList command /////
+//@{
+commands.insertorderedlist = {
+ preservesOverrides: true,
+ // "Toggle lists with tag name "ol", then return true."
+ action: function() { toggleLists("ol"); return true },
+ // "True if the selection's list state is "mixed" or "mixed ol", false
+ // otherwise."
+ indeterm: function() { return /^mixed( ol)?$/.test(getSelectionListState()) },
+ // "True if the selection's list state is "ol", false otherwise."
+ state: function() { return getSelectionListState() == "ol" },
+};
+
+//@}
+///// The insertParagraph command /////
+//@{
+commands.insertparagraph = {
+ preservesOverrides: true,
+ action: function() {
+ // "Delete the selection."
+ deleteSelection();
+
+ // "If the active range's start node is neither editable nor an editing
+ // host, return true."
+ if (!isEditable(getActiveRange().startContainer)
+ && !isEditingHost(getActiveRange().startContainer)) {
+ return true;
+ }
+
+ // "Let node and offset be the active range's start node and offset."
+ var node = getActiveRange().startContainer;
+ var offset = getActiveRange().startOffset;
+
+ // "If node is a Text node, and offset is neither 0 nor the length of
+ // node, call splitText(offset) on node."
+ if (node.nodeType == Node.TEXT_NODE
+ && offset != 0
+ && offset != getNodeLength(node)) {
+ node.splitText(offset);
+ }
+
+ // "If node is a Text node and offset is its length, set offset to one
+ // plus the index of node, then set node to its parent."
+ if (node.nodeType == Node.TEXT_NODE
+ && offset == getNodeLength(node)) {
+ offset = 1 + getNodeIndex(node);
+ node = node.parentNode;
+ }
+
+ // "If node is a Text or Comment node, set offset to the index of node,
+ // then set node to its parent."
+ if (node.nodeType == Node.TEXT_NODE
+ || node.nodeType == Node.COMMENT_NODE) {
+ offset = getNodeIndex(node);
+ node = node.parentNode;
+ }
+
+ // "Call collapse(node, offset) on the context object's Selection."
+ getSelection().collapse(node, offset);
+ getActiveRange().setStart(node, offset);
+ getActiveRange().setEnd(node, offset);
+
+ // "Let container equal node."
+ var container = node;
+
+ // "While container is not a single-line container, and container's
+ // parent is editable and in the same editing host as node, set
+ // container to its parent."
+ while (!isSingleLineContainer(container)
+ && isEditable(container.parentNode)
+ && inSameEditingHost(node, container.parentNode)) {
+ container = container.parentNode;
+ }
+
+ // "If container is an editable single-line container in the same
+ // editing host as node, and its local name is "p" or "div":"
+ if (isEditable(container)
+ && isSingleLineContainer(container)
+ && inSameEditingHost(node, container.parentNode)
+ && (container.tagName == "P" || container.tagName == "DIV")) {
+ // "Let outer container equal container."
+ var outerContainer = container;
+
+ // "While outer container is not a dd or dt or li, and outer
+ // container's parent is editable, set outer container to its
+ // parent."
+ while (!isHtmlElement(outerContainer, ["dd", "dt", "li"])
+ && isEditable(outerContainer.parentNode)) {
+ outerContainer = outerContainer.parentNode;
+ }
+
+ // "If outer container is a dd or dt or li, set container to outer
+ // container."
+ if (isHtmlElement(outerContainer, ["dd", "dt", "li"])) {
+ container = outerContainer;
+ }
+ }
+
+ // "If container is not editable or not in the same editing host as
+ // node or is not a single-line container:"
+ if (!isEditable(container)
+ || !inSameEditingHost(container, node)
+ || !isSingleLineContainer(container)) {
+ // "Let tag be the default single-line container name."
+ var tag = defaultSingleLineContainerName;
+
+ // "Block-extend the active range, and let new range be the
+ // result."
+ var newRange = blockExtend(getActiveRange());
+
+ // "Let node list be a list of nodes, initially empty."
+ //
+ // "Append to node list the first node in tree order that is
+ // contained in new range and is an allowed child of "p", if any."
+ var nodeList = getContainedNodes(newRange, function(node) { return isAllowedChild(node, "p") })
+ .slice(0, 1);
+
+ // "If node list is empty:"
+ if (!nodeList.length) {
+ // "If tag is not an allowed child of the active range's start
+ // node, return true."
+ if (!isAllowedChild(tag, getActiveRange().startContainer)) {
+ return true;
+ }
+
+ // "Set container to the result of calling createElement(tag)
+ // on the context object."
+ container = document.createElement(tag);
+
+ // "Call insertNode(container) on the active range."
+ getActiveRange().insertNode(container);
+
+ // "Call createElement("br") on the context object, and append
+ // the result as the last child of container."
+ container.appendChild(document.createElement("br"));
+
+ // "Call collapse(container, 0) on the context object's
+ // Selection."
+ getSelection().collapse(container, 0);
+ getActiveRange().setStart(container, 0);
+ getActiveRange().setEnd(container, 0);
+
+ // "Return true."
+ return true;
+ }
+
+ // "While the nextSibling of the last member of node list is not
+ // null and is an allowed child of "p", append it to node list."
+ while (nodeList[nodeList.length - 1].nextSibling
+ && isAllowedChild(nodeList[nodeList.length - 1].nextSibling, "p")) {
+ nodeList.push(nodeList[nodeList.length - 1].nextSibling);
+ }
+
+ // "Wrap node list, with sibling criteria returning false and new
+ // parent instructions returning the result of calling
+ // createElement(tag) on the context object. Set container to the
+ // result."
+ container = wrap(nodeList,
+ function() { return false },
+ function() { return document.createElement(tag) }
+ );
+ }
+
+ // "If container's local name is "address", "listing", or "pre":"
+ if (container.tagName == "ADDRESS"
+ || container.tagName == "LISTING"
+ || container.tagName == "PRE") {
+ // "Let br be the result of calling createElement("br") on the
+ // context object."
+ var br = document.createElement("br");
+
+ // "Call insertNode(br) on the active range."
+ getActiveRange().insertNode(br);
+
+ // "Call collapse(node, offset + 1) on the context object's
+ // Selection."
+ getSelection().collapse(node, offset + 1);
+ getActiveRange().setStart(node, offset + 1);
+ getActiveRange().setEnd(node, offset + 1);
+
+ // "If br is the last descendant of container, let br be the result
+ // of calling createElement("br") on the context object, then call
+ // insertNode(br) on the active range."
+ //
+ // Work around browser bugs: some browsers select the
+ // newly-inserted node, not per spec.
+ if (!isDescendant(nextNode(br), container)) {
+ getActiveRange().insertNode(document.createElement("br"));
+ getSelection().collapse(node, offset + 1);
+ getActiveRange().setEnd(node, offset + 1);
+ }
+
+ // "Return true."
+ return true;
+ }
+
+ // "If container's local name is "li", "dt", or "dd"; and either it has
+ // no children or it has a single child and that child is a br:"
+ if (["LI", "DT", "DD"].indexOf(container.tagName) != -1
+ && (!container.hasChildNodes()
+ || (container.childNodes.length == 1
+ && isHtmlElement(container.firstChild, "br")))) {
+ // "Split the parent of the one-node list consisting of container."
+ splitParent([container]);
+
+ // "If container has no children, call createElement("br") on the
+ // context object and append the result as the last child of
+ // container."
+ if (!container.hasChildNodes()) {
+ container.appendChild(document.createElement("br"));
+ }
+
+ // "If container is a dd or dt, and it is not an allowed child of
+ // any of its ancestors in the same editing host, set the tag name
+ // of container to the default single-line container name and let
+ // container be the result."
+ if (isHtmlElement(container, ["dd", "dt"])
+ && getAncestors(container).every(function(ancestor) {
+ return !inSameEditingHost(container, ancestor)
+ || !isAllowedChild(container, ancestor)
+ })) {
+ container = setTagName(container, defaultSingleLineContainerName);
+ }
+
+ // "Fix disallowed ancestors of container."
+ fixDisallowedAncestors(container);
+
+ // "Return true."
+ return true;
+ }
+
+ // "Let new line range be a new range whose start is the same as
+ // the active range's, and whose end is (container, length of
+ // container)."
+ var newLineRange = document.createRange();
+ newLineRange.setStart(getActiveRange().startContainer, getActiveRange().startOffset);
+ newLineRange.setEnd(container, getNodeLength(container));
+
+ // "While new line range's start offset is zero and its start node is
+ // not a prohibited paragraph child, set its start to (parent of start
+ // node, index of start node)."
+ while (newLineRange.startOffset == 0
+ && !isProhibitedParagraphChild(newLineRange.startContainer)) {
+ newLineRange.setStart(newLineRange.startContainer.parentNode, getNodeIndex(newLineRange.startContainer));
+ }
+
+ // "While new line range's start offset is the length of its start node
+ // and its start node is not a prohibited paragraph child, set its
+ // start to (parent of start node, 1 + index of start node)."
+ while (newLineRange.startOffset == getNodeLength(newLineRange.startContainer)
+ && !isProhibitedParagraphChild(newLineRange.startContainer)) {
+ newLineRange.setStart(newLineRange.startContainer.parentNode, 1 + getNodeIndex(newLineRange.startContainer));
+ }
+
+ // "Let end of line be true if new line range contains either nothing
+ // or a single br, and false otherwise."
+ var containedInNewLineRange = getContainedNodes(newLineRange);
+ var endOfLine = !containedInNewLineRange.length
+ || (containedInNewLineRange.length == 1
+ && isHtmlElement(containedInNewLineRange[0], "br"));
+
+ // "If the local name of container is "h1", "h2", "h3", "h4", "h5", or
+ // "h6", and end of line is true, let new container name be the default
+ // single-line container name."
+ var newContainerName;
+ if (/^H[1-6]$/.test(container.tagName)
+ && endOfLine) {
+ newContainerName = defaultSingleLineContainerName;
+
+ // "Otherwise, if the local name of container is "dt" and end of line
+ // is true, let new container name be "dd"."
+ } else if (container.tagName == "DT"
+ && endOfLine) {
+ newContainerName = "dd";
+
+ // "Otherwise, if the local name of container is "dd" and end of line
+ // is true, let new container name be "dt"."
+ } else if (container.tagName == "DD"
+ && endOfLine) {
+ newContainerName = "dt";
+
+ // "Otherwise, let new container name be the local name of container."
+ } else {
+ newContainerName = container.tagName.toLowerCase();
+ }
+
+ // "Let new container be the result of calling createElement(new
+ // container name) on the context object."
+ var newContainer = document.createElement(newContainerName);
+
+ // "Copy all attributes of container to new container."
+ for (var i = 0; i < container.attributes.length; i++) {
+ newContainer.setAttributeNS(container.attributes[i].namespaceURI, container.attributes[i].name, container.attributes[i].value);
+ }
+
+ // "If new container has an id attribute, unset it."
+ newContainer.removeAttribute("id");
+
+ // "Insert new container into the parent of container immediately after
+ // container."
+ container.parentNode.insertBefore(newContainer, container.nextSibling);
+
+ // "Let contained nodes be all nodes contained in new line range."
+ var containedNodes = getAllContainedNodes(newLineRange);
+
+ // "Let frag be the result of calling extractContents() on new line
+ // range."
+ var frag = newLineRange.extractContents();
+
+ // "Unset the id attribute (if any) of each Element descendant of frag
+ // that is not in contained nodes."
+ var descendants = getDescendants(frag);
+ for (var i = 0; i < descendants.length; i++) {
+ if (descendants[i].nodeType == Node.ELEMENT_NODE
+ && containedNodes.indexOf(descendants[i]) == -1) {
+ descendants[i].removeAttribute("id");
+ }
+ }
+
+ // "Call appendChild(frag) on new container."
+ newContainer.appendChild(frag);
+
+ // "While container's lastChild is a prohibited paragraph child, set
+ // container to its lastChild."
+ while (isProhibitedParagraphChild(container.lastChild)) {
+ container = container.lastChild;
+ }
+
+ // "While new container's lastChild is a prohibited paragraph child,
+ // set new container to its lastChild."
+ while (isProhibitedParagraphChild(newContainer.lastChild)) {
+ newContainer = newContainer.lastChild;
+ }
+
+ // "If container has no visible children, call createElement("br") on
+ // the context object, and append the result as the last child of
+ // container."
+ if (![].some.call(container.childNodes, isVisible)) {
+ container.appendChild(document.createElement("br"));
+ }
+
+ // "If new container has no visible children, call createElement("br")
+ // on the context object, and append the result as the last child of
+ // new container."
+ if (![].some.call(newContainer.childNodes, isVisible)) {
+ newContainer.appendChild(document.createElement("br"));
+ }
+
+ // "Call collapse(new container, 0) on the context object's Selection."
+ getSelection().collapse(newContainer, 0);
+ getActiveRange().setStart(newContainer, 0);
+ getActiveRange().setEnd(newContainer, 0);
+
+ // "Return true."
+ return true;
+ }
+};
+
+//@}
+///// The insertText command /////
+//@{
+commands.inserttext = {
+ action: function(value) {
+ // "Delete the selection, with strip wrappers false."
+ deleteSelection({stripWrappers: false});
+
+ // "If the active range's start node is neither editable nor an editing
+ // host, return true."
+ if (!isEditable(getActiveRange().startContainer)
+ && !isEditingHost(getActiveRange().startContainer)) {
+ return true;
+ }
+
+ // "If value's length is greater than one:"
+ if (value.length > 1) {
+ // "For each element el in value, take the action for the
+ // insertText command, with value equal to el."
+ for (var i = 0; i < value.length; i++) {
+ commands.inserttext.action(value[i]);
+ }
+
+ // "Return true."
+ return true;
+ }
+
+ // "If value is the empty string, return true."
+ if (value == "") {
+ return true;
+ }
+
+ // "If value is a newline (U+00A0), take the action for the
+ // insertParagraph command and return true."
+ if (value == "\n") {
+ commands.insertparagraph.action();
+ return true;
+ }
+
+ // "Let node and offset be the active range's start node and offset."
+ var node = getActiveRange().startContainer;
+ var offset = getActiveRange().startOffset;
+
+ // "If node has a child whose index is offset − 1, and that child is a
+ // Text node, set node to that child, then set offset to node's
+ // length."
+ if (0 <= offset - 1
+ && offset - 1 < node.childNodes.length
+ && node.childNodes[offset - 1].nodeType == Node.TEXT_NODE) {
+ node = node.childNodes[offset - 1];
+ offset = getNodeLength(node);
+ }
+
+ // "If node has a child whose index is offset, and that child is a Text
+ // node, set node to that child, then set offset to zero."
+ if (0 <= offset
+ && offset < node.childNodes.length
+ && node.childNodes[offset].nodeType == Node.TEXT_NODE) {
+ node = node.childNodes[offset];
+ offset = 0;
+ }
+
+ // "Record current overrides, and let overrides be the result."
+ var overrides = recordCurrentOverrides();
+
+ // "Call collapse(node, offset) on the context object's Selection."
+ getSelection().collapse(node, offset);
+ getActiveRange().setStart(node, offset);
+ getActiveRange().setEnd(node, offset);
+
+ // "Canonicalize whitespace at (node, offset)."
+ canonicalizeWhitespace(node, offset);
+
+ // "Let (node, offset) be the active range's start."
+ node = getActiveRange().startContainer;
+ offset = getActiveRange().startOffset;
+
+ // "If node is a Text node:"
+ if (node.nodeType == Node.TEXT_NODE) {
+ // "Call insertData(offset, value) on node."
+ node.insertData(offset, value);
+
+ // "Call collapse(node, offset) on the context object's Selection."
+ getSelection().collapse(node, offset);
+ getActiveRange().setStart(node, offset);
+
+ // "Call extend(node, offset + 1) on the context object's
+ // Selection."
+ //
+ // Work around WebKit bug: the extend() can throw if the text we're
+ // adding is trailing whitespace.
+ try { getSelection().extend(node, offset + 1); } catch(e) {}
+ getActiveRange().setEnd(node, offset + 1);
+
+ // "Otherwise:"
+ } else {
+ // "If node has only one child, which is a collapsed line break,
+ // remove its child from it."
+ //
+ // FIXME: IE incorrectly returns false here instead of true
+ // sometimes?
+ if (node.childNodes.length == 1
+ && isCollapsedLineBreak(node.firstChild)) {
+ node.removeChild(node.firstChild);
+ }
+
+ // "Let text be the result of calling createTextNode(value) on the
+ // context object."
+ var text = document.createTextNode(value);
+
+ // "Call insertNode(text) on the active range."
+ getActiveRange().insertNode(text);
+
+ // "Call collapse(text, 0) on the context object's Selection."
+ getSelection().collapse(text, 0);
+ getActiveRange().setStart(text, 0);
+
+ // "Call extend(text, 1) on the context object's Selection."
+ getSelection().extend(text, 1);
+ getActiveRange().setEnd(text, 1);
+ }
+
+ // "Restore states and values from overrides."
+ restoreStatesAndValues(overrides);
+
+ // "Canonicalize whitespace at the active range's start, with fix
+ // collapsed space false."
+ canonicalizeWhitespace(getActiveRange().startContainer, getActiveRange().startOffset, false);
+
+ // "Canonicalize whitespace at the active range's end, with fix
+ // collapsed space false."
+ canonicalizeWhitespace(getActiveRange().endContainer, getActiveRange().endOffset, false);
+
+ // "If value is a space character, autolink the active range's start."
+ if (/^[ \t\n\f\r]$/.test(value)) {
+ autolink(getActiveRange().startContainer, getActiveRange().startOffset);
+ }
+
+ // "Call collapseToEnd() on the context object's Selection."
+ //
+ // Work around WebKit bug: sometimes it blows up the selection and
+ // throws, which we don't want.
+ try { getSelection().collapseToEnd(); } catch(e) {}
+ getActiveRange().collapse(false);
+
+ // "Return true."
+ return true;
+ }
+};
+
+//@}
+///// The insertUnorderedList command /////
+//@{
+commands.insertunorderedlist = {
+ preservesOverrides: true,
+ // "Toggle lists with tag name "ul", then return true."
+ action: function() { toggleLists("ul"); return true },
+ // "True if the selection's list state is "mixed" or "mixed ul", false
+ // otherwise."
+ indeterm: function() { return /^mixed( ul)?$/.test(getSelectionListState()) },
+ // "True if the selection's list state is "ul", false otherwise."
+ state: function() { return getSelectionListState() == "ul" },
+};
+
+//@}
+///// The justifyCenter command /////
+//@{
+commands.justifycenter = {
+ preservesOverrides: true,
+ // "Justify the selection with alignment "center", then return true."
+ action: function() { justifySelection("center"); return true },
+ indeterm: function() {
+ // "Return false if the active range is null. Otherwise, block-extend
+ // the active range. Return true if among visible editable nodes that
+ // are contained in the result and have no children, at least one has
+ // alignment value "center" and at least one does not. Otherwise return
+ // false."
+ if (!getActiveRange()) {
+ return false;
+ }
+ var nodes = getAllContainedNodes(blockExtend(getActiveRange()), function(node) {
+ return isEditable(node) && isVisible(node) && !node.hasChildNodes();
+ });
+ return nodes.some(function(node) { return getAlignmentValue(node) == "center" })
+ && nodes.some(function(node) { return getAlignmentValue(node) != "center" });
+ }, state: function() {
+ // "Return false if the active range is null. Otherwise, block-extend
+ // the active range. Return true if there is at least one visible
+ // editable node that is contained in the result and has no children,
+ // and all such nodes have alignment value "center". Otherwise return
+ // false."
+ if (!getActiveRange()) {
+ return false;
+ }
+ var nodes = getAllContainedNodes(blockExtend(getActiveRange()), function(node) {
+ return isEditable(node) && isVisible(node) && !node.hasChildNodes();
+ });
+ return nodes.length
+ && nodes.every(function(node) { return getAlignmentValue(node) == "center" });
+ }, value: function() {
+ // "Return the empty string if the active range is null. Otherwise,
+ // block-extend the active range, and return the alignment value of the
+ // first visible editable node that is contained in the result and has
+ // no children. If there is no such node, return "left"."
+ if (!getActiveRange()) {
+ return "";
+ }
+ var nodes = getAllContainedNodes(blockExtend(getActiveRange()), function(node) {
+ return isEditable(node) && isVisible(node) && !node.hasChildNodes();
+ });
+ if (nodes.length) {
+ return getAlignmentValue(nodes[0]);
+ } else {
+ return "left";
+ }
+ },
+};
+
+//@}
+///// The justifyFull command /////
+//@{
+commands.justifyfull = {
+ preservesOverrides: true,
+ // "Justify the selection with alignment "justify", then return true."
+ action: function() { justifySelection("justify"); return true },
+ indeterm: function() {
+ // "Return false if the active range is null. Otherwise, block-extend
+ // the active range. Return true if among visible editable nodes that
+ // are contained in the result and have no children, at least one has
+ // alignment value "justify" and at least one does not. Otherwise
+ // return false."
+ if (!getActiveRange()) {
+ return false;
+ }
+ var nodes = getAllContainedNodes(blockExtend(getActiveRange()), function(node) {
+ return isEditable(node) && isVisible(node) && !node.hasChildNodes();
+ });
+ return nodes.some(function(node) { return getAlignmentValue(node) == "justify" })
+ && nodes.some(function(node) { return getAlignmentValue(node) != "justify" });
+ }, state: function() {
+ // "Return false if the active range is null. Otherwise, block-extend
+ // the active range. Return true if there is at least one visible
+ // editable node that is contained in the result and has no children,
+ // and all such nodes have alignment value "justify". Otherwise return
+ // false."
+ if (!getActiveRange()) {
+ return false;
+ }
+ var nodes = getAllContainedNodes(blockExtend(getActiveRange()), function(node) {
+ return isEditable(node) && isVisible(node) && !node.hasChildNodes();
+ });
+ return nodes.length
+ && nodes.every(function(node) { return getAlignmentValue(node) == "justify" });
+ }, value: function() {
+ // "Return the empty string if the active range is null. Otherwise,
+ // block-extend the active range, and return the alignment value of the
+ // first visible editable node that is contained in the result and has
+ // no children. If there is no such node, return "left"."
+ if (!getActiveRange()) {
+ return "";
+ }
+ var nodes = getAllContainedNodes(blockExtend(getActiveRange()), function(node) {
+ return isEditable(node) && isVisible(node) && !node.hasChildNodes();
+ });
+ if (nodes.length) {
+ return getAlignmentValue(nodes[0]);
+ } else {
+ return "left";
+ }
+ },
+};
+
+//@}
+///// The justifyLeft command /////
+//@{
+commands.justifyleft = {
+ preservesOverrides: true,
+ // "Justify the selection with alignment "left", then return true."
+ action: function() { justifySelection("left"); return true },
+ indeterm: function() {
+ // "Return false if the active range is null. Otherwise, block-extend
+ // the active range. Return true if among visible editable nodes that
+ // are contained in the result and have no children, at least one has
+ // alignment value "left" and at least one does not. Otherwise return
+ // false."
+ if (!getActiveRange()) {
+ return false;
+ }
+ var nodes = getAllContainedNodes(blockExtend(getActiveRange()), function(node) {
+ return isEditable(node) && isVisible(node) && !node.hasChildNodes();
+ });
+ return nodes.some(function(node) { return getAlignmentValue(node) == "left" })
+ && nodes.some(function(node) { return getAlignmentValue(node) != "left" });
+ }, state: function() {
+ // "Return false if the active range is null. Otherwise, block-extend
+ // the active range. Return true if there is at least one visible
+ // editable node that is contained in the result and has no children,
+ // and all such nodes have alignment value "left". Otherwise return
+ // false."
+ if (!getActiveRange()) {
+ return false;
+ }
+ var nodes = getAllContainedNodes(blockExtend(getActiveRange()), function(node) {
+ return isEditable(node) && isVisible(node) && !node.hasChildNodes();
+ });
+ return nodes.length
+ && nodes.every(function(node) { return getAlignmentValue(node) == "left" });
+ }, value: function() {
+ // "Return the empty string if the active range is null. Otherwise,
+ // block-extend the active range, and return the alignment value of the
+ // first visible editable node that is contained in the result and has
+ // no children. If there is no such node, return "left"."
+ if (!getActiveRange()) {
+ return "";
+ }
+ var nodes = getAllContainedNodes(blockExtend(getActiveRange()), function(node) {
+ return isEditable(node) && isVisible(node) && !node.hasChildNodes();
+ });
+ if (nodes.length) {
+ return getAlignmentValue(nodes[0]);
+ } else {
+ return "left";
+ }
+ },
+};
+
+//@}
+///// The justifyRight command /////
+//@{
+commands.justifyright = {
+ preservesOverrides: true,
+ // "Justify the selection with alignment "right", then return true."
+ action: function() { justifySelection("right"); return true },
+ indeterm: function() {
+ // "Return false if the active range is null. Otherwise, block-extend
+ // the active range. Return true if among visible editable nodes that
+ // are contained in the result and have no children, at least one has
+ // alignment value "right" and at least one does not. Otherwise return
+ // false."
+ if (!getActiveRange()) {
+ return false;
+ }
+ var nodes = getAllContainedNodes(blockExtend(getActiveRange()), function(node) {
+ return isEditable(node) && isVisible(node) && !node.hasChildNodes();
+ });
+ return nodes.some(function(node) { return getAlignmentValue(node) == "right" })
+ && nodes.some(function(node) { return getAlignmentValue(node) != "right" });
+ }, state: function() {
+ // "Return false if the active range is null. Otherwise, block-extend
+ // the active range. Return true if there is at least one visible
+ // editable node that is contained in the result and has no children,
+ // and all such nodes have alignment value "right". Otherwise return
+ // false."
+ if (!getActiveRange()) {
+ return false;
+ }
+ var nodes = getAllContainedNodes(blockExtend(getActiveRange()), function(node) {
+ return isEditable(node) && isVisible(node) && !node.hasChildNodes();
+ });
+ return nodes.length
+ && nodes.every(function(node) { return getAlignmentValue(node) == "right" });
+ }, value: function() {
+ // "Return the empty string if the active range is null. Otherwise,
+ // block-extend the active range, and return the alignment value of the
+ // first visible editable node that is contained in the result and has
+ // no children. If there is no such node, return "left"."
+ if (!getActiveRange()) {
+ return "";
+ }
+ var nodes = getAllContainedNodes(blockExtend(getActiveRange()), function(node) {
+ return isEditable(node) && isVisible(node) && !node.hasChildNodes();
+ });
+ if (nodes.length) {
+ return getAlignmentValue(nodes[0]);
+ } else {
+ return "left";
+ }
+ },
+};
+
+//@}
+///// The outdent command /////
+//@{
+commands.outdent = {
+ preservesOverrides: true,
+ action: function() {
+ // "Let items be a list of all lis that are ancestor containers of the
+ // range's start and/or end node."
+ //
+ // It's annoying to get this in tree order using functional stuff
+ // without doing getDescendants(document), which is slow, so I do it
+ // imperatively.
+ var items = [];
+ (function(){
+ for (
+ var ancestorContainer = getActiveRange().endContainer;
+ ancestorContainer != getActiveRange().commonAncestorContainer;
+ ancestorContainer = ancestorContainer.parentNode
+ ) {
+ if (isHtmlElement(ancestorContainer, "li")) {
+ items.unshift(ancestorContainer);
+ }
+ }
+ for (
+ var ancestorContainer = getActiveRange().startContainer;
+ ancestorContainer;
+ ancestorContainer = ancestorContainer.parentNode
+ ) {
+ if (isHtmlElement(ancestorContainer, "li")) {
+ items.unshift(ancestorContainer);
+ }
+ }
+ })();
+
+ // "For each item in items, normalize sublists of item."
+ items.forEach(normalizeSublists);
+
+ // "Block-extend the active range, and let new range be the result."
+ var newRange = blockExtend(getActiveRange());
+
+ // "Let node list be a list of nodes, initially empty."
+ //
+ // "For each node node contained in new range, append node to node list
+ // if the last member of node list (if any) is not an ancestor of node;
+ // node is editable; and either node has no editable descendants, or is
+ // an ol or ul, or is an li whose parent is an ol or ul."
+ var nodeList = getContainedNodes(newRange, function(node) {
+ return isEditable(node)
+ && (!getDescendants(node).some(isEditable)
+ || isHtmlElement(node, ["ol", "ul"])
+ || (isHtmlElement(node, "li") && isHtmlElement(node.parentNode, ["ol", "ul"])));
+ });
+
+ // "While node list is not empty:"
+ while (nodeList.length) {
+ // "While the first member of node list is an ol or ul or is not
+ // the child of an ol or ul, outdent it and remove it from node
+ // list."
+ while (nodeList.length
+ && (isHtmlElement(nodeList[0], ["OL", "UL"])
+ || !isHtmlElement(nodeList[0].parentNode, ["OL", "UL"]))) {
+ outdentNode(nodeList.shift());
+ }
+
+ // "If node list is empty, break from these substeps."
+ if (!nodeList.length) {
+ break;
+ }
+
+ // "Let sublist be a list of nodes, initially empty."
+ var sublist = [];
+
+ // "Remove the first member of node list and append it to sublist."
+ sublist.push(nodeList.shift());
+
+ // "While the first member of node list is the nextSibling of the
+ // last member of sublist, and the first member of node list is not
+ // an ol or ul, remove the first member of node list and append it
+ // to sublist."
+ while (nodeList.length
+ && nodeList[0] == sublist[sublist.length - 1].nextSibling
+ && !isHtmlElement(nodeList[0], ["OL", "UL"])) {
+ sublist.push(nodeList.shift());
+ }
+
+ // "Record the values of sublist, and let values be the result."
+ var values = recordValues(sublist);
+
+ // "Split the parent of sublist, with new parent null."
+ splitParent(sublist);
+
+ // "Fix disallowed ancestors of each member of sublist."
+ sublist.forEach(fixDisallowedAncestors);
+
+ // "Restore the values from values."
+ restoreValues(values);
+ }
+
+ // "Return true."
+ return true;
+ }
+};
+
+//@}
+
+//////////////////////////////////
+///// Miscellaneous commands /////
+//////////////////////////////////
+
+///// The defaultParagraphSeparator command /////
+//@{
+commands.defaultparagraphseparator = {
+ action: function(value) {
+ // "Let value be converted to ASCII lowercase. If value is then equal
+ // to "p" or "div", set the context object's default single-line
+ // container name to value and return true. Otherwise, return false."
+ value = value.toLowerCase();
+ if (value == "p" || value == "div") {
+ defaultSingleLineContainerName = value;
+ return true;
+ }
+ return false;
+ }, value: function() {
+ // "Return the context object's default single-line container name."
+ return defaultSingleLineContainerName;
+ },
+};
+
+//@}
+///// The selectAll command /////
+//@{
+commands.selectall = {
+ // Note, this ignores the whole globalRange/getActiveRange() thing and
+ // works with actual selections. Not suitable for autoimplementation.html.
+ action: function() {
+ // "Let target be the body element of the context object."
+ var target = document.body;
+
+ // "If target is null, let target be the context object's
+ // documentElement."
+ if (!target) {
+ target = document.documentElement;
+ }
+
+ // "If target is null, call getSelection() on the context object, and
+ // call removeAllRanges() on the result."
+ if (!target) {
+ getSelection().removeAllRanges();
+
+ // "Otherwise, call getSelection() on the context object, and call
+ // selectAllChildren(target) on the result."
+ } else {
+ getSelection().selectAllChildren(target);
+ }
+
+ // "Return true."
+ return true;
+ }
+};
+
+//@}
+///// The styleWithCSS command /////
+//@{
+commands.stylewithcss = {
+ action: function(value) {
+ // "If value is an ASCII case-insensitive match for the string
+ // "false", set the CSS styling flag to false. Otherwise, set the
+ // CSS styling flag to true. Either way, return true."
+ cssStylingFlag = String(value).toLowerCase() != "false";
+ return true;
+ }, state: function() { return cssStylingFlag }
+};
+
+//@}
+///// The useCSS command /////
+//@{
+commands.usecss = {
+ action: function(value) {
+ // "If value is an ASCII case-insensitive match for the string "false",
+ // set the CSS styling flag to true. Otherwise, set the CSS styling
+ // flag to false. Either way, return true."
+ cssStylingFlag = String(value).toLowerCase() == "false";
+ return true;
+ }
+};
+//@}
+
+// Some final setup
+//@{
+(function() {
+// Opera 11.50 doesn't implement Object.keys, so I have to make an explicit
+// temporary, which means I need an extra closure to not leak the temporaries
+// into the global namespace. >:(
+var commandNames = [];
+for (var command in commands) {
+ commandNames.push(command);
+}
+commandNames.forEach(function(command) {
+ // "If a command does not have a relevant CSS property specified, it
+ // defaults to null."
+ if (!("relevantCssProperty" in commands[command])) {
+ commands[command].relevantCssProperty = null;
+ }
+
+ // "If a command has inline command activated values defined but nothing
+ // else defines when it is indeterminate, it is indeterminate if among
+ // formattable nodes effectively contained in the active range, there is at
+ // least one whose effective command value is one of the given values and
+ // at least one whose effective command value is not one of the given
+ // values."
+ if ("inlineCommandActivatedValues" in commands[command]
+ && !("indeterm" in commands[command])) {
+ commands[command].indeterm = function() {
+ if (!getActiveRange()) {
+ return false;
+ }
+
+ var values = getAllEffectivelyContainedNodes(getActiveRange(), isFormattableNode)
+ .map(function(node) { return getEffectiveCommandValue(node, command) });
+
+ var matchingValues = values.filter(function(value) {
+ return commands[command].inlineCommandActivatedValues.indexOf(value) != -1;
+ });
+
+ return matchingValues.length >= 1
+ && values.length - matchingValues.length >= 1;
+ };
+ }
+
+ // "If a command has inline command activated values defined, its state is
+ // true if either no formattable node is effectively contained in the
+ // active range, and the active range's start node's effective command
+ // value is one of the given values; or if there is at least one
+ // formattable node effectively contained in the active range, and all of
+ // them have an effective command value equal to one of the given values."
+ if ("inlineCommandActivatedValues" in commands[command]) {
+ commands[command].state = function() {
+ if (!getActiveRange()) {
+ return false;
+ }
+
+ var nodes = getAllEffectivelyContainedNodes(getActiveRange(), isFormattableNode);
+
+ if (nodes.length == 0) {
+ return commands[command].inlineCommandActivatedValues
+ .indexOf(getEffectiveCommandValue(getActiveRange().startContainer, command)) != -1;
+ } else {
+ return nodes.every(function(node) {
+ return commands[command].inlineCommandActivatedValues
+ .indexOf(getEffectiveCommandValue(node, command)) != -1;
+ });
+ }
+ };
+ }
+
+ // "If a command is a standard inline value command, it is indeterminate if
+ // among formattable nodes that are effectively contained in the active
+ // range, there are two that have distinct effective command values. Its
+ // value is the effective command value of the first formattable node that
+ // is effectively contained in the active range; or if there is no such
+ // node, the effective command value of the active range's start node; or
+ // if that is null, the empty string."
+ if ("standardInlineValueCommand" in commands[command]) {
+ commands[command].indeterm = function() {
+ if (!getActiveRange()) {
+ return false;
+ }
+
+ var values = getAllEffectivelyContainedNodes(getActiveRange())
+ .filter(isFormattableNode)
+ .map(function(node) { return getEffectiveCommandValue(node, command) });
+ for (var i = 1; i < values.length; i++) {
+ if (values[i] != values[i - 1]) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ commands[command].value = function() {
+ if (!getActiveRange()) {
+ return "";
+ }
+
+ var refNode = getAllEffectivelyContainedNodes(getActiveRange(), isFormattableNode)[0];
+
+ if (typeof refNode == "undefined") {
+ refNode = getActiveRange().startContainer;
+ }
+
+ var ret = getEffectiveCommandValue(refNode, command);
+ if (ret === null) {
+ return "";
+ }
+ return ret;
+ };
+ }
+
+ // "If a command preserves overrides, then before taking its action, the
+ // user agent must record current overrides. After taking the action, if
+ // the active range is collapsed, it must restore states and values from
+ // the recorded list."
+ if ("preservesOverrides" in commands[command]) {
+ var oldAction = commands[command].action;
+
+ commands[command].action = function(value) {
+ var overrides = recordCurrentOverrides();
+ var ret = oldAction(value);
+ if (getActiveRange().collapsed) {
+ restoreStatesAndValues(overrides);
+ }
+ return ret;
+ };
+ }
+});
+})();
+//@}
+
+// vim: foldmarker=@{,@} foldmethod=marker
diff --git a/testing/web-platform/tests/editing/include/manualtest.js b/testing/web-platform/tests/editing/include/manualtest.js
new file mode 100644
index 000000000..504fdae4c
--- /dev/null
+++ b/testing/web-platform/tests/editing/include/manualtest.js
@@ -0,0 +1,225 @@
+// Initial setup
+//@{
+var globalValue;
+if (globalValue === undefined) {
+ globalValue = command in defaultValues ? defaultValues[command] : "";
+}
+var keyPrefix = globalValue == ""
+ ? "manualtest-" + command + "-"
+ : "manualtest-" + command + "-" + globalValue + "-";
+(function(){
+ var manualTests = tests[command]
+ .map(function(test) { return normalizeTest(command, test) })
+ .filter(function(test) { return test[1][1] == globalValue });
+ var relevantMultiTests = tests.multitest
+ .map(function(test) { return normalizeTest("multitest", test) })
+ .filter(function(test) {
+ // We only want multitests if there's exactly one occurrence of the
+ // command we're testing for, and the value is correct, and that's
+ // the last command we're testing. Some of these limitations could
+ // be removed in the future.
+ return test[test.length - 1][0] === command
+ && test[test.length - 1][1] === globalValue;
+ });
+
+ tests = manualTests.concat(relevantMultiTests);
+})();
+//@}
+
+function clearCachedResults() {
+//@{
+ for (var key in localStorage) {
+ if (key.indexOf(keyPrefix) === 0) {
+ localStorage.removeItem(key);
+ }
+ }
+}
+//@}
+
+var numManualTests = 0;
+var currentTestIdx = null;
+
+// Make sure styleWithCss is always reset to false at the start of a test run
+// (I'm looking at you, Firefox)
+try { document.execCommand("stylewithcss", false, "false") } catch(e) {}
+
+function runTests() {
+//@{
+ // We don't ask the user to hit a key on all tests, so make sure not to
+ // claim more tests are going to be run than actually are.
+ for (var i = 0; i < tests.length; i++) {
+ if (localStorage.getItem(keyPrefix + JSON.stringify(tests[i])) === null) {
+ numManualTests++;
+ }
+ }
+
+ currentTestIdx = 0;
+
+ var runTestsButton = document.querySelector("#tests input[type=button]");
+ runTestsButton.parentNode.removeChild(runTestsButton);
+
+ var addTestButton = document.querySelector("#tests input[type=button]");
+ var input = document.querySelector("#tests label input");
+ // This code actually focuses and clicks everything because for some
+ // reason, anything else doesn't work in IE9 . . .
+ input.value = JSON.stringify(tests[0]);
+ input.focus();
+ addTestButton.click();
+}
+//@}
+
+function addTest() {
+//@{
+ var tr = doSetup("#tests table", 0);
+ var input = document.querySelector("#tests label input");
+ var test = JSON.parse(input.value);
+ doInputCell(tr, test, test.length == 2 ? command : "multitest");
+ doSpecCell(tr, test, test.length == 2 ? command : "multitest");
+ if (localStorage.getItem(keyPrefix + JSON.stringify(test)) !== null) {
+ // Yay, I get to cheat. Remove the overlay div so the user doesn't
+ // keep hitting the key, in case it takes a while.
+ var browserCell = document.createElement("td");
+ tr.appendChild(browserCell);
+ browserCell.innerHTML = localStorage[keyPrefix + JSON.stringify(test)];
+ doBrowserCellButton(browserCell, test);
+ document.getElementById("overlay").style.display = "";
+ doSameCell(tr);
+ runNextTest(test);
+ } else {
+ doBrowserCell(tr, test, function() {
+ doSameCell(tr);
+ runNextTest();
+ });
+ }
+}
+//@}
+
+function runNextTest() {
+//@{
+ doTearDown();
+ var input = document.querySelector("#tests label input");
+ if (currentTestIdx === null
+ || currentTestIdx + 1 >= tests.length) {
+ currentTestIdx = null;
+ document.getElementById("overlay").style.display = "";
+ input.value = "";
+ return;
+ }
+ currentTestIdx++;
+ input.value = JSON.stringify(tests[currentTestIdx]);
+ input.focus();
+ addTest();
+}
+//@}
+
+function doBrowserCell(tr, test, callback) {
+//@{
+ var browserCell = document.createElement("td");
+ tr.appendChild(browserCell);
+
+ try {
+ var points = setupCell(browserCell, test[0]);
+
+ var testDiv = browserCell.firstChild;
+ // Work around weird Firefox bug:
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=649138
+ document.body.appendChild(testDiv);
+ testDiv.onkeyup = function() {
+ continueBrowserCell(test, testDiv, browserCell);
+ callback();
+ };
+ testDiv.contentEditable = "true";
+ testDiv.spellcheck = false;
+ if (currentTestIdx === null) {
+ document.getElementById("testcount").style.display = "none";
+ } else {
+ document.getElementById("testcount").style.display = "";
+ document.querySelector("#testcount > span").textContent = numManualTests;
+ numManualTests--;
+ }
+ document.getElementById("overlay").style.display = "block";
+ testDiv.focus();
+ setSelection(points[0], points[1], points[2], points[3]);
+ // Execute any extra commands beforehand, for multitests
+ for (var i = 1; i < test.length - 1; i++) {
+ document.execCommand(test[i][0], false, test[i][1]);
+ }
+ } catch (e) {
+ browserCellException(e, testDiv, browserCell);
+ callback();
+ }
+}
+//@}
+
+function continueBrowserCell(test, testDiv, browserCell) {
+//@{
+ try {
+ testDiv.contentEditable = "inherit";
+ testDiv.removeAttribute("spellcheck");
+ var compareDiv1 = testDiv.cloneNode(true);
+
+ if (getSelection().rangeCount) {
+ addBrackets(getSelection().getRangeAt(0));
+ }
+ browserCell.insertBefore(testDiv, browserCell.firstChild);
+
+ if (!browserCell.childNodes.length == 2) {
+ throw "The cell didn't have two children. Did something spill outside the test div?";
+ }
+
+ compareDiv1.normalize();
+ // Sigh, Gecko is crazy
+ var treeWalker = document.createTreeWalker(compareDiv1, NodeFilter.SHOW_ELEMENT, null, null);
+ while (treeWalker.nextNode()) {
+ var remove = [].filter.call(treeWalker.currentNode.attributes, function(attrib) {
+ return /^_moz_/.test(attrib.name) || attrib.value == "_moz";
+ });
+ for (var i = 0; i < remove.length; i++) {
+ treeWalker.currentNode.removeAttribute(remove[i].name);
+ }
+ }
+ var compareDiv2 = compareDiv1.cloneNode(false);
+ compareDiv2.innerHTML = compareDiv1.innerHTML;
+ if (!compareDiv1.isEqualNode(compareDiv2)
+ && compareDiv1.innerHTML != compareDiv2.innerHTML) {
+ throw "DOM does not round-trip through serialization! "
+ + compareDiv1.innerHTML + " vs. " + compareDiv2.innerHTML;
+ }
+ if (!compareDiv1.isEqualNode(compareDiv2)) {
+ throw "DOM does not round-trip through serialization (although innerHTML is the same)! "
+ + compareDiv1.innerHTML;
+ }
+
+ browserCell.lastChild.textContent = browserCell.firstChild.innerHTML;
+ } catch (e) {
+ browserCellException(e, testDiv, browserCell);
+ }
+
+ localStorage[keyPrefix + JSON.stringify(test)] = browserCell.innerHTML;
+
+ doBrowserCellButton(browserCell, test);
+}
+//@}
+
+function doBrowserCellButton(browserCell, test) {
+//@{
+ var button = document.createElement("button");
+ browserCell.lastChild.appendChild(button);
+ button.textContent = "Redo browser output";
+ button.onclick = function() {
+ localStorage.removeItem(keyPrefix + JSON.stringify(test));
+ var tr = browserCell.parentNode;
+ while (browserCell.nextSibling) {
+ tr.removeChild(browserCell.nextSibling);
+ }
+ tr.removeChild(browserCell);
+ doBrowserCell(tr, test, function() {
+ doSameCell(tr);
+ doTearDown();
+ document.getElementById("overlay").style.display = "";
+ tr.scrollIntoView();
+ });
+ };
+}
+//@}
+// vim: foldmarker=@{,@} foldmethod=marker
diff --git a/testing/web-platform/tests/editing/include/reset.css b/testing/web-platform/tests/editing/include/reset.css
new file mode 100644
index 000000000..b711d724c
--- /dev/null
+++ b/testing/web-platform/tests/editing/include/reset.css
@@ -0,0 +1,27 @@
+/* Make sure various CSS values are what are expected, so that tests work
+ * right. */
+body { font-family: serif }
+/* http://www.w3.org/Bugs/Public/show_bug.cgi?id=12154
+ * https://bugzilla.mozilla.org/show_bug.cgi?id=589124
+ * https://bugs.webkit.org/show_bug.cgi?id=56400 */
+b, strong { font-weight: bold }
+.bold { font-weight: bold }
+.notbold { font-weight: normal }
+.underline { text-decoration: underline }
+.line-through { text-decoration: line-through }
+.underline-and-line-through { text-decoration: underline line-through }
+#purple { color: purple }
+/* https://bugs.webkit.org/show_bug.cgi?id=56670 */
+dfn { font-style: italic }
+/* Opera has weird default blockquote style */
+blockquote { margin: 1em 40px }
+/* Some tests assume links are blue, for the sake of argument, but they aren't
+ * blue in any browser. And :visited definitely isn't blue, except in engines
+ * like Gecko that lie.
+ *
+ * This should really be #00e, probably. See:
+ * http://www.w3.org/Bugs/Public/show_bug.cgi?id=13330 */
+:link, :visited { color: blue }
+/* http://www.w3.org/Bugs/Public/show_bug.cgi?id=14066
+ * https://bugs.webkit.org/show_bug.cgi?id=68392 */
+quasit { text-align: inherit }
diff --git a/testing/web-platform/tests/editing/include/tests.css b/testing/web-platform/tests/editing/include/tests.css
new file mode 100644
index 000000000..e72f33808
--- /dev/null
+++ b/testing/web-platform/tests/editing/include/tests.css
@@ -0,0 +1,84 @@
+@import "reset.css";
+.yes { color: green }
+.no { color: red }
+.maybe { color: orange }
+.yes, .no, .maybe {
+ text-align: center;
+ vertical-align: middle;
+ font-size: 3em;
+ /* Somehow Opera doesn't render the X's if the font is serif, on my
+ * machine. */
+ font-family: sans-serif;
+ border-color: black;
+}
+div.alert {
+ color: red;
+ font-weight: bold;
+}
+.extra-results { font-size: small }
+.good-result { color: green }
+.bad-result { color: red }
+body > div > table > tbody > tr > td > div:first-child {
+ padding-bottom: 0.2em;
+}
+body > div > table > tbody > tr > td > div:last-child {
+ padding-top: 0.2em;
+ border-top: 1px solid black;
+}
+/* Workaround for browsers that don't treat <wbr> as a line-break opportunity
+ * (activated via JS feature-detection) */
+body.wbr-workaround > div > table > tbody > tr > td > div:last-child {
+ word-wrap: break-word;
+}
+body > div > table > tbody > tr > td > div:last-child {
+ white-space: pre-wrap;
+}
+/* Let the rendered HTML line up so it's easier to compare whitespace */
+body > div > table > tbody > tr > td { vertical-align: top }
+/* We don't want test cells to not wrap */
+listing, plaintext, pre, xmp { white-space: pre-wrap }
+img, video { width: 50px }
+body > div > table {
+ width: 100%;
+ table-layout: fixed;
+}
+body > div > table > tbody > tr > td,
+body > div > table > tbody > tr > th {
+ width: 30%;
+}
+body > div > table > tbody > tr > td:last-child,
+body > div > table > tbody > tr > th:last-child {
+ width: 10%;
+}
+body > div > p > label > input { width: 30% }
+#toolbar {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ height: 1.5em;
+ background: white;
+ border-bottom: 2px solid gray;
+}
+body {
+ /* So the toolbar doesn't block it */
+ margin-top: 2em;
+}
+/* For easy visibility of nesting */
+ol ol { list-style-type: lower-alpha }
+ol ol ol { list-style-type: lower-roman }
+/* For manual tests */
+#overlay {
+ display: none;
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ color: red;
+ background: yellow;
+ font-size: 4em;
+ font-weight: bold;
+ text-align: center;
+ padding: 2em;
+}
diff --git a/testing/web-platform/tests/editing/include/tests.js b/testing/web-platform/tests/editing/include/tests.js
new file mode 100644
index 000000000..740cbce68
--- /dev/null
+++ b/testing/web-platform/tests/editing/include/tests.js
@@ -0,0 +1,5716 @@
+// For the original (development) tests, we want to make a bunch of changes to
+// the page as it loads. We don't want this for the conformance tests, so let
+// them opt out.
+if (typeof testsJsLibraryOnly == "undefined" || !testsJsLibraryOnly) {
+ // Alert the reader of egregious Opera bug that will make the specced
+ // implementation horribly buggy
+ //@{
+ (function() {
+ var div = document.createElement("div");
+ div.appendChild(document.createElement("br"));
+ document.body.insertBefore(div, document.body.firstChild);
+ var range = document.createRange();
+ range.setStart(div, 1);
+ div.insertBefore(document.createElement("p"), div.firstChild);
+ if (range.startOffset > range.startContainer.childNodes.length) {
+ var warningDiv = document.createElement("p");
+ document.body.insertBefore(warningDiv, document.body.firstChild);
+ warningDiv.style.fontWeight = "bold";
+ warningDiv.style.fontSize = "2em";
+ warningDiv.style.color = "red";
+ warningDiv.innerHTML = 'Your browser suffers from an <a href="http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1028">egregious bug</a> in range mutation that will give incorrect results for the spec columns in many cases. To ensure that the spec column contains the output actually required by the spec, use a different browser.';
+ }
+ div.parentNode.removeChild(div);
+ })();
+ //@}
+
+ // Insert the toolbar thingie as soon as the script file is loaded
+ //@{
+ (function() {
+ var toolbarDiv = document.createElement("div");
+ toolbarDiv.id = "toolbar";
+ // Note: this is completely not a hack at all.
+ toolbarDiv.innerHTML = "<style id=alerts>body > div > table > tbody > tr:not(.alert):not(:first-child):not(.active) { display: none }</style>"
+ + "<label><input id=alert-checkbox type=checkbox accesskey=a checked onclick='updateAlertRowStyle()'> Display rows without spec <u>a</u>lerts</label>"
+ + "<label><input id=browser-checkbox type=checkbox accesskey=b checked onclick='localStorage[\"display-browser-tests\"] = event.target.checked'> Run <u>b</u>rowser tests as well as spec tests</label>";
+
+ document.body.appendChild(toolbarDiv);
+ })();
+ //@}
+
+ // Confusingly, we're storing a string here, not a boolean.
+ document.querySelector("#alert-checkbox").checked = localStorage["display-alerts"] != "false";
+ document.querySelector("#browser-checkbox").checked = localStorage["display-browser-tests"] != "false";
+
+ function updateAlertRowStyle() {
+ //@{
+ var checked = document.querySelector("#alert-checkbox").checked;
+ document.querySelector("#alerts").disabled = checked;
+ localStorage["display-alerts"] = checked;
+ }
+ //@}
+ updateAlertRowStyle();
+
+ // Feature-test whether the browser wraps at <wbr> or not, and set word-wrap:
+ // break-word where necessary if not. (IE and Opera don't wrap, Gecko and
+ // WebKit do.) word-wrap: break-word will break anywhere at all, so it looks
+ // significantly uglier.
+ //@{
+ (function() {
+ var wordWrapTestDiv = document.createElement("div");
+ wordWrapTestDiv.style.width = "5em";
+ document.body.appendChild(wordWrapTestDiv);
+ wordWrapTestDiv.innerHTML = "abc";
+ var height1 = getComputedStyle(wordWrapTestDiv).height;
+ wordWrapTestDiv.innerHTML = "abc<wbr>abc<wbr>abc<wbr>abc<wbr>abc<wbr>abc";
+ var height2 = getComputedStyle(wordWrapTestDiv).height;
+ document.body.removeChild(wordWrapTestDiv);
+ if (height1 == height2) {
+ document.body.className = (document.body.className + " wbr-workaround").trim();
+ }
+ })();
+ //@}
+}
+
+// Now for the meat of the file.
+var tests = {
+ backcolor: [
+ //@{ Same as hilitecolor (set below)
+ ],
+ //@}
+ bold: [
+ //@{
+ 'foo[]bar',
+ '<p>[foo</p> <p>bar]</p>',
+ '<span>[foo</span> <span>bar]</span>',
+ '<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>',
+ '<p>[foo<p><br><p>bar]',
+ '<b>foo[]bar</b>',
+ '<i>foo[]bar</i>',
+ '<span>foo</span>{}<span>bar</span>',
+ '<span>foo[</span><span>]bar</span>',
+ 'foo[bar]baz',
+ 'foo[bar<b>baz]qoz</b>quz',
+ 'foo[bar<i>baz]qoz</i>quz',
+ '{<p><p> <p>foo</p>}',
+
+ 'foo<span contenteditable=false>[bar]</span>baz',
+ 'fo[o<span contenteditable=false>bar</span>b]az',
+ 'foo<span contenteditable=false>ba[r</span>b]az',
+ 'fo[o<span contenteditable=false>b]ar</span>baz',
+ 'fo[<b>o</b><span contenteditable=false>bar</span><b>b</b>]az',
+ '<span contenteditable=false>foo<span contenteditable=true>[bar]</span>baz</span>',
+ '<span contenteditable=false>fo[o<span contenteditable=true>bar</span>b]az</span>',
+ '<span contenteditable=false>foo<span contenteditable=true>ba[r</span>b]az</span>',
+ '<span contenteditable=false>fo[o<span contenteditable=true>b]ar</span>baz</span>',
+ '<span contenteditable=false>fo[<b>o<span contenteditable=true>bar</span>b</b>]az</span>',
+
+ '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>',
+ '<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>',
+ '<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>',
+ '{<table><tr><td>foo<td>bar<td>baz</table>}',
+
+ 'foo<span style="font-weight: bold">[bar]</span>baz',
+ 'foo<b>[bar]</b>baz',
+ 'foo<b>bar</b>[baz]',
+ '[foo]<b>bar</b>baz',
+ '<b>foo</b>[bar]<b>baz</b>',
+ 'foo<strong>bar</strong>[baz]',
+ '[foo]<strong>bar</strong>baz',
+ '<strong>foo</strong>[bar]<strong>baz</strong>',
+ '<b>foo</b>[bar]<strong>baz</strong>',
+ '<strong>foo</strong>[bar]<b>baz</b>',
+ 'foo[<b>bar</b>]baz',
+ 'foo[<b>bar]</b>baz',
+ 'foo<b>[bar</b>]baz',
+
+ 'foo{<b></b>}baz',
+ 'foo{<i></i>}baz',
+ 'foo{<b><i></i></b>}baz',
+ 'foo{<i><b></b></i>}baz',
+
+ 'foo<strong>[bar]</strong>baz',
+ 'foo[<strong>bar</strong>]baz',
+ 'foo[<strong>bar]</strong>baz',
+ 'foo<strong>[bar</strong>]baz',
+ 'foo[<span style="font-weight: bold">bar</span>]baz',
+ 'foo[<span style="font-weight: bold">bar]</span>baz',
+ 'foo<span style="font-weight: bold">[bar</span>]baz',
+
+ '<b>{<p>foo</p><p>bar</p>}<p>baz</p></b>',
+ '<b><p>foo[<i>bar</i>}</p><p>baz</p></b>',
+
+ 'foo [bar <b>baz] qoz</b> quz sic',
+ 'foo bar <b>baz [qoz</b> quz] sic',
+
+ '<b id=purple>bar [baz] qoz</b>',
+
+ 'foo<span style="font-weight: 100">[bar]</span>baz',
+ 'foo<span style="font-weight: 200">[bar]</span>baz',
+ 'foo<span style="font-weight: 300">[bar]</span>baz',
+ 'foo<span style="font-weight: 400">[bar]</span>baz',
+ 'foo<span style="font-weight: 500">[bar]</span>baz',
+ 'foo<span style="font-weight: 600">[bar]</span>baz',
+ 'foo<span style="font-weight: 700">[bar]</span>baz',
+ 'foo<span style="font-weight: 800">[bar]</span>baz',
+ 'foo<span style="font-weight: 900">[bar]</span>baz',
+ 'foo<span style="font-weight: 400">[bar</span>]baz',
+ 'foo<span style="font-weight: 700">[bar</span>]baz',
+ 'foo[<span style="font-weight: 400">bar]</span>baz',
+ 'foo[<span style="font-weight: 700">bar]</span>baz',
+ 'foo[<span style="font-weight: 400">bar</span>]baz',
+ 'foo[<span style="font-weight: 700">bar</span>]baz',
+ '<span style="font-weight: 100">foo[bar]baz</span>',
+ '<span style="font-weight: 400">foo[bar]baz</span>',
+ '<span style="font-weight: 700">foo[bar]baz</span>',
+ '<span style="font-weight: 900">foo[bar]baz</span>',
+ '{<span style="font-weight: 100">foobar]baz</span>',
+ '{<span style="font-weight: 400">foobar]baz</span>',
+ '{<span style="font-weight: 700">foobar]baz</span>',
+ '{<span style="font-weight: 900">foobar]baz</span>',
+ '<span style="font-weight: 100">foo[barbaz</span>}',
+ '<span style="font-weight: 400">foo[barbaz</span>}',
+ '<span style="font-weight: 700">foo[barbaz</span>}',
+ '<span style="font-weight: 900">foo[barbaz</span>}',
+
+ '<h3>foo[bar]baz</h3>',
+ '{<h3>foobar]baz</h3>',
+ '<h3>foo[barbaz</h3>}',
+ '<h3>[foobarbaz]</h3>',
+ '{<h3>foobarbaz]</h3>',
+ '<h3>[foobarbaz</h3>}',
+ '{<h3>foobarbaz</h3>}',
+
+ '<b>foo<span style="font-weight: normal">bar<b>[baz]</b>quz</span>qoz</b>',
+ '<b>foo<span style="font-weight: normal">[bar]</span>baz</b>',
+
+ '{<b>foo</b> <b>bar</b>}',
+ '{<h3>foo</h3><b>bar</b>}',
+
+ '<i><b>foo</b></i>[bar]<i><b>baz</b></i>',
+ '<i><b>foo</b></i>[bar]<b>baz</b>',
+ '<b>foo</b>[bar]<i><b>baz</b></i>',
+ '<font color=blue face=monospace><b>foo</b></font>[bar]',
+
+ 'foo<span style="font-weight: normal"><b>{bar}</b></span>baz',
+ '[foo<span class=notbold>bar</span>baz]',
+ '<b><span class=notbold>[foo]</span></b>',
+ '<b><span class=notbold>foo[bar]baz</span></b>',
+
+ '<p style="font-weight: bold">foo[bar]baz</p>',
+
+ // Tests for queryCommandIndeterm() and queryCommandState()
+ 'fo[o<b>b]ar</b>baz',
+ 'foo<b>ba[r</b>b]az',
+ 'fo[o<b>bar</b>b]az',
+ 'foo[<b>b]ar</b>baz',
+ 'foo<b>ba[r</b>]baz',
+ 'foo{<b>bar</b>}baz',
+ 'fo[o<span style=font-weight:bold>b]ar</span>baz',
+ '<span style=font-weight:800>fo[o</span><span style=font-weight:900>b]ar</span>',
+ '<span style=font-weight:700>fo[o</span><span style=font-weight:800>b]ar</span>',
+ '<span style=font-weight:600>fo[o</span><span style=font-weight:700>b]ar</span>',
+ '<span style=font-weight:500>fo[o</span><span style=font-weight:600>b]ar</span>',
+ '<span style=font-weight:400>fo[o</span><span style=font-weight:500>b]ar</span>',
+ '<span style=font-weight:300>fo[o</span><span style=font-weight:400>b]ar</span>',
+ '<span style=font-weight:200>fo[o</span><span style=font-weight:300>b]ar</span>',
+ '<span style=font-weight:100>fo[o</span><span style=font-weight:200>b]ar</span>',
+ ],
+ //@}
+ createlink: [
+ //@{
+ 'foo[]bar',
+ '<p>[foo</p> <p>bar]</p>',
+ '<span>[foo</span> <span>bar]</span>',
+ '<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>',
+ '<p>[foo<p><br><p>bar]',
+ '<b>foo[]bar</b>',
+ '<i>foo[]bar</i>',
+ '<span>foo</span>{}<span>bar</span>',
+ '<span>foo[</span><span>]bar</span>',
+ 'foo[bar]baz',
+ 'foo[bar<b>baz]qoz</b>quz',
+ 'foo[bar<i>baz]qoz</i>quz',
+ '{<p><p> <p>foo</p>}',
+
+ '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>',
+ '<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>',
+ '<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>',
+ '{<table><tr><td>foo<td>bar<td>baz</table>}',
+
+ '<a href=http://www.google.com/>foo[bar]baz</a>',
+ '<a href=http://www.google.com/>foo[barbaz</a>}',
+ '{<a href=http://www.google.com/>foobar]baz</a>',
+ '{<a href=http://www.google.com/>foobarbaz</a>}',
+ '<a href=http://www.google.com/>[foobarbaz]</a>',
+
+ 'foo<a href=http://www.google.com/>[bar]</a>baz',
+ '[foo]<a href=http://www.google.com/>bar</a>baz',
+ 'foo<a href=http://www.google.com/>bar</a>[baz]',
+ 'foo[<a href=http://www.google.com/>bar</a>]baz',
+ 'foo<a href=http://www.google.com/>[bar</a>baz]',
+ '[foo<a href=http://www.google.com/>bar]</a>baz',
+ '[foo<a href=http://www.google.com/>bar</a>baz]',
+
+ '<a href=otherurl>foo[bar]baz</a>',
+ '<a href=otherurl>foo[barbaz</a>}',
+ '{<a href=otherurl>foobar]baz</a>',
+ '{<a href=otherurl>foobarbaz</a>}',
+ '<a href=otherurl>[foobarbaz]</a>',
+
+ 'foo<a href=otherurl>[bar]</a>baz',
+ 'foo[<a href=otherurl>bar</a>]baz',
+ 'foo<a href=otherurl>[bar</a>baz]',
+ '[foo<a href=otherurl>bar]</a>baz',
+ '[foo<a href=otherurl>bar</a>baz]',
+
+ '<a href=otherurl><b>foo[bar]baz</b></a>',
+ '<a href=otherurl><b>foo[barbaz</b></a>}',
+ '{<a href=otherurl><b>foobar]baz</b></a>',
+ '<a href=otherurl><b>[foobarbaz]</b></a>',
+
+ '<a name=abc>foo[bar]baz</a>',
+ '<a name=abc><b>foo[bar]baz</b></a>',
+
+ ['', 'foo[bar]baz'],
+ ],
+ //@}
+ // Opera requires this to be quoted, contrary to ES5 11.1.5 which allows
+ // PropertyName to be any IdentifierName, and see 7.6 which defines
+ // IdentifierName to include ReservedWord; Identifier excludes it.
+ "delete": [
+ //@{
+ // Collapsed selection
+ //
+ // These three commented-out test call Firefox 5.0a2 to blow up, not
+ // just throwing exceptions on the tests themselves but on many
+ // subsequent tests too.
+ //'[]foo',
+ //'<span>[]foo</span>',
+ //'<p>[]foo</p>',
+ 'foo[]bar',
+ '<span>foo</span>{}<span>bar</span>',
+ '<span>foo[</span><span>]bar</span>',
+ 'foo<span style=display:none>bar</span>[]baz',
+ 'foo<script>bar</script>[]baz',
+
+ 'fo&ouml;[]bar',
+ 'foo&#x308;[]bar',
+ 'foo&#x308;&#x327;[]bar',
+ '&ouml;[]bar',
+ 'o&#x308;[]bar',
+ 'o&#x308;&#x327;[]bar',
+
+ '&#x5e9;&#x5c1;&#x5b8;[]&#x5dc;&#x5d5;&#x5b9;&#x5dd;',
+ '&#x5e9;&#x5c1;&#x5b8;&#x5dc;&#x5d5;&#x5b9;[]&#x5dd;',
+
+ '<p>foo</p><p>[]bar</p>',
+ '<p>foo</p>[]bar',
+ 'foo<p>[]bar</p>',
+ '<p>foo<br></p><p>[]bar</p>',
+ '<p>foo<br></p>[]bar',
+ 'foo<br><p>[]bar</p>',
+ '<p>foo<br><br></p><p>[]bar</p>',
+ '<p>foo<br><br></p>[]bar',
+ 'foo<br><br><p>[]bar</p>',
+
+ '<div><p>foo</p></div><p>[]bar</p>',
+ '<p>foo</p><div><p>[]bar</p></div>',
+ '<div><p>foo</p></div><div><p>[]bar</p></div>',
+ '<div><p>foo</p></div>[]bar',
+ 'foo<div><p>[]bar</p></div>',
+
+ '<div>foo</div><div>[]bar</div>',
+ '<pre>foo</pre>[]bar',
+
+ 'foo<br>[]bar',
+ 'foo<br><b>[]bar</b>',
+ 'foo<hr>[]bar',
+ '<p>foo<hr><p>[]bar',
+ '<p>foo</p><br><p>[]bar</p>',
+ '<p>foo</p><br><br><p>[]bar</p>',
+ '<p>foo</p><img src=/img/lion.svg><p>[]bar',
+ 'foo<img src=/img/lion.svg>[]bar',
+
+ '<a>foo</a>[]bar',
+ '<a href=/>foo</a>[]bar',
+ '<a name=abc>foo</a>[]bar',
+ '<a href=/ name=abc>foo</a>[]bar',
+ '<span><a>foo</a></span>[]bar',
+ '<span><a href=/>foo</a></span>[]bar',
+ '<span><a name=abc>foo</a></span>[]bar',
+ '<span><a href=/ name=abc>foo</a></span>[]bar',
+ 'foo<a>[]bar</a>',
+ 'foo<a href=/>[]bar</a>',
+ 'foo<a name=abc>[]bar</a>',
+ 'foo<a href=/ name=abc>[]bar</a>',
+
+ 'foo &nbsp;[]',
+ '&nbsp;[] foo',
+ 'foo &nbsp;[]bar',
+ 'foo&nbsp; []bar',
+ 'foo&nbsp;&nbsp;[]bar',
+ 'foo []bar',
+ 'foo []&nbsp; bar',
+ 'foo &nbsp;[] bar',
+ 'foo &nbsp; []bar',
+ 'foo []<span>&nbsp;</span> bar',
+ 'foo <span>&nbsp;</span>[] bar',
+ 'foo <span>&nbsp;</span> []bar',
+ '<b>foo </b>&nbsp;[]bar',
+ '<b>foo&nbsp;</b> []bar',
+ '<b>foo&nbsp;</b>&nbsp;[]bar',
+ '<b>foo </b> []bar',
+ '<p>foo </p><p>[] bar</p>',
+
+ '<pre>foo &nbsp;[]</pre>',
+ '<pre>&nbsp;[] foo</pre>',
+ '<pre>foo &nbsp;[]bar</pre>',
+ '<pre>foo&nbsp; []bar</pre>',
+ '<pre>foo []bar</pre>',
+
+ '<div style=white-space:pre>foo &nbsp;[]</div>',
+ '<div style=white-space:pre>&nbsp;[] foo</div>',
+ '<div style=white-space:pre>foo &nbsp;[]bar</div>',
+ '<div style=white-space:pre>foo&nbsp; []bar</div>',
+ '<div style=white-space:pre>foo []bar</div>',
+
+ '<div style=white-space:pre-wrap>foo &nbsp;[]</div>',
+ '<div style=white-space:pre-wrap>&nbsp;[] foo</div>',
+ '<div style=white-space:pre-wrap>foo &nbsp;[]bar</div>',
+ '<div style=white-space:pre-wrap>foo&nbsp; []bar</div>',
+ '<div style=white-space:pre-wrap>foo []bar</div>',
+
+ '<div style=white-space:pre-line>foo &nbsp;[]</div>',
+ '<div style=white-space:pre-line>&nbsp;[] foo</div>',
+ '<div style=white-space:pre-line>foo &nbsp;[]bar</div>',
+ '<div style=white-space:pre-line>foo&nbsp; []bar</div>',
+ '<div style=white-space:pre-line>foo []bar</div>',
+
+ '<div style=white-space:nowrap>foo &nbsp;[]</div>',
+ '<div style=white-space:nowrap>&nbsp;[] foo</div>',
+ '<div style=white-space:nowrap>foo &nbsp;[]bar</div>',
+ '<div style=white-space:nowrap>foo&nbsp; []bar</div>',
+ '<div style=white-space:nowrap>foo []bar</div>',
+
+ // Tables with collapsed selection
+ 'foo<table><tr><td>[]bar</table>baz',
+ 'foo<table><tr><td>bar</table>[]baz',
+ '<p>foo<table><tr><td>[]bar</table><p>baz',
+ '<p>foo<table><tr><td>bar</table><p>[]baz',
+ '<table><tr><td>foo<td>[]bar</table>',
+ '<table><tr><td>foo<tr><td>[]bar</table>',
+
+ 'foo<br><table><tr><td>[]bar</table>baz',
+ 'foo<table><tr><td>bar<br></table>[]baz',
+ '<p>foo<br><table><tr><td>[]bar</table><p>baz',
+ '<p>foo<table><tr><td>bar<br></table><p>[]baz',
+ '<table><tr><td>foo<br><td>[]bar</table>',
+ '<table><tr><td>foo<br><tr><td>[]bar</table>',
+
+ 'foo<br><br><table><tr><td>[]bar</table>baz',
+ 'foo<table><tr><td>bar<br><br></table>[]baz',
+ '<p>foo<br><br><table><tr><td>[]bar</table><p>baz',
+ '<p>foo<table><tr><td>bar<br><br></table><p>[]baz',
+ '<table><tr><td>foo<br><br><td>[]bar</table>',
+ '<table><tr><td>foo<br><br><tr><td>[]bar</table>',
+
+ 'foo<hr><table><tr><td>[]bar</table>baz',
+ 'foo<table><tr><td>bar<hr></table>[]baz',
+ '<table><tr><td>foo<hr><td>[]bar</table>',
+ '<table><tr><td>foo<hr><tr><td>[]bar</table>',
+
+ // Lists with collapsed selection
+ 'foo<ol><li>[]bar<li>baz</ol>',
+ 'foo<br><ol><li>[]bar<li>baz</ol>',
+ 'foo<br><br><ol><li>[]bar<li>baz</ol>',
+ '<ol><li>foo<li>[]bar</ol>',
+ '<ol><li>foo<br><li>[]bar</ol>',
+ '<ol><li>foo<br><br><li>[]bar</ol>',
+ '<ol><li>foo<li>[]bar<br>baz</ol>',
+ '<ol><li>foo<br>bar<li>[]baz</ol>',
+
+ '<ol><li><p>foo</p>{}bar</ol>',
+
+ '<ol><li><p>foo<li>[]bar</ol>',
+ '<ol><li>foo<li><p>[]bar</ol>',
+ '<ol><li><p>foo<li><p>[]bar</ol>',
+
+ '<ol><li>foo<ul><li>[]bar</ul></ol>',
+ 'foo<ol><ol><li>[]bar</ol></ol>',
+ 'foo<div><ol><li>[]bar</ol></div>',
+
+ 'foo<dl><dt>[]bar<dd>baz</dl>',
+ 'foo<dl><dd>[]bar</dl>',
+ '<dl><dt>foo<dd>[]bar</dl>',
+ '<dl><dt>foo<dt>[]bar<dd>baz</dl>',
+ '<dl><dt>foo<dd>bar<dd>[]baz</dl>',
+
+ '<ol><li>foo</ol>[]bar',
+ '<ol><li>foo<br></ol>[]bar',
+ '<ol><li>foo<br><br></ol>[]bar',
+ '<ol><li><br></ol>[]bar',
+ '<ol><li>foo<li><br></ol>[]bar',
+
+ '<ol><li>foo</ol><p>[]bar',
+ '<ol><li>foo<br></ol><p>[]bar',
+ '<ol><li>foo<br><br></ol><p>[]bar',
+ '<ol><li><br></ol><p>[]bar',
+ '<ol><li>foo<li><br></ol><p>[]bar',
+
+ '<ol><li>foo</ol>{}<br>',
+ '<ol><li>foo<br></ol>{}<br>',
+ '<ol><li>foo<br><br></ol>{}<br>',
+ '<ol><li><br></ol>{}<br>',
+ '<ol><li>foo<li><br></ol>{}<br>',
+
+ '<ol><li>foo</ol><p>{}<br>',
+ '<ol><li>foo<br></ol><p>{}<br>',
+ '<ol><li>foo<br><br></ol><p>{}<br>',
+ '<ol><li><br></ol><p>{}<br>',
+ '<ol><li>foo<li><br></ol><p>{}<br>',
+
+ // Indented stuff with collapsed selection
+ 'foo<blockquote>[]bar</blockquote>',
+ 'foo<blockquote><blockquote>[]bar</blockquote></blockquote>',
+ 'foo<blockquote><div>[]bar</div></blockquote>',
+ 'foo<blockquote style="color: blue">[]bar</blockquote>',
+
+ 'foo<blockquote><blockquote><p>[]bar<p>baz</blockquote></blockquote>',
+ 'foo<blockquote><div><p>[]bar<p>baz</div></blockquote>',
+ 'foo<blockquote style="color: blue"><p>[]bar<p>baz</blockquote>',
+
+ 'foo<blockquote><p><b>[]bar</b><p>baz</blockquote>',
+ 'foo<blockquote><p><strong>[]bar</strong><p>baz</blockquote>',
+ 'foo<blockquote><p><span>[]bar</span><p>baz</blockquote>',
+
+ 'foo<blockquote><ol><li>[]bar</ol></blockquote><p>extra',
+ 'foo<blockquote>bar<ol><li>[]baz</ol>quz</blockquote><p>extra',
+ 'foo<blockquote><ol><li>bar</li><ol><li>[]baz</ol><li>quz</ol></blockquote><p>extra',
+
+ // Invisible stuff with collapsed selection
+ 'foo<span></span>[]bar',
+ 'foo<span><span></span></span>[]bar',
+ 'foo<quasit></quasit>[]bar',
+ 'foo<br><span></span>[]bar',
+ '<span>foo<span></span></span>[]bar',
+ 'foo<span></span><span>[]bar</span>',
+ 'foo<div><div><p>[]bar</div></div>',
+ 'foo<div><div><p><!--abc-->[]bar</div></div>',
+ 'foo<div><div><!--abc--><p>[]bar</div></div>',
+ 'foo<div><!--abc--><div><p>[]bar</div></div>',
+ 'foo<!--abc--><div><div><p>[]bar</div></div>',
+ '<div><div><p>foo</div></div>[]bar',
+ '<div><div><p>foo</div></div><!--abc-->[]bar',
+ '<div><div><p>foo</div><!--abc--></div>[]bar',
+ '<div><div><p>foo</p><!--abc--></div></div>[]bar',
+ '<div><div><p>foo<!--abc--></div></div>[]bar',
+ '<div><div><p>foo</p></div></div><div><div><div>[]bar</div></div></div>',
+ '<div><div><p>foo<!--abc--></p></div></div><div><div><div>[]bar</div></div></div>',
+ '<div><div><p>foo</p><!--abc--></div></div><div><div><div>[]bar</div></div></div>',
+ '<div><div><p>foo</p></div><!--abc--></div><div><div><div>[]bar</div></div></div>',
+ '<div><div><p>foo</p></div></div><!--abc--><div><div><div>[]bar</div></div></div>',
+ '<div><div><p>foo</p></div></div><div><!--abc--><div><div>[]bar</div></div></div>',
+ '<div><div><p>foo</p></div></div><div><div><!--abc--><div>[]bar</div></div></div>',
+ '<div><div><p>foo</p></div></div><div><div><div><!--abc-->[]bar</div></div></div>',
+
+ // Styled stuff with collapsed selection
+ '<p style=color:blue>foo<p>[]bar',
+ '<p style=color:blue>foo<p style=color:brown>[]bar',
+ '<p style=color:blue>foo<p style=color:rgba(0,0,255,1)>[]bar',
+ '<p style=color:transparent>foo<p style=color:rgba(0,0,0,0)>[]bar',
+ '<p>foo<p style=color:brown>[]bar',
+ '<p><font color=blue>foo</font><p>[]bar',
+ '<p><font color=blue>foo</font><p><font color=brown>[]bar</font>',
+ '<p>foo<p><font color=brown>[]bar</font>',
+ '<p><span style=color:blue>foo</font><p>[]bar',
+ '<p><span style=color:blue>foo</font><p><span style=color:brown>[]bar</font>',
+ '<p>foo<p><span style=color:brown>[]bar</font>',
+
+ '<p style=background-color:aqua>foo<p>[]bar',
+ '<p style=background-color:aqua>foo<p style=background-color:tan>[]bar',
+ '<p>foo<p style=background-color:tan>[]bar',
+ '<p><span style=background-color:aqua>foo</font><p>[]bar',
+ '<p><span style=background-color:aqua>foo</font><p><span style=background-color:tan>[]bar</font>',
+ '<p>foo<p><span style=background-color:tan>[]bar</font>',
+
+ '<p style=text-decoration:underline>foo<p>[]bar',
+ '<p style=text-decoration:underline>foo<p style=text-decoration:line-through>[]bar',
+ '<p>foo<p style=text-decoration:line-through>[]bar',
+ '<p><u>foo</u><p>[]bar',
+ '<p><u>foo</u><p><s>[]bar</s>',
+ '<p>foo<p><s>[]bar</s>',
+
+ '<p style=color:blue>foo</p>[]bar',
+ 'foo<p style=color:brown>[]bar',
+ '<div style=color:blue><p style=color:green>foo</div>[]bar',
+ '<div style=color:blue><p style=color:green>foo</div><p style=color:brown>[]bar',
+ '<p style=color:blue>foo<div style=color:brown><p style=color:green>[]bar',
+
+ // Uncollapsed selection
+ 'foo[bar]baz',
+ '<p>foo<span style=color:#aBcDeF>[bar]</span>baz',
+ '<p>foo<span style=color:#aBcDeF>{bar}</span>baz',
+ '<p>foo{<span style=color:#aBcDeF>bar</span>}baz',
+ '<p>[foo<span style=color:#aBcDeF>bar]</span>baz',
+ '<p>{foo<span style=color:#aBcDeF>bar}</span>baz',
+ '<p>foo<span style=color:#aBcDeF>[bar</span>baz]',
+ '<p>foo<span style=color:#aBcDeF>{bar</span>baz}',
+ '<p>foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz',
+
+ 'foo<b>[bar]</b>baz',
+ 'foo<b>{bar}</b>baz',
+ 'foo{<b>bar</b>}baz',
+ 'foo<span>[bar]</span>baz',
+ 'foo<span>{bar}</span>baz',
+ 'foo{<span>bar</span>}baz',
+ '<b>foo[bar</b><i>baz]quz</i>',
+ '<p>foo</p><p>[bar]</p><p>baz</p>',
+ '<p>foo</p><p>{bar}</p><p>baz</p>',
+ '<p>foo</p><p>{bar</p>}<p>baz</p>',
+ '<p>foo</p>{<p>bar}</p><p>baz</p>',
+ '<p>foo</p>{<p>bar</p>}<p>baz</p>',
+
+ '<p>foo[bar<p>baz]quz',
+ '<p>foo[bar<div>baz]quz</div>',
+ '<p>foo[bar<h1>baz]quz</h1>',
+ '<div>foo[bar</div><p>baz]quz',
+ '<blockquote>foo[bar</blockquote><pre>baz]quz</pre>',
+
+ '<p><b>foo[bar</b><p>baz]quz',
+ '<div><p>foo[bar</div><p>baz]quz',
+ '<p>foo[bar<blockquote><p>baz]quz<p>qoz</blockquote',
+ '<p>foo[bar<p style=color:blue>baz]quz',
+ '<p>foo[bar<p><b>baz]quz</b>',
+
+ '<div><p>foo<p>[bar<p>baz]</div>',
+
+ 'foo[<br>]bar',
+ '<p>foo[</p><p>]bar</p>',
+ '<p>foo[</p><p>]bar<br>baz</p>',
+ 'foo[<p>]bar</p>',
+ 'foo{<p>}bar</p>',
+ 'foo[<p>]bar<br>baz</p>',
+ 'foo[<p>]bar</p>baz',
+ 'foo{<p>bar</p>}baz',
+ 'foo<p>{bar</p>}baz',
+ 'foo{<p>bar}</p>baz',
+ '<p>foo[</p>]bar',
+ '<p>foo{</p>}bar',
+ '<p>foo[</p>]bar<br>baz',
+ '<p>foo[</p>]bar<p>baz</p>',
+ 'foo[<div><p>]bar</div>',
+ '<div><p>foo[</p></div>]bar',
+ 'foo[<div><p>]bar</p>baz</div>',
+ 'foo[<div>]bar<p>baz</p></div>',
+ '<div><p>foo</p>bar[</div>]baz',
+ '<div>foo<p>bar[</p></div>]baz',
+
+ '<p>foo<br>{</p>]bar',
+ '<p>foo<br><br>{</p>]bar',
+ 'foo<br>{<p>]bar</p>',
+ 'foo<br><br>{<p>]bar</p>',
+ '<p>foo<br>{</p><p>}bar</p>',
+ '<p>foo<br><br>{</p><p>}bar</p>',
+
+ '<table><tbody><tr><th>foo<th>[bar]<th>baz<tr><td>quz<td>qoz<td>qiz</table>',
+ '<table><tbody><tr><th>foo<th>ba[r<th>b]az<tr><td>quz<td>qoz<td>qiz</table>',
+ '<table><tbody><tr><th>fo[o<th>bar<th>b]az<tr><td>quz<td>qoz<td>qiz</table>',
+ '<table><tbody><tr><th>foo<th>bar<th>ba[z<tr><td>q]uz<td>qoz<td>qiz</table>',
+ '<table><tbody><tr><th>[foo<th>bar<th>baz]<tr><td>quz<td>qoz<td>qiz</table>',
+ '<table><tbody><tr><th>[foo<th>bar<th>baz<tr><td>quz<td>qoz<td>qiz]</table>',
+ '{<table><tbody><tr><th>foo<th>bar<th>baz<tr><td>quz<td>qoz<td>qiz</table>}',
+ '<table><tbody><tr><td>foo<td>ba[r<tr><td>baz<td>quz<tr><td>q]oz<td>qiz</table>',
+ '<p>fo[o<table><tr><td>b]ar</table><p>baz',
+ '<p>foo<table><tr><td>ba[r</table><p>b]az',
+ '<p>fo[o<table><tr><td>bar</table><p>b]az',
+
+ '<p>foo<ol><li>ba[r<li>b]az</ol><p>quz',
+ '<p>foo<ol><li>bar<li>[baz]</ol><p>quz',
+ '<p>fo[o<ol><li>b]ar<li>baz</ol><p>quz',
+ '<p>foo<ol><li>bar<li>ba[z</ol><p>q]uz',
+ '<p>fo[o<ol><li>bar<li>b]az</ol><p>quz',
+ '<p>fo[o<ol><li>bar<li>baz</ol><p>q]uz',
+
+ '<ol><li>fo[o</ol><ol><li>b]ar</ol>',
+ '<ol><li>fo[o</ol><ul><li>b]ar</ul>',
+
+ 'foo[<ol><li>]bar</ol>',
+ '<ol><li>foo[<li>]bar</ol>',
+ 'foo[<dl><dt>]bar<dd>baz</dl>',
+ 'foo[<dl><dd>]bar</dl>',
+ '<dl><dt>foo[<dd>]bar</dl>',
+ '<dl><dt>foo[<dt>]bar<dd>baz</dl>',
+ '<dl><dt>foo<dd>bar[<dd>]baz</dl>',
+
+ '<b>foo [&nbsp;</b>bar]',
+ 'foo<b> [&nbsp;bar]</b>',
+ '<b>[foo&nbsp;] </b>bar',
+ '[foo<b>&nbsp;] bar</b>',
+
+ // Do we merge based on element names or the display property?
+ '<p style=display:inline>fo[o<p style=display:inline>b]ar',
+ '<span style=display:block>fo[o</span><span style=display:block>b]ar</span>',
+ '<span style=display:inline-block>fo[o</span><span style=display:inline-block>b]ar</span>',
+ '<span style=display:inline-table>fo[o</span><span style=display:inline-table>b]ar</span>',
+ '<span style=display:none>fo[o</span><span style=display:none>b]ar</span>',
+ '<quasit style=display:block>fo[o</quasit><quasit style=display:block>b]ar</quasit>',
+
+ // https://bugs.webkit.org/show_bug.cgi?id=35281
+ // http://www.w3.org/Bugs/Public/show_bug.cgi?id=13976
+ '<ol><li>foo</ol>{}<br><ol><li>bar</ol>',
+ '<ol><li>foo</ol><p>{}<br></p><ol><li>bar</ol>',
+ '<ol><li><p>foo</ol><p>{}<br></p><ol><li>bar</ol>',
+ '<ol id=a><li>foo</ol>{}<br><ol><li>bar</ol>',
+ '<ol><li>foo</ol>{}<br><ol id=b><li>bar</ol>',
+ '<ol id=a><li>foo</ol>{}<br><ol id=b><li>bar</ol>',
+ '<ol class=a><li>foo</ol>{}<br><ol class=b><li>bar</ol>',
+ // Broken test: http://www.w3.org/Bugs/Public/show_bug.cgi?id=14727
+ '!<ol><ol><li>foo</ol><li>{}<br><ol><li>bar</ol></ol>',
+ '<ol><ol><li>foo</ol><li>{}<br></li><ol><li>bar</ol></ol>',
+ '<ol><li>foo[</ol>bar]<ol><li>baz</ol>',
+ '<ol><li>foo[</ol><p>bar]<ol><li>baz</ol>',
+ '<ol><li><p>foo[</ol><p>bar]<ol><li>baz</ol>',
+ '<ol><li>foo[]</ol><ol><li>bar</ol>',
+ '<ol><li>foo</ol>[bar<ol><li>]baz</ol>',
+ '<ol><li>foo</ol><p>[bar<ol><li>]baz</ol>',
+ '<ol><li>foo</ol><p>[bar<ol><li><p>]baz</ol>',
+ '<ol><li>foo</ol><ol><li>b[]ar</ol>',
+ '<ol><ol><li>foo[</ol><li>bar</ol>baz]<ol><li>quz</ol>',
+ '<ul><li>foo</ul>{}<br><ul><li>bar</ul>',
+ '<ul><li>foo</ul><p>{}<br></p><ul><li>bar</ul>',
+ '<ol><li>foo[<li>bar]</ol><ol><li>baz</ol><ol><li>quz</ol>',
+ '<ol><li>foo</ol>{}<br><ul><li>bar</ul>',
+ '<ol><li>foo</ol><p>{}<br></p><ul><li>bar</ul>',
+ '<ul><li>foo</ul>{}<br><ol><li>bar</ol>',
+ '<ul><li>foo</ul><p>{}<br></p><ol><li>bar</ol>',
+
+ // http://www.w3.org/Bugs/Public/show_bug.cgi?id=13831
+ '<p><b>[foo]</b>',
+ '<p><quasit>[foo]</quasit>',
+ '<p><b><i>[foo]</i></b>',
+ '<p><b>{foo}</b>',
+ '<p>{<b>foo</b>}',
+ '<p><b>f[]</b>',
+ '<b>[foo]</b>',
+ '<div><b>[foo]</b></div>',
+ ],
+ //@}
+ fontname: [
+ //@{
+ 'foo[]bar',
+ '<p>[foo</p> <p>bar]</p>',
+ '<span>[foo</span> <span>bar]</span>',
+ '<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>',
+ '<p>[foo<p><br><p>bar]',
+ '<b>foo[]bar</b>',
+ '<i>foo[]bar</i>',
+ '<span>foo</span>{}<span>bar</span>',
+ '<span>foo[</span><span>]bar</span>',
+ 'foo[bar]baz',
+ 'foo[bar<b>baz]qoz</b>quz',
+ 'foo[bar<i>baz]qoz</i>quz',
+ '{<p><p> <p>foo</p>}',
+
+ '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>',
+ '<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>',
+ '<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>',
+ '{<table><tr><td>foo<td>bar<td>baz</table>}',
+
+ 'foo<code>[bar]</code>baz',
+ 'foo<kbd>[bar]</kbd>baz',
+ 'foo<listing>[bar]</listing>baz',
+ 'foo<pre>[bar]</pre>baz',
+ 'foo<samp>[bar]</samp>baz',
+ 'foo<tt>[bar]</tt>baz',
+
+ 'foo<code>b[a]r</code>baz',
+ 'foo<kbd>b[a]r</kbd>baz',
+ 'foo<listing>b[a]r</listing>baz',
+ 'foo<pre>b[a]r</pre>baz',
+ 'foo<samp>b[a]r</samp>baz',
+ 'foo<tt>b[a]r</tt>baz',
+
+ '[foo<code>bar</code>baz]',
+ '[foo<kbd>bar</kbd>baz]',
+ '[foo<listing>bar</listing>baz]',
+ '[foo<pre>bar</pre>baz]',
+ '[foo<samp>bar</samp>baz]',
+ '[foo<tt>bar</tt>baz]',
+
+ '[foo<code>ba]r</code>baz',
+ '[foo<kbd>ba]r</kbd>baz',
+ '[foo<listing>ba]r</listing>baz',
+ '[foo<pre>ba]r</pre>baz',
+ '[foo<samp>ba]r</samp>baz',
+ '[foo<tt>ba]r</tt>baz',
+
+ 'foo<code>b[ar</code>baz]',
+ 'foo<kbd>b[ar</kbd>baz]',
+ 'foo<listing>b[ar</listing>baz]',
+ 'foo<pre>b[ar</pre>baz]',
+ 'foo<samp>b[ar</samp>baz]',
+ 'foo<tt>b[ar</tt>baz]',
+
+ 'foo<span style="font-family: sans-serif">[bar]</span>baz',
+ 'foo<span style="font-family: sans-serif">b[a]r</span>baz',
+ 'foo<span style="font-family: monospace">[bar]</span>baz',
+ 'foo<span style="font-family: monospace">b[a]r</span>baz',
+
+ 'foo<tt contenteditable=false>ba[r</tt>b]az',
+ 'fo[o<tt contenteditable=false>b]ar</tt>baz',
+ 'foo<tt>{}<br></tt>bar',
+ 'foo<tt>{<br></tt>}bar',
+ 'foo<tt>{<br></tt>b]ar',
+
+ // Tests for queryCommandIndeterm() and queryCommandState()
+ 'fo[o<span style=font-family:monospace>b]ar</span>baz',
+ 'foo<span style=font-family:monospace>ba[r</span>b]az',
+ 'fo[o<span style=font-family:monospace>bar</span>b]az',
+ 'foo[<span style=font-family:monospace>b]ar</span>baz',
+ 'foo<span style=font-family:monospace>ba[r</span>]baz',
+ 'foo[<span style=font-family:monospace>bar</span>]baz',
+ 'foo<span style=font-family:monospace>[bar]</span>baz',
+ 'foo{<span style=font-family:monospace>bar</span>}baz',
+ 'fo[o<code>b]ar</code>',
+ 'fo[o<kbd>b]ar</kbd>',
+ 'fo[o<listing>b]ar</listing>',
+ 'fo[o<pre>b]ar</pre>',
+ 'fo[o<samp>b]ar</samp>',
+ 'fo[o<tt>b]ar</tt>',
+ '<tt>fo[o</tt><code>b]ar</code>',
+ '<pre>fo[o</pre><samp>b]ar</samp>',
+ '<span style=font-family:monospace>fo[o</span><kbd>b]ar</kbd>',
+ ],
+ //@}
+ fontsize: [
+ //@{
+ 'foo[]bar',
+ '<p>[foo</p> <p>bar]</p>',
+ '<span>[foo</span> <span>bar]</span>',
+ '<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>',
+ '<p>[foo<p><br><p>bar]',
+ '<b>foo[]bar</b>',
+ '<i>foo[]bar</i>',
+ '<span>foo</span>{}<span>bar</span>',
+ '<span>foo[</span><span>]bar</span>',
+ 'foo[bar]baz',
+ 'foo[bar<b>baz]qoz</b>quz',
+ 'foo[bar<i>baz]qoz</i>quz',
+ '{<p><p> <p>foo</p>}',
+
+ ["1", 'foo[bar]baz'],
+ ["0", 'foo[bar]baz'],
+ ["-5", 'foo[bar]baz'],
+ ["6", 'foo[bar]baz'],
+ ["7", 'foo[bar]baz'],
+ ["8", 'foo[bar]baz'],
+ ["100", 'foo[bar]baz'],
+ ["2em", 'foo[bar]baz'],
+ ["20pt", 'foo[bar]baz'],
+ ["xx-large", 'foo[bar]baz'],
+ [" 1 ", 'foo[bar]baz'],
+ ["1.", 'foo[bar]baz'],
+ ["1.0", 'foo[bar]baz'],
+ ["1.0e2", 'foo[bar]baz'],
+ ["1.1", 'foo[bar]baz'],
+ ["1.9", 'foo[bar]baz'],
+ ["+0", 'foo[bar]baz'],
+ ["+1", 'foo[bar]baz'],
+ ["+9", 'foo[bar]baz'],
+ ["-0", 'foo[bar]baz'],
+ ["-1", 'foo[bar]baz'],
+ ["-9", 'foo[bar]baz'],
+ ["", 'foo[bar]baz'],
+
+ '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>',
+ '<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>',
+ '<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>',
+ '{<table><tr><td>foo<td>bar<td>baz</table>}',
+
+ 'foo<font size=1>[bar]</font>baz',
+ '<font size=1>foo[bar]baz</font>',
+ 'foo<font size=3>[bar]</font>baz',
+ '<font size=3>foo[bar]baz</font>',
+ 'foo<font size=4>[bar]</font>baz',
+ '<font size=4>foo[bar]baz</font>',
+ 'foo<font size=+1>[bar]</font>baz',
+ '<font size=+1>foo[bar]baz</font>',
+ '<font size=4>foo<font size=1>b[a]r</font>baz</font>',
+
+ 'foo<span style="font-size: xx-small">[bar]</span>baz',
+ '<span style="font-size: xx-small">foo[bar]baz</span>',
+ 'foo<span style="font-size: medium">[bar]</span>baz',
+ '<span style="font-size: medium">foo[bar]baz</span>',
+ 'foo<span style="font-size: large">[bar]</span>baz',
+ '<span style="font-size: large">foo[bar]baz</span>',
+ '<span style="font-size: large">foo<span style="font-size: xx-small">b[a]r</span>baz</span>',
+
+ 'foo<span style="font-size: 2em">[bar]</span>baz',
+ '<span style="font-size: 2em">foo[bar]baz</span>',
+
+ '<p style="font-size: xx-small">foo[bar]baz</p>',
+ '<p style="font-size: medium">foo[bar]baz</p>',
+ '<p style="font-size: large">foo[bar]baz</p>',
+ '<p style="font-size: 2em">foo[bar]baz</p>',
+
+ ["3", '<p style="font-size: xx-small">foo[bar]baz</p>'],
+ ["3", '<p style="font-size: medium">foo[bar]baz</p>'],
+ ["3", '<p style="font-size: large">foo[bar]baz</p>'],
+ ["3", '<p style="font-size: 2em">foo[bar]baz</p>'],
+
+ // Minor algorithm bug: this changes the size of the "b" and "r" in
+ // "bar" when we pull down styles
+ ["3", '<font size=6>foo <span style="font-size: 2em">b[a]r</span> baz</font>'],
+
+ ["3", 'foo<big>[bar]</big>baz'],
+ ["3", 'foo<big>b[a]r</big>baz'],
+ ["3", 'foo<small>[bar]</small>baz'],
+ ["3", 'foo<small>b[a]r</small>baz'],
+
+ // Tests for queryCommandIndeterm() and queryCommandState()
+ 'fo[o<font size=2>b]ar</font>baz',
+ 'foo<font size=2>ba[r</font>b]az',
+ 'fo[o<font size=2>bar</font>b]az',
+ 'foo[<font size=2>b]ar</font>baz',
+ 'foo<font size=2>ba[r</font>]baz',
+ 'foo[<font size=2>bar</font>]baz',
+ 'foo<font size=2>[bar]</font>baz',
+ 'foo{<font size=2>bar</font>}baz',
+ '<font size=1>fo[o</font><span style=font-size:xx-small>b]ar</span>',
+ '<font size=2>fo[o</font><span style=font-size:small>b]ar</span>',
+ '<font size=3>fo[o</font><span style=font-size:medium>b]ar</span>',
+ '<font size=4>fo[o</font><span style=font-size:large>b]ar</span>',
+ '<font size=5>fo[o</font><span style=font-size:x-large>b]ar</span>',
+ '<font size=6>fo[o</font><span style=font-size:xx-large>b]ar</span>',
+
+ // http://www.w3.org/Bugs/Public/show_bug.cgi?id=13829
+ ["!6", '<span style=background-color:aqua>[foo]</span>'],
+ ["!6", '<span style=background-color:aqua>foo[bar]baz</span>'],
+ ["!6", '[foo<span style=background-color:aqua>bar</span>baz]'],
+ ],
+ //@}
+ forecolor: [
+ //@{
+ 'foo[]bar',
+ '<p>[foo</p> <p>bar]</p>',
+ '<span>[foo</span> <span>bar]</span>',
+ '<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>',
+ '<p>[foo<p><br><p>bar]',
+ '<b>foo[]bar</b>',
+ '<i>foo[]bar</i>',
+ '<span>foo</span>{}<span>bar</span>',
+ '<span>foo[</span><span>]bar</span>',
+ 'foo[bar]baz',
+ 'foo[bar<b>baz]qoz</b>quz',
+ 'foo[bar<i>baz]qoz</i>quz',
+ '{<p><p> <p>foo</p>}',
+
+ ['blue', 'foo[bar]baz'],
+ ['f', 'foo[bar]baz'],
+ ['#f', 'foo[bar]baz'],
+ ['00f', 'foo[bar]baz'],
+ ['#00f', 'foo[bar]baz'],
+ ['0000ff', 'foo[bar]baz'],
+ ['#0000ff', 'foo[bar]baz'],
+ ['000000fff', 'foo[bar]baz'],
+ ['#000000fff', 'foo[bar]baz'],
+ ['rgb(0, 0, 255)', 'foo[bar]baz'],
+ ['rgb(0%, 0%, 100%)', 'foo[bar]baz'],
+ ['rgb( 0 ,0 ,255)', 'foo[bar]baz'],
+ ['rgba(0, 0, 255, 0.0)', 'foo[bar]baz'],
+ ['rgb(15, -10, 375)', 'foo[bar]baz'],
+ ['rgba(0, 0, 0, 1)', 'foo[bar]baz'],
+ ['rgba(255, 255, 255, 1)', 'foo[bar]baz'],
+ ['rgba(0, 0, 255, 0.5)', 'foo[bar]baz'],
+ ['hsl(240, 100%, 50%)', 'foo[bar]baz'],
+ ['cornsilk', 'foo[bar]baz'],
+ ['potato quiche', 'foo[bar]baz'],
+ ['transparent', 'foo[bar]baz'],
+ ['currentColor', 'foo[bar]baz'],
+
+ '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>',
+ '<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>',
+ '<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>',
+ '{<table><tr><td>foo<td>bar<td>baz</table>}',
+
+ 'foo<font color=blue>[bar]</font>baz',
+ 'foo{<font color=blue>bar</font>}baz',
+ '<span style="color: blue">foo<span style="color: brown">[bar]</span>baz</span>',
+ '<span style="color: #00f">foo<span style="color: brown">[bar]</span>baz</span>',
+ '<span style="color: #0000ff">foo<span style="color: brown">[bar]</span>baz</span>',
+ '<span style="color: rgb(0, 0, 255)">foo<span style="color: brown">[bar]</span>baz</span>',
+ '<font color=blue>foo<font color=brown>[bar]</font>baz</font>',
+ '<span style="color: rgb(0, 0, 255)">foo<span style="color: brown">b[ar]</span>baz</span>',
+ 'foo<span id=purple>ba[r</span>ba]z',
+ '<span style="color: rgb(0, 0, 255)">foo<span id=purple>b[a]r</span>baz</span>',
+
+ ['blue', '<a href=http://www.google.com>foo[bar]baz</a>'],
+ ['#0000ff', '<a href=http://www.google.com>foo[bar]baz</a>'],
+ ['rgb(0,0,255)', '<a href=http://www.google.com>foo[bar]baz</a>'],
+
+ // Tests for queryCommandValue()
+ '<font color="blue">[foo]</font>',
+ '<font color="0000ff">[foo]</font>',
+ '<font color="#0000ff">[foo]</font>',
+ '<span style="color: blue">[foo]</span>',
+ '<span style="color: #0000ff">[foo]</span>',
+ '<span style="color: rgb(0, 0, 255)">[foo]</span>',
+ '<span style="color: rgb(0%, 0%, 100%)">[foo]</span>',
+ '<span style="color: rgb( 0 ,0 ,255)">[foo]</span>',
+ '<span style="color: rgba(0, 0, 255, 0.0)">[foo]</span>',
+ '<span style="color: rgb(15, -10, 375)">[foo]</span>',
+ '<span style="color: rgba(0, 0, 0, 1)">[foo]</span>',
+ '<span style="color: rgba(255, 255, 255, 1)">[foo]</span>',
+ '<span style="color: rgba(0, 0, 255, 0.5)">[foo]</span>',
+ '<span style="color: hsl(240, 100%, 50%)">[foo]</span>',
+ '<span style="color: cornsilk">[foo]</span>',
+ '<span style="color: transparent">[foo]</span>',
+ '<span style="color: currentColor">[foo]</span>',
+
+ // Tests for queryCommandIndeterm() and queryCommandState()
+ 'fo[o<font color=brown>b]ar</font>baz',
+ 'foo<font color=brown>ba[r</font>b]az',
+ 'fo[o<font color=brown>bar</font>b]az',
+ 'foo[<font color=brown>b]ar</font>baz',
+ 'foo<font color=brown>ba[r</font>]baz',
+ 'foo[<font color=brown>bar</font>]baz',
+ 'foo<font color=brown>[bar]</font>baz',
+ 'foo{<font color=brown>bar</font>}baz',
+ '<font color=brown>fo[o</font><span style=color:brown>b]ar</span>',
+ '<span style=color:brown>fo[o</span><span style=color:#0000ff>b]ar</span>',
+ ],
+ //@}
+ formatblock: [
+ //@{
+ 'foo[]bar<p>extra',
+ '<span>foo</span>{}<span>bar</span><p>extra',
+ '<span>foo[</span><span>]bar</span><p>extra',
+ 'foo[bar]baz<p>extra',
+ 'foo]bar[baz<p>extra',
+ '{<p><p> <p>foo</p>}',
+ 'foo[bar<i>baz]qoz</i>quz<p>extra',
+
+ '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>',
+ '<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>',
+ '<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>',
+ '{<table><tr><td>foo<td>bar<td>baz</table>}',
+
+ '<div>[foobar]</div>',
+ '<p>[foobar]</p>',
+ '<blockquote>[foobar]</blockquote>',
+ '<h1>[foobar]</h1>',
+ '<h2>[foobar]</h2>',
+ '<h3>[foobar]</h3>',
+ '<h4>[foobar]</h4>',
+ '<h5>[foobar]</h5>',
+ '<h6>[foobar]</h6>',
+ '<dl><dt>[foo]<dd>bar</dl>',
+ '<dl><dt>foo<dd>[bar]</dl>',
+ '<dl><dt>[foo<dd>bar]</dl>',
+ '<ol><li>[foobar]</ol>',
+ '<ul><li>[foobar]</ul>',
+ '<address>[foobar]</address>',
+ '<pre>[foobar]</pre>',
+ '<article>[foobar]</article>',
+ '<ins>[foobar]</ins>',
+ '<del>[foobar]</del>',
+ '<quasit>[foobar]</quasit>',
+ '<quasit style="display: block">[foobar]</quasit>',
+
+ ['<p>', 'foo[]bar<p>extra'],
+ ['<p>', '<span>foo</span>{}<span>bar</span><p>extra'],
+ ['<p>', '<span>foo[</span><span>]bar</span><p>extra'],
+ ['<p>', 'foo[bar]baz<p>extra'],
+ ['<p>', 'foo]bar[baz<p>extra'],
+ ['<p>', '{<p><p> <p>foo</p>}'],
+ ['<p>', 'foo[bar<i>baz]qoz</i>quz<p>extra'],
+
+ ['<p>', '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>'],
+ ['<p>', '<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>'],
+ ['<p>', '<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>'],
+ ['<p>', '<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>'],
+ ['<p>', '<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>'],
+ ['<p>', '{<table><tr><td>foo<td>bar<td>baz</table>}'],
+
+ ['<p>', '<div>[foobar]</div>'],
+ ['<p>', '<p>[foobar]</p>'],
+ ['<p>', '<blockquote>[foobar]</blockquote>'],
+ ['<p>', '<h1>[foobar]</h1>'],
+ ['<p>', '<h2>[foobar]</h2>'],
+ ['<p>', '<h3>[foobar]</h3>'],
+ ['<p>', '<h4>[foobar]</h4>'],
+ ['<p>', '<h5>[foobar]</h5>'],
+ ['<p>', '<h6>[foobar]</h6>'],
+ ['<p>', '<dl><dt>[foo]<dd>bar</dl>'],
+ ['<p>', '<dl><dt>foo<dd>[bar]</dl>'],
+ ['<p>', '<dl><dt>[foo<dd>bar]</dl>'],
+ ['<p>', '<ol><li>[foobar]</ol>'],
+ ['<p>', '<ul><li>[foobar]</ul>'],
+ ['<p>', '<address>[foobar]</address>'],
+ ['<p>', '<pre>[foobar]</pre>'],
+ ['<p>', '<listing>[foobar]</listing>'],
+ ['<p>', '<xmp>[foobar]</xmp>'],
+ ['<p>', '<article>[foobar]</article>'],
+ ['<p>', '<ins>[foobar]</ins>'],
+ ['<p>', '<del>[foobar]</del>'],
+ ['<p>', '<quasit>[foobar]</quasit>'],
+ ['<p>', '<quasit style="display: block">[foobar]</quasit>'],
+
+ ['<blockquote>', '<blockquote>[foo]</blockquote><p>extra'],
+ ['<blockquote>', '<blockquote><p>[foo]<p>bar</blockquote><p>extra'],
+ ['<blockquote>', '[foo]<blockquote>bar</blockquote><p>extra'],
+ ['<blockquote>', '<p>[foo<p>bar]<p>baz'],
+ ['<blockquote>', '<section>[foo]</section>'],
+ ['<blockquote>', '<section><p>[foo]</section>'],
+ ['<blockquote>', '<section><hgroup><h1>[foo]</h1><h2>bar</h2></hgroup><p>baz</section>'],
+ ['<article>', '<section>[foo]</section>'],
+
+ ['<address>', '<div>[foobar]</div>'],
+ ['<article>', '<div>[foobar]</div>'],
+ ['<blockquote>', '<div>[foobar]</div>'],
+ ['<dd>', '<div>[foobar]</div>'],
+ ['<del>', '<div>[foobar]</div>'],
+ ['<dl>', '<div>[foobar]</div>'],
+ ['<dt>', '<div>[foobar]</div>'],
+ ['<h1>', '<div>[foobar]</div>'],
+ ['<h2>', '<div>[foobar]</div>'],
+ ['<h3>', '<div>[foobar]</div>'],
+ ['<h4>', '<div>[foobar]</div>'],
+ ['<h5>', '<div>[foobar]</div>'],
+ ['<h6>', '<div>[foobar]</div>'],
+ ['<ins>', '<div>[foobar]</div>'],
+ ['<li>', '<div>[foobar]</div>'],
+ ['<ol>', '<div>[foobar]</div>'],
+ ['<pre>', '<div>[foobar]</div>'],
+ ['<ul>', '<div>[foobar]</div>'],
+ ['<quasit>', '<div>[foobar]</div>'],
+
+ ['<address>', '<p>[foobar]</p>'],
+ ['<article>', '<p>[foobar]</p>'],
+ ['<aside>', '<p>[foobar]</p>'],
+ ['<blockquote>', '<p>[foobar]</p>'],
+ ['<body>', '<p>[foobar]</p>'],
+ ['<dd>', '<p>[foobar]</p>'],
+ ['<del>', '<p>[foobar]</p>'],
+ ['<details>', '<p>[foobar]</p>'],
+ ['<dir>', '<p>[foobar]</p>'],
+ ['<dl>', '<p>[foobar]</p>'],
+ ['<dt>', '<p>[foobar]</p>'],
+ ['<fieldset>', '<p>[foobar]</p>'],
+ ['<figcaption>', '<p>[foobar]</p>'],
+ ['<figure>', '<p>[foobar]</p>'],
+ ['<footer>', '<p>[foobar]</p>'],
+ ['<form>', '<p>[foobar]</p>'],
+ ['<h1>', '<p>[foobar]</p>'],
+ ['<h2>', '<p>[foobar]</p>'],
+ ['<h3>', '<p>[foobar]</p>'],
+ ['<h4>', '<p>[foobar]</p>'],
+ ['<h5>', '<p>[foobar]</p>'],
+ ['<h6>', '<p>[foobar]</p>'],
+ ['<header>', '<p>[foobar]</p>'],
+ ['<head>', '<p>[foobar]</p>'],
+ ['<hgroup>', '<p>[foobar]</p>'],
+ ['<hr>', '<p>[foobar]</p>'],
+ ['<html>', '<p>[foobar]</p>'],
+ ['<ins>', '<p>[foobar]</p>'],
+ ['<li>', '<p>[foobar]</p>'],
+ ['<listing>', '<p>[foobar]</p>'],
+ ['<menu>', '<p>[foobar]</p>'],
+ ['<nav>', '<p>[foobar]</p>'],
+ ['<ol>', '<p>[foobar]</p>'],
+ ['<plaintext>', '<p>[foobar]</p>'],
+ ['<pre>', '<p>[foobar]</p>'],
+ ['<section>', '<p>[foobar]</p>'],
+ ['<ul>', '<p>[foobar]</p>'],
+ ['<xmp>', '<p>[foobar]</p>'],
+ ['<quasit>', '<p>[foobar]</p>'],
+
+ ['<address>', '<p>[foo<p>bar]'],
+ ['<article>', '<p>[foo<p>bar]'],
+ ['<aside>', '<p>[foo<p>bar]'],
+ ['<blockquote>', '<p>[foo<p>bar]'],
+ ['<body>', '<p>[foo<p>bar]'],
+ ['<dd>', '<p>[foo<p>bar]'],
+ ['<del>', '<p>[foo<p>bar]'],
+ ['<details>', '<p>[foo<p>bar]'],
+ ['<dir>', '<p>[foo<p>bar]'],
+ ['<div>', '<p>[foo<p>bar]'],
+ ['<dl>', '<p>[foo<p>bar]'],
+ ['<dt>', '<p>[foo<p>bar]'],
+ ['<fieldset>', '<p>[foo<p>bar]'],
+ ['<figcaption>', '<p>[foo<p>bar]'],
+ ['<figure>', '<p>[foo<p>bar]'],
+ ['<footer>', '<p>[foo<p>bar]'],
+ ['<form>', '<p>[foo<p>bar]'],
+ ['<h1>', '<p>[foo<p>bar]'],
+ ['<h2>', '<p>[foo<p>bar]'],
+ ['<h3>', '<p>[foo<p>bar]'],
+ ['<h4>', '<p>[foo<p>bar]'],
+ ['<h5>', '<p>[foo<p>bar]'],
+ ['<h6>', '<p>[foo<p>bar]'],
+ ['<header>', '<p>[foo<p>bar]'],
+ ['<head>', '<p>[foo<p>bar]'],
+ ['<hgroup>', '<p>[foo<p>bar]'],
+ ['<hr>', '<p>[foo<p>bar]'],
+ ['<html>', '<p>[foo<p>bar]'],
+ ['<ins>', '<p>[foo<p>bar]'],
+ ['<li>', '<p>[foo<p>bar]'],
+ ['<listing>', '<p>[foo<p>bar]'],
+ ['<menu>', '<p>[foo<p>bar]'],
+ ['<nav>', '<p>[foo<p>bar]'],
+ ['<ol>', '<p>[foo<p>bar]'],
+ ['<p>', '<p>[foo<p>bar]'],
+ ['<plaintext>', '<p>[foo<p>bar]'],
+ ['<pre>', '<p>[foo<p>bar]'],
+ ['<section>', '<p>[foo<p>bar]'],
+ ['<ul>', '<p>[foo<p>bar]'],
+ ['<xmp>', '<p>[foo<p>bar]'],
+ ['<quasit>', '<p>[foo<p>bar]'],
+
+ ['p', '<div>[foobar]</div>'],
+
+ '<ol><li>[foo]<li>bar</ol>',
+
+ ['<p>', '<h1>[foo]<br>bar</h1>'],
+ ['<p>', '<h1>foo<br>[bar]</h1>'],
+ ['<p>', '<h1>[foo<br>bar]</h1>'],
+ ['<address>', '<h1>[foo]<br>bar</h1>'],
+ ['<address>', '<h1>foo<br>[bar]</h1>'],
+ ['<address>', '<h1>[foo<br>bar]</h1>'],
+ ['<pre>', '<h1>[foo]<br>bar</h1>'],
+ ['<pre>', '<h1>foo<br>[bar]</h1>'],
+ ['<pre>', '<h1>[foo<br>bar]</h1>'],
+ ['<h2>', '<h1>[foo]<br>bar</h1>'],
+ ['<h2>', '<h1>foo<br>[bar]</h1>'],
+ ['<h2>', '<h1>[foo<br>bar]</h1>'],
+
+ ['<h1>', '<p>[foo]<br>bar</p>'],
+ ['<h1>', '<p>foo<br>[bar]</p>'],
+ ['<h1>', '<p>[foo<br>bar]</p>'],
+ ['<address>', '<p>[foo]<br>bar</p>'],
+ ['<address>', '<p>foo<br>[bar]</p>'],
+ ['<address>', '<p>[foo<br>bar]</p>'],
+ ['<pre>', '<p>[foo]<br>bar</p>'],
+ ['<pre>', '<p>foo<br>[bar]</p>'],
+ ['<pre>', '<p>[foo<br>bar]</p>'],
+
+ ['<p>', '<address>[foo]<br>bar</address>'],
+ ['<p>', '<address>foo<br>[bar]</address>'],
+ ['<p>', '<address>[foo<br>bar]</address>'],
+ ['<pre>', '<address>[foo]<br>bar</address>'],
+ ['<pre>', '<address>foo<br>[bar]</address>'],
+ ['<pre>', '<address>[foo<br>bar]</address>'],
+ ['<h1>', '<address>[foo]<br>bar</address>'],
+ ['<h1>', '<address>foo<br>[bar]</address>'],
+ ['<h1>', '<address>[foo<br>bar]</address>'],
+
+ ['<p>', '<pre>[foo]<br>bar</pre>'],
+ ['<p>', '<pre>foo<br>[bar]</pre>'],
+ ['<p>', '<pre>[foo<br>bar]</pre>'],
+ ['<address>', '<pre>[foo]<br>bar</pre>'],
+ ['<address>', '<pre>foo<br>[bar]</pre>'],
+ ['<address>', '<pre>[foo<br>bar]</pre>'],
+ ['<h1>', '<pre>[foo]<br>bar</pre>'],
+ ['<h1>', '<pre>foo<br>[bar]</pre>'],
+ ['<h1>', '<pre>[foo<br>bar]</pre>'],
+
+ ['<h1>', '<p>[foo</p>bar]'],
+ ['<h1>', '[foo<p>bar]</p>'],
+ ['<p>', '<div>[foo<p>bar]</p></div>'],
+ ['<p>', '<xmp>[foo]</xmp>'],
+ ['<div>', '<xmp>[foo]</xmp>'],
+
+ '<div><ol><li>[foo]</ol></div>',
+ '<div><table><tr><td>[foo]</table></div>',
+ '<p>[foo<h1>bar]</h1>',
+ '<h1>[foo</h1><h2>bar]</h2>',
+ '<div>[foo</div>bar]',
+
+ // https://bugs.webkit.org/show_bug.cgi?id=47054
+ ['<p>', '<div style=color:blue>[foo]</div>'],
+ // https://bugs.webkit.org/show_bug.cgi?id=47574
+ ['<h1>', '{<p>foo</p>ba]r'],
+ ['<pre>', '&#10;[foo<p>bar]</p>'],
+ // From https://bugs.webkit.org/show_bug.cgi?id=47300
+ // http://www.w3.org/Bugs/Public/show_bug.cgi?id=14009
+ ['!<p>', '{<pre>&#10;foo&#10;&#10;bar&#10;</pre>}'],
+ ],
+ //@}
+ forwarddelete: [
+ //@{
+ // Collapsed selection
+ 'foo[]',
+ '<span>foo[]</span>',
+ '<p>foo[]</p>',
+ 'foo[]bar',
+ '<span>foo</span>{}<span>bar</span>',
+ '<span>foo[</span><span>]bar</span>',
+ 'foo[]<span style=display:none>bar</span>baz',
+ 'foo[]<script>bar</script>baz',
+ 'fo[]&ouml;bar',
+ 'fo[]o&#x308;bar',
+ 'fo[]o&#x308;&#x327;bar',
+ '[]&ouml;bar',
+ '[]o&#x308;bar',
+ '[]o&#x308;&#x327;bar',
+
+ '[]&#x5e9;&#x5c1;&#x5b8;&#x5dc;&#x5d5;&#x5b9;&#x5dd;',
+ '&#x5e9;&#x5c1;&#x5b8;&#x5dc;[]&#x5d5;&#x5b9;&#x5dd;',
+
+ '<p>foo[]</p><p>bar</p>',
+ '<p>foo[]</p>bar',
+ 'foo[]<p>bar</p>',
+ '<p>foo[]<br></p><p>bar</p>',
+ '<p>foo[]<br></p>bar',
+ 'foo[]<br><p>bar</p>',
+
+ '<p>{}<br></p>foo',
+ '<p>{}<span><br></span></p>foo',
+ 'foo{}<p><br>',
+ 'foo{}<p><span><br></span>',
+ 'foo{}<br><p><br>',
+ 'foo{}<span><br></span><p><br>',
+ 'foo{}<br><p><span><br></span>',
+ 'foo{}<span><br></span><p><span><br></span>',
+ 'foo{}<p>',
+ '<table><tr><td>{}</table>foo',
+ '<table><tr><td>{}<br></table>foo',
+ '<table><tr><td>{}<span><br></span></table>foo',
+
+ '<div><p>foo[]</p></div><p>bar</p>',
+ '<p>foo[]</p><div><p>bar</p></div>',
+ '<div><p>foo[]</p></div><div><p>bar</p></div>',
+ '<div><p>foo[]</p></div>bar',
+ 'foo[]<div><p>bar</p></div>',
+
+ '<div>foo[]</div><div>bar</div>',
+ '<pre>foo[]</pre>bar',
+
+ 'foo[]<br>bar',
+ '<b>foo[]</b><br>bar',
+ 'foo[]<hr>bar',
+ '<p>foo[]<hr><p>bar',
+ '<p>foo[]</p><br><p>bar</p>',
+ '<p>foo[]</p><br><br><p>bar</p>',
+ '<p>foo[]</p><img src=/img/lion.svg><p>bar',
+ 'foo[]<img src=/img/lion.svg>bar',
+
+ 'foo[]<a>bar</a>',
+ 'foo[]<a href=/>bar</a>',
+ 'foo[]<a name=abc>bar</a>',
+ 'foo[]<a href=/ name=abc>bar</a>',
+ 'foo[]<span><a>bar</a></span>',
+ 'foo[]<span><a href=/>bar</a></span>',
+ 'foo[]<span><a name=abc>bar</a></span>',
+ 'foo[]<span><a href=/ name=abc>bar</a></span>',
+ '<a>foo[]</a>bar',
+ '<a href=/>foo[]</a>bar',
+ '<a name=abc>foo[]</a>bar',
+ '<a href=/ name=abc>foo[]</a>bar',
+
+ 'foo []&nbsp;',
+ '[]&nbsp; foo',
+ 'foo[] &nbsp;bar',
+ 'foo[]&nbsp; bar',
+ 'foo[]&nbsp;&nbsp;bar',
+ 'foo[] bar',
+ 'foo[] &nbsp; bar',
+ 'foo []&nbsp; bar',
+ 'foo &nbsp;[] bar',
+ 'foo[] <span>&nbsp;</span> bar',
+ 'foo []<span>&nbsp;</span> bar',
+ 'foo <span>&nbsp;</span>[] bar',
+ '<b>foo[] </b>&nbsp;bar',
+ '<b>foo[]&nbsp;</b> bar',
+ '<b>foo[]&nbsp;</b>&nbsp;bar',
+ '<b>foo[] </b> bar',
+
+ '<pre>foo []&nbsp;</pre>',
+ '<pre>[]&nbsp; foo</pre>',
+ '<pre>foo[] &nbsp;bar</pre>',
+ '<pre>foo[]&nbsp; bar</pre>',
+ '<pre>foo[] bar</pre>',
+
+ '<div style=white-space:pre>foo []&nbsp;</div>',
+ '<div style=white-space:pre>[]&nbsp; foo</div>',
+ '<div style=white-space:pre>foo[] &nbsp;bar</div>',
+ '<div style=white-space:pre>foo[]&nbsp; bar</div>',
+ '<div style=white-space:pre>foo[] bar</div>',
+
+ '<div style=white-space:pre-wrap>foo []&nbsp;</div>',
+ '<div style=white-space:pre-wrap>[]&nbsp; foo</div>',
+ '<div style=white-space:pre-wrap>foo[] &nbsp;bar</div>',
+ '<div style=white-space:pre-wrap>foo[]&nbsp; bar</div>',
+ '<div style=white-space:pre-wrap>foo[] bar</div>',
+
+ '<div style=white-space:pre-line>foo []&nbsp;</div>',
+ '<div style=white-space:pre-line>[]&nbsp; foo</div>',
+ '<div style=white-space:pre-line>foo[] &nbsp;bar</div>',
+ '<div style=white-space:pre-line>foo[]&nbsp; bar</div>',
+ '<div style=white-space:pre-line>foo[] bar</div>',
+
+ '<div style=white-space:nowrap>foo []&nbsp;</div>',
+ '<div style=white-space:nowrap>[]&nbsp; foo</div>',
+ '<div style=white-space:nowrap>foo[] &nbsp;bar</div>',
+ '<div style=white-space:nowrap>foo[]&nbsp; bar</div>',
+ '<div style=white-space:nowrap>foo[] bar</div>',
+
+ // Tables with collapsed selection
+ 'foo[]<table><tr><td>bar</table>baz',
+ 'foo<table><tr><td>bar[]</table>baz',
+ '<p>foo[]<table><tr><td>bar</table><p>baz',
+ '<table><tr><td>foo[]<td>bar</table>',
+ '<table><tr><td>foo[]<tr><td>bar</table>',
+
+ 'foo[]<br><table><tr><td>bar</table>baz',
+ 'foo<table><tr><td>bar[]<br></table>baz',
+ '<p>foo[]<br><table><tr><td>bar</table><p>baz',
+ '<p>foo<table><tr><td>bar[]<br></table><p>baz',
+ '<table><tr><td>foo[]<br><td>bar</table>',
+ '<table><tr><td>foo[]<br><tr><td>bar</table>',
+
+ 'foo<table><tr><td>bar[]</table><br>baz',
+ 'foo[]<table><tr><td><hr>bar</table>baz',
+ '<table><tr><td>foo[]<td><hr>bar</table>',
+ '<table><tr><td>foo[]<tr><td><hr>bar</table>',
+
+ // Lists with collapsed selection
+ 'foo[]<ol><li>bar<li>baz</ol>',
+ 'foo[]<br><ol><li>bar<li>baz</ol>',
+ '<ol><li>foo[]<li>bar</ol>',
+ '<ol><li>foo[]<br><li>bar</ol>',
+ '<ol><li>foo[]<li>bar<br>baz</ol>',
+
+ '<ol><li><p>foo[]<li>bar</ol>',
+ '<ol><li>foo[]<li><p>bar</ol>',
+ '<ol><li><p>foo[]<li><p>bar</ol>',
+
+ '<ol><li>foo[]<ul><li>bar</ul></ol>',
+ 'foo[]<ol><ol><li>bar</ol></ol>',
+ 'foo[]<div><ol><li>bar</ol></div>',
+
+ 'foo[]<dl><dt>bar<dd>baz</dl>',
+ 'foo[]<dl><dd>bar</dl>',
+ '<dl><dt>foo[]<dd>bar</dl>',
+ '<dl><dt>foo[]<dt>bar<dd>baz</dl>',
+ '<dl><dt>foo<dd>bar[]<dd>baz</dl>',
+
+ '<ol><li>foo[]</ol>bar',
+ '<ol><li>foo[]<br></ol>bar',
+ '<ol><li>{}<br></ol>bar',
+ '<ol><li>foo<li>{}<br></ol>bar',
+
+ '<ol><li>foo[]</ol><p>bar',
+ '<ol><li>foo[]<br></ol><p>bar',
+ '<ol><li>{}<br></ol><p>bar',
+ '<ol><li>foo<li>{}<br></ol><p>bar',
+
+ '<ol><li>foo[]</ol><br>',
+ '<ol><li>foo[]<br></ol><br>',
+ '<ol><li>{}<br></ol><br>',
+ '<ol><li>foo<li>{}<br></ol><br>',
+
+ '<ol><li>foo[]</ol><p><br>',
+ '<ol><li>foo[]<br></ol><p><br>',
+ '<ol><li>{}<br></ol><p><br>',
+ '<ol><li>foo<li>{}<br></ol><p><br>',
+
+ // Indented stuff with collapsed selection
+ 'foo[]<blockquote>bar</blockquote>',
+ 'foo[]<blockquote><blockquote>bar</blockquote></blockquote>',
+ 'foo[]<blockquote><div>bar</div></blockquote>',
+ 'foo[]<blockquote style="color: blue">bar</blockquote>',
+
+ 'foo[]<blockquote><blockquote><p>bar<p>baz</blockquote></blockquote>',
+ 'foo[]<blockquote><div><p>bar<p>baz</div></blockquote>',
+ 'foo[]<blockquote style="color: blue"><p>bar<p>baz</blockquote>',
+
+ 'foo[]<blockquote><p><b>bar</b><p>baz</blockquote>',
+ 'foo[]<blockquote><p><strong>bar</strong><p>baz</blockquote>',
+ 'foo[]<blockquote><p><span>bar</span><p>baz</blockquote>',
+
+ 'foo[]<blockquote><ol><li>bar</ol></blockquote><p>extra',
+ 'foo[]<blockquote>bar<ol><li>baz</ol>quz</blockquote><p>extra',
+ 'foo<blockquote><ol><li>bar[]</li><ol><li>baz</ol><li>quz</ol></blockquote><p>extra',
+
+ // Invisible stuff with collapsed selection
+ 'foo[]<span></span>bar',
+ 'foo[]<span><span></span></span>bar',
+ 'foo[]<quasit></quasit>bar',
+ 'foo[]<span></span><br>bar',
+ '<span>foo[]<span></span></span>bar',
+ 'foo[]<span></span><span>bar</span>',
+ 'foo[]<div><div><p>bar</div></div>',
+ 'foo[]<div><div><p><!--abc-->bar</div></div>',
+ 'foo[]<div><div><!--abc--><p>bar</div></div>',
+ 'foo[]<div><!--abc--><div><p>bar</div></div>',
+ 'foo[]<!--abc--><div><div><p>bar</div></div>',
+ '<div><div><p>foo[]</div></div>bar',
+ '<div><div><p>foo[]</div></div><!--abc-->bar',
+ '<div><div><p>foo[]</div><!--abc--></div>bar',
+ '<div><div><p>foo[]</p><!--abc--></div></div>bar',
+ '<div><div><p>foo[]<!--abc--></div></div>bar',
+ '<div><div><p>foo[]</p></div></div><div><div><div>bar</div></div></div>',
+ '<div><div><p>foo[]<!--abc--></p></div></div><div><div><div>bar</div></div></div>',
+ '<div><div><p>foo[]</p><!--abc--></div></div><div><div><div>bar</div></div></div>',
+ '<div><div><p>foo[]</p></div><!--abc--></div><div><div><div>bar</div></div></div>',
+ '<div><div><p>foo[]</p></div></div><!--abc--><div><div><div>bar</div></div></div>',
+ '<div><div><p>foo[]</p></div></div><div><!--abc--><div><div>bar</div></div></div>',
+ '<div><div><p>foo[]</p></div></div><div><div><!--abc--><div>bar</div></div></div>',
+ '<div><div><p>foo[]</p></div></div><div><div><div><!--abc-->bar</div></div></div>',
+
+ // Styled stuff with collapsed selection
+ '<p style=color:blue>foo[]<p>bar',
+ '<p style=color:blue>foo[]<p style=color:brown>bar',
+ '<p>foo[]<p style=color:brown>bar',
+ '<p><font color=blue>foo[]</font><p>bar',
+ '<p><font color=blue>foo[]</font><p><font color=brown>bar</font>',
+ '<p>foo[]<p><font color=brown>bar</font>',
+ '<p><span style=color:blue>foo[]</font><p>bar',
+ '<p><span style=color:blue>foo[]</font><p><span style=color:brown>bar</font>',
+ '<p>foo[]<p><span style=color:brown>bar</font>',
+
+ '<p style=background-color:aqua>foo[]<p>bar',
+ '<p style=background-color:aqua>foo[]<p style=background-color:tan>bar',
+ '<p>foo[]<p style=background-color:tan>bar',
+ '<p><span style=background-color:aqua>foo[]</font><p>bar',
+ '<p><span style=background-color:aqua>foo[]</font><p><span style=background-color:tan>bar</font>',
+ '<p>foo[]<p><span style=background-color:tan>bar</font>',
+
+ '<p style=text-decoration:underline>foo[]<p>bar',
+ '<p style=text-decoration:underline>foo[]<p style=text-decoration:line-through>bar',
+ '<p>foo[]<p style=text-decoration:line-through>bar',
+ '<p><u>foo[]</u><p>bar',
+ '<p><u>foo[]</u><p><s>bar</s>',
+ '<p>foo[]<p><s>bar</s>',
+
+ '<p style=color:blue>foo[]</p>bar',
+ 'foo[]<p style=color:brown>bar',
+ '<div style=color:blue><p style=color:green>foo[]</div>bar',
+ '<div style=color:blue><p style=color:green>foo[]</div><p style=color:brown>bar',
+ '<p style=color:blue>foo[]<div style=color:brown><p style=color:green>bar',
+
+ // Uncollapsed selection (should be same as delete command)
+ 'foo[bar]baz',
+ '<p>foo<span style=color:#aBcDeF>[bar]</span>baz',
+ '<p>foo<span style=color:#aBcDeF>{bar}</span>baz',
+ '<p>foo{<span style=color:#aBcDeF>bar</span>}baz',
+ '<p>[foo<span style=color:#aBcDeF>bar]</span>baz',
+ '<p>{foo<span style=color:#aBcDeF>bar}</span>baz',
+ '<p>foo<span style=color:#aBcDeF>[bar</span>baz]',
+ '<p>foo<span style=color:#aBcDeF>{bar</span>baz}',
+ '<p>foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz',
+
+ 'foo<b>[bar]</b>baz',
+ 'foo<b>{bar}</b>baz',
+ 'foo{<b>bar</b>}baz',
+ 'foo<span>[bar]</span>baz',
+ 'foo<span>{bar}</span>baz',
+ 'foo{<span>bar</span>}baz',
+ '<b>foo[bar</b><i>baz]quz</i>',
+ '<p>foo</p><p>[bar]</p><p>baz</p>',
+ '<p>foo</p><p>{bar}</p><p>baz</p>',
+ '<p>foo</p><p>{bar</p>}<p>baz</p>',
+ '<p>foo</p>{<p>bar}</p><p>baz</p>',
+ '<p>foo</p>{<p>bar</p>}<p>baz</p>',
+
+ '<p>foo[bar<p>baz]quz',
+ '<p>foo[bar<div>baz]quz</div>',
+ '<p>foo[bar<h1>baz]quz</h1>',
+ '<div>foo[bar</div><p>baz]quz',
+ '<blockquote>foo[bar</blockquote><pre>baz]quz</pre>',
+
+ '<p><b>foo[bar</b><p>baz]quz',
+ '<div><p>foo[bar</div><p>baz]quz',
+ '<p>foo[bar<blockquote><p>baz]quz<p>qoz</blockquote',
+ '<p>foo[bar<p style=color:blue>baz]quz',
+ '<p>foo[bar<p><b>baz]quz</b>',
+
+ '<div><p>foo<p>[bar<p>baz]</div>',
+
+ 'foo[<br>]bar',
+ '<p>foo[</p><p>]bar</p>',
+ '<p>foo[</p><p>]bar<br>baz</p>',
+ 'foo[<p>]bar</p>',
+ 'foo{<p>}bar</p>',
+ 'foo[<p>]bar<br>baz</p>',
+ 'foo[<p>]bar</p>baz',
+ 'foo{<p>bar</p>}baz',
+ 'foo<p>{bar</p>}baz',
+ 'foo{<p>bar}</p>baz',
+ '<p>foo[</p>]bar',
+ '<p>foo{</p>}bar',
+ '<p>foo[</p>]bar<br>baz',
+ '<p>foo[</p>]bar<p>baz</p>',
+ 'foo[<div><p>]bar</div>',
+ '<div><p>foo[</p></div>]bar',
+ 'foo[<div><p>]bar</p>baz</div>',
+ 'foo[<div>]bar<p>baz</p></div>',
+ '<div><p>foo</p>bar[</div>]baz',
+ '<div>foo<p>bar[</p></div>]baz',
+
+ '<p>foo<br>{</p>]bar',
+ '<p>foo<br><br>{</p>]bar',
+ 'foo<br>{<p>]bar</p>',
+ 'foo<br><br>{<p>]bar</p>',
+ '<p>foo<br>{</p><p>}bar</p>',
+ '<p>foo<br><br>{</p><p>}bar</p>',
+
+ '<table><tbody><tr><th>foo<th>[bar]<th>baz<tr><td>quz<td>qoz<td>qiz</table>',
+ '<table><tbody><tr><th>foo<th>ba[r<th>b]az<tr><td>quz<td>qoz<td>qiz</table>',
+ '<table><tbody><tr><th>fo[o<th>bar<th>b]az<tr><td>quz<td>qoz<td>qiz</table>',
+ '<table><tbody><tr><th>foo<th>bar<th>ba[z<tr><td>q]uz<td>qoz<td>qiz</table>',
+ '<table><tbody><tr><th>[foo<th>bar<th>baz]<tr><td>quz<td>qoz<td>qiz</table>',
+ '<table><tbody><tr><th>[foo<th>bar<th>baz<tr><td>quz<td>qoz<td>qiz]</table>',
+ '{<table><tbody><tr><th>foo<th>bar<th>baz<tr><td>quz<td>qoz<td>qiz</table>}',
+ '<table><tbody><tr><td>foo<td>ba[r<tr><td>baz<td>quz<tr><td>q]oz<td>qiz</table>',
+ '<p>fo[o<table><tr><td>b]ar</table><p>baz',
+ '<p>foo<table><tr><td>ba[r</table><p>b]az',
+ '<p>fo[o<table><tr><td>bar</table><p>b]az',
+
+ '<p>foo<ol><li>ba[r<li>b]az</ol><p>quz',
+ '<p>foo<ol><li>bar<li>[baz]</ol><p>quz',
+ '<p>fo[o<ol><li>b]ar<li>baz</ol><p>quz',
+ '<p>foo<ol><li>bar<li>ba[z</ol><p>q]uz',
+ '<p>fo[o<ol><li>bar<li>b]az</ol><p>quz',
+ '<p>fo[o<ol><li>bar<li>baz</ol><p>q]uz',
+
+ '<ol><li>fo[o</ol><ol><li>b]ar</ol>',
+ '<ol><li>fo[o</ol><ul><li>b]ar</ul>',
+
+ 'foo[<ol><li>]bar</ol>',
+ '<ol><li>foo[<li>]bar</ol>',
+ 'foo[<dl><dt>]bar<dd>baz</dl>',
+ 'foo[<dl><dd>]bar</dl>',
+ '<dl><dt>foo[<dd>]bar</dl>',
+ '<dl><dt>foo[<dt>]bar<dd>baz</dl>',
+ '<dl><dt>foo<dd>bar[<dd>]baz</dl>',
+
+ // https://bugs.webkit.org/show_bug.cgi?id=35281
+ // http://www.w3.org/Bugs/Public/show_bug.cgi?id=13976
+ '<ol><li>foo</ol>{}<br><ol><li>bar</ol>',
+ '<ol><li>foo</ol><p>{}<br></p><ol><li>bar</ol>',
+ '<ol><li><p>foo</ol><p>{}<br></p><ol><li>bar</ol>',
+ '<ol id=a><li>foo</ol>{}<br><ol><li>bar</ol>',
+ '<ol><li>foo</ol>{}<br><ol id=b><li>bar</ol>',
+ '<ol id=a><li>foo</ol>{}<br><ol id=b><li>bar</ol>',
+ '<ol class=a><li>foo</ol>{}<br><ol class=b><li>bar</ol>',
+ '<ol><ol><li>foo</ol><li>{}<br><ol><li>bar</ol></ol>',
+ '<ol><ol><li>foo</ol><li>{}<br></li><ol><li>bar</ol></ol>',
+ '<ol><li>foo[</ol>bar]<ol><li>baz</ol>',
+ '<ol><li>foo[</ol><p>bar]<ol><li>baz</ol>',
+ '<ol><li><p>foo[</ol><p>bar]<ol><li>baz</ol>',
+ '<ol><li>fo[]o</ol><ol><li>bar</ol>',
+ '<ol><li>foo</ol>[bar<ol><li>]baz</ol>',
+ '<ol><li>foo</ol><p>[bar<ol><li>]baz</ol>',
+ '<ol><li>foo</ol><p>[bar<ol><li><p>]baz</ol>',
+ '<ol><li>foo</ol><ol><li>[]bar</ol>',
+ '<ol><ol><li>foo[</ol><li>bar</ol>baz]<ol><li>quz</ol>',
+ '<ul><li>foo</ul>{}<br><ul><li>bar</ul>',
+ '<ul><li>foo</ul><p>{}<br></p><ul><li>bar</ul>',
+ '<ol><li>foo[<li>bar]</ol><ol><li>baz</ol><ol><li>quz</ol>',
+ '<ol><li>foo</ol>{}<br><ul><li>bar</ul>',
+ '<ol><li>foo</ol><p>{}<br></p><ul><li>bar</ul>',
+ '<ul><li>foo</ul>{}<br><ol><li>bar</ol>',
+ '<ul><li>foo</ul><p>{}<br></p><ol><li>bar</ol>',
+
+ // http://www.w3.org/Bugs/Public/show_bug.cgi?id=13831
+ '<p><b>[foo]</b>',
+ '<p><quasit>[foo]</quasit>',
+ '<p><b><i>[foo]</i></b>',
+ '<p><b>{foo}</b>',
+ '<p>{<b>foo</b>}',
+ '<p><b>[]f</b>',
+ '<b>[foo]</b>',
+ '<div><b>[foo]</b></div>',
+ ],
+ //@}
+ hilitecolor: [
+ //@{
+ 'foo[]bar',
+ '<p>[foo</p> <p>bar]</p>',
+ '<span>[foo</span> <span>bar]</span>',
+ '<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>',
+ '<p>[foo<p><br><p>bar]',
+ '<b>foo[]bar</b>',
+ '<i>foo[]bar</i>',
+ '<span>foo</span>{}<span>bar</span>',
+ '<span>foo[</span><span>]bar</span>',
+ 'foo[bar]baz',
+ 'foo[bar<b>baz]qoz</b>quz',
+ 'foo[bar<i>baz]qoz</i>quz',
+ '{<p><p> <p>foo</p>}',
+
+ '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>',
+ '<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>',
+ '<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>',
+ '{<table><tr><td>foo<td>bar<td>baz</table>}',
+
+ '<p style="background-color: rgb(0, 255, 255)">foo[bar]baz</p>',
+ '<p style="background-color: #00ffff">foo[bar]baz</p>',
+ '<p style="background-color: aqua">foo[bar]baz</p>',
+ '{<p style="background-color: aqua">foo</p><p>bar</p>}',
+ '<span style="background-color: aqua">foo<span style="background-color: tan">[bar]</span>baz</span>',
+ '<span style="background-color: #00ffff">foo<span style="background-color: tan">[bar]</span>baz</span>',
+ '<span style="background-color: #0ff">foo<span style="background-color: tan">[bar]</span>baz</span>',
+ '<span style="background-color: rgb(0, 255, 255)">foo<span style="background-color: tan">[bar]</span>baz</span>',
+ '<span style="background-color: aqua">foo<span style="background-color: tan">b[ar]</span>baz</span>',
+ '<p style="background-color: aqua">foo<span style="background-color: tan">b[ar]</span>baz</p>',
+ '<div style="background-color: aqua"><p style="background-color: tan">b[ar]</p></div>',
+ '<span style="display: block; background-color: aqua"><span style="display: block; background-color: tan">b[ar]</span></span>',
+
+ // Tests for queryCommandIndeterm() and queryCommandState()
+ 'fo[o<span style=background-color:tan>b]ar</span>baz',
+ 'foo<span style=background-color:tan>ba[r</span>b]az',
+ 'fo[o<span style=background-color:tan>bar</span>b]az',
+ 'foo[<span style=background-color:tan>b]ar</span>baz',
+ 'foo<span style=background-color:tan>ba[r</span>]baz',
+ 'foo[<span style=background-color:tan>bar</span>]baz',
+ 'foo<span style=background-color:tan>[bar]</span>baz',
+ 'foo{<span style=background-color:tan>bar</span>}baz',
+ '<span style=background-color:tan>fo[o</span><span style=background-color:yellow>b]ar</span>',
+ '<span style=background-color:tan>fo[o</span><span style=background-color:tan>b]ar</span>',
+ '<span style=background-color:tan>fo[o<span style=background-color:transparent>b]ar</span></span>',
+
+ // http://www.w3.org/Bugs/Public/show_bug.cgi?id=13829
+ '!<font size=6>[foo]</font>',
+ '!<span style=font-size:xx-large>[foo]</span>',
+ '!<font size=6>foo[bar]baz</font>',
+ '!<span style=font-size:xx-large>foo[bar]baz</span>',
+ '![foo<font size=6>bar</font>baz]',
+ '![foo<span style=font-size:xx-large>bar</span>baz]',
+ ],
+ //@}
+ indent: [
+ //@{
+ // All these have a trailing unselected paragraph, because otherwise
+ // Gecko is unhappy: it throws exceptions in non-CSS mode, and in CSS
+ // mode it adds the indentation invisibly to the wrapper div in many
+ // cases.
+ 'foo[]bar<p>extra',
+ '<span>foo</span>{}<span>bar</span><p>extra',
+ '<span>foo[</span><span>]bar</span><p>extra',
+ 'foo[bar]baz<p>extra',
+ '<p dir=rtl>פו[בר]בז<p dir=rtl>נוםף',
+ '<p dir=rtl>פו[ברבז<p>Foobar]baz<p>Extra',
+ '<p>Foo[barbaz<p dir=rtl>פובר]בז<p>Extra',
+ '<div><p>Foo[barbaz<p dir=rtl>פובר]בז</div><p>Extra',
+ 'foo]bar[baz<p>extra',
+ '{<p><p> <p>foo</p>}<p>extra',
+ 'foo[bar<i>baz]qoz</i>quz<p>extra',
+ '[]foo<p>extra',
+ 'foo[]<p>extra',
+ '<p>[]foo<p>extra',
+ '<p>foo[]<p>extra',
+ '<p>{}<br>foo</p><p>extra',
+ '<p>foo<br>{}</p><p>extra',
+ '<span>{}<br>foo</span>bar<p>extra',
+ '<span>foo<br>{}</span>bar<p>extra',
+ '<p>foo</p>{}<p>bar</p>',
+
+ '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra',
+ '<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '{<table><tr><td>foo<td>bar<td>baz</table>}<p>extra',
+
+ '<p>foo[bar]</p><p>baz</p><p>extra',
+ '<p>[foobar</p><p>ba]z</p><p>extra',
+ 'foo[bar]<br>baz<p>extra',
+ 'foo[bar]<br><br><br><br>baz<p>extra',
+ 'foobar<br>[ba]z<p>extra',
+ 'foobar<br><br><br><br>[ba]z<p>extra',
+ 'foo[bar<br>ba]z<p>extra',
+ '<div>foo<p>[bar]</p>baz</div><p>extra',
+
+ // These mimic existing indentation in various browsers, to see how
+ // they cope with indenting twice. This is spec, Gecko non-CSS, and
+ // Opera:
+ '<blockquote><p>foo[bar]</p><p>baz</p></blockquote><p>extra',
+ '<blockquote><p>foo[bar</p><p>b]az</p></blockquote><p>extra',
+ '<blockquote><p>foo[bar]</p></blockquote><p>baz</p><p>extra',
+ '<blockquote><p>foo[bar</p></blockquote><p>b]az</p><p>extra',
+ '<p>[foo]<blockquote><p>bar</blockquote><p>extra',
+ '<p>[foo<blockquote><p>b]ar</blockquote><p>extra',
+ '<p>foo<blockquote><p>bar</blockquote><p>[baz]<p>extra',
+ '<p>foo<blockquote><p>[bar</blockquote><p>baz]<p>extra',
+ '<p>[foo<blockquote><p>bar</blockquote><p>baz]<p>extra',
+ '<blockquote><p>foo</blockquote><p>[bar]<blockquote><p>baz</blockquote><p>extra',
+
+ '<blockquote>foo[bar]<br>baz</blockquote><p>extra',
+ '<blockquote>foo[bar<br>b]az</blockquote><p>extra',
+ '<blockquote>foo[bar]</blockquote>baz<p>extra',
+ '<blockquote>foo[bar</blockquote>b]az<p>extra',
+ '[foo]<blockquote>bar</blockquote><p>extra',
+ '[foo<blockquote>b]ar</blockquote><p>extra',
+ 'foo<blockquote>bar</blockquote>[baz]<p>extra',
+ '[foo<blockquote>bar</blockquote>baz]<p>extra',
+ '<blockquote>foo</blockquote>[bar]<blockquote>baz</blockquote><p>extra',
+
+ // IE:
+ '<blockquote style="margin-right: 0" dir="ltr"><p>foo[bar]</p><p>baz</p></blockquote><p>extra',
+ '<blockquote style="margin-right: 0" dir="ltr"><p>foo[bar</p><p>b]az</p></blockquote><p>extra',
+ '<blockquote style="margin-right: 0" dir="ltr"><p>foo[bar]</p></blockquote><p>baz</p><p>extra',
+ '<blockquote style="margin-right: 0" dir="ltr"><p>foo[bar</p></blockquote><p>b]az</p><p>extra',
+ '<p>[foo]<blockquote style="margin-right: 0" dir="ltr"><p>bar</blockquote><p>extra',
+ '<p>[foo<blockquote style="margin-right: 0" dir="ltr"><p>b]ar</blockquote><p>extra',
+ '<p>foo<blockquote style="margin-right: 0" dir="ltr"><p>bar</blockquote><p>[baz]<p>extra',
+ '<p>foo<blockquote style="margin-right: 0" dir="ltr"><p>[bar</blockquote><p>baz]<p>extra',
+ '<p>[foo<blockquote style="margin-right: 0" dir="ltr"><p>bar</blockquote><p>baz]<p>extra',
+ '<blockquote style="margin-right: 0" dir="ltr"><p>foo</blockquote><p>[bar]<blockquote style="margin-right: 0" dir="ltr"><p>baz</blockquote><p>extra',
+
+ // Firefox CSS mode:
+ '<p style="margin-left: 40px">foo[bar]</p><p style="margin-left: 40px">baz</p><p>extra',
+ '<p style="margin-left: 40px">foo[bar</p><p style="margin-left: 40px">b]az</p><p>extra',
+ '<p style="margin-left: 40px">foo[bar]</p><p>baz</p><p>extra',
+ '<p style="margin-left: 40px">foo[bar</p><p>b]az</p><p>extra',
+ '<p>[foo]<p style="margin-left: 40px">bar<p>extra',
+ '<p>[foo<p style="margin-left: 40px">b]ar<p>extra',
+ '<p>foo<p style="margin-left: 40px">bar<p>[baz]<p>extra',
+ '<p>foo<p style="margin-left: 40px">[bar<p>baz]<p>extra',
+ '<p>[foo<p style="margin-left: 40px">bar<p>baz]<p>extra',
+ '<p style="margin-left: 40px">foo<p>[bar]<p style="margin-left: 40px">baz<p>extra',
+
+ // WebKit:
+ '<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px"><p>foo[bar]</p><p>baz</p></blockquote><p>extra',
+ '<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px"><p>foo[bar</p><p>b]az</p></blockquote><p>extra',
+ '<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px"><p>foo[bar]</p></blockquote><p>baz</p><p>extra',
+ '<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px"><p>foo[bar</p></blockquote><p>b]az</p><p>extra',
+ '<p>[foo]<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px"><p>bar</blockquote><p>extra',
+ '<p>[foo<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px"><p>b]ar</blockquote><p>extra',
+ '<p>foo<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px"><p>bar</blockquote><p>[baz]<p>extra',
+ '<p>foo<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px"><p>[bar</blockquote><p>baz]<p>extra',
+ '<p>[foo<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px"><p>bar</blockquote><p>baz]<p>extra',
+ '<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px"><p>foo</blockquote><p>[bar]<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px"><p>baz</blockquote><p>extra',
+
+ // MDC says "In Firefox, if the selection spans multiple lines at
+ // different levels of indentation, only the least indented lines in
+ // the selection will be indented." Let's test that.
+ '<blockquote>f[oo<blockquote>b]ar</blockquote></blockquote><p>extra',
+
+ // Lists!
+ '<ol><li>foo<li>[bar]<li>baz</ol>',
+ '<ol data-start=1 data-end=2><li>foo<li>bar<li>baz</ol>',
+ '<ol><li>foo</ol>[bar]',
+ '<ol><li>[foo]<br>bar<li>baz</ol>',
+ '<ol><li>foo<br>[bar]<li>baz</ol>',
+ '<ol><li><div>[foo]</div>bar<li>baz</ol>',
+ '<ol><li>foo<ol><li>[bar]<li>baz</ol><li>quz</ol>',
+ '<ol><li>foo<ol><li>bar<li>[baz]</ol><li>quz</ol>',
+ '<ol><li>foo</li><ol><li>[bar]<li>baz</ol><li>quz</ol>',
+ '<ol><li>foo</li><ol data-start=0 data-end=1><li>bar<li>baz</ol><li>quz</ol>',
+ '<ol><li>foo</li><ol><li>bar<li>[baz]</ol><li>quz</ol>',
+ '<ol><li>foo</li><ol data-start=1 data-end=2><li>bar<li>baz</ol><li>quz</ol>',
+ '<ol><li>foo<ol><li>b[a]r</ol><li>baz</ol>',
+ '<ol><li>foo</li><ol><li>b[a]r</ol><li>baz</ol>',
+ '<ol><li>foo{<ol><li>bar</ol>}<li>baz</ol>',
+ '<ol><li>foo</li>{<ol><li>bar</ol>}<li>baz</ol>',
+ '<ol><li>[foo]<ol><li>bar</ol><li>baz</ol>',
+ '<ol><li>[foo]</li><ol><li>bar</ol><li>baz</ol>',
+ '<ol><li>foo<li>[bar]<ol><li>baz</ol><li>quz</ol>',
+ '<ol><li>foo<li>[bar]</li><ol><li>baz</ol><li>quz</ol>',
+ '<ol><li>foo<ol><li>bar<li>baz</ol><li>[quz]</ol>',
+ '<ol><li>foo</li><ol><li>bar<li>baz</ol><li>[quz]</ol>',
+
+ // Lists with id's:
+ // http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2009-July/020721.html
+ '<ol><ol id=u1><li id=i1>foo</ol><li id=i2>[bar]</li><ol id=u3><li id=i3>baz</ol></ol>',
+ '<ol><ol><li id=i1>foo</ol><li id=i2>[bar]</li><ol id=u3><li id=i3>baz</ol></ol>',
+ '<ol><ol id=u1><li id=i1>foo</ol><li id=i2>[bar]</li><ol><li id=i3>baz</ol></ol>',
+ '<ol><li id=i2>[bar]</li><ol id=u3><li id=i3>baz</ol></ol>',
+ '<ol><ol id=u1><li id=i1>foo</ol><li id=i2>[bar]</ol>',
+
+ // Try indenting multiple items at once.
+ '<ol><li>foo<li>b[ar<li>baz]</ol>',
+ '<ol><li>[foo<ol><li>bar]</ol><li>baz</ol>',
+ '<ol><li>[foo</li><ol><li>bar]</ol><li>baz</ol>',
+ '<ol><li>foo<ol><li>b[ar</ol><li>b]az</ol>',
+ '<ol><li>foo</li><ol><li>b[ar</ol><li>b]az</ol>',
+ '<ol><li>[foo<ol><li>bar</ol><li>baz]</ol><p>extra',
+ '<ol><li>[foo</li><ol><li>bar</ol><li>baz]</ol><p>extra',
+
+ // We probably can't actually get this DOM . . .
+ '<ol><li>[foo]<ol><li>bar</ol>baz</ol>',
+ '<ol><li>foo<ol><li>[bar]</ol>baz</ol>',
+ '<ol><li>foo<ol><li>bar</ol>[baz]</ol>',
+ '<ol><li>[foo<ol><li>bar]</ol>baz</ol>',
+
+ 'foo<!--bar-->[baz]<p>extra',
+ '[foo]<!--bar-->baz<p>extra',
+ '<p>foo<!--bar-->{}<p>extra',
+ '<p>{}<!--foo-->bar<p>extra',
+
+ // Whitespace nodes
+ '<blockquote><p>foo</blockquote> <p>[bar]',
+ '<p>[foo]</p> <blockquote><p>bar</blockquote>',
+ '<blockquote><p>foo</blockquote> <p>[bar]</p> <blockquote><p>baz</blockquote>',
+ '<ol><li>foo</li><ol><li>bar</li> </ol><li>[baz]</ol>',
+ '<ol><li>foo</li><ol><li>bar</li></ol> <li>[baz]</ol>',
+ '<ol><li>foo</li><ol><li>bar</li> </ol> <li>[baz]</ol>',
+ '<ol><li>foo<ol><li>bar</li> </ol></li><li>[baz]</ol>',
+ '<ol><li>foo<ol><li>bar</li></ol></li> <li>[baz]</ol>',
+ '<ol><li>foo<ol><li>bar</li> </ol></li> <li>[baz]</ol>',
+ '<ol><li>foo<li>[bar]</li> <ol><li>baz</ol></ol>',
+ '<ol><li>foo<li>[bar]</li><ol> <li>baz</ol></ol>',
+ '<ol><li>foo<li>[bar]</li> <ol> <li>baz</ol></ol>',
+ '<ol><li>foo<li>[bar] <ol><li>baz</ol></ol>',
+ '<ol><li>foo<li>[bar]<ol> <li>baz</ol></ol>',
+ '<ol><li>foo<li>[bar] <ol> <li>baz</ol></ol>',
+
+ // https://bugs.webkit.org/show_bug.cgi?id=32003
+ '<ul><li>a<br>{<br>}</li><li>b</li></ul>',
+ ],
+ //@}
+ inserthorizontalrule: [
+ //@{
+ 'foo[]bar',
+ '<span>foo</span>{}<span>bar</span>',
+ '<span>foo[</span><span>]bar</span>',
+ '<p>foo[bar<p>baz]quz',
+ '<div><b>foo</b>{}<b>bar</b></div>',
+ '<div><b>foo[</b><b>]bar</b></div>',
+ '<div><b>foo</b>{<b>bar</b>}<b>baz</b></div>',
+ '<b>foo[]bar</b>',
+ '<b id=abc>foo[]bar</b>',
+ ["abc", 'foo[bar]baz'],
+ 'foo[bar]baz',
+
+ 'foo<b>[bar]</b>baz',
+ 'foo<b>{bar}</b>baz',
+ 'foo{<b>bar</b>}baz',
+ '<p>foo<p>[bar]<p>baz',
+ '<p>foo<p>{bar}<p>baz',
+ '<p>foo{<p>bar</p>}<p>baz',
+
+ '<p>foo[bar]baz</p>',
+ '<p id=abc>foo[bar]baz</p>',
+ '<h1>foo[bar]baz</h1>',
+ '<p>foo<b>b[a]r</b>baz</p>',
+
+ '<a>foo[bar]baz</a>',
+ '<a href=/>foo[bar]baz</a>',
+ '<abbr>foo[bar]baz</abbr>',
+ '<address>foo[bar]baz</address>',
+ '<article>foo[bar]baz</article>',
+ '<aside>foo[bar]baz</aside>',
+ '<b>foo[bar]baz</b>',
+ '<bdi>foo[bar]baz</bdi>',
+ '<bdo dir=rtl>foo[bar]baz</bdo>',
+ '<blockquote>foo[bar]baz</blockquote>',
+ '<table><caption>foo[bar]baz</caption><tr><td>quz</table>',
+ '<cite>foo[bar]baz</cite>',
+ '<code>foo[bar]baz</code>',
+ '<dl><dd>foo[bar]baz</dd></dl>',
+ '<del>foo[bar]baz</del>',
+ '<details>foo[bar]baz</details>',
+ '<dfn>foo[bar]baz</dfn>',
+ '<div>foo[bar]baz</div>',
+ '<dl><dt>foo[bar]baz</dt></dl>',
+ '<em>foo[bar]baz</em>',
+ '<figure><figcaption>foo[bar]baz</figcaption>quz</figure>',
+ '<figure>foo[bar]baz</figure>',
+ '<footer>foo[bar]baz</footer>',
+ '<h1>foo[bar]baz</h1>',
+ '<h2>foo[bar]baz</h2>',
+ '<h3>foo[bar]baz</h3>',
+ '<h4>foo[bar]baz</h4>',
+ '<h5>foo[bar]baz</h5>',
+ '<h6>foo[bar]baz</h6>',
+ '<header>foo[bar]baz</header>',
+ '<hgroup>foo[bar]baz</hgroup>',
+ '<hgroup><h1>foo[bar]baz</h1></hgroup>',
+ '<i>foo[bar]baz</i>',
+ '<ins>foo[bar]baz</ins>',
+ '<kbd>foo[bar]baz</kbd>',
+ '<mark>foo[bar]baz</mark>',
+ '<nav>foo[bar]baz</nav>',
+ '<ol><li>foo[bar]baz</li></ol>',
+ '<p>foo[bar]baz</p>',
+ '<pre>foo[bar]baz</pre>',
+ '<q>foo[bar]baz</q>',
+ '<ruby>foo[bar]baz<rt>quz</rt></ruby>',
+ '<ruby>foo<rt>bar[baz]quz</rt></ruby>',
+ '<ruby>foo<rp>bar[baz]quz</rp><rt>qoz</rt><rp>qiz</rp></ruby>',
+ '<s>foo[bar]baz</s>',
+ '<samp>foo[bar]baz</samp>',
+ '<section>foo[bar]baz</section>',
+ '<small>foo[bar]baz</small>',
+ '<span>foo[bar]baz</span>',
+ '<strong>foo[bar]baz</strong>',
+ '<sub>foo[bar]baz</sub>',
+ '<sup>foo[bar]baz</sup>',
+ '<table><tr><td>foo[bar]baz</td></table>',
+ '<table><tr><th>foo[bar]baz</th></table>',
+ '<u>foo[bar]baz</u>',
+ '<ul><li>foo[bar]baz</li></ul>',
+ '<var>foo[bar]baz</var>',
+
+ '<acronym>foo[bar]baz</acronym>',
+ '<big>foo[bar]baz</big>',
+ '<blink>foo[bar]baz</blink>',
+ '<center>foo[bar]baz</center>',
+ '<dir>foo[bar]baz</dir>',
+ '<dir><li>foo[bar]baz</li></dir>',
+ '<font>foo[bar]baz</font>',
+ '<listing>foo[bar]baz</listing>',
+ '<marquee>foo[bar]baz</marquee>',
+ '<nobr>foo[bar]baz</nobr>',
+ '<strike>foo[bar]baz</strike>',
+ '<tt>foo[bar]baz</tt>',
+ '<xmp>foo[bar]baz</xmp>',
+
+ '<quasit>foo[bar]baz</quasit>',
+
+ '<table><tr><td>fo[o<td>b]ar</table>',
+ 'fo[o<span contenteditable=false>bar</span>b]az',
+ ],
+ //@}
+ inserthtml: [
+ //@{
+ 'foo[]bar',
+ 'foo[bar]baz',
+ 'foo<span style=color:#aBcDeF>[bar]</span>baz',
+ 'foo<span style=color:#aBcDeF>{bar}</span>baz',
+ 'foo{<span style=color:#aBcDeF>bar</span>}baz',
+ '[foo<span style=color:#aBcDeF>bar]</span>baz',
+ '{foo<span style=color:#aBcDeF>bar}</span>baz',
+ 'foo<span style=color:#aBcDeF>[bar</span>baz]',
+ 'foo<span style=color:#aBcDeF>{bar</span>baz}',
+ 'foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz',
+
+ ['', 'foo[bar]baz'],
+ ['\0', 'foo[bar]baz'],
+ ['\x07', 'foo[bar]baz'],
+ // The following line makes Firefox 7.0a2 go into an infinite loop on
+ // my machine.
+ //['\ud800', 'foo[bar]baz'],
+
+ ['<b>', 'foo[bar]baz'],
+ ['<b>abc', 'foo[bar]baz'],
+ ['<p>abc', '<p>foo[bar]baz'],
+ ['<li>abc', '<p>foo[bar]baz'],
+ ['<p>abc', '<ol>{<li>foo</li>}<li>bar</ol>'],
+ ['<p>abc', '<ol><li>foo</li>{<li>bar</li>}<li>baz</ol>'],
+ ['<p>abc', '<ol><li>[foo]</li><li>bar</ol>'],
+
+ ['abc', '<xmp>f[o]o</xmp>'],
+ ['<b>abc</b>', '<xmp>f[o]o</xmp>'],
+ ['abc', '<script>f[o]o</script>bar'],
+ ['<b>abc</b>', '<script>f[o]o</script>bar'],
+
+ ['<a>abc</a>', '<a>f[o]o</a>'],
+ ['<a href=/>abc</a>', '<a href=.>f[o]o</a>'],
+ ['<hr>', '<p>f[o]o'],
+ ['<hr>', '<b>f[o]o</b>'],
+ ['<h2>abc</h2>', '<h1>f[o]o</h1>'],
+ ['<td>abc</td>', '<table><tr><td>f[o]o</table>'],
+ ['<td>abc</td>', 'f[o]o'],
+
+ ['<dt>abc</dt>', '<dl><dt>f[o]o<dd>bar</dl>'],
+ ['<dt>abc</dt>', '<dl><dt>foo<dd>b[a]r</dl>'],
+ ['<dd>abc</dd>', '<dl><dt>f[o]o<dd>bar</dl>'],
+ ['<dd>abc</dd>', '<dl><dt>foo<dd>b[a]r</dl>'],
+ ['<dt>abc</dt>', 'f[o]o'],
+ ['<dt>abc</dt>', '<ol><li>f[o]o</ol>'],
+ ['<dd>abc</dd>', 'f[o]o'],
+ ['<dd>abc</dd>', '<ol><li>f[o]o</ol>'],
+
+ ['<li>abc</li>', '<dir><li>f[o]o</dir>'],
+ ['<li>abc</li>', '<ol><li>f[o]o</ol>'],
+ ['<li>abc</li>', '<ul><li>f[o]o</ul>'],
+ ['<dir><li>abc</dir>', '<dir><li>f[o]o</dir>'],
+ ['<dir><li>abc</dir>', '<ol><li>f[o]o</ol>'],
+ ['<dir><li>abc</dir>', '<ul><li>f[o]o</ul>'],
+ ['<ol><li>abc</ol>', '<dir><li>f[o]o</dir>'],
+ ['<ol><li>abc</ol>', '<ol><li>f[o]o</ol>'],
+ ['<ol><li>abc</ol>', '<ul><li>f[o]o</ul>'],
+ ['<ul><li>abc</ul>', '<dir><li>f[o]o</dir>'],
+ ['<ul><li>abc</ul>', '<ol><li>f[o]o</ol>'],
+ ['<ul><li>abc</ul>', '<ul><li>f[o]o</ul>'],
+ ['<li>abc</li>', 'f[o]o'],
+
+ ['<nobr>abc</nobr>', '<nobr>f[o]o</nobr>'],
+ ['<nobr>abc</nobr>', 'f[o]o'],
+
+ ['<p>abc', '<font color=blue>foo[]bar</font>'],
+ ['<p>abc', '<span style=color:blue>foo[]bar</span>'],
+ ['<p>abc', '<span style=font-variant:small-caps>foo[]bar</span>'],
+ [' ', '<p>[foo]</p>'],
+ ['<span style=display:none></span>', '<p>[foo]</p>'],
+ ['<!--abc-->', '<p>[foo]</p>'],
+
+ ['abc', '<p>{}<br></p>'],
+ ['<!--abc-->', '<p>{}<br></p>'],
+ ['abc', '<p><!--foo-->{}<span><br></span><!--bar--></p>'],
+ ['<!--abc-->', '<p><!--foo-->{}<span><br></span><!--bar--></p>'],
+ ['abc', '<p>{}<span><!--foo--><br><!--bar--></span></p>'],
+ ['<!--abc-->', '<p>{}<span><!--foo--><br><!--bar--></span></p>'],
+
+ ['abc', '<p><br>{}</p>'],
+ ['<!--abc-->', '<p><br>{}</p>'],
+ ['abc', '<p><!--foo--><span><br></span>{}<!--bar--></p>'],
+ ['<!--abc-->', '<p><!--foo--><span><br></span>{}<!--bar--></p>'],
+ ['abc', '<p><span><!--foo--><br><!--bar--></span>{}</p>'],
+ ['<!--abc-->', '<p><span><!--foo--><br><!--bar--></span>{}</p>'],
+ ],
+ //@}
+ insertimage: [
+ //@{
+ 'foo[]bar',
+ '<span>foo</span>{}<span>bar</span>',
+ '<span>foo[</span><span>]bar</span>',
+ ["", 'foo[bar]baz'],
+ 'foo[bar]baz',
+ 'foo<span style=color:#aBcDeF>[bar]</span>baz',
+ 'foo<span style=color:#aBcDeF>{bar}</span>baz',
+ 'foo{<span style=color:#aBcDeF>bar</span>}baz',
+ '[foo<span style=color:#aBcDeF>bar]</span>baz',
+ '{foo<span style=color:#aBcDeF>bar}</span>baz',
+ 'foo<span style=color:#aBcDeF>[bar</span>baz]',
+ 'foo<span style=color:#aBcDeF>{bar</span>baz}',
+ 'foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz',
+
+ 'foo<b>[bar]</b>baz',
+ 'foo<b>{bar}</b>baz',
+ 'foo{<b>bar</b>}baz',
+ 'foo<span>[bar]</span>baz',
+ 'foo<span>{bar}</span>baz',
+ 'foo{<span>bar</span>}baz',
+ '<b>foo[bar</b><i>baz]quz</i>',
+ '<p>foo</p><p>[bar]</p><p>baz</p>',
+ '<p>foo</p><p>{bar}</p><p>baz</p>',
+ '<p>foo</p>{<p>bar</p>}<p>baz</p>',
+
+ '<p>foo[bar<p>baz]quz',
+ '<p>foo[bar<div>baz]quz</div>',
+ '<p>foo[bar<h1>baz]quz</h1>',
+ '<div>foo[bar</div><p>baz]quz',
+ '<blockquote>foo[bar</blockquote><pre>baz]quz</pre>',
+
+ '<p><b>foo[bar</b><p>baz]quz',
+ '<div><p>foo[bar</div><p>baz]quz',
+ '<p>foo[bar<blockquote><p>baz]quz<p>qoz</blockquote',
+ '<p>foo[bar<p style=color:blue>baz]quz',
+ '<p>foo[bar<p><b>baz]quz</b>',
+
+ '<div><p>foo<p>[bar<p>baz]</div>',
+
+ 'foo[<br>]bar',
+ '<p>foo[</p><p>]bar</p>',
+ '<p>foo[</p><p>]bar<br>baz</p>',
+ 'foo[<p>]bar</p>',
+ 'foo[<p>]bar<br>baz</p>',
+ 'foo[<p>]bar</p>baz',
+ '<p>foo[</p>]bar',
+ '<p>foo[</p>]bar<br>baz',
+ '<p>foo[</p>]bar<p>baz</p>',
+ 'foo[<div><p>]bar</div>',
+ '<div><p>foo[</p></div>]bar',
+ 'foo[<div><p>]bar</p>baz</div>',
+ 'foo[<div>]bar<p>baz</p></div>',
+ '<div><p>foo</p>bar[</div>]baz',
+ '<div>foo<p>bar[</p></div>]baz',
+ ],
+ //@}
+ insertlinebreak: [
+ //@{ Same as insertparagraph (set below)
+ ],
+ //@}
+ insertorderedlist: [
+ //@{
+ 'foo[]bar',
+ 'foo[bar]baz',
+ 'foo<br>[bar]',
+ 'f[oo<br>b]ar<br>baz',
+ '<p>[foo]<br>bar</p>',
+ '[foo<ol><li>bar]</ol>baz',
+ 'foo<ol><li>[bar</ol>baz]',
+ '[foo<ul><li>bar]</ul>baz',
+ 'foo<ul><li>[bar</ul>baz]',
+ 'foo<ul><li>[bar</ul><ol><li>baz]</ol>quz',
+ 'foo<ol><li>[bar</ol><ul><li>baz]</ul>quz',
+
+ '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>',
+ '<table><tbody><tr><td>fo[o<td>b]ar<td>baz</table>',
+ '{<table><tr><td>foo<td>bar<td>baz</table>}',
+
+ '<p>foo<p>[bar]<p>baz',
+ '<p>foo<blockquote>[bar]</blockquote><p>baz',
+ '<dl><dt>foo<dd>[bar]<dt>baz<dd>quz</dl>',
+ '<dl><dt>foo<dd>bar<dt>[baz]<dd>quz</dl>',
+
+ '<p>[foo<p>bar]<p>baz',
+ '<p>[foo<blockquote>bar]</blockquote><p>baz',
+ '<dl><dt>[foo<dd>bar]<dt>baz<dd>quz</dl>',
+ '<dl><dt>foo<dd>[bar<dt>baz]<dd>quz</dl>',
+
+ '<p>[foo<blockquote><p>bar]<p>baz</blockquote>',
+
+
+ // Various <ol> stuff
+ '<ol><li>foo<li>[bar]<li>baz</ol>',
+ '<ol><li>foo</ol>[bar]',
+ '[foo]<ol><li>bar</ol>',
+ '<ol><li>foo</ol>[bar]<ol><li>baz</ol>',
+ '<ol><ol><li>[foo]</ol></ol>',
+ '<ol><li>[foo]<br>bar<li>baz</ol>',
+ '<ol><li>foo<br>[bar]<li>baz</ol>',
+ '<ol><li><div>[foo]</div>bar<li>baz</ol>',
+ '<ol><li>foo<ol><li>[bar]<li>baz</ol><li>quz</ol>',
+ '<ol><li>foo<ol><li>bar<li>[baz]</ol><li>quz</ol>',
+ '<ol><li>foo</li><ol><li>[bar]<li>baz</ol><li>quz</ol>',
+ '<ol><li>foo</li><ol><li>bar<li>[baz]</ol><li>quz</ol>',
+ '<ol><li>[foo]<ol><li>bar</ol><li>baz</ol>',
+ '<ol><li>[foo]</li><ol><li>bar</ol><li>baz</ol>',
+ '<ol><li>foo<li>[bar]<ol><li>baz</ol><li>quz</ol>',
+ '<ol><li>foo<li>[bar]</li><ol><li>baz</ol><li>quz</ol>',
+ '<ol><li>foo<ol><li>bar<li>baz</ol><li>[quz]</ol>',
+ '<ol><li>foo</li><ol><li>bar<li>baz</ol><li>[quz]</ol>',
+
+ // Multiple items at once.
+ '<ol><li>foo<li>[bar<li>baz]</ol>',
+ '<ol><li>[foo<ol><li>bar]</ol><li>baz</ol>',
+ '<ol><li>foo<ol><li>b[ar</ol><li>b]az</ol>',
+ '<ol><li>[foo<ol><li>bar</ol><li>baz]</ol><p>extra',
+
+ // We probably can't actually get this DOM . . .
+ '<ol><li>[foo]<ol><li>bar</ol>baz</ol>',
+ '<ol><li>foo<ol><li>[bar]</ol>baz</ol>',
+ '<ol><li>foo<ol><li>bar</ol>[baz]</ol>',
+ '<ol><li>[foo<ol><li>bar]</ol>baz</ol>',
+
+
+ // Same stuff but with <ul>
+ '<ul><li>foo<li>[bar]<li>baz</ul>',
+ '<ul><li>foo</ul>[bar]',
+ '[foo]<ul><li>bar</ul>',
+ '<ul><li>foo</ul>[bar]<ul><li>baz</ul>',
+ '<ul><ul><li>[foo]</ul></ul>',
+ '<ul><li>[foo]<br>bar<li>baz</ul>',
+ '<ul><li>foo<br>[bar]<li>baz</ul>',
+ '<ul><li><div>[foo]</div>bar<li>baz</ul>',
+ '<ul><li>foo<ul><li>[bar]<li>baz</ul><li>quz</ul>',
+ '<ul><li>foo<ul><li>bar<li>[baz]</ul><li>quz</ul>',
+ '<ul><li>foo</li><ul><li>[bar]<li>baz</ul><li>quz</ul>',
+ '<ul><li>foo</li><ul><li>bar<li>[baz]</ul><li>quz</ul>',
+ '<ul><li>[foo]<ul><li>bar</ul><li>baz</ul>',
+ '<ul><li>[foo]</li><ul><li>bar</ul><li>baz</ul>',
+ '<ul><li>foo<li>[bar]<ul><li>baz</ul><li>quz</ul>',
+ '<ul><li>foo<li>[bar]</li><ul><li>baz</ul><li>quz</ul>',
+ '<ul><li>foo<ul><li>bar<li>baz</ul><li>[quz]</ul>',
+ '<ul><li>foo</li><ul><li>bar<li>baz</ul><li>[quz]</ul>',
+
+ // Multiple items at once.
+ '<ul><li>foo<li>[bar<li>baz]</ul>',
+ '<ul><li>[foo<ul><li>bar]</ul><li>baz</ul>',
+ '<ul><li>foo<ul><li>b[ar</ul><li>b]az</ul>',
+ '<ul><li>[foo<ul><li>bar</ul><li>baz]</ul><p>extra',
+
+ // We probably can't actually get this DOM . . .
+ '<ul><li>[foo]<ul><li>bar</ul>baz</ul>',
+ '<ul><li>foo<ul><li>[bar]</ul>baz</ul>',
+ '<ul><li>foo<ul><li>bar</ul>[baz]</ul>',
+ '<ul><li>[foo<ul><li>bar]</ul>baz</ul>',
+
+
+ // Mix of <ol> and <ul>
+ 'foo<ol><li>bar</ol><ul><li>[baz]</ul>quz',
+ 'foo<ol><li>bar</ol><ul><li>[baz</ul>quz]',
+ 'foo<ul><li>[bar]</ul><ol><li>baz</ol>quz',
+ '[foo<ul><li>bar]</ul><ol><li>baz</ol>quz',
+
+ // Interaction with indentation
+ '[foo]<blockquote>bar</blockquote>baz',
+ 'foo<blockquote>[bar]</blockquote>baz',
+ '[foo<blockquote>bar]</blockquote>baz',
+ '<ol><li>foo</ol><blockquote>[bar]</blockquote>baz',
+ '[foo]<blockquote><ol><li>bar</ol></blockquote>baz',
+ 'foo<blockquote>[bar]<br>baz</blockquote>',
+ '[foo<blockquote>bar]<br>baz</blockquote>',
+ '<ol><li>foo</ol><blockquote>[bar]<br>baz</blockquote>',
+
+ '<p>[foo]<blockquote><p>bar</blockquote><p>baz',
+ '<p>foo<blockquote><p>[bar]</blockquote><p>baz',
+ '<p>[foo<blockquote><p>bar]</blockquote><p>baz',
+ '<ol><li>foo</ol><blockquote><p>[bar]</blockquote><p>baz',
+
+ // Attributes
+ '<ul id=abc><li>foo<li>[bar]<li>baz</ul>',
+ '<ul style=color:blue><li>foo<li>[bar]<li>baz</ul>',
+ '<ul style=text-indent:1em><li>foo<li>[bar]<li>baz</ul>',
+ '<ul id=abc><li>[foo]<li>bar<li>baz</ul>',
+ '<ul style=color:blue><li>[foo]<li>bar<li>baz</ul>',
+ '<ul style=text-indent:1em><li>[foo]<li>bar<li>baz</ul>',
+ '<ul id=abc><li>foo<li>bar<li>[baz]</ul>',
+ '<ul style=color:blue><li>foo<li>bar<li>[baz]</ul>',
+ '<ul style=text-indent:1em><li>foo<li>bar<li>[baz]</ul>',
+
+ // Whitespace nodes
+ '<ol><li>foo</ol> <p>[bar]',
+ '<p>[foo]</p> <ol><li>bar</ol>',
+ '<ol><li>foo</ol> <p>[bar]</p> <ol><li>baz</ol>',
+
+ // This caused an infinite loop at one point due to a bug in "fix
+ // disallowed ancestors". Disabled because I'm not sure how we want it
+ // to behave:
+ // http://www.w3.org/Bugs/Public/show_bug.cgi?id=14578
+ '!<span contenteditable=true>foo[]</span>',
+ ],
+ //@}
+ insertparagraph: [
+ //@{
+ 'foo[bar]baz',
+ 'fo[o<table><tr><td>b]ar</table>',
+ '<table><tr><td>[foo<td>bar]<tr><td>baz<td>quz</table>',
+ '<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<tr><td>baz<td>quz</table>',
+ '<table><tr><td>fo[o</table>b]ar',
+ '<table><tr><td>fo[o<td>b]ar<td>baz</table>',
+ '{<table><tr><td>foo</table>}',
+ '<table><tr><td>[foo]</table>',
+ '<ol><li>[foo]<li>bar</ol>',
+ '<ol><li>f[o]o<li>bar</ol>',
+
+ '[]foo',
+ 'foo[]',
+ '<span>foo[]</span>',
+ 'foo[]<br>',
+ 'foo[]bar',
+ '<address>[]foo</address>',
+ '<address>foo[]</address>',
+ '<address>foo[]<br></address>',
+ '<address>foo[]bar</address>',
+ '<div>[]foo</div>',
+ '<div>foo[]</div>',
+ '<div>foo[]<br></div>',
+ '<div>foo[]bar</div>',
+ '<dl><dt>[]foo<dd>bar</dl>',
+ '<dl><dt>foo[]<dd>bar</dl>',
+ '<dl><dt>foo[]<br><dd>bar</dl>',
+ '<dl><dt>foo[]bar<dd>baz</dl>',
+ '<dl><dt>foo<dd>[]bar</dl>',
+ '<dl><dt>foo<dd>bar[]</dl>',
+ '<dl><dt>foo<dd>bar[]<br></dl>',
+ '<dl><dt>foo<dd>bar[]baz</dl>',
+ '<h1>[]foo</h1>',
+ '<h1>foo[]</h1>',
+ '<h1>foo[]<br></h1>',
+ '<h1>foo[]bar</h1>',
+ '<ol><li>[]foo</ol>',
+ '<ol><li>foo[]</ol>',
+ '<ol><li>foo[]<br></ol>',
+ '<ol><li>foo[]bar</ol>',
+ '<p>[]foo</p>',
+ '<p>foo[]</p>',
+ '<p>foo[]<br></p>',
+ '<p>foo[]bar</p>',
+ '<pre>[]foo</pre>',
+ '<pre>foo[]</pre>',
+ '<pre>foo[]<br></pre>',
+ '<pre>foo[]bar</pre>',
+
+ '<pre>foo[]<br><br></pre>',
+ '<pre>foo<br>{}<br></pre>',
+ '<pre>foo&#10;[]</pre>',
+ '<pre>foo[]&#10;</pre>',
+ '<pre>foo&#10;[]&#10;</pre>',
+
+ '<xmp>foo[]bar</xmp>',
+ '<script>foo[]bar</script>baz',
+ '<div style=display:none>foo[]bar</div>baz',
+ '<listing>foo[]bar</listing>',
+
+ '<ol><li>{}<br></li></ol>',
+ 'foo<ol><li>{}<br></li></ol>',
+ '<ol><li>{}<br></li></ol>foo',
+ '<ol><li>foo<li>{}<br></ol>',
+ '<ol><li>{}<br><li>bar</ol>',
+ '<ol><li>foo</li><ul><li>{}<br></ul></ol>',
+
+ '<dl><dt>{}<br></dt></dl>',
+ '<dl><dt>foo<dd>{}<br></dl>',
+ '<dl><dt>{}<br><dd>bar</dl>',
+ '<dl><dt>foo<dd>bar<dl><dt>{}<br><dd>baz</dl></dl>',
+ '<dl><dt>foo<dd>bar<dl><dt>baz<dd>{}<br></dl></dl>',
+
+ '<h1>foo[bar</h1><p>baz]quz</p>',
+ '<p>foo[bar</p><h1>baz]quz</h1>',
+ '<p>foo</p>{}<br>',
+ '{}<br><p>foo</p>',
+ '<p>foo</p>{}<br><h1>bar</h1>',
+ '<h1>foo</h1>{}<br><p>bar</p>',
+ '<h1>foo</h1>{}<br><h2>bar</h2>',
+ '<p>foo</p><h1>[bar]</h1><p>baz</p>',
+ '<p>foo</p>{<h1>bar</h1>}<p>baz</p>',
+
+ '<table><tr><td>foo[]bar</table>',
+ '<table><tr><td><p>foo[]bar</table>',
+
+ '<blockquote>[]foo</blockquote>',
+ '<blockquote>foo[]</blockquote>',
+ '<blockquote>foo[]<br></blockquote>',
+ '<blockquote>foo[]bar</blockquote>',
+ '<blockquote><p>[]foo</blockquote>',
+ '<blockquote><p>foo[]</blockquote>',
+ '<blockquote><p>foo[]bar</blockquote>',
+ '<blockquote><p>foo[]<p>bar</blockquote>',
+ '<blockquote><p>foo[]bar<p>baz</blockquote>',
+
+ '<span>foo[]bar</span>',
+ '<span>foo[]bar</span>baz',
+ '<b>foo[]bar</b>',
+ '<b>foo[]bar</b>baz',
+ '<b>foo[]</b>bar',
+ 'foo<b>[]bar</b>',
+ '<b>foo[]</b><i>bar</i>',
+ '<b id=x class=y>foo[]bar</b>',
+ '<i><b>foo[]bar</b>baz</i>',
+
+ '<p><b>foo[]bar</b></p>',
+ '<p><b>[]foo</b></p>',
+ '<p><b id=x class=y>foo[]bar</b></p>',
+ '<div><b>foo[]bar</b></div>',
+
+ '<a href=foo>foo[]bar</a>',
+ '<a href=foo>foo[]bar</a>baz',
+ '<a href=foo>foo[]</a>bar',
+ 'foo<a href=foo>[]bar</a>',
+
+ '<p>foo[]<!--bar-->',
+ '<p><!--foo-->[]bar',
+
+ '<p>foo<span style=color:#aBcDeF>[bar]</span>baz',
+ '<p>foo<span style=color:#aBcDeF>{bar}</span>baz',
+ '<p>foo{<span style=color:#aBcDeF>bar</span>}baz',
+ '<p>[foo<span style=color:#aBcDeF>bar]</span>baz',
+ '<p>{foo<span style=color:#aBcDeF>bar}</span>baz',
+ '<p>foo<span style=color:#aBcDeF>[bar</span>baz]',
+ '<p>foo<span style=color:#aBcDeF>{bar</span>baz}',
+ '<p>foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz',
+
+ // https://bugs.webkit.org/show_bug.cgi?id=5036
+ '<ul contenteditable><li>{}<br></ul>',
+ '<ul contenteditable><li>foo[]</ul>',
+ '<div contenteditable=false><ul contenteditable><li>{}<br></ul></div>',
+ '<div contenteditable=false><ul contenteditable><li>foo[]</ul></div>',
+
+ // http://www.w3.org/Bugs/Public/show_bug.cgi?id=13841
+ // https://bugs.webkit.org/show_bug.cgi?id=23507
+ '<address><p>foo[]</address>',
+ '<dl><dt><p>foo[]</dl>',
+ '<dl><dd><p>foo[]</dl>',
+ '<ol><li><p>foo[]</ol>',
+ '<ul><li><p>foo[]</ul>',
+ '<address><div>foo[]</address>',
+ '<dl><dt><div>foo[]</dl>',
+ '<dl><dd><div>foo[]</dl>',
+ '<ol><li><div>foo[]</ol>',
+ '<ul><li><div>foo[]</ul>',
+ '<div><p>foo[]</div>',
+ '<div><div>foo[]</div>',
+
+ '<address><p>[]foo</address>',
+ '<dl><dt><p>[]foo</dl>',
+ '<dl><dd><p>[]foo</dl>',
+ '<ol><li><p>[]foo</ol>',
+ '<ul><li><p>[]foo</ul>',
+ '<address><div>[]foo</address>',
+ '<dl><dt><div>[]foo</dl>',
+ '<dl><dd><div>[]foo</dl>',
+ '<ol><li><div>[]foo</ol>',
+ '<ul><li><div>[]foo</ul>',
+ '<div><p>[]foo</div>',
+ '<div><div>[]foo</div>',
+
+ '<address><p>foo[]bar</address>',
+ '<dl><dt><p>foo[]bar</dl>',
+ '<dl><dd><p>foo[]bar</dl>',
+ '<ol><li><p>foo[]bar</ol>',
+ '<ul><li><p>foo[]bar</ul>',
+ '<address><div>foo[]bar</address>',
+ '<dl><dt><div>foo[]bar</dl>',
+ '<dl><dd><div>foo[]bar</dl>',
+ '<ol><li><div>foo[]bar</ol>',
+ '<ul><li><div>foo[]bar</ul>',
+ '<div><p>foo[]bar</div>',
+ '<div><div>foo[]bar</div>',
+
+ '<ol><li class=a id=x><p class=b id=y>foo[]</ol>',
+ '<div class=a id=x><div class=b id=y>foo[]</div></div>',
+ '<div class=a id=x><p class=b id=y>foo[]</div>',
+ '<ol><li class=a id=x><p class=b id=y>[]foo</ol>',
+ '<div class=a id=x><div class=b id=y>[]foo</div></div>',
+ '<div class=a id=x><p class=b id=y>[]foo</div>',
+ '<ol><li class=a id=x><p class=b id=y>foo[]bar</ol>',
+ '<div class=a id=x><div class=b id=y>foo[]bar</div></div>',
+ '<div class=a id=x><p class=b id=y>foo[]bar</div>',
+ ],
+ //@}
+ inserttext: [
+ //@{
+ 'foo[bar]baz',
+ ['', 'foo[bar]baz'],
+
+ ['\t', 'foo[]bar'],
+ ['&', 'foo[]bar'],
+ ['\n', 'foo[]bar'],
+ ['abc\ndef', 'foo[]bar'],
+ ['\x07', 'foo[]bar'],
+
+ ['<b>hi</b>', 'foo[]bar'],
+ ['<', 'foo[]bar'],
+ ['&amp;', 'foo[]bar'],
+
+ // http://www.w3.org/Bugs/Public/show_bug.cgi?id=14254
+ ['!\r', 'foo[]bar'],
+ ['!\r\n', 'foo[]bar'],
+ ['!\0', 'foo[]bar'],
+ ['!\ud800', 'foo[]bar'],
+
+ // Whitespace tests! The following two bugs are relevant to some of
+ // these:
+ // http://www.w3.org/Bugs/Public/show_bug.cgi?id=14119
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=681626
+ [' ', 'foo[]bar'],
+ [' ', 'foo []bar'],
+ [' ', 'foo[] bar'],
+ [' ', 'foo &nbsp;[]bar'],
+ [' ', 'foo []&nbsp;bar'],
+ [' ', 'foo[] &nbsp;bar'],
+ [' ', 'foo&nbsp; []bar'],
+ [' ', 'foo&nbsp;[] bar'],
+ [' ', 'foo[]&nbsp; bar'],
+ [' ', 'foo&nbsp;&nbsp;[]bar'],
+ [' ', 'foo&nbsp;[]&nbsp;bar'],
+ [' ', 'foo[]&nbsp;&nbsp;bar'],
+ [' ', 'foo []&nbsp; bar'],
+ [' ', 'foo []bar'],
+ [' ', 'foo []&nbsp;&nbsp; &nbsp; bar'],
+
+ [' ', '[]foo'],
+ [' ', '{}foo'],
+ [' ', 'foo[]'],
+ [' ', 'foo{}'],
+ [' ', 'foo&nbsp;[]'],
+ [' ', 'foo&nbsp;{}'],
+ [' ', 'foo&nbsp;&nbsp;[]'],
+ [' ', 'foo&nbsp;&nbsp;{}'],
+ [' ', '<b>foo[]</b>bar'],
+ [' ', 'foo[]<b>bar</b>'],
+
+ [' ', 'foo[] '],
+ [' ', ' foo [] '],
+ [' ', 'foo[]<span> </span>'],
+ [' ', 'foo[]<span> </span> '],
+ [' ', ' []foo'],
+ [' ', ' [] foo '],
+ [' ', '<span> </span>[]foo'],
+ [' ', ' <span> </span>[]foo'],
+
+ [' ', '{}<br>'],
+ [' ', '<p>{}<br>'],
+
+ [' ', '<p>foo[]<p>bar'],
+ [' ', '<p>foo&nbsp;[]<p>bar'],
+ [' ', '<p>foo[]<p>&nbsp;bar'],
+
+ // Some of the same tests as above, repeated with various values of
+ // white-space.
+ [' ', '<pre>foo[]bar</pre>'],
+ [' ', '<pre>foo []bar</pre>'],
+ [' ', '<pre>foo[] bar</pre>'],
+ [' ', '<pre>foo &nbsp;[]bar</pre>'],
+ [' ', '<pre>[]foo</pre>'],
+ [' ', '<pre>foo[]</pre>'],
+ [' ', '<pre>foo&nbsp;[]</pre>'],
+ [' ', '<pre> foo [] </pre>'],
+
+ [' ', '<div style=white-space:pre>foo[]bar</div>'],
+ [' ', '<div style=white-space:pre>foo []bar</div>'],
+ [' ', '<div style=white-space:pre>foo[] bar</div>'],
+ [' ', '<div style=white-space:pre>foo &nbsp;[]bar</div>'],
+ [' ', '<div style=white-space:pre>[]foo</div>'],
+ [' ', '<div style=white-space:pre>foo[]</div>'],
+ [' ', '<div style=white-space:pre>foo&nbsp;[]</div>'],
+ [' ', '<div style=white-space:pre> foo [] </div>'],
+
+ [' ', '<div style=white-space:pre-wrap>foo[]bar</div>'],
+ [' ', '<div style=white-space:pre-wrap>foo []bar</div>'],
+ [' ', '<div style=white-space:pre-wrap>foo[] bar</div>'],
+ [' ', '<div style=white-space:pre-wrap>foo &nbsp;[]bar</div>'],
+ [' ', '<div style=white-space:pre-wrap>[]foo</div>'],
+ [' ', '<div style=white-space:pre-wrap>foo[]</div>'],
+ [' ', '<div style=white-space:pre-wrap>foo&nbsp;[]</div>'],
+ [' ', '<div style=white-space:pre-wrap> foo [] </div>'],
+
+ [' ', '<div style=white-space:pre-line>foo[]bar</div>'],
+ [' ', '<div style=white-space:pre-line>foo []bar</div>'],
+ [' ', '<div style=white-space:pre-line>foo[] bar</div>'],
+ [' ', '<div style=white-space:pre-line>foo &nbsp;[]bar</div>'],
+ [' ', '<div style=white-space:pre-line>[]foo</div>'],
+ [' ', '<div style=white-space:pre-line>foo[]</div>'],
+ [' ', '<div style=white-space:pre-line>foo&nbsp;[]</div>'],
+ [' ', '<div style=white-space:pre-line> foo [] </div>'],
+
+ [' ', '<div style=white-space:nowrap>foo[]bar</div>'],
+ [' ', '<div style=white-space:nowrap>foo []bar</div>'],
+ [' ', '<div style=white-space:nowrap>foo[] bar</div>'],
+ [' ', '<div style=white-space:nowrap>foo &nbsp;[]bar</div>'],
+ [' ', '<div style=white-space:nowrap>[]foo</div>'],
+ [' ', '<div style=white-space:nowrap>foo[]</div>'],
+ [' ', '<div style=white-space:nowrap>foo&nbsp;[]</div>'],
+ [' ', '<div style=white-space:nowrap> foo [] </div>'],
+
+ // End whitespace tests
+
+ // Autolinking tests
+ [' ', 'http://a[]'],
+ [' ', 'ftp://a[]'],
+ [' ', 'quasit://a[]'],
+ [' ', '.x-++-.://a[]'],
+ [' ', '(http://a)[]'],
+ [' ', '&lt;http://a>[]'],
+ // http://www.w3.org/Bugs/Public/show_bug.cgi?id=14744
+ ['! ', '&#x5b;http://a&#x5d;[]'],
+ ['! ', '&#x7b;http://a&#x7d;[]'],
+ [' ', 'http://a![]'],
+ [' ', '!"#$%&amp;\'()*+,-./:;&lt;=>?\^_`|~http://a!"#$%&amp;\'()*+,-./:;&lt;=>?\^_`|~[]'],
+ [' ', 'http://a!"\'(),-.:;&lt;>`[]'],
+ [' ', 'http://a#$%&amp;*+/=?\^_|~[]'],
+ [' ', 'mailto:a[]'],
+ [' ', 'a@b[]'],
+ [' ', 'a@[]'],
+ [' ', '@b[]'],
+ [' ', '#@x[]'],
+ [' ', 'a@.[]'],
+ [' ', '!"#$%&amp;\'()*+,-./:;&lt;=>?\^_`|~a@b!"#$%&amp;\'()*+,-./:;&lt;=>?\^_`|~[]'],
+ [' ', '<b>a@b</b>{}'],
+ [' ', '<b>a</b><i>@</i><u>b</u>{}'],
+ [' ', 'a@b<b>[]c</b>'],
+ [' ', '<p>a@b</p><p>[]c</p>'],
+ ['a', 'http://a[]'],
+ ['\t', 'http://a[]'],
+ // http://www.w3.org/Bugs/Public/show_bug.cgi?id=14254
+ ['!\r', 'http://a[]'],
+ // http://www.w3.org/Bugs/Public/show_bug.cgi?id=14745
+ ['!\n', 'http://a[]'],
+ ['\f', 'http://a[]'],
+ ['\u00A0', 'http://a[]'],
+
+ [' ', 'foo[]'],
+
+ 'foo[]bar',
+ 'foo&nbsp;[]',
+ 'foo\xa0[]',
+ '<p>foo[]',
+ '<p>foo</p>{}',
+ '<p>[]foo',
+ '<p>{}foo',
+ '{}<p>foo',
+ '<p>foo</p>{}<p>bar</p>',
+ '<b>foo[]</b>bar',
+ '<b>foo</b>[]bar',
+ 'foo<b>{}</b>bar',
+ '<a>foo[]</a>bar',
+ '<a>foo</a>[]bar',
+ '<a href=/>foo[]</a>bar',
+ '<a href=/>foo</a>[]bar',
+ '<p>fo[o<p>b]ar',
+ '<p>fo[o<p>bar<p>b]az',
+ '{}<br>',
+ '<p>{}<br>',
+ '<p><span>{}<br></span>',
+ '<p>foo<span style=color:#aBcDeF>[bar]</span>baz',
+ '<p>foo<span style=color:#aBcDeF>{bar}</span>baz',
+ '<p>foo{<span style=color:#aBcDeF>bar</span>}baz',
+ '<p>[foo<span style=color:#aBcDeF>bar]</span>baz',
+ '<p>{foo<span style=color:#aBcDeF>bar}</span>baz',
+ '<p>foo<span style=color:#aBcDeF>[bar</span>baz]',
+ '<p>foo<span style=color:#aBcDeF>{bar</span>baz}',
+ '<p>foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz',
+
+
+ // These are like the corresponding tests in the multitest section, but
+ // because the selection isn't collapsed, we don't need to do
+ // multitests to set overrides.
+ 'foo<b>[bar]</b>baz',
+ 'foo<i>[bar]</i>baz',
+ 'foo<s>[bar]</s>baz',
+ 'foo<sub>[bar]</sub>baz',
+ 'foo<sup>[bar]</sup>baz',
+ 'foo<u>[bar]</u>baz',
+ 'foo<a href=http://www.google.com>[bar]</a>baz',
+ 'foo<font face=sans-serif>[bar]</font>baz',
+ 'foo<font size=4>[bar]</font>baz',
+ 'foo<font color=#0000FF>[bar]</font>baz',
+ 'foo<span style=background-color:#00FFFF>[bar]</span>baz',
+ 'foo<a href=http://www.google.com><font color=blue>[bar]</font></a>baz',
+ 'foo<font color=blue><a href=http://www.google.com>[bar]</a></font>baz',
+ 'foo<a href=http://www.google.com><font color=brown>[bar]</font></a>baz',
+ 'foo<font color=brown><a href=http://www.google.com>[bar]</a></font>baz',
+ 'foo<a href=http://www.google.com><font color=black>[bar]</font></a>baz',
+ 'foo<a href=http://www.google.com><u>[bar]</u></a>baz',
+ 'foo<u><a href=http://www.google.com>[bar]</a></u>baz',
+ 'foo<sub><font size=2>[bar]</font></sub>baz',
+ 'foo<font size=2><sub>[bar]</sub></font>baz',
+ 'foo<sub><font size=3>[bar]</font></sub>baz',
+ 'foo<font size=3><sub>[bar]</sub></font>baz',
+
+ // Now repeat but with different selections.
+ '[foo<b>bar]</b>baz',
+ '[foo<i>bar]</i>baz',
+ '[foo<s>bar]</s>baz',
+ '[foo<sub>bar]</sub>baz',
+ '[foo<sup>bar]</sup>baz',
+ '[foo<u>bar]</u>baz',
+ '[foo<a href=http://www.google.com>bar]</a>baz',
+ '[foo<font face=sans-serif>bar]</font>baz',
+ '[foo<font size=4>bar]</font>baz',
+ '[foo<font color=#0000FF>bar]</font>baz',
+ '[foo<span style=background-color:#00FFFF>bar]</span>baz',
+ '[foo<a href=http://www.google.com><font color=blue>bar]</font></a>baz',
+ '[foo<font color=blue><a href=http://www.google.com>bar]</a></font>baz',
+ '[foo<a href=http://www.google.com><font color=brown>bar]</font></a>baz',
+ '[foo<font color=brown><a href=http://www.google.com>bar]</a></font>baz',
+ '[foo<a href=http://www.google.com><font color=black>bar]</font></a>baz',
+ '[foo<a href=http://www.google.com><u>bar]</u></a>baz',
+ '[foo<u><a href=http://www.google.com>bar]</a></u>baz',
+ '[foo<sub><font size=2>bar]</font></sub>baz',
+ '[foo<font size=2><sub>bar]</sub></font>baz',
+ '[foo<sub><font size=3>bar]</font></sub>baz',
+ '[foo<font size=3><sub>bar]</sub></font>baz',
+
+ 'foo<b>[bar</b>baz]',
+ 'foo<i>[bar</i>baz]',
+ 'foo<s>[bar</s>baz]',
+ 'foo<sub>[bar</sub>baz]',
+ 'foo<sup>[bar</sup>baz]',
+ 'foo<u>[bar</u>baz]',
+ 'foo<a href=http://www.google.com>[bar</a>baz]',
+ 'foo<font face=sans-serif>[bar</font>baz]',
+ 'foo<font size=4>[bar</font>baz]',
+ 'foo<font color=#0000FF>[bar</font>baz]',
+ 'foo<span style=background-color:#00FFFF>[bar</span>baz]',
+ 'foo<a href=http://www.google.com><font color=blue>[bar</font></a>baz]',
+ 'foo<font color=blue><a href=http://www.google.com>[bar</a></font>baz]',
+ 'foo<a href=http://www.google.com><font color=brown>[bar</font></a>baz]',
+ 'foo<font color=brown><a href=http://www.google.com>[bar</a></font>baz]',
+ 'foo<a href=http://www.google.com><font color=black>[bar</font></a>baz]',
+ 'foo<a href=http://www.google.com><u>[bar</u></a>baz]',
+ 'foo<u><a href=http://www.google.com>[bar</a></u>baz]',
+ 'foo<sub><font size=2>[bar</font></sub>baz]',
+ 'foo<font size=2><sub>[bar</sub></font>baz]',
+ 'foo<sub><font size=3>[bar</font></sub>baz]',
+ 'foo<font size=3><sub>[bar</sub></font>baz]',
+
+ // https://bugs.webkit.org/show_bug.cgi?id=19702
+ '<blockquote><font color=blue>[foo]</font></blockquote>',
+ ],
+ //@}
+ insertunorderedlist: [
+ //@{
+ 'foo[]bar',
+ 'foo[bar]baz',
+ 'foo<br>[bar]',
+ 'f[oo<br>b]ar<br>baz',
+ '<p>[foo]<br>bar</p>',
+ '[foo<ol><li>bar]</ol>baz',
+ 'foo<ol><li>[bar</ol>baz]',
+ '[foo<ul><li>bar]</ul>baz',
+ 'foo<ul><li>[bar</ul>baz]',
+ 'foo<ul><li>[bar</ul><ol><li>baz]</ol>quz',
+ 'foo<ol><li>[bar</ol><ul><li>baz]</ul>quz',
+
+ '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>',
+ '<table><tbody><tr><td>fo[o<td>b]ar<td>baz</table>',
+ '{<table><tr><td>foo<td>bar<td>baz</table>}',
+
+ '<p>foo<p>[bar]<p>baz',
+ '<p>foo<blockquote>[bar]</blockquote><p>baz',
+ '<dl><dt>foo<dd>[bar]<dt>baz<dd>quz</dl>',
+ '<dl><dt>foo<dd>bar<dt>[baz]<dd>quz</dl>',
+
+ '<p>[foo<p>bar]<p>baz',
+ '<p>[foo<blockquote>bar]</blockquote><p>baz',
+ '<dl><dt>[foo<dd>bar]<dt>baz<dd>quz</dl>',
+ '<dl><dt>foo<dd>[bar<dt>baz]<dd>quz</dl>',
+
+ '<p>[foo<blockquote><p>bar]<p>baz</blockquote>',
+
+
+ // Various <ol> stuff
+ '<ol><li>foo<li>[bar]<li>baz</ol>',
+ '<ol><li>foo</ol>[bar]',
+ '[foo]<ol><li>bar</ol>',
+ '<ol><li>foo</ol>[bar]<ol><li>baz</ol>',
+ '<ol><ol><li>[foo]</ol></ol>',
+ '<ol><li>[foo]<br>bar<li>baz</ol>',
+ '<ol><li>foo<br>[bar]<li>baz</ol>',
+ '<ol><li><div>[foo]</div>bar<li>baz</ol>',
+ '<ol><li>foo<ol><li>[bar]<li>baz</ol><li>quz</ol>',
+ '<ol><li>foo<ol><li>bar<li>[baz]</ol><li>quz</ol>',
+ '<ol><li>foo</li><ol><li>[bar]<li>baz</ol><li>quz</ol>',
+ '<ol><li>foo</li><ol><li>bar<li>[baz]</ol><li>quz</ol>',
+ '<ol><li>[foo]<ol><li>bar</ol><li>baz</ol>',
+ '<ol><li>[foo]</li><ol><li>bar</ol><li>baz</ol>',
+ '<ol><li>foo<li>[bar]<ol><li>baz</ol><li>quz</ol>',
+ '<ol><li>foo<li>[bar]</li><ol><li>baz</ol><li>quz</ol>',
+ '<ol><li>foo<ol><li>bar<li>baz</ol><li>[quz]</ol>',
+ '<ol><li>foo</li><ol><li>bar<li>baz</ol><li>[quz]</ol>',
+
+ // Multiple items at once.
+ '<ol><li>foo<li>[bar<li>baz]</ol>',
+ '<ol><li>[foo<ol><li>bar]</ol><li>baz</ol>',
+ '<ol><li>foo<ol><li>b[ar</ol><li>b]az</ol>',
+ '<ol><li>[foo<ol><li>bar</ol><li>baz]</ol><p>extra',
+
+ // We probably can't actually get this DOM . . .
+ '<ol><li>[foo]<ol><li>bar</ol>baz</ol>',
+ '<ol><li>foo<ol><li>[bar]</ol>baz</ol>',
+ '<ol><li>foo<ol><li>bar</ol>[baz]</ol>',
+ '<ol><li>[foo<ol><li>bar]</ol>baz</ol>',
+
+
+ // Same stuff but with <ul>
+ '<ul><li>foo<li>[bar]<li>baz</ul>',
+ '<ul><li>foo</ul>[bar]',
+ '[foo]<ul><li>bar</ul>',
+ '<ul><li>foo</ul>[bar]<ul><li>baz</ul>',
+ '<ul><ul><li>[foo]</ul></ul>',
+ '<ul><li>[foo]<br>bar<li>baz</ul>',
+ '<ul><li>foo<br>[bar]<li>baz</ul>',
+ '<ul><li><div>[foo]</div>bar<li>baz</ul>',
+ '<ul><li>foo<ul><li>[bar]<li>baz</ul><li>quz</ul>',
+ '<ul><li>foo<ul><li>bar<li>[baz]</ul><li>quz</ul>',
+ '<ul><li>foo</li><ul><li>[bar]<li>baz</ul><li>quz</ul>',
+ '<ul><li>foo</li><ul><li>bar<li>[baz]</ul><li>quz</ul>',
+ '<ul><li>[foo]<ul><li>bar</ul><li>baz</ul>',
+ '<ul><li>[foo]</li><ul><li>bar</ul><li>baz</ul>',
+ '<ul><li>foo<li>[bar]<ul><li>baz</ul><li>quz</ul>',
+ '<ul><li>foo<li>[bar]</li><ul><li>baz</ul><li>quz</ul>',
+ '<ul><li>foo<ul><li>bar<li>baz</ul><li>[quz]</ul>',
+ '<ul><li>foo</li><ul><li>bar<li>baz</ul><li>[quz]</ul>',
+
+ // Multiple items at once.
+ '<ul><li>foo<li>[bar<li>baz]</ul>',
+ '<ul><li>[foo<ul><li>bar]</ul><li>baz</ul>',
+ '<ul><li>foo<ul><li>b[ar</ul><li>b]az</ul>',
+ '<ul><li>[foo<ul><li>bar</ul><li>baz]</ul><p>extra',
+
+ // We probably can't actually get this DOM . . .
+ '<ul><li>[foo]<ul><li>bar</ul>baz</ul>',
+ '<ul><li>foo<ul><li>[bar]</ul>baz</ul>',
+ '<ul><li>foo<ul><li>bar</ul>[baz]</ul>',
+ '<ul><li>[foo<ul><li>bar]</ul>baz</ul>',
+
+
+ // Mix of <ol> and <ul>
+ 'foo<ol><li>bar</ol><ul><li>[baz]</ul>quz',
+ 'foo<ol><li>bar</ol><ul><li>[baz</ul>quz]',
+ 'foo<ul><li>[bar]</ul><ol><li>baz</ol>quz',
+ '[foo<ul><li>bar]</ul><ol><li>baz</ol>quz',
+
+ // Interaction with indentation
+ '[foo]<blockquote>bar</blockquote>baz',
+ 'foo<blockquote>[bar]</blockquote>baz',
+ '[foo<blockquote>bar]</blockquote>baz',
+ '<ol><li>foo</ol><blockquote>[bar]</blockquote>baz',
+ '[foo]<blockquote><ol><li>bar</ol></blockquote>baz',
+ 'foo<blockquote>[bar]<br>baz</blockquote>',
+ '[foo<blockquote>bar]<br>baz</blockquote>',
+ '<ol><li>foo</ol><blockquote>[bar]<br>baz</blockquote>',
+
+ '<p>[foo]<blockquote><p>bar</blockquote><p>baz',
+ '<p>foo<blockquote><p>[bar]</blockquote><p>baz',
+ '<p>[foo<blockquote><p>bar]</blockquote><p>baz',
+ '<ol><li>foo</ol><blockquote><p>[bar]</blockquote><p>baz',
+
+ // Attributes
+ '<ul id=abc><li>foo<li>[bar]<li>baz</ul>',
+ '<ul style=color:blue><li>foo<li>[bar]<li>baz</ul>',
+ '<ul style=text-indent:1em><li>foo<li>[bar]<li>baz</ul>',
+ '<ul id=abc><li>[foo]<li>bar<li>baz</ul>',
+ '<ul style=color:blue><li>[foo]<li>bar<li>baz</ul>',
+ '<ul style=text-indent:1em><li>[foo]<li>bar<li>baz</ul>',
+ '<ul id=abc><li>foo<li>bar<li>[baz]</ul>',
+ '<ul style=color:blue><li>foo<li>bar<li>[baz]</ul>',
+ '<ul style=text-indent:1em><li>foo<li>bar<li>[baz]</ul>',
+
+ // Whitespace nodes
+ '<ul><li>foo</ul> <p>[bar]',
+ '<p>[foo]</p> <ul><li>bar</ul>',
+ '<ul><li>foo</ul> <p>[bar]</p> <ul><li>baz</ul>',
+
+ // https://bugs.webkit.org/show_bug.cgi?id=24167
+ '{<div style="font-size: 1.3em">1</div><div style="font-size: 1.1em">2</div>}',
+ ],
+ //@}
+ italic: [
+ //@{
+ 'foo[]bar',
+ '<p>[foo</p> <p>bar]</p>',
+ '<span>[foo</span> <span>bar]</span>',
+ '<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>',
+ '<p>[foo<p><br><p>bar]',
+ '<b>foo[]bar</b>',
+ '<i>foo[]bar</i>',
+ '<span>foo</span>{}<span>bar</span>',
+ '<span>foo[</span><span>]bar</span>',
+ 'foo[bar]baz',
+ 'foo[bar<b>baz]qoz</b>quz',
+ 'foo[bar<i>baz]qoz</i>quz',
+ '{<p><p> <p>foo</p>}',
+
+ '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>',
+ '<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>',
+ '<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>',
+ '{<table><tr><td>foo<td>bar<td>baz</table>}',
+
+ 'foo<span style="font-style: italic">[bar]</span>baz',
+ 'foo<address>[bar]</address>baz',
+ 'foo<cite>[bar]</cite>baz',
+ 'foo<dfn>[bar]</dfn>baz',
+ 'foo<em>[bar]</em>baz',
+ 'foo<i>[bar]</i>baz',
+ 'foo<var>[bar]</var>baz',
+
+ 'foo{<address>bar</address>}baz',
+ 'foo{<cite>bar</cite>}baz',
+ 'foo{<dfn>bar</dfn>}baz',
+ 'foo{<em>bar</em>}baz',
+ 'foo{<i>bar</i>}baz',
+ 'foo{<var>bar</var>}baz',
+
+ 'foo<address>b[a]r</address>baz',
+ 'foo<cite>b[a]r</cite>baz',
+ 'foo<dfn>b[a]r</dfn>baz',
+ 'foo<em>b[a]r</em>baz',
+ 'foo<i>b[a]r</i>baz',
+ 'foo<var>b[a]r</var>baz',
+
+ 'fo[o<address>bar</address>b]az',
+ 'fo[o<cite>bar</cite>b]az',
+ 'fo[o<dfn>bar</dfn>b]az',
+ 'fo[o<em>bar</em>b]az',
+ 'fo[o<i>bar</i>b]az',
+ 'fo[o<var>bar</var>b]az',
+
+ 'foo[<address>bar</address>baz]',
+ 'foo[<cite>bar</cite>baz]',
+ 'foo[<dfn>bar</dfn>baz]',
+ 'foo[<em>bar</em>baz]',
+ 'foo[<i>bar</i>baz]',
+ 'foo[<var>bar</var>baz]',
+
+ '[foo<address>bar</address>]baz',
+ '[foo<cite>bar</cite>]baz',
+ '[foo<dfn>bar</dfn>]baz',
+ '[foo<em>bar</em>]baz',
+ '[foo<i>bar</i>]baz',
+ '[foo<var>bar</var>]baz',
+
+ 'foo<span style="font-style: italic">[bar]</span>baz',
+ 'foo<span style="font-style: oblique">[bar]</span>baz',
+ 'foo<span style="font-style: oblique">b[a]r</span>baz',
+
+ '<i>{<p>foo</p><p>bar</p>}<p>baz</p></i>',
+ '<i><p>foo[<b>bar</b>}</p><p>baz</p></i>',
+ 'foo [bar <b>baz] qoz</b> quz sic',
+ 'foo bar <b>baz [qoz</b> quz] sic',
+ 'foo [bar <i>baz] qoz</i> quz sic',
+ 'foo bar <i>baz [qoz</i> quz] sic',
+
+ // Tests for queryCommandIndeterm() and queryCommandState()
+ 'fo[o<i>b]ar</i>baz',
+ 'foo<i>ba[r</i>b]az',
+ 'fo[o<i>bar</i>b]az',
+ 'foo[<i>b]ar</i>baz',
+ 'foo<i>ba[r</i>]baz',
+ 'foo[<i>bar</i>]baz',
+ 'foo<i>[bar]</i>baz',
+ 'foo{<i>bar</i>}baz',
+ 'fo[o<span style=font-style:italic>b]ar</span>baz',
+ 'fo[o<span style=font-style:oblique>b]ar</span>baz',
+ '<span style=font-style:italic>fo[o</span><span style=font-style:oblique>b]ar</span>',
+ '<span style=font-style:oblique>fo[o</span><span style=font-style:italic>b]ar</span>',
+ '<i>fo[o</i><address>b]ar</address>',
+ ],
+ //@}
+ justifycenter: [
+ //@{
+ 'foo[]bar<p>extra',
+ '<span>foo</span>{}<span>bar</span><p>extra',
+ '<span>foo[</span><span>]bar</span><p>extra',
+ 'foo[bar]baz<p>extra',
+ 'foo[bar<b>baz]qoz</b>quz<p>extra',
+ '<p>foo[]bar<p>extra',
+ '<p>foo[bar]baz<p>extra',
+ '<h1>foo[bar]baz</h1><p>extra',
+ '<pre>foo[bar]baz</pre><p>extra',
+ '<xmp>foo[bar]baz</xmp><p>extra',
+ '<center><p>[foo]<p>bar</center><p>extra',
+ '<center><p>[foo<p>bar]</center><p>extra',
+
+ '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra',
+ '<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '{<table><tr><td>foo<td>bar<td>baz</table>}<p>extra',
+
+ '<table align=center><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra',
+ '<table align=center><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table align=center><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table align=center><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '<table align=center data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '{<table align=center><tr><td>foo<td>bar<td>baz</table>}<p>extra',
+
+ '<table><tbody align=center><tr><td>foo<td>b[a]r<td>baz</table><p>extra',
+ '<table><tbody align=center><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody align=center><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody align=center data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '<table data-start=0 data-end=1><tbody align=center><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '{<table><tbody align=center><tr><td>foo<td>bar<td>baz</table>}<p>extra',
+
+ '<table><tbody><tr align=center><td>foo<td>b[a]r<td>baz</table><p>extra',
+ '<table><tbody><tr align=center data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody><tr align=center data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody data-start=0 data-end=1><tr align=center><td>foo<td>bar<td>baz</table><p>extra',
+ '<table data-start=0 data-end=1><tbody><tr align=center><td>foo<td>bar<td>baz</table><p>extra',
+ '{<table><tr align=center><td>foo<td>bar<td>baz</table>}<p>extra',
+
+ '<div align=center><p>[foo]<p>bar</div><p>extra',
+ '<div align=center><p>[foo<p>bar}</div><p>extra',
+ '<div style=text-align:center><p>[foo]<p>bar</div><p>extra',
+ '<div style=text-align:center><p>[foo<p>bar]</div><p>extra',
+
+ '<div align=justify><p>[foo]<p>bar</div><p>extra',
+ '<div align=justify><p>[foo<p>bar}</div><p>extra',
+ '<div style=text-align:justify><p>[foo]<p>bar</div><p>extra',
+ '<div style=text-align:justify><p>[foo<p>bar]</div><p>extra',
+
+ '<div align=left><p>[foo]<p>bar</div><p>extra',
+ '<div align=left><p>[foo<p>bar}</div><p>extra',
+ '<div style=text-align:left><p>[foo]<p>bar</div><p>extra',
+ '<div style=text-align:left><p>[foo<p>bar]</div><p>extra',
+
+ '<div align=right><p>[foo]<p>bar</div><p>extra',
+ '<div align=right><p>[foo<p>bar}</div><p>extra',
+ '<div style=text-align:right><p>[foo]<p>bar</div><p>extra',
+ '<div style=text-align:right><p>[foo<p>bar]</div><p>extra',
+
+ '<center>foo</center>[bar]<p>extra',
+ '[foo]<center>bar</center><p>extra',
+ '<center>foo</center>[bar]<center>baz</center><p>extra',
+ '<div align=center>foo</div>[bar]<p>extra',
+ '[foo]<div align=center>bar</div><p>extra',
+ '<div align=center>foo</div>[bar]<div align=center>baz</div><p>extra',
+ '<div align=center><p>foo</div><p>[bar]<p>extra',
+ '<p>[foo]<div align=center><p>bar</div><p>extra',
+ '<div align=center><p>foo</div><p>[bar]<div align=center><p>baz</div><p>extra',
+ '<div style=text-align:center>foo</div>[bar]<p>extra',
+ '[foo]<div style=text-align:center>bar</div><p>extra',
+ '<div style=text-align:center>foo</div>[bar]<div style=text-align:center>baz</div><p>extra',
+ '<div style=text-align:center><p>foo</div><p>[bar]<p>extra',
+ '<p>[foo]<div style=text-align:center><p>bar</div><p>extra',
+ '<div style=text-align:center><p>foo</div><p>[bar]<div style=text-align:center><p>baz</div><p>extra',
+ '<p align=center>foo<p>[bar]<p>extra',
+ '<p>[foo]<p align=center>bar<p>extra',
+ '<p align=center>foo<p>[bar]<p align=center>baz<p>extra',
+
+ '<center>[foo</center>bar]<p>extra',
+ '<center>fo[o</center>b]ar<p>extra',
+ '<div align=center>[foo</div>bar]<p>extra',
+ '<div align=center>fo[o</div>b]ar<p>extra',
+ '<div style=text-align:center>[foo</div>bar]<p>extra',
+ '<div style=text-align:center>fo[o</div>b]ar<p>extra',
+ '<span style=text-align:center>[foo]</span><p>extra',
+ '<span style=text-align:center>f[o]o</span><p>extra',
+
+ '<div style=text-align:center>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra',
+
+ '<div align=nonsense><p>[foo]</div><p>extra',
+ '<div style=text-align:inherit><p>[foo]</div><p>extra',
+ '<quasit align=right><p>[foo]</p></quasit><p>extra',
+
+ '<div align=center>{<div align=left>foo</div>}</div>',
+ '<div align=left>{<div align=center>foo</div>}</div>',
+ '<div align=center>{<div align=left>foo</div>bar}</div>',
+ '<div align=left>{<div align=center>foo</div>bar}</div>',
+ '<div align=center>{<div align=left>foo</div><img src=/img/lion.svg>}</div>',
+ '<div align=left>{<div align=center>foo</div><img src=/img/lion.svg>}</div>',
+ '<div align=center>{<div align=left>foo</div><!-- bar -->}</div>',
+ '<div align=left>{<div align=center>foo</div><!-- bar -->}</div>',
+
+ '<div style=text-align:start>[foo]</div><p>extra',
+ '<div style=text-align:end>[foo]</div><p>extra',
+ '<div dir=rtl style=text-align:start>[foo]</div><p>extra',
+ '<div dir=rtl style=text-align:end>[foo]</div><p>extra',
+
+ // Whitespace nodes
+ '<div style=text-align:center><p>foo</div> <p>[bar]',
+ '<div align=center><p>foo</div> <p>[bar]',
+ '<center><p>foo</center> <p>[bar]',
+ '<p>[foo]</p> <div style=text-align:center><p>bar</div>',
+ '<p>[foo]</p> <div align=center><p>bar</div>',
+ '<p>[foo]</p> <center><p>bar</center>',
+ '<div style=text-align:center><p>foo</div> <p>[bar]</p> <div style=text-align:center><p>baz</div>',
+ '<div align=center><p>foo</div> <p>[bar]</p> <div align=center><p>baz</div>',
+ '<center><p>foo</center> <p>[bar]</p> <center><p>baz</center>',
+ ],
+ //@}
+ justifyfull: [
+ //@{
+ 'foo[]bar<p>extra',
+ '<span>foo</span>{}<span>bar</span><p>extra',
+ '<span>foo[</span><span>]bar</span><p>extra',
+ 'foo[bar]baz<p>extra',
+ 'foo[bar<b>baz]qoz</b>quz<p>extra',
+ '<p>foo[]bar<p>extra',
+ '<p>foo[bar]baz<p>extra',
+ '<h1>foo[bar]baz</h1><p>extra',
+ '<pre>foo[bar]baz</pre><p>extra',
+ '<xmp>foo[bar]baz</xmp><p>extra',
+ '<center><p>[foo]<p>bar</center><p>extra',
+ '<center><p>[foo<p>bar]</center><p>extra',
+
+ '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra',
+ '<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '{<table><tr><td>foo<td>bar<td>baz</table>}<p>extra',
+
+ '<table align=justify><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra',
+ '<table align=justify><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table align=justify><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table align=justify><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '<table align=justify data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '{<table align=justify><tr><td>foo<td>bar<td>baz</table>}<p>extra',
+
+ '<table><tbody align=justify><tr><td>foo<td>b[a]r<td>baz</table><p>extra',
+ '<table><tbody align=justify><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody align=justify><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody align=justify data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '<table data-start=0 data-end=1><tbody align=justify><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '{<table><tbody align=justify><tr><td>foo<td>bar<td>baz</table>}<p>extra',
+
+ '<table><tbody><tr align=justify><td>foo<td>b[a]r<td>baz</table><p>extra',
+ '<table><tbody><tr align=justify data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody><tr align=justify data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody data-start=0 data-end=1><tr align=justify><td>foo<td>bar<td>baz</table><p>extra',
+ '<table data-start=0 data-end=1><tbody><tr align=justify><td>foo<td>bar<td>baz</table><p>extra',
+ '{<table><tr align=justify><td>foo<td>bar<td>baz</table>}<p>extra',
+
+ '<div align=center><p>[foo]<p>bar</div><p>extra',
+ '<div align=center><p>[foo<p>bar}</div><p>extra',
+ '<div style=text-align:center><p>[foo]<p>bar</div><p>extra',
+ '<div style=text-align:center><p>[foo<p>bar]</div><p>extra',
+
+ '<div align=justify><p>[foo]<p>bar</div><p>extra',
+ '<div align=justify><p>[foo<p>bar}</div><p>extra',
+ '<div style=text-align:justify><p>[foo]<p>bar</div><p>extra',
+ '<div style=text-align:justify><p>[foo<p>bar]</div><p>extra',
+
+ '<div align=left><p>[foo]<p>bar</div><p>extra',
+ '<div align=left><p>[foo<p>bar}</div><p>extra',
+ '<div style=text-align:left><p>[foo]<p>bar</div><p>extra',
+ '<div style=text-align:left><p>[foo<p>bar]</div><p>extra',
+
+ '<div align=right><p>[foo]<p>bar</div><p>extra',
+ '<div align=right><p>[foo<p>bar}</div><p>extra',
+ '<div style=text-align:right><p>[foo]<p>bar</div><p>extra',
+ '<div style=text-align:right><p>[foo<p>bar]</div><p>extra',
+
+ '<div align=justify>foo</div>[bar]<p>extra',
+ '[foo]<div align=justify>bar</div><p>extra',
+ '<div align=justify>foo</div>[bar]<div align=justify>baz</div><p>extra',
+ '<div align=justify><p>foo</div><p>[bar]<p>extra',
+ '<p>[foo]<div align=justify><p>bar</div><p>extra',
+ '<div align=justify><p>foo</div><p>[bar]<div align=justify><p>baz</div><p>extra',
+ '<div style=text-align:justify>foo</div>[bar]<p>extra',
+ '[foo]<div style=text-align:justify>bar</div><p>extra',
+ '<div style=text-align:justify>foo</div>[bar]<div style=text-align:justify>baz</div><p>extra',
+ '<div style=text-align:justify><p>foo</div><p>[bar]<p>extra',
+ '<p>[foo]<div style=text-align:justify><p>bar</div><p>extra',
+ '<div style=text-align:justify><p>foo</div><p>[bar]<div style=text-align:justify><p>baz</div><p>extra',
+ '<p align=justify>foo<p>[bar]<p>extra',
+ '<p>[foo]<p align=justify>bar<p>extra',
+ '<p align=justify>foo<p>[bar]<p align=justify>baz<p>extra',
+
+ '<div align=justify>[foo</div>bar]<p>extra',
+ '<div align=justify>fo[o</div>b]ar<p>extra',
+ '<div style=text-align:justify>[foo</div>bar]<p>extra',
+ '<div style=text-align:justify>fo[o</div>b]ar<p>extra',
+ '<span style=text-align:justify>[foo]</span><p>extra',
+ '<span style=text-align:justify>f[o]o</span><p>extra',
+
+ '<div style=text-align:justify>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra',
+
+ '<div align=nonsense><p>[foo]</div><p>extra',
+ '<div style=text-align:inherit><p>[foo]</div><p>extra',
+ '<quasit align=center><p>[foo]</p></quasit><p>extra',
+
+ '<div style=text-align:start>[foo]</div><p>extra',
+ '<div style=text-align:end>[foo]</div><p>extra',
+ '<div dir=rtl style=text-align:start>[foo]</div><p>extra',
+ '<div dir=rtl style=text-align:end>[foo]</div><p>extra',
+
+ // Whitespace nodes
+ '<div style=text-align:justify><p>foo</div> <p>[bar]',
+ '<div align=justify><p>foo</div> <p>[bar]',
+ '<p>[foo]</p> <div style=text-align:justify><p>bar</div>',
+ '<p>[foo]</p> <div align=justify><p>bar</div>',
+ '<div style=text-align:justify><p>foo</div> <p>[bar]</p> <div style=text-align:justify><p>baz</div>',
+ '<div align=justify><p>foo</div> <p>[bar]</p> <div align=justify><p>baz</div>',
+ ],
+ //@}
+ justifyleft: [
+ //@{
+ 'foo[]bar<p>extra',
+ '<span>foo</span>{}<span>bar</span><p>extra',
+ '<span>foo[</span><span>]bar</span><p>extra',
+ 'foo[bar]baz<p>extra',
+ 'foo[bar<b>baz]qoz</b>quz<p>extra',
+ '<p>foo[]bar<p>extra',
+ '<p>foo[bar]baz<p>extra',
+ '<h1>foo[bar]baz</h1><p>extra',
+ '<pre>foo[bar]baz</pre><p>extra',
+ '<xmp>foo[bar]baz</xmp><p>extra',
+ '<center><p>[foo]<p>bar</center><p>extra',
+ '<center><p>[foo<p>bar]</center><p>extra',
+
+ '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra',
+ '<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '{<table><tr><td>foo<td>bar<td>baz</table>}<p>extra',
+
+ '<table align=left><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra',
+ '<table align=left><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table align=left><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table align=left><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '<table align=left data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '{<table align=left><tr><td>foo<td>bar<td>baz</table>}<p>extra',
+
+ '<table><tbody align=left><tr><td>foo<td>b[a]r<td>baz</table><p>extra',
+ '<table><tbody align=left><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody align=left><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody align=left data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '<table data-start=0 data-end=1><tbody align=left><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '{<table><tbody align=left><tr><td>foo<td>bar<td>baz</table>}<p>extra',
+
+ '<table><tbody><tr align=left><td>foo<td>b[a]r<td>baz</table><p>extra',
+ '<table><tbody><tr align=left data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody><tr align=left data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody data-start=0 data-end=1><tr align=left><td>foo<td>bar<td>baz</table><p>extra',
+ '<table data-start=0 data-end=1><tbody><tr align=left><td>foo<td>bar<td>baz</table><p>extra',
+ '{<table><tr align=left><td>foo<td>bar<td>baz</table>}<p>extra',
+
+ '<div align=center><p>[foo]<p>bar</div><p>extra',
+ '<div align=center><p>[foo<p>bar}</div><p>extra',
+ '<div style=text-align:center><p>[foo]<p>bar</div><p>extra',
+ '<div style=text-align:center><p>[foo<p>bar]</div><p>extra',
+
+ '<div align=justify><p>[foo]<p>bar</div><p>extra',
+ '<div align=justify><p>[foo<p>bar}</div><p>extra',
+ '<div style=text-align:justify><p>[foo]<p>bar</div><p>extra',
+ '<div style=text-align:justify><p>[foo<p>bar]</div><p>extra',
+
+ '<div align=left><p>[foo]<p>bar</div><p>extra',
+ '<div align=left><p>[foo<p>bar}</div><p>extra',
+ '<div style=text-align:left><p>[foo]<p>bar</div><p>extra',
+ '<div style=text-align:left><p>[foo<p>bar]</div><p>extra',
+
+ '<div align=right><p>[foo]<p>bar</div><p>extra',
+ '<div align=right><p>[foo<p>bar}</div><p>extra',
+ '<div style=text-align:right><p>[foo]<p>bar</div><p>extra',
+ '<div style=text-align:right><p>[foo<p>bar]</div><p>extra',
+
+ '<div align=left>foo</div>[bar]<p>extra',
+ '[foo]<div align=left>bar</div><p>extra',
+ '<div align=left>foo</div>[bar]<div align=left>baz</div><p>extra',
+ '<div align=left><p>foo</div><p>[bar]<p>extra',
+ '<p>[foo]<div align=left><p>bar</div><p>extra',
+ '<div align=left><p>foo</div><p>[bar]<div align=left><p>baz</div><p>extra',
+ '<div style=text-align:left>foo</div>[bar]<p>extra',
+ '[foo]<div style=text-align:left>bar</div><p>extra',
+ '<div style=text-align:left>foo</div>[bar]<div style=text-align:left>baz</div><p>extra',
+ '<div style=text-align:left><p>foo</div><p>[bar]<p>extra',
+ '<p>[foo]<div style=text-align:left><p>bar</div><p>extra',
+ '<div style=text-align:left><p>foo</div><p>[bar]<div style=text-align:left><p>baz</div><p>extra',
+ '<p align=left>foo<p>[bar]<p>extra',
+ '<p>[foo]<p align=left>bar<p>extra',
+ '<p align=left>foo<p>[bar]<p align=left>baz<p>extra',
+
+ '<div align=left>[foo</div>bar]<p>extra',
+ '<div align=left>fo[o</div>b]ar<p>extra',
+ '<div style=text-align:left>[foo</div>bar]<p>extra',
+ '<div style=text-align:left>fo[o</div>b]ar<p>extra',
+ '<span style=text-align:left>[foo]</span><p>extra',
+ '<span style=text-align:left>f[o]o</span><p>extra',
+
+ '<div style=text-align:left>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra',
+
+ '<div align=nonsense><p>[foo]</div><p>extra',
+ '<div style=text-align:inherit><p>[foo]</div><p>extra',
+ '<quasit align=center><p>[foo]</p></quasit><p>extra',
+
+ '<div style=text-align:start>[foo]</div><p>extra',
+ '<div style=text-align:end>[foo]</div><p>extra',
+ '<div dir=rtl style=text-align:start>[foo]</div><p>extra',
+ '<div dir=rtl style=text-align:end>[foo]</div><p>extra',
+
+ // Whitespace nodes
+ '<div style=text-align:left><p>foo</div> <p>[bar]',
+ '<div align=left><p>foo</div> <p>[bar]',
+ '<p>[foo]</p> <div style=text-align:left><p>bar</div>',
+ '<p>[foo]</p> <div align=left><p>bar</div>',
+ '<div style=text-align:left><p>foo</div> <p>[bar]</p> <div style=text-align:left><p>baz</div>',
+ '<div align=left><p>foo</div> <p>[bar]</p> <div align=left><p>baz</div>',
+ ],
+ //@}
+ justifyright: [
+ //@{
+ 'foo[]bar<p>extra',
+ '<span>foo</span>{}<span>bar</span><p>extra',
+ '<span>foo[</span><span>]bar</span><p>extra',
+ 'foo[bar]baz<p>extra',
+ 'foo[bar<b>baz]qoz</b>quz<p>extra',
+ '<p>foo[]bar<p>extra',
+ '<p>foo[bar]baz<p>extra',
+ '<h1>foo[bar]baz</h1><p>extra',
+ '<pre>foo[bar]baz</pre><p>extra',
+ '<xmp>foo[bar]baz</xmp><p>extra',
+ '<center><p>[foo]<p>bar</center><p>extra',
+ '<center><p>[foo<p>bar]</center><p>extra',
+
+ '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra',
+ '<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '{<table><tr><td>foo<td>bar<td>baz</table>}<p>extra',
+
+ '<table align=right><tbody><tr><td>foo<td>b[a]r<td>baz</table><p>extra',
+ '<table align=right><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table align=right><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table align=right><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '<table align=right data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '{<table align=right><tr><td>foo<td>bar<td>baz</table>}<p>extra',
+
+ '<table><tbody align=right><tr><td>foo<td>b[a]r<td>baz</table><p>extra',
+ '<table><tbody align=right><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody align=right><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody align=right data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '<table data-start=0 data-end=1><tbody align=right><tr><td>foo<td>bar<td>baz</table><p>extra',
+ '{<table><tbody align=right><tr><td>foo<td>bar<td>baz</table>}<p>extra',
+
+ '<table><tbody><tr align=right><td>foo<td>b[a]r<td>baz</table><p>extra',
+ '<table><tbody><tr align=right data-start=1 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody><tr align=right data-start=0 data-end=2><td>foo<td>bar<td>baz</table><p>extra',
+ '<table><tbody data-start=0 data-end=1><tr align=right><td>foo<td>bar<td>baz</table><p>extra',
+ '<table data-start=0 data-end=1><tbody><tr align=right><td>foo<td>bar<td>baz</table><p>extra',
+ '{<table><tr align=right><td>foo<td>bar<td>baz</table>}<p>extra',
+
+ '<div align=center><p>[foo]<p>bar</div><p>extra',
+ '<div align=center><p>[foo<p>bar}</div><p>extra',
+ '<div style=text-align:center><p>[foo]<p>bar</div><p>extra',
+ '<div style=text-align:center><p>[foo<p>bar]</div><p>extra',
+
+ '<div align=justify><p>[foo]<p>bar</div><p>extra',
+ '<div align=justify><p>[foo<p>bar}</div><p>extra',
+ '<div style=text-align:justify><p>[foo]<p>bar</div><p>extra',
+ '<div style=text-align:justify><p>[foo<p>bar]</div><p>extra',
+
+ '<div align=left><p>[foo]<p>bar</div><p>extra',
+ '<div align=left><p>[foo<p>bar}</div><p>extra',
+ '<div style=text-align:left><p>[foo]<p>bar</div><p>extra',
+ '<div style=text-align:left><p>[foo<p>bar]</div><p>extra',
+
+ '<div align=right><p>[foo]<p>bar</div><p>extra',
+ '<div align=right><p>[foo<p>bar}</div><p>extra',
+ '<div style=text-align:right><p>[foo]<p>bar</div><p>extra',
+ '<div style=text-align:right><p>[foo<p>bar]</div><p>extra',
+
+ '<div align=right>foo</div>[bar]<p>extra',
+ '[foo]<div align=right>bar</div><p>extra',
+ '<div align=right>foo</div>[bar]<div align=right>baz</div><p>extra',
+ '<div align=right><p>foo</div><p>[bar]<p>extra',
+ '<p>[foo]<div align=right><p>bar</div><p>extra',
+ '<div align=right><p>foo</div><p>[bar]<div align=right><p>baz</div><p>extra',
+ '<div style=text-align:right>foo</div>[bar]<p>extra',
+ '[foo]<div style=text-align:right>bar</div><p>extra',
+ '<div style=text-align:right>foo</div>[bar]<div style=text-align:right>baz</div><p>extra',
+ '<div style=text-align:right><p>foo</div><p>[bar]<p>extra',
+ '<p>[foo]<div style=text-align:right><p>bar</div><p>extra',
+ '<div style=text-align:right><p>foo</div><p>[bar]<div style=text-align:right><p>baz</div><p>extra',
+ '<p align=right>foo<p>[bar]<p>extra',
+ '<p>[foo]<p align=right>bar<p>extra',
+ '<p align=right>foo<p>[bar]<p align=right>baz<p>extra',
+
+ '<div align=right>[foo</div>bar]<p>extra',
+ '<div align=right>fo[o</div>b]ar<p>extra',
+ '<div style=text-align:right>[foo</div>bar]<p>extra',
+ '<div style=text-align:right>fo[o</div>b]ar<p>extra',
+ '<span style=text-align:right>[foo]</span><p>extra',
+ '<span style=text-align:right>f[o]o</span><p>extra',
+
+ '<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra',
+
+ '<div align=nonsense><p>[foo]</div><p>extra',
+ '<div style=text-align:inherit><p>[foo]</div><p>extra',
+ '<quasit align=center><p>[foo]</p></quasit><p>extra',
+
+ '<div style=text-align:start>[foo]</div><p>extra',
+ '<div style=text-align:end>[foo]</div><p>extra',
+ '<div dir=rtl style=text-align:start>[foo]</div><p>extra',
+ '<div dir=rtl style=text-align:end>[foo]</div><p>extra',
+
+ // Whitespace nodes
+ '<div style=text-align:right><p>foo</div> <p>[bar]',
+ '<div align=right><p>foo</div> <p>[bar]',
+ '<p>[foo]</p> <div style=text-align:right><p>bar</div>',
+ '<p>[foo]</p> <div align=right><p>bar</div>',
+ '<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>',
+ '<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>',
+ ],
+ //@}
+ outdent: [
+ //@{
+ // These mimic existing indentation in various browsers, to see how
+ // they cope with outdenting various things. This is spec, Gecko
+ // non-CSS, and Opera:
+ '<blockquote><p>foo[bar]</p><p>baz</p></blockquote><p>extra',
+ '<blockquote><p>foo[bar</p><p>b]az</p></blockquote><p>extra',
+ '<blockquote><p>foo[bar]</p></blockquote><p>baz</p><p>extra',
+ '<blockquote><p>foo[bar</p></blockquote><p>b]az</p><p>extra',
+
+ // IE:
+ '<blockquote style="margin-right: 0px;" dir="ltr"><p>foo[bar]</p><p>baz</p></blockquote><p>extra',
+ '<blockquote style="margin-right: 0px;" dir="ltr"><p>foo[bar</p><p>b]az</p></blockquote><p>extra',
+ '<blockquote style="margin-right: 0px;" dir="ltr"><p>foo[bar]</p></blockquote><p>baz</p><p>extra',
+ '<blockquote style="margin-right: 0px;" dir="ltr"><p>foo[bar</p></blockquote><p>b]az</p><p>extra',
+
+ // Firefox CSS mode:
+ '<p style="margin-left: 40px">foo[bar]</p><p style="margin-left: 40px">baz</p><p>extra',
+ '<p style="margin-left: 40px">foo[bar</p><p style="margin-left: 40px">b]az</p><p>extra',
+ '<p style="margin-left: 40px">foo[bar]</p><p>baz</p><p>extra',
+ '<p style="margin-left: 40px">foo[bar</p><p>b]az</p><p>extra',
+
+ // WebKit:
+ '<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p>foo[bar]</p><p>baz</p></blockquote><p>extra',
+ '<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p>foo[bar</p><p>b]az</p></blockquote><p>extra',
+ '<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p>foo[bar]</p></blockquote><p>baz</p><p>extra',
+ '<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p>foo[bar</p></blockquote><p>b]az</p><p>extra',
+
+ // Now let's try nesting lots of stuff and see what happens.
+ '<blockquote><blockquote>foo[bar]baz</blockquote></blockquote>',
+ '<blockquote><blockquote data-abc=def>foo[bar]baz</blockquote></blockquote>',
+ '<blockquote data-abc=def><blockquote>foo[bar]baz</blockquote></blockquote>',
+ '<blockquote><div>foo[bar]baz</div></blockquote>',
+ '<blockquote><div id=abc>foo[bar]baz</div></blockquote>',
+ '<blockquote id=abc>foo[bar]baz</blockquote>',
+ '<blockquote style="color: blue">foo[bar]baz</blockquote>',
+
+ '<blockquote><blockquote><p>foo[bar]<p>baz</blockquote></blockquote>',
+ '<blockquote><blockquote data-abc=def><p>foo[bar]<p>baz</blockquote></blockquote>',
+ '<blockquote data-abc=def><blockquote><p>foo[bar]<p>baz</blockquote></blockquote>',
+ '<blockquote><div><p>foo[bar]<p>baz</div></blockquote>',
+ '<blockquote><div id=abc><p>foo[bar]<p>baz</div></blockquote>',
+ '<blockquote id=abc><p>foo[bar]<p>baz</blockquote>',
+ '<blockquote style="color: blue"><p>foo[bar]<p>baz</blockquote>',
+
+ '<blockquote><p><b>foo[bar]</b><p>baz</blockquote>',
+ '<blockquote><p><strong>foo[bar]</strong><p>baz</blockquote>',
+ '<blockquote><p><span>foo[bar]</span><p>baz</blockquote>',
+ '<blockquote><blockquote style="color: blue"><p>foo[bar]</blockquote><p>baz</blockquote>',
+ '<blockquote style="color: blue"><blockquote><p>foo[bar]</blockquote><p>baz</blockquote>',
+
+ // Lists!
+ '<ol><li>foo<li>[bar]<li>baz</ol>',
+ '<ol data-start=1 data-end=2><li>foo<li>bar<li>baz</ol>',
+ '<ol><li>foo</ol>[bar]',
+ '<ol><li>[foo]<br>bar<li>baz</ol>',
+ '<ol><li>foo<br>[bar]<li>baz</ol>',
+ '<ol><li><div>[foo]</div>bar<li>baz</ol>',
+ '<ol><li>foo<ol><li>[bar]<li>baz</ol><li>quz</ol>',
+ '<ol><li>foo<ol><li>bar<li>[baz]</ol><li>quz</ol>',
+ '<ol><li>foo</li><ol><li>[bar]<li>baz</ol><li>quz</ol>',
+ '<ol><li>foo</li><ol data-start=0 data-end=1><li>bar<li>baz</ol><li>quz</ol>',
+ '<ol><li>foo</li><ol><li>bar<li>[baz]</ol><li>quz</ol>',
+ '<ol><li>foo</li><ol data-start=1 data-end=2><li>bar<li>baz</ol><li>quz</ol>',
+ '<ol><li>foo<ol><li>b[a]r</ol><li>baz</ol>',
+ '<ol><li>foo</li><ol><li>b[a]r</ol><li>baz</ol>',
+ '<ol><li>foo{<ol><li>bar</ol>}<li>baz</ol>',
+ '<ol><li>foo</li>{<ol><li>bar</ol>}<li>baz</ol>',
+ '<ol><li>[foo]<ol><li>bar</ol><li>baz</ol>',
+ '<ol><li>[foo]</li><ol><li>bar</ol><li>baz</ol>',
+ '<ol><li>foo<li>[bar]<ol><li>baz</ol><li>quz</ol>',
+ '<ol><li>foo<li>[bar]</li><ol><li>baz</ol><li>quz</ol>',
+ '<ol><li>foo<ol><li>bar<li>baz</ol><li>[quz]</ol>',
+ '<ol><li>foo</li><ol><li>bar<li>baz</ol><li>[quz]</ol>',
+
+ // Try outdenting multiple items at once.
+ '<ol><li>foo<li>b[ar<li>baz]</ol>',
+ '<ol><li>[foo<ol><li>bar]</ol><li>baz</ol>',
+ '<ol><li>[foo</li><ol><li>bar]</ol><li>baz</ol>',
+ '<ol><li>foo<ol><li>b[ar</ol><li>b]az</ol>',
+ '<ol><li>foo</li><ol><li>b[ar</ol><li>b]az</ol>',
+ '<ol><li>[foo<ol><li>bar</ol><li>baz]</ol><p>extra',
+ '<ol><li>[foo</li><ol><li>bar</ol><li>baz]</ol><p>extra',
+
+ // We probably can't actually get this DOM . . .
+ '<ol><li>[foo]<ol><li>bar</ol>baz</ol>',
+ '<ol><li>foo<ol><li>[bar]</ol>baz</ol>',
+ '<ol><li>foo<ol><li>bar</ol>[baz]</ol>',
+ '<ol><li>[foo<ol><li>bar]</ol>baz</ol>',
+
+ // Attribute handling on lists
+ 'foo<ol start=5><li>[bar]</ol>baz',
+ 'foo<ol id=abc><li>[bar]</ol>baz',
+ 'foo<ol style=color:blue><li>[bar]</ol>baz',
+ 'foo<ol><li value=5>[bar]</ol>baz',
+ 'foo<ol><li id=abc>[bar]</ol>baz',
+ 'foo<ol><li style=color:blue>[bar]</ol>baz',
+ '<ol><li>foo</li><ol><li value=5>[bar]</ol></ol>',
+ '<ul><li>foo</li><ol><li value=5>[bar]</ol></ul>',
+ '<ol><li>foo</li><ol start=5><li>[bar]</ol><li>baz</ol>',
+ '<ol><li>foo</li><ol id=abc><li>[bar]</ol><li>baz</ol>',
+ '<ol><li>foo</li><ol style=color:blue><li>[bar]</ol><li>baz</ol>',
+ '<ol><li>foo</li><ol style=text-indent:1em><li>[bar]</ol><li>baz</ol>',
+ '<ol><li>foo</li><ol start=5><li>[bar<li>baz]</ol><li>quz</ol>',
+ '<ol><li>foo</li><ol id=abc><li>[bar<li>baz]</ol><li>quz</ol>',
+ '<ol><li>foo</li><ol style=color:blue><li>[bar<li>baz]</ol><li>quz</ol>',
+ '<ol><li>foo</li><ol style=text-indent:1em><li>[bar<li>baz]</ol><li>quz</ol>',
+
+ // List inside indentation element
+ '<blockquote><ol><li>[foo]</ol></blockquote><p>extra',
+ '<blockquote>foo<ol><li>[bar]</ol>baz</blockquote><p>extra',
+ '<blockquote><ol><li>foo</li><ol><li>[bar]</ol><li>baz</ol></blockquote><p>extra',
+
+ '<ol><li><h1>[foo]</h1></ol>',
+ '<ol><li><xmp>[foo]</xmp></li></ol>',
+ '<blockquote><ol><li>foo<div><ol><li>[bar]</ol></div><li>baz</ol></blockquote>',
+
+ // Whitespace nodes
+ '<blockquote> <p>[foo]</p></blockquote>',
+ '<blockquote><p>[foo]</p> </blockquote>',
+ '<blockquote> <p>[foo]</p> </blockquote>',
+ '<ol> <li>[foo]</li></ol>',
+ '<ol><li>[foo]</li> </ol>',
+ '<ol> <li>[foo]</li> </ol>',
+ '<ul> <li>[foo]</li></ul>',
+ '<ul><li>[foo]</li> </ul>',
+ '<ul> <li>[foo]</li> </ul>',
+ '<blockquote> <p>[foo]</p> <p>bar</p> <p>baz</p></blockquote>',
+ '<blockquote> <p>foo</p> <p>[bar]</p> <p>baz</p></blockquote>',
+ '<blockquote> <p>foo</p> <p>bar</p> <p>[baz]</p></blockquote>',
+ '<ol> <li>[foo]</li> <li>bar</li> <li>baz</li></ol>',
+ '<ol> <li>foo</li> <li>[bar]</li> <li>baz</li></ol>',
+ '<ol> <li>foo</li> <li>bar</li> <li>[baz]</li></ol>',
+ '<ul> <li>[foo]</li> <li>bar</li> <li>baz</li></ul>',
+ '<ul> <li>foo</li> <li>[bar]</li> <li>baz</li></ul>',
+ '<ul> <li>foo</li> <li>bar</li> <li>[baz]</li></ul>',
+
+ // https://bugs.webkit.org/show_bug.cgi?id=24249
+ '<ol><li>[]a<table><tr><td><br></table></ol>',
+ // https://bugs.webkit.org/show_bug.cgi?id=43447
+ '<blockquote><span>foo<br>[bar]</span></blockquote>',
+ ],
+ //@}
+ removeformat: [
+ //@{
+ 'foo[]bar',
+ '<span>foo</span>{}<span>bar</span>',
+ '<span>foo[</span><span>]bar</span>',
+ '[foo<b>bar</b>baz]',
+ 'foo[<b>bar</b>baz]',
+ 'foo[<b>bar</b>]baz',
+ 'foo<b>[bar]</b>baz',
+ 'foo<b>b[a]r</b>baz',
+ '[foo<strong>bar</strong>baz]',
+ '[foo<span style="font-weight: bold">bar</span>baz]',
+ 'foo<span style="font-weight: bold">b[a]r</span>baz',
+ '[foo<span style="font-variant: small-caps">bar</span>baz]',
+ 'foo<span style="font-variant: small-caps">b[a]r</span>baz',
+ '[foo<b id=foo>bar</b>baz]',
+ 'foo<b id=foo>b[a]r</b>baz',
+
+ // HTML has lots of inline elements, doesn't it?
+ '[foo<a>bar</a>baz]',
+ 'foo<a>b[a]r</a>baz',
+ '[foo<a href=foo>bar</a>baz]',
+ 'foo<a href=foo>b[a]r</a>baz',
+ '[foo<abbr>bar</abbr>baz]',
+ 'foo<abbr>b[a]r</abbr>baz',
+ '[foo<acronym>bar</acronym>baz]',
+ 'foo<acronym>b[a]r</acronym>baz',
+ '[foo<b>bar</b>baz]',
+ 'foo<b>b[a]r</b>baz',
+ '[foo<bdi dir=rtl>bar</bdi>baz]',
+ 'foo<bdi dir=rtl>b[a]r</bdi>baz',
+ '[foo<bdo dir=rtl>bar</bdo>baz]',
+ 'foo<bdo dir=rtl>b[a]r</bdo>baz',
+ '[foo<big>bar</big>baz]',
+ 'foo<big>b[a]r</big>baz',
+ '[foo<blink>bar</blink>baz]',
+ 'foo<blink>b[a]r</blink>baz',
+ '[foo<cite>bar</cite>baz]',
+ 'foo<cite>b[a]r</cite>baz',
+ '[foo<code>bar</code>baz]',
+ 'foo<code>b[a]r</code>baz',
+ '[foo<del>bar</del>baz]',
+ 'foo<del>b[a]r</del>baz',
+ '[foo<dfn>bar</dfn>baz]',
+ 'foo<dfn>b[a]r</dfn>baz',
+ '[foo<em>bar</em>baz]',
+ 'foo<em>b[a]r</em>baz',
+ '[foo<font>bar</font>baz]',
+ 'foo<font>b[a]r</font>baz',
+ '[foo<font color=blue>bar</font>baz]',
+ 'foo<font color=blue>b[a]r</font>baz',
+ '[foo<i>bar</i>baz]',
+ 'foo<i>b[a]r</i>baz',
+ '[foo<ins>bar</ins>baz]',
+ 'foo<ins>b[a]r</ins>baz',
+ '[foo<kbd>bar</kbd>baz]',
+ 'foo<kbd>b[a]r</kbd>baz',
+ '[foo<mark>bar</mark>baz]',
+ 'foo<mark>b[a]r</mark>baz',
+ '[foo<nobr>bar</nobr>baz]',
+ 'foo<nobr>b[a]r</nobr>baz',
+ '[foo<q>bar</q>baz]',
+ 'foo<q>b[a]r</q>baz',
+ '[foo<samp>bar</samp>baz]',
+ 'foo<samp>b[a]r</samp>baz',
+ '[foo<s>bar</s>baz]',
+ 'foo<s>b[a]r</s>baz',
+ '[foo<small>bar</small>baz]',
+ 'foo<small>b[a]r</small>baz',
+ '[foo<span>bar</span>baz]',
+ 'foo<span>b[a]r</span>baz',
+ '[foo<strike>bar</strike>baz]',
+ 'foo<strike>b[a]r</strike>baz',
+ '[foo<strong>bar</strong>baz]',
+ 'foo<strong>b[a]r</strong>baz',
+ '[foo<sub>bar</sub>baz]',
+ 'foo<sub>b[a]r</sub>baz',
+ '[foo<sup>bar</sup>baz]',
+ 'foo<sup>b[a]r</sup>baz',
+ '[foo<tt>bar</tt>baz]',
+ 'foo<tt>b[a]r</tt>baz',
+ '[foo<u>bar</u>baz]',
+ 'foo<u>b[a]r</u>baz',
+ '[foo<var>bar</var>baz]',
+ 'foo<var>b[a]r</var>baz',
+
+ // Empty and replaced elements
+ '[foo<br>bar]',
+ '[foo<hr>bar]',
+ '[foo<wbr>bar]',
+ '[foo<img>bar]',
+ '[foo<img src=abc>bar]',
+ '[foo<video></video>bar]',
+ '[foo<video src=abc></video>bar]',
+ '[foo<svg><circle fill=blue r=20 cx=20 cy=20 /></svg>bar]',
+
+ // Unrecognized elements
+ '[foo<nonexistentelement>bar</nonexistentelement>baz]',
+ 'foo<nonexistentelement>b[a]r</nonexistentelement>baz',
+ '[foo<nonexistentelement style="display: block">bar</nonexistentelement>baz]',
+ 'foo<nonexistentelement style="display: block">b[a]r</nonexistentelement>baz',
+
+ // Random stuff
+ '[foo<span id=foo>bar</span>baz]',
+ 'foo<span id=foo>b[a]r</span>baz',
+ '[foo<span class=foo>bar</span>baz]',
+ 'foo<span class=foo>b[a]r</span>baz',
+ '[foo<b style="font-weight: normal">bar</b>baz]',
+ 'foo<b style="font-weight: normal">b[a]r</b>baz',
+ '<p style="background-color: aqua">foo[bar]baz</p>',
+ '<p><span style="background-color: aqua">foo[bar]baz</span></p>',
+ '<p style="font-weight: bold">foo[bar]baz</p>',
+ '<b><p style="font-weight: bold">foo[bar]baz</p></b>',
+ '<p style="font-variant: small-caps">foo[bar]baz</p>',
+ '{<p style="font-variant: small-caps">foobarbaz</p>}',
+ '<p style="text-indent: 2em">foo[bar]baz</p>',
+ '{<p style="text-indent: 2em">foobarbaz</p>}',
+
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=649138
+ // Chrome 15 dev fails this for some unclear reason.
+ '<table data-start=0 data-end=1><tr><td><b>foo</b></table>',
+ ],
+ //@}
+ strikethrough: [
+ //@{
+ 'foo[]bar',
+ '<p>[foo</p> <p>bar]</p>',
+ '<span>[foo</span> <span>bar]</span>',
+ '<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>',
+ '<p>[foo<p><br><p>bar]',
+ '<b>foo[]bar</b>',
+ '<i>foo[]bar</i>',
+ '<span>foo</span>{}<span>bar</span>',
+ '<span>foo[</span><span>]bar</span>',
+ 'foo[bar]baz',
+ 'foo[bar<b>baz]qoz</b>quz',
+ 'foo[bar<i>baz]qoz</i>quz',
+ '{<p><p> <p>foo</p>}',
+
+ '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>',
+ '<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>',
+ '<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>',
+ '{<table><tr><td>foo<td>bar<td>baz</table>}',
+
+ 'foo<u>[bar]</u>baz',
+ 'foo<span style="text-decoration: underline">[bar]</span>baz',
+ '<u>foo[bar]baz</u>',
+ '<u>foo[b<span style="color:blue">ar]ba</span>z</u>',
+ '<u>foo[b<span style="color:blue" id=foo>ar]ba</span>z</u>',
+ '<u>foo[b<span style="font-size:3em">ar]ba</span>z</u>',
+ '<u>foo[b<i>ar]ba</i>z</u>',
+ '<p style="text-decoration: underline">foo[bar]baz</p>',
+
+ 'foo<s>[bar]</s>baz',
+ 'foo<span style="text-decoration: line-through">[bar]</span>baz',
+ '<s>foo[bar]baz</s>',
+ '<s>foo[b<span style="color:blue">ar]ba</span>z</s>',
+ '<s>foo[b<span style="color:blue" id=foo>ar]ba</span>z</s>',
+ '<s>foo[b<span style="font-size:3em">ar]ba</span>z</s>',
+ '<s>foo[b<i>ar]ba</i>z</s>',
+ '<p style="text-decoration: line-through">foo[bar]baz</p>',
+
+ 'foo<strike>[bar]</strike>baz',
+ '<strike>foo[bar]baz</strike>',
+ '<strike>foo[b<span style="color:blue">ar]ba</span>z</strike>',
+ '<strike>foo[b<span style="color:blue" id=foo>ar]ba</span>z</strike>',
+ '<strike>foo[b<span style="font-size:3em">ar]ba</span>z</strike>',
+ '<strike>foo[b<i>ar]ba</i>z</strike>',
+
+ 'foo<ins>[bar]</ins>baz',
+ '<ins>foo[bar]baz</ins>',
+ '<ins>foo[b<span style="color:blue">ar]ba</span>z</ins>',
+ '<ins>foo[b<span style="color:blue" id=foo>ar]ba</span>z</ins>',
+ '<ins>foo[b<span style="font-size:3em">ar]ba</span>z</ins>',
+ '<ins>foo[b<i>ar]ba</i>z</ins>',
+
+ 'foo<del>[bar]</del>baz',
+ '<del>foo[bar]baz</del>',
+ '<del>foo[b<span style="color:blue">ar]ba</span>z</del>',
+ '<del>foo[b<span style="color:blue" id=foo>ar]ba</span>z</del>',
+ '<del>foo[b<span style="font-size:3em">ar]ba</span>z</del>',
+ '<del>foo[b<i>ar]ba</i>z</del>',
+
+ 'foo<span style="text-decoration: underline line-through">[bar]</span>baz',
+ 'foo<span style="text-decoration: underline line-through">b[a]r</span>baz',
+ 'foo<s style="text-decoration: underline">[bar]</s>baz',
+ 'foo<s style="text-decoration: underline">b[a]r</s>baz',
+ 'foo<u style="text-decoration: line-through">[bar]</u>baz',
+ 'foo<u style="text-decoration: line-through">b[a]r</u>baz',
+ 'foo<s style="text-decoration: overline">[bar]</s>baz',
+ 'foo<s style="text-decoration: overline">b[a]r</s>baz',
+ 'foo<u style="text-decoration: overline">[bar]</u>baz',
+ 'foo<u style="text-decoration: overline">b[a]r</u>baz',
+
+ '<p style="text-decoration: line-through">foo[bar]baz</p>',
+ '<p style="text-decoration: overline">foo[bar]baz</p>',
+
+ 'foo<span class="underline">[bar]</span>baz',
+ 'foo<span class="underline">b[a]r</span>baz',
+ 'foo<span class="line-through">[bar]</span>baz',
+ 'foo<span class="line-through">b[a]r</span>baz',
+ 'foo<span class="underline-and-line-through">[bar]</span>baz',
+ 'foo<span class="underline-and-line-through">b[a]r</span>baz',
+
+ // Tests for queryCommandIndeterm() and queryCommandState()
+ 'fo[o<s>b]ar</s>baz',
+ 'foo<s>ba[r</s>b]az',
+ 'fo[o<s>bar</s>b]az',
+ 'foo[<s>b]ar</s>baz',
+ 'foo<s>ba[r</s>]baz',
+ 'foo[<s>bar</s>]baz',
+ 'foo<s>[bar]</s>baz',
+ 'foo{<s>bar</s>}baz',
+ 'fo[o<span style=text-decoration:line-through>b]ar</span>baz',
+ '<strike>fo[o</strike><s>b]ar</s>',
+ '<s>fo[o</s><del>b]ar</del>',
+ ],
+ //@}
+ subscript: [
+ //@{
+ 'foo[]bar',
+ '<p>[foo</p> <p>bar]</p>',
+ '<span>[foo</span> <span>bar]</span>',
+ '<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>',
+ '<p>[foo<p><br><p>bar]',
+ '<b>foo[]bar</b>',
+ '<i>foo[]bar</i>',
+ '<span>foo</span>{}<span>bar</span>',
+ '<span>foo[</span><span>]bar</span>',
+ 'foo[bar]baz',
+ 'foo[bar<b>baz]qoz</b>quz',
+ 'foo[bar<i>baz]qoz</i>quz',
+ '{<p><p> <p>foo</p>}',
+
+ '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>',
+ '<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>',
+ '<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>',
+ '{<table><tr><td>foo<td>bar<td>baz</table>}',
+
+ 'foo<sub>[bar]</sub>baz',
+ 'foo<sub>b[a]r</sub>baz',
+ 'foo<sup>[bar]</sup>baz',
+ 'foo<sup>b[a]r</sup>baz',
+
+ 'foo<span style=vertical-align:sub>[bar]</span>baz',
+ 'foo<span style=vertical-align:super>[bar]</span>baz',
+
+ 'foo<sub><sub>[bar]</sub></sub>baz',
+ 'foo<sub><sub>b[a]r</sub></sub>baz',
+ 'foo<sub>b<sub>[a]</sub>r</sub>baz',
+ 'foo<sup><sup>[bar]</sup></sup>baz',
+ 'foo<sup><sup>b[a]r</sup></sup>baz',
+ 'foo<sup>b<sup>[a]</sup>r</sup>baz',
+ 'foo<sub><sup>[bar]</sup></sub>baz',
+ 'foo<sub><sup>b[a]r</sup></sub>baz',
+ 'foo<sub>b<sup>[a]</sup>r</sub>baz',
+ 'foo<sup><sub>[bar]</sub></sup>baz',
+ 'foo<sup><sub>b[a]r</sub></sup>baz',
+ 'foo<sup>b<sub>[a]</sub>r</sup>baz',
+
+ // Tests for queryCommandIndeterm() and queryCommandState()
+ 'fo[o<sub>b]ar</sub>baz',
+ 'foo<sub>ba[r</sub>b]az',
+ 'fo[o<sub>bar</sub>b]az',
+ 'foo[<sub>b]ar</sub>baz',
+ 'foo<sub>ba[r</sub>]baz',
+ 'foo[<sub>bar</sub>]baz',
+ 'foo<sub>[bar]</sub>baz',
+ 'foo{<sub>bar</sub>}baz',
+ '<sub>fo[o</sub><sup>b]ar</sup>',
+ '<sub>fo[o</sub><span style=vertical-align:sub>b]ar</span>',
+ 'foo<span style=vertical-align:top>[bar]</span>baz',
+ '<sub>fo[o</sub><span style=vertical-align:top>b]ar</span>',
+ ],
+ //@}
+ superscript: [
+ //@{
+ 'foo[]bar',
+ '<p>[foo</p> <p>bar]</p>',
+ '<span>[foo</span> <span>bar]</span>',
+ '<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>',
+ '<p>[foo<p><br><p>bar]',
+ '<b>foo[]bar</b>',
+ '<i>foo[]bar</i>',
+ '<span>foo</span>{}<span>bar</span>',
+ '<span>foo[</span><span>]bar</span>',
+ 'foo[bar]baz',
+ 'foo[bar<b>baz]qoz</b>quz',
+ 'foo[bar<i>baz]qoz</i>quz',
+ '{<p><p> <p>foo</p>}',
+
+ '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>',
+ '<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>',
+ '<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>',
+ '{<table><tr><td>foo<td>bar<td>baz</table>}',
+
+ 'foo<sub>[bar]</sub>baz',
+ 'foo<sub>b[a]r</sub>baz',
+ 'foo<sup>[bar]</sup>baz',
+ 'foo<sup>b[a]r</sup>baz',
+
+ 'foo<span style=vertical-align:sub>[bar]</span>baz',
+ 'foo<span style=vertical-align:super>[bar]</span>baz',
+
+ 'foo<sub><sub>[bar]</sub></sub>baz',
+ 'foo<sub><sub>b[a]r</sub></sub>baz',
+ 'foo<sub>b<sub>[a]</sub>r</sub>baz',
+ 'foo<sup><sup>[bar]</sup></sup>baz',
+ 'foo<sup><sup>b[a]r</sup></sup>baz',
+ 'foo<sup>b<sup>[a]</sup>r</sup>baz',
+ 'foo<sub><sup>[bar]</sup></sub>baz',
+ 'foo<sub><sup>b[a]r</sup></sub>baz',
+ 'foo<sub>b<sup>[a]</sup>r</sub>baz',
+ 'foo<sup><sub>[bar]</sub></sup>baz',
+ 'foo<sup><sub>b[a]r</sub></sup>baz',
+ 'foo<sup>b<sub>[a]</sub>r</sup>baz',
+
+ // Tests for queryCommandIndeterm() and queryCommandState()
+ 'fo[o<sup>b]ar</sup>baz',
+ 'foo<sup>ba[r</sup>b]az',
+ 'fo[o<sup>bar</sup>b]az',
+ 'foo[<sup>b]ar</sup>baz',
+ 'foo<sup>ba[r</sup>]baz',
+ 'foo[<sup>bar</sup>]baz',
+ 'foo<sup>[bar]</sup>baz',
+ 'foo{<sup>bar</sup>}baz',
+ '<sup>fo[o</sup><sub>b]ar</sub>',
+ '<sup>fo[o</sup><span style=vertical-align:super>b]ar</span>',
+ 'foo<span style=vertical-align:bottom>[bar]</span>baz',
+ '<sup>fo[o</sup><span style=vertical-align:bottom>b]ar</span>',
+
+ // https://bugs.webkit.org/show_bug.cgi?id=28472
+ 'foo<sup>[bar]<br></sup>',
+ ],
+ //@}
+ underline: [
+ //@{
+ 'foo[]bar',
+ '<p>[foo</p> <p>bar]</p>',
+ '<span>[foo</span> <span>bar]</span>',
+ '<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>',
+ '<p>[foo<p><br><p>bar]',
+ '<b>foo[]bar</b>',
+ '<i>foo[]bar</i>',
+ '<span>foo</span>{}<span>bar</span>',
+ '<span>foo[</span><span>]bar</span>',
+ 'foo[bar]baz',
+ 'foo[bar<b>baz]qoz</b>quz',
+ 'foo[bar<i>baz]qoz</i>quz',
+ '{<p><p> <p>foo</p>}',
+
+ '<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>',
+ '<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>',
+ '<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>',
+ '<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>',
+ '{<table><tr><td>foo<td>bar<td>baz</table>}',
+
+ 'foo<u>[bar]</u>baz',
+ 'foo<span style="text-decoration: underline">[bar]</span>baz',
+ '<u>foo[bar]baz</u>',
+ '<u>foo[b<span style="color:blue">ar]ba</span>z</u>',
+ '<u>foo[b<span style="color:blue" id=foo>ar]ba</span>z</u>',
+ '<u>foo[b<span style="font-size:3em">ar]ba</span>z</u>',
+ '<u>foo[b<i>ar]ba</i>z</u>',
+ '<p style="text-decoration: underline">foo[bar]baz</p>',
+
+ 'foo<s>[bar]</s>baz',
+ 'foo<span style="text-decoration: line-through">[bar]</span>baz',
+ '<s>foo[bar]baz</s>',
+ '<s>foo[b<span style="color:blue">ar]ba</span>z</s>',
+ '<s>foo[b<span style="color:blue" id=foo>ar]ba</span>z</s>',
+ '<s>foo[b<span style="font-size:3em">ar]ba</span>z</s>',
+ '<s>foo[b<i>ar]ba</i>z</s>',
+ '<p style="text-decoration: line-through">foo[bar]baz</p>',
+
+ 'foo<strike>[bar]</strike>baz',
+ '<strike>foo[bar]baz</strike>',
+ '<strike>foo[b<span style="color:blue">ar]ba</span>z</strike>',
+ '<strike>foo[b<span style="color:blue" id=foo>ar]ba</span>z</strike>',
+ '<strike>foo[b<span style="font-size:3em">ar]ba</span>z</strike>',
+ '<strike>foo[b<i>ar]ba</i>z</strike>',
+
+ 'foo<ins>[bar]</ins>baz',
+ '<ins>foo[bar]baz</ins>',
+ '<ins>foo[b<span style="color:blue">ar]ba</span>z</ins>',
+ '<ins>foo[b<span style="color:blue" id=foo>ar]ba</span>z</ins>',
+ '<ins>foo[b<span style="font-size:3em">ar]ba</span>z</ins>',
+ '<ins>foo[b<i>ar]ba</i>z</ins>',
+
+ 'foo<del>[bar]</del>baz',
+ '<del>foo[bar]baz</del>',
+ '<del>foo[b<span style="color:blue">ar]ba</span>z</del>',
+ '<del>foo[b<span style="color:blue" id=foo>ar]ba</span>z</del>',
+ '<del>foo[b<span style="font-size:3em">ar]ba</span>z</del>',
+ '<del>foo[b<i>ar]ba</i>z</del>',
+
+ 'foo<span style="text-decoration: underline line-through">[bar]</span>baz',
+ 'foo<span style="text-decoration: underline line-through">b[a]r</span>baz',
+ 'foo<s style="text-decoration: underline">[bar]</s>baz',
+ 'foo<s style="text-decoration: underline">b[a]r</s>baz',
+ 'foo<u style="text-decoration: line-through">[bar]</u>baz',
+ 'foo<u style="text-decoration: line-through">b[a]r</u>baz',
+ 'foo<s style="text-decoration: overline">[bar]</s>baz',
+ 'foo<s style="text-decoration: overline">b[a]r</s>baz',
+ 'foo<u style="text-decoration: overline">[bar]</u>baz',
+ 'foo<u style="text-decoration: overline">b[a]r</u>baz',
+
+ '<p style="text-decoration: line-through">foo[bar]baz</p>',
+ '<p style="text-decoration: overline">foo[bar]baz</p>',
+
+ 'foo<span class="underline">[bar]</span>baz',
+ 'foo<span class="underline">b[a]r</span>baz',
+ 'foo<span class="line-through">[bar]</span>baz',
+ 'foo<span class="line-through">b[a]r</span>baz',
+ 'foo<span class="underline-and-line-through">[bar]</span>baz',
+ 'foo<span class="underline-and-line-through">b[a]r</span>baz',
+
+ // Tests for queryCommandIndeterm() and queryCommandState()
+ 'fo[o<u>b]ar</u>baz',
+ 'foo<u>ba[r</u>b]az',
+ 'fo[o<u>bar</u>b]az',
+ 'foo[<u>b]ar</u>baz',
+ 'foo<u>ba[r</u>]baz',
+ 'foo[<u>bar</u>]baz',
+ 'foo<u>[bar]</u>baz',
+ 'foo{<u>bar</u>}baz',
+ 'fo[o<span style=text-decoration:underline>b]ar</span>baz',
+ '<ins>fo[o</ins><u>b]ar</u>',
+ '<u>fo[o</u><ins>b]ar</ins>',
+ ],
+ //@}
+ unlink: [
+ //@{
+ 'foo[]bar',
+ '<p>[foo</p> <p>bar]</p>',
+ '<span>[foo</span> <span>bar]</span>',
+ '<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>',
+ '<b>foo[]bar</b>',
+ '<i>foo[]bar</i>',
+ '<span>foo</span>{}<span>bar</span>',
+ '<span>foo[</span><span>]bar</span>',
+ 'foo[bar]baz',
+ 'foo[bar<b>baz]qoz</b>quz',
+ 'foo[bar<i>baz]qoz</i>quz',
+ '{<p><p> <p>foo</p>}',
+
+ '<a href=http://www.google.com/>foo[bar]baz</a>',
+ '<a href=http://www.google.com/>foo[barbaz</a>}',
+ '{<a href=http://www.google.com/>foobar]baz</a>',
+ '{<a href=http://www.google.com/>foobarbaz</a>}',
+ '<a href=http://www.google.com/>[foobarbaz]</a>',
+
+ 'foo<a href=http://www.google.com/>b[]ar</a>baz',
+ 'foo<a href=http://www.google.com/>[bar]</a>baz',
+ 'foo[<a href=http://www.google.com/>bar</a>]baz',
+ 'foo<a href=http://www.google.com/>[bar</a>baz]',
+ '[foo<a href=http://www.google.com/>bar]</a>baz',
+ '[foo<a href=http://www.google.com/>bar</a>baz]',
+
+ '<a id=foo href=http://www.google.com/>foobar[]baz</a>',
+ '<a id=foo href=http://www.google.com/>foo[bar]baz</a>',
+ '<a id=foo href=http://www.google.com/>[foobarbaz]</a>',
+ 'foo<a id=foo href=http://www.google.com/>[bar]</a>baz',
+ 'foo[<a id=foo href=http://www.google.com/>bar</a>]baz',
+ '[foo<a id=foo href=http://www.google.com/>bar</a>baz]',
+
+ '<a name=foo>foobar[]baz</a>',
+ '<a name=foo>foo[bar]baz</a>',
+ '<a name=foo>[foobarbaz]</a>',
+ 'foo<a name=foo>[bar]</a>baz',
+ 'foo[<a name=foo>bar</a>]baz',
+ '[foo<a name=foo>bar</a>baz]',
+ ],
+ //@}
+ copy: ['!foo[bar]baz'],
+ cut: ['!foo[bar]baz'],
+ defaultparagraphseparator: [
+ //@{
+ ['', 'foo[bar]baz'],
+ ['div', 'foo[bar]baz'],
+ ['p', 'foo[bar]baz'],
+ ['DIV', 'foo[bar]baz'],
+ ['P', 'foo[bar]baz'],
+ [' div ', 'foo[bar]baz'],
+ [' p ', 'foo[bar]baz'],
+ ['<div>', 'foo[bar]baz'],
+ ['<p>', 'foo[bar]baz'],
+ ['li', 'foo[bar]baz'],
+ ['blockquote', 'foo[bar]baz'],
+ ],
+ //@}
+ paste: ['!foo[bar]baz'],
+ selectall: ['foo[bar]baz'],
+ stylewithcss: [
+ //@{
+ ['true', 'foo[bar]baz'],
+ ['TRUE', 'foo[bar]baz'],
+ ['TrUe', 'foo[bar]baz'],
+ ['true ', 'foo[bar]baz'],
+ [' true', 'foo[bar]baz'],
+ ['truer', 'foo[bar]baz'],
+ [' true ', 'foo[bar]baz'],
+ [' TrUe', 'foo[bar]baz'],
+ ['', 'foo[bar]baz'],
+ [' ', 'foo[bar]baz'],
+ ['false', 'foo[bar]baz'],
+ ['FALSE', 'foo[bar]baz'],
+ ['FaLsE', 'foo[bar]baz'],
+ [' false', 'foo[bar]baz'],
+ ['false ', 'foo[bar]baz'],
+ ['falser', 'foo[bar]baz'],
+ ['falsé', 'foo[bar]baz'],
+ ],
+ //@}
+ usecss: [
+ //@{
+ ['true', 'foo[bar]baz'],
+ ['TRUE', 'foo[bar]baz'],
+ ['TrUe', 'foo[bar]baz'],
+ ['true ', 'foo[bar]baz'],
+ [' true', 'foo[bar]baz'],
+ ['truer', 'foo[bar]baz'],
+ [' true ', 'foo[bar]baz'],
+ [' TrUe', 'foo[bar]baz'],
+ ['', 'foo[bar]baz'],
+ [' ', 'foo[bar]baz'],
+ ['false', 'foo[bar]baz'],
+ ['FALSE', 'foo[bar]baz'],
+ ['FaLsE', 'foo[bar]baz'],
+ [' false', 'foo[bar]baz'],
+ ['false ', 'foo[bar]baz'],
+ ['falser', 'foo[bar]baz'],
+ ['falsé', 'foo[bar]baz'],
+ ],
+ //@}
+ quasit: ['foo[bar]baz'],
+ multitest: [
+ //@{
+ // Insertion-affecting state. Test that insertText works right, and
+ // test that various block commands preserve (or don't preserve) the
+ // state.
+ ['foo[]bar', 'bold', 'inserttext'],
+ ['foo[]bar', 'bold', 'delete'],
+ ['foo[]bar', 'bold', 'delete', 'inserttext'],
+ ['foo[]bar', 'bold', 'formatblock'],
+ ['foo[]bar', 'bold', 'formatblock', 'inserttext'],
+ ['foo[]bar', 'bold', 'forwarddelete'],
+ ['foo[]bar', 'bold', 'forwarddelete', 'inserttext'],
+ ['foo[]bar', 'bold', 'indent'],
+ ['foo[]bar', 'bold', 'indent', 'inserttext'],
+ ['foo[]bar', 'bold', 'inserthorizontalrule'],
+ ['foo[]bar', 'bold', 'inserthorizontalrule', 'inserttext'],
+ ['foo[]bar', 'bold', 'inserthtml'],
+ ['foo[]bar', 'bold', 'inserthtml', 'inserttext'],
+ ['foo[]bar', 'bold', 'insertimage'],
+ ['foo[]bar', 'bold', 'insertimage', 'inserttext'],
+ ['foo[]bar', 'bold', 'insertlinebreak'],
+ ['foo[]bar', 'bold', 'insertlinebreak', 'inserttext'],
+ ['foo[]bar', 'bold', 'insertorderedlist'],
+ ['foo[]bar', 'bold', 'insertorderedlist', 'inserttext'],
+ ['foo[]bar', 'bold', 'insertparagraph'],
+ ['foo[]bar', 'bold', 'insertparagraph', 'inserttext'],
+ ['foo[]bar', 'bold', 'insertunorderedlist'],
+ ['foo[]bar', 'bold', 'insertunorderedlist', 'inserttext'],
+ ['foo[]bar', 'bold', 'justifycenter'],
+ ['foo[]bar', 'bold', 'justifycenter', 'inserttext'],
+ ['foo[]bar', 'bold', 'justifyfull'],
+ ['foo[]bar', 'bold', 'justifyfull', 'inserttext'],
+ ['foo[]bar', 'bold', 'justifyleft'],
+ ['foo[]bar', 'bold', 'justifyleft', 'inserttext'],
+ ['foo[]bar', 'bold', 'justifyright'],
+ ['foo[]bar', 'bold', 'justifyright', 'inserttext'],
+ ['foo[]bar', 'bold', 'outdent'],
+ ['foo[]bar', 'bold', 'outdent', 'inserttext'],
+
+ ['foo[]bar', 'italic', 'inserttext'],
+ ['foo[]bar', 'italic', 'delete'],
+ ['foo[]bar', 'italic', 'delete', 'inserttext'],
+ ['foo[]bar', 'italic', 'formatblock'],
+ ['foo[]bar', 'italic', 'formatblock', 'inserttext'],
+ ['foo[]bar', 'italic', 'forwarddelete'],
+ ['foo[]bar', 'italic', 'forwarddelete', 'inserttext'],
+ ['foo[]bar', 'italic', 'indent'],
+ ['foo[]bar', 'italic', 'indent', 'inserttext'],
+ ['foo[]bar', 'italic', 'inserthorizontalrule'],
+ ['foo[]bar', 'italic', 'inserthorizontalrule', 'inserttext'],
+ ['foo[]bar', 'italic', 'inserthtml'],
+ ['foo[]bar', 'italic', 'inserthtml', 'inserttext'],
+ ['foo[]bar', 'italic', 'insertimage'],
+ ['foo[]bar', 'italic', 'insertimage', 'inserttext'],
+ ['foo[]bar', 'italic', 'insertlinebreak'],
+ ['foo[]bar', 'italic', 'insertlinebreak', 'inserttext'],
+ ['foo[]bar', 'italic', 'insertorderedlist'],
+ ['foo[]bar', 'italic', 'insertorderedlist', 'inserttext'],
+ ['foo[]bar', 'italic', 'insertparagraph'],
+ ['foo[]bar', 'italic', 'insertparagraph', 'inserttext'],
+ ['foo[]bar', 'italic', 'insertunorderedlist'],
+ ['foo[]bar', 'italic', 'insertunorderedlist', 'inserttext'],
+ ['foo[]bar', 'italic', 'justifycenter'],
+ ['foo[]bar', 'italic', 'justifycenter', 'inserttext'],
+ ['foo[]bar', 'italic', 'justifyfull'],
+ ['foo[]bar', 'italic', 'justifyfull', 'inserttext'],
+ ['foo[]bar', 'italic', 'justifyleft'],
+ ['foo[]bar', 'italic', 'justifyleft', 'inserttext'],
+ ['foo[]bar', 'italic', 'justifyright'],
+ ['foo[]bar', 'italic', 'justifyright', 'inserttext'],
+ ['foo[]bar', 'italic', 'outdent'],
+ ['foo[]bar', 'italic', 'outdent', 'inserttext'],
+
+ ['foo[]bar', 'strikethrough', 'inserttext'],
+ ['foo[]bar', 'strikethrough', 'delete'],
+ ['foo[]bar', 'strikethrough', 'delete', 'inserttext'],
+ ['foo[]bar', 'strikethrough', 'formatblock'],
+ ['foo[]bar', 'strikethrough', 'formatblock', 'inserttext'],
+ ['foo[]bar', 'strikethrough', 'forwarddelete'],
+ ['foo[]bar', 'strikethrough', 'forwarddelete', 'inserttext'],
+ ['foo[]bar', 'strikethrough', 'indent'],
+ ['foo[]bar', 'strikethrough', 'indent', 'inserttext'],
+ ['foo[]bar', 'strikethrough', 'inserthorizontalrule'],
+ ['foo[]bar', 'strikethrough', 'inserthorizontalrule', 'inserttext'],
+ ['foo[]bar', 'strikethrough', 'inserthtml'],
+ ['foo[]bar', 'strikethrough', 'inserthtml', 'inserttext'],
+ ['foo[]bar', 'strikethrough', 'insertimage'],
+ ['foo[]bar', 'strikethrough', 'insertimage', 'inserttext'],
+ ['foo[]bar', 'strikethrough', 'insertlinebreak'],
+ ['foo[]bar', 'strikethrough', 'insertlinebreak', 'inserttext'],
+ ['foo[]bar', 'strikethrough', 'insertorderedlist'],
+ ['foo[]bar', 'strikethrough', 'insertorderedlist', 'inserttext'],
+ ['foo[]bar', 'strikethrough', 'insertparagraph'],
+ ['foo[]bar', 'strikethrough', 'insertparagraph', 'inserttext'],
+ ['foo[]bar', 'strikethrough', 'insertunorderedlist'],
+ ['foo[]bar', 'strikethrough', 'insertunorderedlist', 'inserttext'],
+ ['foo[]bar', 'strikethrough', 'justifycenter'],
+ ['foo[]bar', 'strikethrough', 'justifycenter', 'inserttext'],
+ ['foo[]bar', 'strikethrough', 'justifyfull'],
+ ['foo[]bar', 'strikethrough', 'justifyfull', 'inserttext'],
+ ['foo[]bar', 'strikethrough', 'justifyleft'],
+ ['foo[]bar', 'strikethrough', 'justifyleft', 'inserttext'],
+ ['foo[]bar', 'strikethrough', 'justifyright'],
+ ['foo[]bar', 'strikethrough', 'justifyright', 'inserttext'],
+ ['foo[]bar', 'strikethrough', 'outdent'],
+ ['foo[]bar', 'strikethrough', 'outdent', 'inserttext'],
+
+ ['foo[]bar', 'subscript', 'inserttext'],
+ ['foo[]bar', 'subscript', 'delete'],
+ ['foo[]bar', 'subscript', 'delete', 'inserttext'],
+ ['foo[]bar', 'subscript', 'formatblock'],
+ ['foo[]bar', 'subscript', 'formatblock', 'inserttext'],
+ ['foo[]bar', 'subscript', 'forwarddelete'],
+ ['foo[]bar', 'subscript', 'forwarddelete', 'inserttext'],
+ ['foo[]bar', 'subscript', 'indent'],
+ ['foo[]bar', 'subscript', 'indent', 'inserttext'],
+ ['foo[]bar', 'subscript', 'inserthorizontalrule'],
+ ['foo[]bar', 'subscript', 'inserthorizontalrule', 'inserttext'],
+ ['foo[]bar', 'subscript', 'inserthtml'],
+ ['foo[]bar', 'subscript', 'inserthtml', 'inserttext'],
+ ['foo[]bar', 'subscript', 'insertimage'],
+ ['foo[]bar', 'subscript', 'insertimage', 'inserttext'],
+ ['foo[]bar', 'subscript', 'insertlinebreak'],
+ ['foo[]bar', 'subscript', 'insertlinebreak', 'inserttext'],
+ ['foo[]bar', 'subscript', 'insertorderedlist'],
+ ['foo[]bar', 'subscript', 'insertorderedlist', 'inserttext'],
+ ['foo[]bar', 'subscript', 'insertparagraph'],
+ ['foo[]bar', 'subscript', 'insertparagraph', 'inserttext'],
+ ['foo[]bar', 'subscript', 'insertunorderedlist'],
+ ['foo[]bar', 'subscript', 'insertunorderedlist', 'inserttext'],
+ ['foo[]bar', 'subscript', 'justifycenter'],
+ ['foo[]bar', 'subscript', 'justifycenter', 'inserttext'],
+ ['foo[]bar', 'subscript', 'justifyfull'],
+ ['foo[]bar', 'subscript', 'justifyfull', 'inserttext'],
+ ['foo[]bar', 'subscript', 'justifyleft'],
+ ['foo[]bar', 'subscript', 'justifyleft', 'inserttext'],
+ ['foo[]bar', 'subscript', 'justifyright'],
+ ['foo[]bar', 'subscript', 'justifyright', 'inserttext'],
+ ['foo[]bar', 'subscript', 'outdent'],
+ ['foo[]bar', 'subscript', 'outdent', 'inserttext'],
+
+ ['foo[]bar', 'superscript', 'inserttext'],
+ ['foo[]bar', 'superscript', 'delete'],
+ ['foo[]bar', 'superscript', 'delete', 'inserttext'],
+ ['foo[]bar', 'superscript', 'formatblock'],
+ ['foo[]bar', 'superscript', 'formatblock', 'inserttext'],
+ ['foo[]bar', 'superscript', 'forwarddelete'],
+ ['foo[]bar', 'superscript', 'forwarddelete', 'inserttext'],
+ ['foo[]bar', 'superscript', 'indent'],
+ ['foo[]bar', 'superscript', 'indent', 'inserttext'],
+ ['foo[]bar', 'superscript', 'inserthorizontalrule'],
+ ['foo[]bar', 'superscript', 'inserthorizontalrule', 'inserttext'],
+ ['foo[]bar', 'superscript', 'inserthtml'],
+ ['foo[]bar', 'superscript', 'inserthtml', 'inserttext'],
+ ['foo[]bar', 'superscript', 'insertimage'],
+ ['foo[]bar', 'superscript', 'insertimage', 'inserttext'],
+ ['foo[]bar', 'superscript', 'insertlinebreak'],
+ ['foo[]bar', 'superscript', 'insertlinebreak', 'inserttext'],
+ ['foo[]bar', 'superscript', 'insertorderedlist'],
+ ['foo[]bar', 'superscript', 'insertorderedlist', 'inserttext'],
+ ['foo[]bar', 'superscript', 'insertparagraph'],
+ ['foo[]bar', 'superscript', 'insertparagraph', 'inserttext'],
+ ['foo[]bar', 'superscript', 'insertunorderedlist'],
+ ['foo[]bar', 'superscript', 'insertunorderedlist', 'inserttext'],
+ ['foo[]bar', 'superscript', 'justifycenter'],
+ ['foo[]bar', 'superscript', 'justifycenter', 'inserttext'],
+ ['foo[]bar', 'superscript', 'justifyfull'],
+ ['foo[]bar', 'superscript', 'justifyfull', 'inserttext'],
+ ['foo[]bar', 'superscript', 'justifyleft'],
+ ['foo[]bar', 'superscript', 'justifyleft', 'inserttext'],
+ ['foo[]bar', 'superscript', 'justifyright'],
+ ['foo[]bar', 'superscript', 'justifyright', 'inserttext'],
+ ['foo[]bar', 'superscript', 'outdent'],
+ ['foo[]bar', 'superscript', 'outdent', 'inserttext'],
+
+ ['foo[]bar', 'underline', 'inserttext'],
+ ['foo[]bar', 'underline', 'delete'],
+ ['foo[]bar', 'underline', 'delete', 'inserttext'],
+ ['foo[]bar', 'underline', 'formatblock'],
+ ['foo[]bar', 'underline', 'formatblock', 'inserttext'],
+ ['foo[]bar', 'underline', 'forwarddelete'],
+ ['foo[]bar', 'underline', 'forwarddelete', 'inserttext'],
+ ['foo[]bar', 'underline', 'indent'],
+ ['foo[]bar', 'underline', 'indent', 'inserttext'],
+ ['foo[]bar', 'underline', 'inserthorizontalrule'],
+ ['foo[]bar', 'underline', 'inserthorizontalrule', 'inserttext'],
+ ['foo[]bar', 'underline', 'inserthtml'],
+ ['foo[]bar', 'underline', 'inserthtml', 'inserttext'],
+ ['foo[]bar', 'underline', 'insertimage'],
+ ['foo[]bar', 'underline', 'insertimage', 'inserttext'],
+ ['foo[]bar', 'underline', 'insertlinebreak'],
+ ['foo[]bar', 'underline', 'insertlinebreak', 'inserttext'],
+ ['foo[]bar', 'underline', 'insertorderedlist'],
+ ['foo[]bar', 'underline', 'insertorderedlist', 'inserttext'],
+ ['foo[]bar', 'underline', 'insertparagraph'],
+ ['foo[]bar', 'underline', 'insertparagraph', 'inserttext'],
+ ['foo[]bar', 'underline', 'insertunorderedlist'],
+ ['foo[]bar', 'underline', 'insertunorderedlist', 'inserttext'],
+ ['foo[]bar', 'underline', 'justifycenter'],
+ ['foo[]bar', 'underline', 'justifycenter', 'inserttext'],
+ ['foo[]bar', 'underline', 'justifyfull'],
+ ['foo[]bar', 'underline', 'justifyfull', 'inserttext'],
+ ['foo[]bar', 'underline', 'justifyleft'],
+ ['foo[]bar', 'underline', 'justifyleft', 'inserttext'],
+ ['foo[]bar', 'underline', 'justifyright'],
+ ['foo[]bar', 'underline', 'justifyright', 'inserttext'],
+ ['foo[]bar', 'underline', 'outdent'],
+ ['foo[]bar', 'underline', 'outdent', 'inserttext'],
+
+ // Insertion-affecting value. Test that insertText works right, and
+ // test that various block commands preserve (or don't preserve) the
+ // value.
+ ['foo[]bar', 'backcolor', 'inserttext'],
+ ['foo[]bar', 'backcolor', 'delete'],
+ ['foo[]bar', 'backcolor', 'delete', 'inserttext'],
+ ['foo[]bar', 'backcolor', 'formatblock'],
+ ['foo[]bar', 'backcolor', 'formatblock', 'inserttext'],
+ ['foo[]bar', 'backcolor', 'forwarddelete'],
+ ['foo[]bar', 'backcolor', 'forwarddelete', 'inserttext'],
+ ['foo[]bar', 'backcolor', 'indent'],
+ ['foo[]bar', 'backcolor', 'indent', 'inserttext'],
+ ['foo[]bar', 'backcolor', 'inserthorizontalrule'],
+ ['foo[]bar', 'backcolor', 'inserthorizontalrule', 'inserttext'],
+ ['foo[]bar', 'backcolor', 'inserthtml'],
+ ['foo[]bar', 'backcolor', 'inserthtml', 'inserttext'],
+ ['foo[]bar', 'backcolor', 'insertimage'],
+ ['foo[]bar', 'backcolor', 'insertimage', 'inserttext'],
+ ['foo[]bar', 'backcolor', 'insertlinebreak'],
+ ['foo[]bar', 'backcolor', 'insertlinebreak', 'inserttext'],
+ ['foo[]bar', 'backcolor', 'insertorderedlist'],
+ ['foo[]bar', 'backcolor', 'insertorderedlist', 'inserttext'],
+ ['foo[]bar', 'backcolor', 'insertparagraph'],
+ ['foo[]bar', 'backcolor', 'insertparagraph', 'inserttext'],
+ ['foo[]bar', 'backcolor', 'insertunorderedlist'],
+ ['foo[]bar', 'backcolor', 'insertunorderedlist', 'inserttext'],
+ ['foo[]bar', 'backcolor', 'justifycenter'],
+ ['foo[]bar', 'backcolor', 'justifycenter', 'inserttext'],
+ ['foo[]bar', 'backcolor', 'justifyfull'],
+ ['foo[]bar', 'backcolor', 'justifyfull', 'inserttext'],
+ ['foo[]bar', 'backcolor', 'justifyleft'],
+ ['foo[]bar', 'backcolor', 'justifyleft', 'inserttext'],
+ ['foo[]bar', 'backcolor', 'justifyright'],
+ ['foo[]bar', 'backcolor', 'justifyright', 'inserttext'],
+ ['foo[]bar', 'backcolor', 'outdent'],
+ ['foo[]bar', 'backcolor', 'outdent', 'inserttext'],
+
+ ['foo[]bar', 'createlink', 'inserttext'],
+ ['foo[]bar', 'createlink', 'delete'],
+ ['foo[]bar', 'createlink', 'delete', 'inserttext'],
+ ['foo[]bar', 'createlink', 'formatblock'],
+ ['foo[]bar', 'createlink', 'formatblock', 'inserttext'],
+ ['foo[]bar', 'createlink', 'forwarddelete'],
+ ['foo[]bar', 'createlink', 'forwarddelete', 'inserttext'],
+ ['foo[]bar', 'createlink', 'indent'],
+ ['foo[]bar', 'createlink', 'indent', 'inserttext'],
+ ['foo[]bar', 'createlink', 'inserthorizontalrule'],
+ ['foo[]bar', 'createlink', 'inserthorizontalrule', 'inserttext'],
+ ['foo[]bar', 'createlink', 'inserthtml'],
+ ['foo[]bar', 'createlink', 'inserthtml', 'inserttext'],
+ ['foo[]bar', 'createlink', 'insertimage'],
+ ['foo[]bar', 'createlink', 'insertimage', 'inserttext'],
+ ['foo[]bar', 'createlink', 'insertlinebreak'],
+ ['foo[]bar', 'createlink', 'insertlinebreak', 'inserttext'],
+ ['foo[]bar', 'createlink', 'insertorderedlist'],
+ ['foo[]bar', 'createlink', 'insertorderedlist', 'inserttext'],
+ ['foo[]bar', 'createlink', 'insertparagraph'],
+ ['foo[]bar', 'createlink', 'insertparagraph', 'inserttext'],
+ ['foo[]bar', 'createlink', 'insertunorderedlist'],
+ ['foo[]bar', 'createlink', 'insertunorderedlist', 'inserttext'],
+ ['foo[]bar', 'createlink', 'justifycenter'],
+ ['foo[]bar', 'createlink', 'justifycenter', 'inserttext'],
+ ['foo[]bar', 'createlink', 'justifyfull'],
+ ['foo[]bar', 'createlink', 'justifyfull', 'inserttext'],
+ ['foo[]bar', 'createlink', 'justifyleft'],
+ ['foo[]bar', 'createlink', 'justifyleft', 'inserttext'],
+ ['foo[]bar', 'createlink', 'justifyright'],
+ ['foo[]bar', 'createlink', 'justifyright', 'inserttext'],
+ ['foo[]bar', 'createlink', 'outdent'],
+ ['foo[]bar', 'createlink', 'outdent', 'inserttext'],
+
+ ['foo[]bar', 'fontname', 'inserttext'],
+ ['foo[]bar', 'fontname', 'delete'],
+ ['foo[]bar', 'fontname', 'delete', 'inserttext'],
+ ['foo[]bar', 'fontname', 'formatblock'],
+ ['foo[]bar', 'fontname', 'formatblock', 'inserttext'],
+ ['foo[]bar', 'fontname', 'forwarddelete'],
+ ['foo[]bar', 'fontname', 'forwarddelete', 'inserttext'],
+ ['foo[]bar', 'fontname', 'indent'],
+ ['foo[]bar', 'fontname', 'indent', 'inserttext'],
+ ['foo[]bar', 'fontname', 'inserthorizontalrule'],
+ ['foo[]bar', 'fontname', 'inserthorizontalrule', 'inserttext'],
+ ['foo[]bar', 'fontname', 'inserthtml'],
+ ['foo[]bar', 'fontname', 'inserthtml', 'inserttext'],
+ ['foo[]bar', 'fontname', 'insertimage'],
+ ['foo[]bar', 'fontname', 'insertimage', 'inserttext'],
+ ['foo[]bar', 'fontname', 'insertlinebreak'],
+ ['foo[]bar', 'fontname', 'insertlinebreak', 'inserttext'],
+ ['foo[]bar', 'fontname', 'insertorderedlist'],
+ ['foo[]bar', 'fontname', 'insertorderedlist', 'inserttext'],
+ ['foo[]bar', 'fontname', 'insertparagraph'],
+ ['foo[]bar', 'fontname', 'insertparagraph', 'inserttext'],
+ ['foo[]bar', 'fontname', 'insertunorderedlist'],
+ ['foo[]bar', 'fontname', 'insertunorderedlist', 'inserttext'],
+ ['foo[]bar', 'fontname', 'justifycenter'],
+ ['foo[]bar', 'fontname', 'justifycenter', 'inserttext'],
+ ['foo[]bar', 'fontname', 'justifyfull'],
+ ['foo[]bar', 'fontname', 'justifyfull', 'inserttext'],
+ ['foo[]bar', 'fontname', 'justifyleft'],
+ ['foo[]bar', 'fontname', 'justifyleft', 'inserttext'],
+ ['foo[]bar', 'fontname', 'justifyright'],
+ ['foo[]bar', 'fontname', 'justifyright', 'inserttext'],
+ ['foo[]bar', 'fontname', 'outdent'],
+ ['foo[]bar', 'fontname', 'outdent', 'inserttext'],
+
+ ['foo[]bar', 'fontsize', 'inserttext'],
+ ['foo[]bar', 'fontsize', 'delete'],
+ ['foo[]bar', 'fontsize', 'delete', 'inserttext'],
+ ['foo[]bar', 'fontsize', 'formatblock'],
+ ['foo[]bar', 'fontsize', 'formatblock', 'inserttext'],
+ ['foo[]bar', 'fontsize', 'forwarddelete'],
+ ['foo[]bar', 'fontsize', 'forwarddelete', 'inserttext'],
+ ['foo[]bar', 'fontsize', 'indent'],
+ ['foo[]bar', 'fontsize', 'indent', 'inserttext'],
+ ['foo[]bar', 'fontsize', 'inserthorizontalrule'],
+ ['foo[]bar', 'fontsize', 'inserthorizontalrule', 'inserttext'],
+ ['foo[]bar', 'fontsize', 'inserthtml'],
+ ['foo[]bar', 'fontsize', 'inserthtml', 'inserttext'],
+ ['foo[]bar', 'fontsize', 'insertimage'],
+ ['foo[]bar', 'fontsize', 'insertimage', 'inserttext'],
+ ['foo[]bar', 'fontsize', 'insertlinebreak'],
+ ['foo[]bar', 'fontsize', 'insertlinebreak', 'inserttext'],
+ ['foo[]bar', 'fontsize', 'insertorderedlist'],
+ ['foo[]bar', 'fontsize', 'insertorderedlist', 'inserttext'],
+ ['foo[]bar', 'fontsize', 'insertparagraph'],
+ ['foo[]bar', 'fontsize', 'insertparagraph', 'inserttext'],
+ ['foo[]bar', 'fontsize', 'insertunorderedlist'],
+ ['foo[]bar', 'fontsize', 'insertunorderedlist', 'inserttext'],
+ ['foo[]bar', 'fontsize', 'justifycenter'],
+ ['foo[]bar', 'fontsize', 'justifycenter', 'inserttext'],
+ ['foo[]bar', 'fontsize', 'justifyfull'],
+ ['foo[]bar', 'fontsize', 'justifyfull', 'inserttext'],
+ ['foo[]bar', 'fontsize', 'justifyleft'],
+ ['foo[]bar', 'fontsize', 'justifyleft', 'inserttext'],
+ ['foo[]bar', 'fontsize', 'justifyright'],
+ ['foo[]bar', 'fontsize', 'justifyright', 'inserttext'],
+ ['foo[]bar', 'fontsize', 'outdent'],
+ ['foo[]bar', 'fontsize', 'outdent', 'inserttext'],
+
+ ['foo[]bar', 'forecolor', 'inserttext'],
+ ['foo[]bar', 'forecolor', 'delete'],
+ ['foo[]bar', 'forecolor', 'delete', 'inserttext'],
+ ['foo[]bar', 'forecolor', 'formatblock'],
+ ['foo[]bar', 'forecolor', 'formatblock', 'inserttext'],
+ ['foo[]bar', 'forecolor', 'forwarddelete'],
+ ['foo[]bar', 'forecolor', 'forwarddelete', 'inserttext'],
+ ['foo[]bar', 'forecolor', 'indent'],
+ ['foo[]bar', 'forecolor', 'indent', 'inserttext'],
+ ['foo[]bar', 'forecolor', 'inserthorizontalrule'],
+ ['foo[]bar', 'forecolor', 'inserthorizontalrule', 'inserttext'],
+ ['foo[]bar', 'forecolor', 'inserthtml'],
+ ['foo[]bar', 'forecolor', 'inserthtml', 'inserttext'],
+ ['foo[]bar', 'forecolor', 'insertimage'],
+ ['foo[]bar', 'forecolor', 'insertimage', 'inserttext'],
+ ['foo[]bar', 'forecolor', 'insertlinebreak'],
+ ['foo[]bar', 'forecolor', 'insertlinebreak', 'inserttext'],
+ ['foo[]bar', 'forecolor', 'insertorderedlist'],
+ ['foo[]bar', 'forecolor', 'insertorderedlist', 'inserttext'],
+ ['foo[]bar', 'forecolor', 'insertparagraph'],
+ ['foo[]bar', 'forecolor', 'insertparagraph', 'inserttext'],
+ ['foo[]bar', 'forecolor', 'insertunorderedlist'],
+ ['foo[]bar', 'forecolor', 'insertunorderedlist', 'inserttext'],
+ ['foo[]bar', 'forecolor', 'justifycenter'],
+ ['foo[]bar', 'forecolor', 'justifycenter', 'inserttext'],
+ ['foo[]bar', 'forecolor', 'justifyfull'],
+ ['foo[]bar', 'forecolor', 'justifyfull', 'inserttext'],
+ ['foo[]bar', 'forecolor', 'justifyleft'],
+ ['foo[]bar', 'forecolor', 'justifyleft', 'inserttext'],
+ ['foo[]bar', 'forecolor', 'justifyright'],
+ ['foo[]bar', 'forecolor', 'justifyright', 'inserttext'],
+ ['foo[]bar', 'forecolor', 'outdent'],
+ ['foo[]bar', 'forecolor', 'outdent', 'inserttext'],
+
+ ['foo[]bar', 'hilitecolor', 'inserttext'],
+ ['foo[]bar', 'hilitecolor', 'delete'],
+ ['foo[]bar', 'hilitecolor', 'delete', 'inserttext'],
+ ['foo[]bar', 'hilitecolor', 'formatblock'],
+ ['foo[]bar', 'hilitecolor', 'formatblock', 'inserttext'],
+ ['foo[]bar', 'hilitecolor', 'forwarddelete'],
+ ['foo[]bar', 'hilitecolor', 'forwarddelete', 'inserttext'],
+ ['foo[]bar', 'hilitecolor', 'indent'],
+ ['foo[]bar', 'hilitecolor', 'indent', 'inserttext'],
+ ['foo[]bar', 'hilitecolor', 'inserthorizontalrule'],
+ ['foo[]bar', 'hilitecolor', 'inserthorizontalrule', 'inserttext'],
+ ['foo[]bar', 'hilitecolor', 'inserthtml'],
+ ['foo[]bar', 'hilitecolor', 'inserthtml', 'inserttext'],
+ ['foo[]bar', 'hilitecolor', 'insertimage'],
+ ['foo[]bar', 'hilitecolor', 'insertimage', 'inserttext'],
+ ['foo[]bar', 'hilitecolor', 'insertlinebreak'],
+ ['foo[]bar', 'hilitecolor', 'insertlinebreak', 'inserttext'],
+ ['foo[]bar', 'hilitecolor', 'insertorderedlist'],
+ ['foo[]bar', 'hilitecolor', 'insertorderedlist', 'inserttext'],
+ ['foo[]bar', 'hilitecolor', 'insertparagraph'],
+ ['foo[]bar', 'hilitecolor', 'insertparagraph', 'inserttext'],
+ ['foo[]bar', 'hilitecolor', 'insertunorderedlist'],
+ ['foo[]bar', 'hilitecolor', 'insertunorderedlist', 'inserttext'],
+ ['foo[]bar', 'hilitecolor', 'justifycenter'],
+ ['foo[]bar', 'hilitecolor', 'justifycenter', 'inserttext'],
+ ['foo[]bar', 'hilitecolor', 'justifyfull'],
+ ['foo[]bar', 'hilitecolor', 'justifyfull', 'inserttext'],
+ ['foo[]bar', 'hilitecolor', 'justifyleft'],
+ ['foo[]bar', 'hilitecolor', 'justifyleft', 'inserttext'],
+ ['foo[]bar', 'hilitecolor', 'justifyright'],
+ ['foo[]bar', 'hilitecolor', 'justifyright', 'inserttext'],
+ ['foo[]bar', 'hilitecolor', 'outdent'],
+ ['foo[]bar', 'hilitecolor', 'outdent', 'inserttext'],
+
+ // Test things that interfere with each other
+ ['foo[]bar', 'superscript', 'subscript', 'inserttext'],
+ ['foo[]bar', 'subscript', 'superscript', 'inserttext'],
+
+ ['foo[]bar', 'createlink', ['forecolor', '#0000FF'], 'inserttext'],
+ ['foo[]bar', ['forecolor', '#0000FF'], 'createlink', 'inserttext'],
+ ['foo[]bar', 'createlink', ['forecolor', 'blue'], 'inserttext'],
+ ['foo[]bar', ['forecolor', 'blue'], 'createlink', 'inserttext'],
+ ['foo[]bar', 'createlink', ['forecolor', 'brown'], 'inserttext'],
+ ['foo[]bar', ['forecolor', 'brown'], 'createlink', 'inserttext'],
+ ['foo[]bar', 'createlink', ['forecolor', 'black'], 'inserttext'],
+ ['foo[]bar', ['forecolor', 'black'], 'createlink', 'inserttext'],
+ ['foo[]bar', 'createlink', 'underline', 'inserttext'],
+ ['foo[]bar', 'underline', 'createlink', 'inserttext'],
+ ['foo[]bar', 'createlink', 'underline', 'underline', 'inserttext'],
+ ['foo[]bar', 'underline', 'underline', 'createlink', 'inserttext'],
+
+ ['foo[]bar', 'subscript', ['fontsize', '2'], 'inserttext'],
+ ['foo[]bar', ['fontsize', '2'], 'subscript', 'inserttext'],
+ ['foo[]bar', 'subscript', ['fontsize', '3'], 'inserttext'],
+ ['foo[]bar', ['fontsize', '3'], 'subscript', 'inserttext'],
+
+ ['foo[]bar', ['hilitecolor', 'aqua'], ['backcolor', 'tan'], 'inserttext'],
+ ['foo[]bar', ['backcolor', 'tan'], ['hilitecolor', 'aqua'], 'inserttext'],
+
+
+ // The following are all just inserttext tests that we took from there,
+ // but we first backspace the selected text instead of letting
+ // inserttext handle it. This tests that deletion correctly sets
+ // overrides.
+ ['foo<b>[bar]</b>baz', 'delete', 'inserttext'],
+ ['foo<i>[bar]</i>baz', 'delete', 'inserttext'],
+ ['foo<s>[bar]</s>baz', 'delete', 'inserttext'],
+ ['foo<sub>[bar]</sub>baz', 'delete', 'inserttext'],
+ ['foo<sup>[bar]</sup>baz', 'delete', 'inserttext'],
+ ['foo<u>[bar]</u>baz', 'delete', 'inserttext'],
+ ['foo<a href=http://www.google.com>[bar]</a>baz', 'delete', 'inserttext'],
+ ['foo<font face=sans-serif>[bar]</font>baz', 'delete', 'inserttext'],
+ ['foo<font size=4>[bar]</font>baz', 'delete', 'inserttext'],
+ ['foo<font color=#0000FF>[bar]</font>baz', 'delete', 'inserttext'],
+ ['foo<span style=background-color:#00FFFF>[bar]</span>baz', 'delete', 'inserttext'],
+ ['foo<a href=http://www.google.com><font color=blue>[bar]</font></a>baz', 'delete', 'inserttext'],
+ ['foo<font color=blue><a href=http://www.google.com>[bar]</a></font>baz', 'delete', 'inserttext'],
+ ['foo<a href=http://www.google.com><font color=brown>[bar]</font></a>baz', 'delete', 'inserttext'],
+ ['foo<font color=brown><a href=http://www.google.com>[bar]</a></font>baz', 'delete', 'inserttext'],
+ ['foo<a href=http://www.google.com><font color=black>[bar]</font></a>baz', 'delete', 'inserttext'],
+ ['foo<a href=http://www.google.com><u>[bar]</u></a>baz', 'delete', 'inserttext'],
+ ['foo<u><a href=http://www.google.com>[bar]</a></u>baz', 'delete', 'inserttext'],
+ ['foo<sub><font size=2>[bar]</font></sub>baz', 'delete', 'inserttext'],
+ ['foo<font size=2><sub>[bar]</sub></font>baz', 'delete', 'inserttext'],
+ ['foo<sub><font size=3>[bar]</font></sub>baz', 'delete', 'inserttext'],
+ ['foo<font size=3><sub>[bar]</sub></font>baz', 'delete', 'inserttext'],
+
+ // Now repeat but with different selections.
+ ['[foo<b>bar]</b>baz', 'delete', 'inserttext'],
+ ['[foo<i>bar]</i>baz', 'delete', 'inserttext'],
+ ['[foo<s>bar]</s>baz', 'delete', 'inserttext'],
+ ['[foo<sub>bar]</sub>baz', 'delete', 'inserttext'],
+ ['[foo<sup>bar]</sup>baz', 'delete', 'inserttext'],
+ ['[foo<u>bar]</u>baz', 'delete', 'inserttext'],
+ ['[foo<a href=http://www.google.com>bar]</a>baz', 'delete', 'inserttext'],
+ ['[foo<font face=sans-serif>bar]</font>baz', 'delete', 'inserttext'],
+ ['[foo<font size=4>bar]</font>baz', 'delete', 'inserttext'],
+ ['[foo<font color=#0000FF>bar]</font>baz', 'delete', 'inserttext'],
+ ['[foo<span style=background-color:#00FFFF>bar]</span>baz', 'delete', 'inserttext'],
+ ['[foo<a href=http://www.google.com><font color=blue>bar]</font></a>baz', 'delete', 'inserttext'],
+ ['[foo<font color=blue><a href=http://www.google.com>bar]</a></font>baz', 'delete', 'inserttext'],
+ ['[foo<a href=http://www.google.com><font color=brown>bar]</font></a>baz', 'delete', 'inserttext'],
+ ['[foo<font color=brown><a href=http://www.google.com>bar]</a></font>baz', 'delete', 'inserttext'],
+ ['[foo<a href=http://www.google.com><font color=black>bar]</font></a>baz', 'delete', 'inserttext'],
+ ['[foo<a href=http://www.google.com><u>bar]</u></a>baz', 'delete', 'inserttext'],
+ ['[foo<u><a href=http://www.google.com>bar]</a></u>baz', 'delete', 'inserttext'],
+ ['[foo<sub><font size=2>bar]</font></sub>baz', 'delete', 'inserttext'],
+ ['[foo<font size=2><sub>bar]</sub></font>baz', 'delete', 'inserttext'],
+ ['[foo<sub><font size=3>bar]</font></sub>baz', 'delete', 'inserttext'],
+ ['[foo<font size=3><sub>bar]</sub></font>baz', 'delete', 'inserttext'],
+
+ ['foo<b>[bar</b>baz]', 'delete', 'inserttext'],
+ ['foo<i>[bar</i>baz]', 'delete', 'inserttext'],
+ ['foo<s>[bar</s>baz]', 'delete', 'inserttext'],
+ ['foo<sub>[bar</sub>baz]', 'delete', 'inserttext'],
+ ['foo<sup>[bar</sup>baz]', 'delete', 'inserttext'],
+ ['foo<u>[bar</u>baz]', 'delete', 'inserttext'],
+ ['foo<a href=http://www.google.com>[bar</a>baz]', 'delete', 'inserttext'],
+ ['foo<font face=sans-serif>[bar</font>baz]', 'delete', 'inserttext'],
+ ['foo<font size=4>[bar</font>baz]', 'delete', 'inserttext'],
+ ['foo<font color=#0000FF>[bar</font>baz]', 'delete', 'inserttext'],
+ ['foo<span style=background-color:#00FFFF>[bar</span>baz]', 'delete', 'inserttext'],
+ ['foo<a href=http://www.google.com><font color=blue>[bar</font></a>baz]', 'delete', 'inserttext'],
+ ['foo<font color=blue><a href=http://www.google.com>[bar</a></font>baz]', 'delete', 'inserttext'],
+ ['foo<a href=http://www.google.com><font color=brown>[bar</font></a>baz]', 'delete', 'inserttext'],
+ ['foo<font color=brown><a href=http://www.google.com>[bar</a></font>baz]', 'delete', 'inserttext'],
+ ['foo<a href=http://www.google.com><font color=black>[bar</font></a>baz]', 'delete', 'inserttext'],
+ ['foo<a href=http://www.google.com><u>[bar</u></a>baz]', 'delete', 'inserttext'],
+ ['foo<u><a href=http://www.google.com>[bar</a></u>baz]', 'delete', 'inserttext'],
+ ['foo<sub><font size=2>[bar</font></sub>baz]', 'delete', 'inserttext'],
+ ['foo<font size=2><sub>[bar</sub></font>baz]', 'delete', 'inserttext'],
+ ['foo<sub><font size=3>[bar</font></sub>baz]', 'delete', 'inserttext'],
+ ['foo<font size=3><sub>[bar</sub></font>baz]', 'delete', 'inserttext'],
+
+ // https://bugs.webkit.org/show_bug.cgi?id=19702
+ ['<blockquote><font color=blue>[foo]</font></blockquote>', 'delete', 'inserttext'],
+ ],
+ //@}
+};
+tests.backcolor = tests.hilitecolor;
+tests.insertlinebreak = tests.insertparagraph;
+
+// Tests that start with "!" are believed to have bogus results and should be
+// skipped until the relevant bugs are fixed.
+var badTests = {};
+(function(){
+ for (var command in tests) {
+ badTests[command] = [];
+ for (var i = 0; i < tests[command].length; i++) {
+ var test = tests[command][i];
+ if (typeof test == "string" && test[0] == "!") {
+ test = test.slice(1);
+ tests[command][i] = test;
+ badTests[command].push(test);
+ }
+ if (typeof test == "object" && test[0][0] == "!") {
+ test = [test[0].slice(1)].concat(test.slice(1));
+ tests[command][i] = test;
+ badTests[command].push(test);
+ }
+ }
+ }
+})();
+
+var defaultValues = {
+//@{
+ backcolor: "#00FFFF",
+ createlink: "http://www.google.com/",
+ fontname: "sans-serif",
+ fontsize: "4",
+ forecolor: "#0000FF",
+ formatblock: "<div>",
+ hilitecolor: "#00FFFF",
+ inserthorizontalrule: "",
+ inserthtml: "ab<b>c</b>d",
+ insertimage: "/img/lion.svg",
+ inserttext: "a",
+ defaultparagraphseparator: "div",
+ stylewithcss: "true",
+ usecss: "true",
+};
+//@}
+
+var notes = {
+//@{
+ fontname: 'Note that the body\'s font-family is "serif".',
+};
+//@}
+
+var doubleTestingCommands = [
+//@{
+ "backcolor",
+ "bold",
+ "fontname",
+ "fontsize",
+ "forecolor",
+ "italic",
+ "justifycenter",
+ "justifyfull",
+ "justifyleft",
+ "justifyright",
+ "strikethrough",
+ "stylewithcss",
+ "subscript",
+ "superscript",
+ "underline",
+ "usecss",
+];
+//@}
+
+function prettyPrint(value) {
+//@{
+ // Partly stolen from testharness.js
+ if (typeof value != "string") {
+ return String(value);
+ }
+
+ value = value.replace(/\\/g, "\\\\")
+ .replace(/"/g, '\\"');
+
+ for (var i = 0; i < 32; i++) {
+ var replace = "\\";
+ switch (i) {
+ case 0: replace += "0"; break;
+ case 1: replace += "x01"; break;
+ case 2: replace += "x02"; break;
+ case 3: replace += "x03"; break;
+ case 4: replace += "x04"; break;
+ case 5: replace += "x05"; break;
+ case 6: replace += "x06"; break;
+ case 7: replace += "x07"; break;
+ case 8: replace += "b"; break;
+ case 9: replace += "t"; break;
+ case 10: replace += "n"; break;
+ case 11: replace += "v"; break;
+ case 12: replace += "f"; break;
+ case 13: replace += "r"; break;
+ case 14: replace += "x0e"; break;
+ case 15: replace += "x0f"; break;
+ case 16: replace += "x10"; break;
+ case 17: replace += "x11"; break;
+ case 18: replace += "x12"; break;
+ case 19: replace += "x13"; break;
+ case 20: replace += "x14"; break;
+ case 21: replace += "x15"; break;
+ case 22: replace += "x16"; break;
+ case 23: replace += "x17"; break;
+ case 24: replace += "x18"; break;
+ case 25: replace += "x19"; break;
+ case 26: replace += "x1a"; break;
+ case 27: replace += "x1b"; break;
+ case 28: replace += "x1c"; break;
+ case 29: replace += "x1d"; break;
+ case 30: replace += "x1e"; break;
+ case 31: replace += "x1f"; break;
+ }
+ value = value.replace(new RegExp(String.fromCharCode(i), "g"), replace);
+ }
+ return '"' + value + '"';
+}
+//@}
+
+function doSetup(selector, idx) {
+//@{
+ var table = document.querySelectorAll(selector)[idx];
+
+ var tr = document.createElement("tr");
+ table.firstChild.appendChild(tr);
+ tr.className = (tr.className + " active").trim();
+
+ return tr;
+}
+//@}
+
+function queryOutputHelper(beforeIndeterm, beforeState, beforeValue,
+ afterIndeterm, afterState, afterValue,
+ command, value) {
+//@{
+ var frag = document.createDocumentFragment();
+ var beforeDiv = document.createElement("div");
+ var afterDiv = document.createElement("div");
+ frag.appendChild(beforeDiv);
+ frag.appendChild(afterDiv);
+ beforeDiv.className = afterDiv.className = "extra-results";
+ beforeDiv.textContent = "Before: ";
+ afterDiv.textContent = "After: ";
+
+ beforeDiv.appendChild(document.createElement("span"));
+ afterDiv.appendChild(document.createElement("span"));
+ if ("indeterm" in commands[command]) {
+ // We only know it has to be either true or false.
+ if (beforeIndeterm !== true && beforeIndeterm !== false) {
+ beforeDiv.lastChild.className = "bad-result";
+ }
+ } else {
+ // It always has to be false.
+ beforeDiv.lastChild.className = beforeIndeterm === false
+ ? "good-result"
+ : "bad-result";
+ }
+ // After running the command, indeterminate must always be false, except if
+ // it's an exception, or if it's insert*list and the state was true to
+ // begin with. And we can't help strikethrough/underline.
+ if ((/^insert(un)?orderedlist$/.test(command) && beforeState)
+ || command == "strikethrough"
+ || command == "underline") {
+ if (afterIndeterm !== true && afterIndeterm !== false) {
+ afterDiv.lastChild.className = "bad-result";
+ }
+ } else {
+ afterDiv.lastChild.className =
+ afterIndeterm === false
+ ? "good-result"
+ : "bad-result";
+ }
+ beforeDiv.lastChild.textContent = "indeterm " + prettyPrint(beforeIndeterm);
+ afterDiv.lastChild.textContent = "indeterm " + prettyPrint(afterIndeterm);
+
+ beforeDiv.appendChild(document.createTextNode(", "));
+ afterDiv.appendChild(document.createTextNode(", "));
+
+ beforeDiv.appendChild(document.createElement("span"));
+ afterDiv.appendChild(document.createElement("span"));
+ if (/^insert(un)?orderedlist$/.test(command)) {
+ // If the before state is true, the after state could be either true or
+ // false. But if the before state is false, the after state has to be
+ // true.
+ if (beforeState !== true && beforeState !== false) {
+ beforeDiv.lastChild.className = "bad-result";
+ }
+ if (!beforeState) {
+ afterDiv.lastChild.className = afterState === true
+ ? "good-result"
+ : "bad-result";
+ } else if (afterState !== true && afterState !== false) {
+ afterDiv.lastChild.className = "bad-result";
+ }
+ } else if (/^justify(center|full|left|right)$/.test(command)) {
+ // We don't know about the before state, but the after state is always
+ // supposed to be true.
+ if (beforeState !== true && beforeState !== false) {
+ beforeDiv.lastChild.className = "bad-result";
+ }
+ afterDiv.lastChild.className = afterState === true
+ ? "good-result"
+ : "bad-result";
+ } else if (command == "strikethrough" || command == "underline") {
+ // The only thing we can say is the before/after states need to be
+ // either true or false.
+ if (beforeState !== true && beforeState !== false) {
+ beforeDiv.lastChild.className = "bad-result";
+ }
+ if (afterState !== true && afterState !== false) {
+ afterDiv.lastChild.className = "bad-result";
+ }
+ } else {
+ // The general rule is it must flip the state, unless there's no state
+ // defined, in which case it should always be false.
+ beforeDiv.lastChild.className =
+ afterDiv.lastChild.className =
+ ("state" in commands[command] && typeof beforeState == "boolean" && typeof afterState == "boolean" && beforeState === !afterState)
+ || (!("state" in commands[command]) && beforeState === false && afterState === false)
+ ? "good-result"
+ : "bad-result";
+ }
+ beforeDiv.lastChild.textContent = "state " + prettyPrint(beforeState);
+ afterDiv.lastChild.textContent = "state " + prettyPrint(afterState);
+
+ beforeDiv.appendChild(document.createTextNode(", "));
+ afterDiv.appendChild(document.createTextNode(", "));
+
+ beforeDiv.appendChild(document.createElement("span"));
+ afterDiv.appendChild(document.createElement("span"));
+
+ // Direct equality comparison doesn't make sense in a bunch of cases.
+ if (command == "backcolor" || command == "forecolor" || command == "hilitecolor") {
+ if (/^([0-9a-fA-F]{3}){1,2}$/.test(value)) {
+ value = "#" + value;
+ }
+ } else if (command == "fontsize") {
+ value = normalizeFontSize(value);
+ if (value !== null) {
+ value = String(cssSizeToLegacy(value));
+ }
+ } else if (command == "formatblock") {
+ value = value.replace(/^<(.*)>$/, "$1").toLowerCase();
+ } else if (command == "defaultparagraphseparator") {
+ value = value.toLowerCase();
+ if (value != "p" && value != "div") {
+ value = "";
+ }
+ }
+
+ if (((command == "backcolor" || command == "forecolor" || command == "hilitecolor") && value.toLowerCase() == "currentcolor")
+ || (command == "fontsize" && value === null)
+ || (command == "formatblock" && formattableBlockNames.indexOf(value.replace(/^<(.*)>$/, "$1").trim()) == -1)
+ || (command == "defaultparagraphseparator" && value == "")) {
+ afterDiv.lastChild.className = beforeValue === afterValue
+ ? "good-result"
+ : "bad-result";
+ } else if (/^justify(center|full|left|right)$/.test(command)) {
+ // We know there are only four correct values beforehand, and afterward
+ // the value has to be the one we set.
+ if (!/^(center|justify|left|right)$/.test(beforeValue)) {
+ beforeDiv.lastChild.className = "bad-result";
+ }
+ var expectedValue = command == "justifyfull"
+ ? "justify"
+ : command.replace("justify", "");
+ afterDiv.lastChild.className = afterValue === expectedValue
+ ? "good-result"
+ : "bad-result";
+ } else if (!("value" in commands[command])) {
+ // If it's not defined we want "".
+ beforeDiv.lastChild.className = beforeValue === ""
+ ? "good-result"
+ : "bad-result";
+ afterDiv.lastChild.className = afterValue === ""
+ ? "good-result"
+ : "bad-result";
+ } else {
+ // And in all other cases, the value afterwards has to be the one we
+ // set.
+ afterDiv.lastChild.className =
+ areEquivalentValues(command, afterValue, value)
+ ? "good-result"
+ : "bad-result";
+ }
+ beforeDiv.lastChild.textContent = "value " + prettyPrint(beforeValue);
+ afterDiv.lastChild.textContent = "value " + prettyPrint(afterValue);
+
+ return frag;
+}
+//@}
+
+function normalizeTest(command, test, styleWithCss) {
+//@{
+ // Our standard format for test processing is:
+ // [input HTML, [command1, value1], [command2, value2], ...]
+ // But this is verbose, so we actually use three different formats in the
+ // tests and multiTests arrays:
+ //
+ // 1) Plain string giving the input HTML. The command is implicit from the
+ // key of the tests array. If the command takes values, the value is given
+ // by defaultValues, otherwise it's "". Has to be converted to
+ // [input HTML, [command, value].
+ //
+ // 2) Two-element array [value, input HTML]. Has to be converted to
+ // [input HTML, [command, value]].
+ //
+ // 3) An element of multiTests. This just has to have values filled in.
+ //
+ // Optionally, a styleWithCss argument can be passed, either true or false.
+ // If it is, we'll prepend a styleWithCss invocation.
+ if (command == "multitest") {
+ if (typeof test == "string") {
+ test = JSON.parse(test);
+ }
+ for (var i = 1; i < test.length; i++) {
+ if (typeof test[i] == "string"
+ && test[i] in defaultValues) {
+ test[i] = [test[i], defaultValues[test[i]]];
+ } else if (typeof test[i] == "string") {
+ test[i] = [test[i], ""];
+ }
+ }
+ return test;
+ }
+
+ if (typeof test == "string") {
+ if (command in defaultValues) {
+ test = [test, [command, defaultValues[command]]];
+ } else {
+ test = [test, [command, ""]];
+ }
+ } else if (test.length == 2) {
+ test = [test[1], [command, String(test[0])]];
+ }
+
+ if (styleWithCss !== undefined) {
+ test.splice(1, 0, ["stylewithcss", String(styleWithCss)]);
+ }
+
+ return test;
+}
+//@}
+
+function doInputCell(tr, test, command) {
+//@{
+ var testHtml = test[0];
+
+ var msg = null;
+ if (command in defaultValues) {
+ // Single command with a value, possibly with a styleWithCss stuck
+ // before. We don't need to specify the command itself, since this
+ // presumably isn't in multiTests, so the command is already given by
+ // the section header.
+ msg = 'value: ' + prettyPrint(test[test.length - 1][1]);
+ } else if (command == "multitest") {
+ // Uses a different input format
+ msg = JSON.stringify(test);
+ }
+ var inputCell = document.createElement("td");
+ inputCell.innerHTML = "<div></div><div></div>";
+ inputCell.firstChild.innerHTML = testHtml;
+ inputCell.lastChild.textContent = inputCell.firstChild.innerHTML;
+ if (msg !== null) {
+ inputCell.lastChild.textContent += " (" + msg + ")";
+ }
+
+ tr.appendChild(inputCell);
+}
+//@}
+
+function doSpecCell(tr, test, command) {
+//@{
+ var specCell = document.createElement("td");
+ tr.appendChild(specCell);
+ try {
+ var points = setupCell(specCell, test[0]);
+ var range = document.createRange();
+ range.setStart(points[0], points[1]);
+ range.setEnd(points[2], points[3]);
+ // The points might be backwards
+ if (range.collapsed) {
+ range.setEnd(points[0], points[1]);
+ }
+ specCell.firstChild.contentEditable = "true";
+ specCell.firstChild.spellcheck = false;
+
+ if (command != "multitest") {
+ try { var beforeIndeterm = myQueryCommandIndeterm(command, range) }
+ catch(e) { beforeIndeterm = "Exception" }
+ try { var beforeState = myQueryCommandState(command, range) }
+ catch(e) { beforeState = "Exception" }
+ try { var beforeValue = myQueryCommandValue(command, range) }
+ catch(e) { beforeValue = "Exception" }
+ }
+
+ for (var i = 1; i < test.length; i++) {
+ myExecCommand(test[i][0], false, test[i][1], range);
+ }
+
+ if (command != "multitest") {
+ try { var afterIndeterm = myQueryCommandIndeterm(command, range) }
+ catch(e) { afterIndeterm = "Exception" }
+ try { var afterState = myQueryCommandState(command, range) }
+ catch(e) { afterState = "Exception" }
+ try { var afterValue = myQueryCommandValue(command, range) }
+ catch(e) { afterValue = "Exception" }
+ }
+
+ specCell.firstChild.contentEditable = "inherit";
+ specCell.firstChild.removeAttribute("spellcheck");
+ var compareDiv1 = specCell.firstChild.cloneNode(true);
+
+ // Now do various sanity checks, and throw if they're violated. First
+ // just count children:
+ if (specCell.childNodes.length != 2) {
+ throw "The cell didn't have two children. Did something spill outside the test div?";
+ }
+
+ // Now verify that the DOM serializes.
+ compareDiv1.normalize();
+ var compareDiv2 = compareDiv1.cloneNode(false);
+ compareDiv2.innerHTML = compareDiv1.innerHTML;
+ // Oddly, IE9 sometimes produces two nodes that return true for
+ // isEqualNode but have different innerHTML (omitting closing tags vs.
+ // not).
+ if (!compareDiv1.isEqualNode(compareDiv2)
+ && compareDiv1.innerHTML != compareDiv2.innerHTML) {
+ throw "DOM does not round-trip through serialization! "
+ + compareDiv1.innerHTML + " vs. " + compareDiv2.innerHTML;
+ }
+ if (!compareDiv1.isEqualNode(compareDiv2)) {
+ throw "DOM does not round-trip through serialization (although innerHTML is the same)! "
+ + compareDiv1.innerHTML;
+ }
+
+ // Check for attributes
+ if (specCell.firstChild.attributes.length) {
+ throw "Wrapper div has attributes! " +
+ specCell.innerHTML.replace(/<div><\/div>$/, "");
+ }
+
+ // Final sanity check: make sure everything isAllowedChild() of its
+ // parent.
+ getDescendants(specCell.firstChild).forEach(function(descendant) {
+ if (!isAllowedChild(descendant, descendant.parentNode)) {
+ throw "Something here is not an allowed child of its parent: " + descendant;
+ }
+ });
+
+ addBrackets(range);
+
+ specCell.lastChild.textContent = specCell.firstChild.innerHTML;
+ if (command != "multitest") {
+ specCell.lastChild.appendChild(queryOutputHelper(
+ beforeIndeterm, beforeState, beforeValue,
+ afterIndeterm, afterState, afterValue,
+ command, test[test.length - 1][1]));
+ if (specCell.querySelector(".bad-result")) {
+ specCell.parentNode.className = "alert";
+ }
+ }
+ } catch (e) {
+ specCell.firstChild.contentEditable = "inherit";
+ specCell.firstChild.removeAttribute("spellcheck");
+ specCell.lastChild.textContent = "Exception: " + formatException(e);
+
+ specCell.parentNode.className = "alert";
+ specCell.lastChild.className = "alert";
+
+ // Don't bother comparing to localStorage, this is always wrong no
+ // matter what.
+ return;
+ }
+
+ if (command != "multitest") {
+ // Old storage format
+ var key = "execcommand-" + command
+ + "-" + (test.length == 2 || test[1][1] == "false" ? "0" : "1")
+ + "-" + tr.firstChild.lastChild.textContent;
+ } else {
+ var key = "execcommand-" + JSON.stringify(test);
+ }
+
+ // Use getItem() instead of direct property access to work around Firefox
+ // bug: https://bugzilla.mozilla.org/show_bug.cgi?id=532062
+ var oldValue = localStorage.getItem(key);
+ var newValue = specCell.lastChild.firstChild.textContent;
+
+ // Ignore differences between {} and [].
+ if (oldValue === null
+ || oldValue.replace("{}", "[]") !== newValue.replace("{}", "[]")) {
+ specCell.parentNode.className = "alert";
+ var alertDiv = document.createElement("div");
+ specCell.lastChild.appendChild(alertDiv);
+ alertDiv.className = "alert";
+ if (oldValue === null) {
+ alertDiv.textContent = "Newly added test result";
+ } else if (oldValue.replace(/[\[\]{}]/g, "") == newValue.replace(/[\[\]{}]/g, "")) {
+ alertDiv.textContent = "Last run produced a different selection: " + oldValue;
+ } else {
+ alertDiv.textContent = "Last run produced different markup: " + oldValue;
+ }
+
+ var button = document.createElement("button");
+ alertDiv.appendChild(button);
+ button.textContent = "Store new result";
+ button.className = "store-new-result";
+ button.onclick = (function(key, val, alertDiv) { return function() {
+ localStorage[key] = val;
+ // Make it easier to do mass updates, and also to jump to the next
+ // new result
+ var buttons = document.getElementsByClassName("store-new-result");
+ for (var i = 0; i < buttons.length; i++) {
+ if (isDescendant(buttons[i], alertDiv)
+ && i + 1 < buttons.length) {
+ buttons[i + 1].focus();
+ break;
+ }
+ }
+ var td = alertDiv;
+ while (td.tagName != "TD") {
+ td = td.parentNode;
+ }
+ alertDiv.parentNode.removeChild(alertDiv);
+ if (!td.querySelector(".alert")) {
+ td.parentNode.className = (" " + td.parentNode.className + " ")
+ .replace(/ alert /g, "")
+ .replace(/^ | $/g, "");
+ }
+ } })(key, newValue, alertDiv);
+ }
+}
+//@}
+
+function browserCellException(e, testDiv, browserCell) {
+//@{
+ if (testDiv) {
+ testDiv.contenteditable = "inherit";
+ testDiv.removeAttribute("spellcheck");
+ }
+ browserCell.lastChild.className = "alert";
+ browserCell.lastChild.textContent = "Exception: " + formatException(e);
+ if (testDiv && testDiv.parentNode != browserCell) {
+ browserCell.insertBefore(testDiv, browserCell.firstChild);
+ }
+}
+//@}
+
+function formatException(e) {
+//@{
+ if (typeof e == "object" && "stack" in e) {
+ return e + " (stack: " + e.stack + ")";
+ }
+ return String(e);
+}
+//@}
+
+function doSameCell(tr) {
+//@{
+ tr.className = (" " + tr.className + " ").replace(" active ", "").trim();
+ if (tr.className == "") {
+ tr.removeAttribute("class");
+ }
+
+ var sameCell = document.createElement("td");
+ if (!document.querySelector("#browser-checkbox").checked) {
+ sameCell.className = "maybe";
+ sameCell.textContent = "?";
+ } else {
+ var exception = false;
+ try {
+ // Ad hoc normalization to avoid basically spurious mismatches. For
+ // now this includes ignoring where the selection goes.
+ var normalizedSpecCell = tr.childNodes[1].lastChild.firstChild.textContent
+ .replace(/[[\]{}]/g, "")
+ .replace(/ style="margin: 0 0 0 40px; border: none; padding: 0px;"/g, '')
+ .replace(/ style="margin-right: 0px;" dir="ltr"/g, '')
+ .replace(/ style="margin-left: 0px;" dir="rtl"/g, '')
+ .replace(/ style="margin-(left|right): 40px;"/g, '')
+ .replace(/: /g, ":")
+ .replace(/;? ?"/g, '"')
+ .replace(/<(\/?)strong/g, '<$1b')
+ .replace(/<(\/?)strike/g, '<$1s')
+ .replace(/<(\/?)em/g, '<$1i')
+ .replace(/#[0-9a-fA-F]{6}/g, function(match) { return match.toUpperCase(); });
+ var normalizedBrowserCell = tr.childNodes[2].lastChild.firstChild.textContent
+ .replace(/[[\]{}]/g, "")
+ .replace(/ style="margin: 0 0 0 40px; border: none; padding: 0px;"/g, '')
+ .replace(/ style="margin-right: 0px;" dir="ltr"/g, '')
+ .replace(/ style="margin-left: 0px;" dir="rtl"/g, '')
+ .replace(/ style="margin-(left|right): 40px;"/g, '')
+ .replace(/: /g, ":")
+ .replace(/;? ?"/g, '"')
+ .replace(/<(\/?)strong/g, '<$1b')
+ .replace(/<(\/?)strike/g, '<$1s')
+ .replace(/<(\/?)em/g, '<$1i')
+ .replace(/#[0-9a-fA-F]{6}/g, function(match) { return match.toUpperCase(); })
+ .replace(/ size="2" width="100%"/g, '');
+ if (navigator.userAgent.indexOf("MSIE") != -1) {
+ // IE produces <font style> instead of <span style>, so let's
+ // translate all <span>s to <font>s.
+ normalizedSpecCell = normalizedSpecCell
+ .replace(/<(\/?)span/g, '<$1font');
+ normalizedBrowserCell = normalizedBrowserCell
+ .replace(/<(\/?)span/g, '<$1font');
+ }
+ } catch (e) {
+ exception = true;
+ }
+ if (!exception && normalizedSpecCell == normalizedBrowserCell) {
+ sameCell.className = "yes";
+ sameCell.textContent = "\u2713";
+ } else {
+ sameCell.className = "no";
+ sameCell.textContent = "\u2717";
+ }
+ }
+ tr.appendChild(sameCell);
+
+ for (var i = 0; i <= 2; i++) {
+ // Insert <wbr> so IE doesn't stretch the screen. This is considerably
+ // more complicated than it has to be, thanks to Firefox's lack of
+ // support for outerHTML.
+ var div = tr.childNodes[i].lastChild;
+ if (div.firstChild) {
+ var text = div.firstChild.textContent;
+ div.removeChild(div.firstChild);
+ div.insertBefore(document.createElement("div"), div.firstChild);
+ div.firstChild.innerHTML = text
+ .replace(/&/g, "&amp;")
+ .replace(/</g, "&lt;")
+ .replace(/>/g, "><wbr>")
+ .replace(/&lt;/g, "<wbr>&lt;");
+ while (div.firstChild.hasChildNodes()) {
+ div.insertBefore(div.firstChild.lastChild, div.firstChild.nextSibling);
+ }
+ div.removeChild(div.firstChild);
+ }
+
+ // Add position: absolute span to not affect vertical layout
+ getDescendants(tr.childNodes[i].firstChild)
+ .filter(function(node) {
+ return node.nodeType == Node.TEXT_NODE
+ && /^(\{\}?|\})$/.test(node.data);
+ }).forEach(function(node) {
+ var span = document.createElement("span");
+ span.style.position = "absolute";
+ span.textContent = node.data;
+ node.parentNode.insertBefore(span, node);
+ node.parentNode.removeChild(node);
+ });
+ }
+}
+//@}
+
+function doTearDown(command) {
+//@{
+ getSelection().removeAllRanges();
+}
+//@}
+
+function setupCell(cell, html) {
+//@{
+ cell.innerHTML = "<div></div><div></div>";
+
+ return setupDiv(cell.firstChild, html);
+}
+//@}
+
+function setupDiv(node, html) {
+//@{
+ // A variety of checks to avoid simple errors. Not foolproof, of course.
+ var re = /\{|\[|data-start/g;
+ var markers = [];
+ var marker;
+ while (marker = re.exec(html)) {
+ markers.push(marker);
+ }
+ if (markers.length != 1) {
+ throw "Need exactly one start marker ([ or { or data-start), found " + markers.length;
+ }
+
+ var re = /\}|\]|data-end/g;
+ var markers = [];
+ var marker;
+ while (marker = re.exec(html)) {
+ markers.push(marker);
+ }
+ if (markers.length != 1) {
+ throw "Need exactly one end marker (] or } or data-end), found " + markers.length;
+ }
+
+ node.innerHTML = html;
+
+ var startNode, startOffset, endNode, endOffset;
+
+ // For braces that don't lie inside text nodes, we can't just set
+ // innerHTML, because that might disturb the DOM. For instance, if the
+ // brace is right before a <tr>, it could get moved outside the table
+ // entirely, which messes everything up pretty badly. So we instead
+ // allow using data attributes: data-start and data-end on the start and
+ // end nodes, with a numeric value indicating the offset. This format
+ // doesn't allow the parent div to be a start or end node, but in that case
+ // you can always use the curly braces.
+ if (node.querySelector("[data-start]")) {
+ startNode = node.querySelector("[data-start]");
+ startOffset = startNode.getAttribute("data-start");
+ startNode.removeAttribute("data-start");
+ }
+ if (node.querySelector("[data-end]")) {
+ endNode = node.querySelector("[data-end]");
+ endOffset = endNode.getAttribute("data-end");
+ endNode.removeAttribute("data-end");
+ }
+
+ var cur = node;
+ while (true) {
+ if (!cur || (cur != node && !(cur.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINS))) {
+ break;
+ }
+
+ if (cur.nodeType != Node.TEXT_NODE) {
+ cur = nextNode(cur);
+ continue;
+ }
+
+ var data = cur.data.replace(/\]/g, "");
+ var startIdx = data.indexOf("[");
+
+ data = cur.data.replace(/\[/g, "");
+ var endIdx = data.indexOf("]");
+
+ cur.data = cur.data.replace(/[\[\]]/g, "");
+
+ if (startIdx != -1) {
+ startNode = cur;
+ startOffset = startIdx;
+ }
+
+ if (endIdx != -1) {
+ endNode = cur;
+ endOffset = endIdx;
+ }
+
+ // These are only legal as the first or last
+ data = cur.data.replace(/\}/g, "");
+ var elStartIdx = data.indexOf("{");
+
+ data = cur.data.replace(/\{/g, "");
+ var elEndIdx = data.indexOf("}");
+
+ if (elStartIdx == 0) {
+ startNode = cur.parentNode;
+ startOffset = getNodeIndex(cur);
+ } else if (elStartIdx != -1) {
+ startNode = cur.parentNode;
+ startOffset = getNodeIndex(cur) + 1;
+ }
+ if (elEndIdx == 0) {
+ endNode = cur.parentNode;
+ endOffset = getNodeIndex(cur);
+ } else if (elEndIdx != -1) {
+ endNode = cur.parentNode;
+ endOffset = getNodeIndex(cur) + 1;
+ }
+
+ cur.data = cur.data.replace(/[{}]/g, "");
+ if (!cur.data.length) {
+ if (cur == startNode || cur == endNode) {
+ throw "You put a square bracket where there was no text node . . .";
+ }
+ var oldCur = cur;
+ cur = nextNode(cur);
+ oldCur.parentNode.removeChild(oldCur);
+ } else {
+ cur = nextNode(cur);
+ }
+ }
+
+ return [startNode, startOffset, endNode, endOffset];
+}
+//@}
+
+function setSelection(startNode, startOffset, endNode, endOffset) {
+//@{
+ if (navigator.userAgent.indexOf("Opera") != -1) {
+ // Yes, browser sniffing is evil, but I can't be bothered to debug
+ // Opera.
+ var range = document.createRange();
+ range.setStart(startNode, startOffset);
+ range.setEnd(endNode, endOffset);
+ if (range.collapsed) {
+ range.setEnd(startNode, startOffset);
+ }
+ getSelection().removeAllRanges();
+ getSelection().addRange(range);
+ } else if ("extend" in getSelection()) {
+ // WebKit behaves unreasonably for collapse(), so do that manually.
+ /*
+ var range = document.createRange();
+ range.setStart(startNode, startOffset);
+ getSelection().removeAllRanges();
+ getSelection().addRange(range);
+ */
+ getSelection().collapse(startNode, startOffset);
+ getSelection().extend(endNode, endOffset);
+ } else {
+ // IE9. Selections have no direction, so we just make the selection
+ // always forwards.
+ var range;
+ if (getSelection().rangeCount) {
+ range = getSelection().getRangeAt(0);
+ } else {
+ range = document.createRange();
+ }
+ range.setStart(startNode, startOffset);
+ range.setEnd(endNode, endOffset);
+ if (range.collapsed) {
+ // Phooey, we got them backwards.
+ range.setEnd(startNode, startOffset);
+ }
+ if (!getSelection().rangeCount) {
+ getSelection().addRange(range);
+ }
+ }
+}
+//@}
+
+/**
+ * Add brackets at the start and end points of the given range, so that they're
+ * visible.
+ */
+function addBrackets(range) {
+//@{
+ // Handle the collapsed case specially, to avoid confusingly getting the
+ // markers backwards in some cases
+ if (range.startContainer.nodeType == Node.TEXT_NODE
+ || range.startContainer.nodeType == Node.COMMENT_NODE) {
+ if (range.collapsed) {
+ range.startContainer.insertData(range.startOffset, "[]");
+ } else {
+ range.startContainer.insertData(range.startOffset, "[");
+ }
+ } else {
+ var marker = range.collapsed ? "{}" : "{";
+ if (range.startOffset != range.startContainer.childNodes.length
+ && range.startContainer.childNodes[range.startOffset].nodeType == Node.TEXT_NODE) {
+ range.startContainer.childNodes[range.startOffset].insertData(0, marker);
+ } else if (range.startOffset != 0
+ && range.startContainer.childNodes[range.startOffset - 1].nodeType == Node.TEXT_NODE) {
+ range.startContainer.childNodes[range.startOffset - 1].appendData(marker);
+ } else {
+ // Seems to serialize as I'd want even for tables . . . IE doesn't
+ // allow undefined to be passed as the second argument (it throws
+ // an exception), so we have to explicitly check the number of
+ // children and pass null.
+ range.startContainer.insertBefore(document.createTextNode(marker),
+ range.startContainer.childNodes.length == range.startOffset
+ ? null
+ : range.startContainer.childNodes[range.startOffset]);
+ }
+ }
+ if (range.collapsed) {
+ return;
+ }
+ if (range.endContainer.nodeType == Node.TEXT_NODE
+ || range.endContainer.nodeType == Node.COMMENT_NODE) {
+ range.endContainer.insertData(range.endOffset, "]");
+ } else {
+ if (range.endOffset != range.endContainer.childNodes.length
+ && range.endContainer.childNodes[range.endOffset].nodeType == Node.TEXT_NODE) {
+ range.endContainer.childNodes[range.endOffset].insertData(0, "}");
+ } else if (range.endOffset != 0
+ && range.endContainer.childNodes[range.endOffset - 1].nodeType == Node.TEXT_NODE) {
+ range.endContainer.childNodes[range.endOffset - 1].appendData("}");
+ } else {
+ range.endContainer.insertBefore(document.createTextNode("}"),
+ range.endContainer.childNodes.length == range.endOffset
+ ? null
+ : range.endContainer.childNodes[range.endOffset]);
+ }
+ }
+}
+//@}
+
+function normalizeSerializedStyle(wrapper) {
+//@{
+ // Inline CSS attribute serialization has terrible interop, so we fix
+ // things up a bit to avoid spurious mismatches. This needs to be removed
+ // once CSSOM defines this stuff properly, but for now there's just no
+ // standard for any of it. This only normalizes descendants of wrapper,
+ // not wrapper itself.
+ [].forEach.call(wrapper.querySelectorAll("[style]"), function(node) {
+ if (node.style.color != "") {
+ var newColor = normalizeColor(node.style.color);
+ node.style.color = "";
+ node.style.color = newColor;
+ }
+ if (node.style.backgroundColor != "") {
+ var newBackgroundColor = normalizeColor(node.style.backgroundColor);
+ node.style.backgroundColor = "";
+ node.style.backgroundColor = newBackgroundColor;
+ }
+ node.setAttribute("style", node.getAttribute("style")
+ // Random spacing differences
+ .replace(/; ?$/, "")
+ .replace(/: /g, ":")
+ // Gecko likes "transparent"
+ .replace(/transparent/g, "rgba(0, 0, 0, 0)")
+ // WebKit likes to look overly precise
+ .replace(/, 0.496094\)/g, ", 0.5)")
+ // Gecko converts anything with full alpha to "transparent" which
+ // then becomes "rgba(0, 0, 0, 0)", so we have to make other
+ // browsers match
+ .replace(/rgba\([0-9]+, [0-9]+, [0-9]+, 0\)/g, "rgba(0, 0, 0, 0)")
+ );
+ });
+}
+//@}
+
+/**
+ * Input is the same format as output of generateTest in gentest.html.
+ */
+function runConformanceTest(browserTest) {
+//@{
+ document.getElementById("test-container").innerHTML = "<div contenteditable></div><p>test";
+ var testName = JSON.stringify(browserTest[1]) + " " + format_value(browserTest[0]);
+ var testDiv = document.querySelector("div[contenteditable]");
+ var originalRootElement, newRootElement;
+ var exception = null;
+ var expectedExecCommandReturnValues = browserTest[3];
+ var expectedQueryResults = browserTest[4];
+ var actualQueryResults = {};
+ var actualQueryExceptions = {};
+
+ try {
+ var points = setupDiv(testDiv, browserTest[0]);
+
+ var range = document.createRange();
+ range.setStart(points[0], points[1]);
+ range.setEnd(points[2], points[3]);
+ // The points might be backwards
+ if (range.collapsed) {
+ range.setEnd(points[0], points[1]);
+ }
+ getSelection().removeAllRanges();
+ getSelection().addRange(range);
+
+ var originalRootElement = document.documentElement.cloneNode(true);
+ originalRootElement.querySelector("[contenteditable]").parentNode
+ .removeChild(originalRootElement.querySelector("[contenteditable]"));
+ originalRootElement.querySelector("#log").parentNode
+ .removeChild(originalRootElement.querySelector("#log"));
+
+ for (var command in expectedQueryResults) {
+ var results = [];
+ var exceptions = {};
+ try { results[0] = document.queryCommandIndeterm(command) }
+ catch(e) { exceptions[0] = e }
+ try { results[1] = document.queryCommandState(command) }
+ catch(e) { exceptions[1] = e }
+ try { results[2] = document.queryCommandValue(command) }
+ catch(e) { exceptions[2] = e }
+ actualQueryResults[command] = results;
+ actualQueryExceptions[command] = exceptions;
+ }
+ } catch(e) {
+ exception = e;
+ }
+
+ for (var i = 0; i < browserTest[1].length; i++) {
+ test(function() {
+ assert_equals(exception, null, "Setup must not throw an exception");
+
+ assert_equals(document.execCommand(browserTest[1][i][0], false, browserTest[1][i][1]),
+ expectedExecCommandReturnValues[i]);
+ }, testName + ": execCommand(" + format_value(browserTest[1][i][0]) + ", false, " + format_value(browserTest[1][i][1]) + ") return value");
+ }
+
+ if (exception === null) {
+ try {
+ for (var command in expectedQueryResults) {
+ var results = actualQueryResults[command];
+ var exceptions = actualQueryExceptions[command];
+ try { results[3] = document.queryCommandIndeterm(command) }
+ catch(e) { exceptions[3] = e }
+ try { results[4] = document.queryCommandState(command) }
+ catch(e) { exceptions[4] = e }
+ try { results[5] = document.queryCommandValue(command) }
+ catch(e) { exceptions[5] = e }
+ }
+
+ var newRootElement = document.documentElement.cloneNode(true);
+ newRootElement.querySelector("[contenteditable]").parentNode
+ .removeChild(newRootElement.querySelector("[contenteditable]"));
+ newRootElement.querySelector("#log").parentNode
+ .removeChild(newRootElement.querySelector("#log"));
+
+ normalizeSerializedStyle(testDiv);
+ } catch(e) {
+ exception = e;
+ }
+ }
+
+ test(function() {
+ assert_equals(exception, null, "Setup must not throw an exception");
+
+ // Now test for modifications to non-editable content. First just
+ // count children:
+ assert_equals(testDiv.parentNode.childNodes.length, 2,
+ "The parent div must have two children. Did something spill outside the test div?");
+
+ // Check for attributes
+ assert_equals(testDiv.attributes.length, 1,
+ 'Wrapper div must have only one attribute (<div contenteditable="">), but has more (' +
+ formatStartTag(testDiv) + ")");
+
+ assert_equals(document.body.attributes.length, 0,
+ "Body element must have no attributes (<body>), but has more (" +
+ formatStartTag(document.body) + ")");
+
+ // Check that in general, nothing outside the test div was modified.
+ // TODO: Less verbose error reporting, the way some of the range tests
+ // do?
+ assert_equals(newRootElement.innerHTML, originalRootElement.innerHTML,
+ "Everything outside the editable div must be unchanged, but some change did occur");
+ }, testName + " checks for modifications to non-editable content");
+
+ test(function() {
+ assert_equals(exception, null, "Setup must not throw an exception");
+
+ assert_equals(testDiv.innerHTML,
+ browserTest[2].replace(/[\[\]{}]/g, ""),
+ "Unexpected innerHTML (after normalizing inline style)");
+ }, testName + " compare innerHTML");
+
+ for (var command in expectedQueryResults) {
+ var descriptions = [
+ 'queryCommandIndeterm("' + command + '") before',
+ 'queryCommandState("' + command + '") before',
+ 'queryCommandValue("' + command + '") before',
+ 'queryCommandIndeterm("' + command + '") after',
+ 'queryCommandState("' + command + '") after',
+ 'queryCommandValue("' + command + '") after',
+ ];
+ for (var i = 0; i < 6; i++) {
+ test(function() {
+ assert_equals(exception, null, "Setup must not throw an exception");
+
+ if (expectedQueryResults[command][i] === null) {
+ // Some ad hoc tests to verify that we have a real
+ // DOMException. FIXME: This should be made more rigorous,
+ // with clear steps specified for checking that something
+ // is really a DOMException.
+ assert_true(i in actualQueryExceptions[command],
+ "An exception must be thrown in this case");
+ var e = actualQueryExceptions[command][i];
+ assert_equals(typeof e, "object",
+ "typeof thrown object");
+ assert_idl_attribute(e, "code",
+ "Thrown object must be a DOMException");
+ assert_idl_attribute(e, "INVALID_ACCESS_ERR",
+ "Thrown object must be a DOMException");
+ assert_equals(e.code, e.INVALID_ACCESS_ERR,
+ "Thrown object must be an INVALID_ACCESS_ERR, so its .code and .INVALID_ACCESS_ERR attributes must be equal");
+ } else if ((i == 2 || i == 5)
+ && (command == "backcolor" || command == "forecolor" || command == "hilitecolor")
+ && typeof actualQueryResults[command][i] == "string") {
+ assert_false(i in actualQueryExceptions[command],
+ "An exception must not be thrown in this case");
+ // We don't return the format that the color should be in:
+ // that's up to CSSOM. Thus we normalize before comparing.
+ assert_equals(normalizeColor(actualQueryResults[command][i]),
+ expectedQueryResults[command][i],
+ "Wrong result returned (after color normalization)");
+ } else {
+ assert_false(i in actualQueryExceptions[command],
+ "An exception must not be thrown in this case");
+ assert_equals(actualQueryResults[command][i],
+ expectedQueryResults[command][i],
+ "Wrong result returned");
+ }
+ }, testName + " " + descriptions[i]);
+ }
+ }
+
+ // Silly Firefox
+ document.body.removeAttribute("bgcolor");
+}
+//@}
+
+/**
+ * Return a string like '<body bgcolor="#FFFFFF">'.
+ */
+function formatStartTag(el) {
+//@{
+ var ret = "<" + el.tagName.toLowerCase();
+ for (var i = 0; i < el.attributes.length; i++) {
+ ret += " " + el.attributes[i].name + '="';
+ ret += el.attributes[i].value.replace(/\&/g, "&amp;")
+ .replace(/"/g, "&quot;");
+ ret += '"';
+ }
+ return ret + ">";
+}
+//@}
+
+// vim: foldmarker=@{,@} foldmethod=marker
diff --git a/testing/web-platform/tests/editing/manual/delete.manual.html b/testing/web-platform/tests/editing/manual/delete.manual.html
new file mode 100644
index 000000000..be8c773b1
--- /dev/null
+++ b/testing/web-platform/tests/editing/manual/delete.manual.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Manual delete (backspace) tests</title>
+<link rel=stylesheet href=../include/tests.css>
+
+<p><input type=button value="Clear cached results" onclick="clearCachedResults()">
+
+<div id=tests>
+ <input type=button value="Run tests" onclick="runTests()">
+ <table border=1><tr><th>Input<th>Spec<th>Browser<th>Same</table>
+ <p><label>New test input: <input></label> <input type=button value="Add test" onclick="addTest()">
+</div>
+
+<div id=overlay>Tap backspace repeatedly until this annoying message
+disappears! (But not too quickly. And don't hit any other keys or click with
+the mouse anywhere, it will mess it up.<span id=testcount> <span></span>
+manual test(s) remain.</span>)</div>
+
+<script src=../include/implementation.js></script>
+<script src=../include/tests.js></script>
+<script>
+var command = "delete";
+</script>
+<script src=../include/manualtest.js></script>
diff --git a/testing/web-platform/tests/editing/manual/forwarddelete.manual.html b/testing/web-platform/tests/editing/manual/forwarddelete.manual.html
new file mode 100644
index 000000000..9c42b88f7
--- /dev/null
+++ b/testing/web-platform/tests/editing/manual/forwarddelete.manual.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Manual forwardDelete (delete key) tests</title>
+<link rel=stylesheet href=../include/tests.css>
+
+<p><input type=button value="Clear cached results" onclick="clearCachedResults()">
+
+<div id=tests>
+ <input type=button value="Run tests" onclick="runTests()">
+ <table border=1><tr><th>Input<th>Spec<th>Browser<th>Same</table>
+ <p><label>New test input: <input></label> <input type=button value="Add test" onclick="addTest()">
+</div>
+
+<div id=overlay>Tap delete repeatedly until this annoying message
+disappears! (But not too quickly. And don't hit any other keys or click with
+the mouse anywhere, it will mess it up.<span id=testcount> <span></span>
+manual test(s) remain.</span>)</div>
+
+<script src=../include/implementation.js></script>
+<script src=../include/tests.js></script>
+<script>
+var command = "forwarddelete";
+</script>
+<script src=../include/manualtest.js></script>
diff --git a/testing/web-platform/tests/editing/manual/insertlinebreak.manual.html b/testing/web-platform/tests/editing/manual/insertlinebreak.manual.html
new file mode 100644
index 000000000..631fc0431
--- /dev/null
+++ b/testing/web-platform/tests/editing/manual/insertlinebreak.manual.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Manual insertLineBreak (Shift-Enter) tests</title>
+<link rel=stylesheet href=../include/tests.css>
+
+<p><input type=button value="Clear cached results" onclick="clearCachedResults()">
+
+<div id=tests>
+ <input type=button value="Run tests" onclick="runTests()">
+ <table border=1><tr><th>Input<th>Spec<th>Browser<th>Same</table>
+ <p><label>New test input: <input></label> <input type=button value="Add test" onclick="addTest()">
+</div>
+
+<div id=overlay>Tap Shift-Enter (or Mac equivalent) repeatedly until this
+annoying message disappears! (But not too quickly. And don't hit any other
+keys or click with the mouse anywhere, it will mess it up.<span id=testcount>
+<span></span> manual test(s) remain.</span>)</div>
+
+<script src=../include/implementation.js></script>
+<script src=../include/tests.js></script>
+<script>
+var command = "insertlinebreak";
+</script>
+<script src=../include/manualtest.js></script>
diff --git a/testing/web-platform/tests/editing/manual/insertparagraph.manual.html b/testing/web-platform/tests/editing/manual/insertparagraph.manual.html
new file mode 100644
index 000000000..468a096f0
--- /dev/null
+++ b/testing/web-platform/tests/editing/manual/insertparagraph.manual.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Manual insertParagraph (enter key) tests</title>
+<link rel=stylesheet href=../include/tests.css>
+
+<p><input type=button value="Clear cached results" onclick="clearCachedResults()">
+
+<div id=tests>
+ <input type=button value="Run tests" onclick="runTests()">
+ <table border=1><tr><th>Input<th>Spec<th>Browser<th>Same</table>
+ <p><label>New test input: <input></label> <input type=button value="Add test" onclick="addTest()">
+</div>
+
+<div id=overlay>Tap enter repeatedly until this annoying message
+disappears! (But not too quickly. And don't hit any other keys or click with
+the mouse anywhere, it will mess it up.<span id=testcount> <span></span>
+manual test(s) remain.</span>)</div>
+
+<script src=../include/implementation.js></script>
+<script src=../include/tests.js></script>
+<script>
+var command = "insertparagraph";
+</script>
+<script src=../include/manualtest.js></script>
diff --git a/testing/web-platform/tests/editing/manual/inserttext.manual.html b/testing/web-platform/tests/editing/manual/inserttext.manual.html
new file mode 100644
index 000000000..c796c0574
--- /dev/null
+++ b/testing/web-platform/tests/editing/manual/inserttext.manual.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Manual insertText tests (A key)</title>
+<link rel=stylesheet href=../include/tests.css>
+
+<p><input type=button value="Clear cached results" onclick="clearCachedResults()">
+
+<div id=tests>
+ <input type=button value="Run tests" onclick="runTests()">
+ <table border=1><tr><th>Input<th>Spec<th>Browser<th>Same</table>
+ <p><label>New test input: <input></label> <input type=button value="Add test" onclick="addTest()">
+</div>
+
+<div id=overlay>Tap the A key repeatedly until this annoying message
+disappears! (But not too quickly. And don't hit any other keys or click with
+the mouse anywhere, it will mess it up.<span id=testcount> <span></span>
+manual test(s) remain.</span>)</div>
+
+<script src=../include/implementation.js></script>
+<script src=../include/tests.js></script>
+<script>
+var command = "inserttext";
+</script>
+<script src=../include/manualtest.js></script>
diff --git a/testing/web-platform/tests/editing/manual/inserttext2.manual.html b/testing/web-platform/tests/editing/manual/inserttext2.manual.html
new file mode 100644
index 000000000..43c3d4b2d
--- /dev/null
+++ b/testing/web-platform/tests/editing/manual/inserttext2.manual.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Manual insertText tests (space key)</title>
+<link rel=stylesheet href=../include/tests.css>
+
+<p><input type=button value="Clear cached results" onclick="clearCachedResults()">
+
+<div id=tests>
+ <input type=button value="Run tests" onclick="runTests()">
+ <table border=1><tr><th>Input<th>Spec<th>Browser<th>Same</table>
+ <p><label>New test input: <input></label> <input type=button value="Add test" onclick="addTest()">
+</div>
+
+<div id=overlay>Tap the space key repeatedly until this annoying message
+disappears! (But not too quickly. And don't hit any other keys or click with
+the mouse anywhere, it will mess it up.<span id=testcount> <span></span>
+manual test(s) remain.</span>)</div>
+
+<script src=../include/implementation.js></script>
+<script src=../include/tests.js></script>
+<script>
+var command = "inserttext";
+var globalValue = " ";
+</script>
+<script src=../include/manualtest.js></script>
diff --git a/testing/web-platform/tests/editing/other/delete.html b/testing/web-platform/tests/editing/other/delete.html
new file mode 100644
index 000000000..b9bd1437e
--- /dev/null
+++ b/testing/web-platform/tests/editing/other/delete.html
@@ -0,0 +1,149 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Deletion tests</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<div contenteditable></div>
+<script>
+var div = document.querySelector("div");
+
+// Format: [start html, start pos, expected html, expected pos, command]
+// Positions are a sequence of offsets starting from div, e.g., "1,2,0"
+// translates to node = div.childNodes[1].childNodes[2], offset = 0. For a
+// non-collapsed selection, use a hyphen, like "0,0-1,0". The selections are
+// created with collapse() followed by extend() to allow reverse selections, so
+// order is significant.
+//
+// Expected values can be arrays, in which case any is acceptable.
+var tests = [
+ ["<p><br></p><p><br></p>", "1,0", "<p><br></p>", "0,0", "delete"],
+ ["<p><br></p><p><br></p>", "0,0", "<p><br></p>", "0,0", "forwarddelete"],
+
+ // Range
+ ["<p><br></p><p><br></p>", "0,0-1,0", "<p><br></p>", "0,0", "delete"],
+ ["<p><br></p><p><br></p>", "0,0-1,0", "<p><br></p>", "0,0", "forwarddelete"],
+ ["<p><br></p><p><br></p>", "1,0-0,0", "<p><br></p>", "0,0", "delete"],
+ ["<p><br></p><p><br></p>", "1,0-0,0", "<p><br></p>", "0,0", "forwarddelete"],
+
+ // Different start values
+ ["<p>x<br></p><p><br></p>", "1,0",
+ // WebKit/Blink like to get rid of the extra <br>
+ ["<p>x<br></p>", "<p>x</p>"],
+ // The selection should really be collapsed inside the text node, but in the
+ // parent is close enough.
+ ["0,0,1", "0,1"], "delete"],
+ ["<p><br><br></p><p><br></p>", "1,0", "<p><br><br></p>", "0,1", "delete"],
+ ["<p><br></p><p><br><br></p>", "1,1",
+ "<p><br></p><p><br></p>", "1,0", "delete"],
+ ["<p><br><br><br></p>", "0,2", "<p><br><br></p>", "0,1", "delete"],
+ ["<p><br></p><p><br><br><br></p>", "1,2",
+ "<p><br></p><p><br><br></p>", "1,1", "delete"],
+ ["<p><br><br></p><p><br><br></p>", "1,1",
+ "<p><br><br></p><p><br></p>", "1,0", "delete"],
+ ["<p><br></p><br>", "1", "<p><br></p>", "0,0", "delete"],
+
+ // The trailing \n in these cases is actually significant, because it was
+ // necessary to trigger an actual Gecko bug (somehow!).
+ ["<p><br></p><p><br></p>\n", "1,0", "<p><br></p>\n", "0,0", "delete"],
+ ["<p><br></p><p><br></p>\n", "0,0", "<p><br></p>\n", "0,0", "forwarddelete"],
+ ["\n<p><tt>x</tt></p><p><tt><br></tt></p><p><tt><br></tt></p>\n", "3,0,0",
+ "\n<p><tt>x</tt></p><p><tt><br></tt></p>\n", "2,0,0", "delete"],
+];
+
+div.focus();
+
+for (var i = 0; i < tests.length; i++) {
+ test(function() {
+ var test = tests[i];
+ div.innerHTML = test[0];
+ setSelection(test[1]);
+
+ document.execCommand(test[4], false, "");
+
+ if (typeof test[2] == "string") {
+ assert_equals(div.innerHTML, test[2], "innerHTML");
+ } else {
+ assert_in_array(div.innerHTML, test[2], "innerHTML");
+ }
+
+ var actualSel = recordSelection();
+ var expectedSel = [];
+ if (typeof test[3] == "string") {
+ test[3] = [test[3]];
+ }
+ for (var j = 0; j < test[3].length; j++) {
+ setSelection(test[3][j]);
+ expectedSel.push(recordSelection());
+ }
+ assertSelectionEquals(actualSel, expectedSel, test[2]);
+ }, i + ": " + format_value(tests[i][0]) + " " + tests[i][1] +
+ " " + tests[i][4]);
+}
+
+function setSelection(selstr) {
+ var parts = selstr.split("-");
+ var collapsePoint = getPointFromArray(parts[0].split(","));
+ getSelection().collapse(collapsePoint[0], collapsePoint[1]);
+
+ if (parts[1]) {
+ var extendPoint = getPointFromArray(parts[1].split(","));
+ getSelection().extend(extendPoint[0], extendPoint[1]);
+ }
+}
+
+function getPointFromArray(offsets) {
+ var retNode = div, retOffset;
+ var offset;
+ while (offset = offsets.shift()) {
+ if (!offsets.length) {
+ retOffset = offset;
+ } else {
+ retNode = retNode.childNodes[offset];
+ }
+ }
+ return [retNode, retOffset];
+}
+
+function recordSelection() {
+ return [getSelection().anchorNode, getSelection().anchorOffset,
+ getSelection().focusNode, getSelection().focusOffset];
+}
+
+function assertSelectionEquals(actual, expected, html) {
+ if (typeof expected == "string") {
+ expected = [expected];
+ }
+ var pass = false;
+ for (var i = 0; i < expected.length; i++) {
+ if (expected[i][0] === actual[0] &&
+ expected[i][1] === actual[1] &&
+ expected[i][2] === actual[2] &&
+ expected[i][3] === actual[3]) {
+ pass = true;
+ break;
+ }
+ }
+
+ assert_true(pass, "Wrong selection, expected " + formatSel(expected) +
+ ", got " + formatSel(actual) +
+ " (in HTML " + format_value(html) + ")");
+}
+
+function formatSel(arr) {
+ if (arr.length == 1) {
+ arr = arr[0];
+ }
+ if (Array.isArray(arr[0])) {
+ var ret = [];
+ for (var i = 0; i < arr.length; i++) {
+ ret.push(formatSel(arr[i]));
+ }
+ return ret.join(" or ");
+ }
+ if (arr[0] == arr[2] && arr[1] == arr[3]) {
+ return "collapsed (" + format_value(arr[0]) + ", " + arr[1] + ")";
+ }
+ return "(" + format_value(arr[0]) + ", " + arr[1] +
+ ")-(" + format_value(arr[2]) + ", " + arr[3] + ")";
+}
+</script>
diff --git a/testing/web-platform/tests/editing/other/restoration.html b/testing/web-platform/tests/editing/other/restoration.html
new file mode 100644
index 000000000..4c53008b4
--- /dev/null
+++ b/testing/web-platform/tests/editing/other/restoration.html
@@ -0,0 +1,90 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>Restoration of style tests</title>
+<!--
+No spec, based on: https://bugzilla.mozilla.org/show_bug.cgi?id=1250805
+If the user presses Ctrl+B and then hits Enter and then types text, the text
+should still be bold. Hitting Enter shouldn't make it forget. And so too for
+other commands.
+-->
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<div contenteditable></div>
+<script>
+var div = document.querySelector("div");
+
+function doTestInner(cmd, param, startBold) {
+ div.innerHTML = startBold ? "<b>foo</b>bar" : "foobar";
+ getSelection().collapse(startBold ? div.firstChild.firstChild
+ : div.firstChild, 3);
+
+ // Set/unset bold, then run command and see if it's still there
+ assert_true(document.execCommand("bold", false, ""),
+ "execCommand needs to return true for bold");
+
+ assert_true(document.execCommand(cmd, false, param),
+ "execCommand needs to return true for " + cmd + " " + param);
+
+ assert_equals(document.queryCommandState("bold"), !startBold,
+ "bold state");
+
+ assert_true(document.execCommand("inserttext", false, "x"),
+ "execCommand needs to return true for inserttext x");
+
+ // Find the new text node and check that it's actually bold (or not)
+ var node = div;
+ while (node) {
+ if (node.nodeType == Node.TEXT_NODE && node.nodeValue.indexOf("x") != -1) {
+ assert_in_array(getComputedStyle(node.parentNode).fontWeight,
+ !startBold ? ["700", "bold"] : ["400", "normal"],
+ "font-weight");
+ return;
+ }
+ if (node.firstChild) {
+ node = node.firstChild;
+ continue;
+ }
+ while (node != div && !node.nextSibling) {
+ node = node.parentNode;
+ }
+ if (node == div) {
+ assert_unreached("x not found!");
+ break;
+ }
+ node = node.nextSibling;
+ }
+}
+
+function doTest(cmd, param) {
+ if (param === undefined) {
+ param = "";
+ }
+
+ test(function() {
+ doTestInner(cmd, param, true);
+ }, cmd + " " + param + " starting bold");
+
+ test(function() {
+ doTestInner(cmd, param, false);
+ }, cmd + " " + param + " starting not bold");
+}
+
+doTest("insertparagraph");
+doTest("insertlinebreak");
+doTest("delete");
+doTest("forwarddelete");
+doTest("insertorderedlist");
+doTest("insertunorderedlist");
+doTest("indent");
+// Outdent does nothing here, but should be harmless.
+doTest("outdent");
+doTest("justifyleft");
+doTest("justifyright");
+doTest("justifycenter");
+doTest("justifyfull");
+doTest("formatblock", "div");
+doTest("formatblock", "blockquote");
+doTest("inserthorizontalrule");
+doTest("insertimage", "a");
+doTest("inserttext", "bar");
+</script>
diff --git a/testing/web-platform/tests/editing/run/backcolor.html b/testing/web-platform/tests/editing/run/backcolor.html
new file mode 100644
index 000000000..94ca94a77
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/backcolor.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>backcolor - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/backcolor.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (false) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/bold.html b/testing/web-platform/tests/editing/run/bold.html
new file mode 100644
index 000000000..583428bb0
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/bold.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>bold - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/bold.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/createlink.html b/testing/web-platform/tests/editing/run/createlink.html
new file mode 100644
index 000000000..a21751697
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/createlink.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>createlink - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/createlink.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/delete.html b/testing/web-platform/tests/editing/run/delete.html
new file mode 100644
index 000000000..a8c24d283
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/delete.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>delete - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/delete.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/fontname.html b/testing/web-platform/tests/editing/run/fontname.html
new file mode 100644
index 000000000..3e9b8ad34
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/fontname.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>fontname - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/fontname.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/fontsize.html b/testing/web-platform/tests/editing/run/fontsize.html
new file mode 100644
index 000000000..cd2e601c9
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/fontsize.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>fontsize - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/fontsize.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/forecolor.html b/testing/web-platform/tests/editing/run/forecolor.html
new file mode 100644
index 000000000..bb5f35cb3
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/forecolor.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>forecolor - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/forecolor.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/formatblock.html b/testing/web-platform/tests/editing/run/formatblock.html
new file mode 100644
index 000000000..946061761
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/formatblock.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>formatblock - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/formatblock.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/forwarddelete.html b/testing/web-platform/tests/editing/run/forwarddelete.html
new file mode 100644
index 000000000..d3b88627b
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/forwarddelete.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>forwarddelete - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/forwarddelete.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/hilitecolor.html b/testing/web-platform/tests/editing/run/hilitecolor.html
new file mode 100644
index 000000000..515b62ba4
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/hilitecolor.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>hilitecolor - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/hilitecolor.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/indent.html b/testing/web-platform/tests/editing/run/indent.html
new file mode 100644
index 000000000..7be7a53b9
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/indent.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>indent - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/indent.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/inserthorizontalrule.html b/testing/web-platform/tests/editing/run/inserthorizontalrule.html
new file mode 100644
index 000000000..d3ebc18bc
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/inserthorizontalrule.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>inserthorizontalrule - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/inserthorizontalrule.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/inserthtml.html b/testing/web-platform/tests/editing/run/inserthtml.html
new file mode 100644
index 000000000..17e74e74e
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/inserthtml.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>inserthtml - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/inserthtml.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/insertimage.html b/testing/web-platform/tests/editing/run/insertimage.html
new file mode 100644
index 000000000..50730f426
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/insertimage.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>insertimage - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/insertimage.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/insertlinebreak.html b/testing/web-platform/tests/editing/run/insertlinebreak.html
new file mode 100644
index 000000000..34af7701d
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/insertlinebreak.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>insertlinebreak - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/insertlinebreak.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/insertorderedlist.html b/testing/web-platform/tests/editing/run/insertorderedlist.html
new file mode 100644
index 000000000..c762693c4
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/insertorderedlist.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>insertorderedlist - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/insertorderedlist.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/insertparagraph.html b/testing/web-platform/tests/editing/run/insertparagraph.html
new file mode 100644
index 000000000..bc13953c8
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/insertparagraph.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>insertparagraph - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/insertparagraph.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/inserttext.html b/testing/web-platform/tests/editing/run/inserttext.html
new file mode 100644
index 000000000..54134569c
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/inserttext.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>inserttext - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/inserttext.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/insertunorderedlist.html b/testing/web-platform/tests/editing/run/insertunorderedlist.html
new file mode 100644
index 000000000..9a5c1e163
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/insertunorderedlist.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>insertunorderedlist - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/insertunorderedlist.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/italic.html b/testing/web-platform/tests/editing/run/italic.html
new file mode 100644
index 000000000..b94658ec5
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/italic.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>italic - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/italic.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/justifycenter.html b/testing/web-platform/tests/editing/run/justifycenter.html
new file mode 100644
index 000000000..f2d98b934
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/justifycenter.html
@@ -0,0 +1,52 @@
+<!doctype html>
+<meta charset=utf-8>
+<meta name=timeout content=long>
+<link rel=stylesheet href=../include/reset.css>
+<title>justifycenter - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/justifycenter.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/justifyfull.html b/testing/web-platform/tests/editing/run/justifyfull.html
new file mode 100644
index 000000000..1de99d73a
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/justifyfull.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>justifyfull - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/justifyfull.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/justifyleft.html b/testing/web-platform/tests/editing/run/justifyleft.html
new file mode 100644
index 000000000..207da21d4
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/justifyleft.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>justifyleft - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/justifyleft.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/justifyright.html b/testing/web-platform/tests/editing/run/justifyright.html
new file mode 100644
index 000000000..bf4954e54
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/justifyright.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>justifyright - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/justifyright.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/misc.html b/testing/web-platform/tests/editing/run/misc.html
new file mode 100644
index 000000000..e0d62f33b
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/misc.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>misc - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/misc.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/multitest.html b/testing/web-platform/tests/editing/run/multitest.html
new file mode 100644
index 000000000..f8fa41c9c
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/multitest.html
@@ -0,0 +1,52 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<meta name=timeout content=long>
+<title>multitest - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/multitest.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/outdent.html b/testing/web-platform/tests/editing/run/outdent.html
new file mode 100644
index 000000000..4582bf0d1
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/outdent.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>outdent - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/outdent.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/removeformat.html b/testing/web-platform/tests/editing/run/removeformat.html
new file mode 100644
index 000000000..2437cd05f
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/removeformat.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>removeformat - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/removeformat.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/strikethrough.html b/testing/web-platform/tests/editing/run/strikethrough.html
new file mode 100644
index 000000000..9aa671ad7
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/strikethrough.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>strikethrough - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/strikethrough.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/subscript.html b/testing/web-platform/tests/editing/run/subscript.html
new file mode 100644
index 000000000..bd5a66b26
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/subscript.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>subscript - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/subscript.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/superscript.html b/testing/web-platform/tests/editing/run/superscript.html
new file mode 100644
index 000000000..890960ad0
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/superscript.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>superscript - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/superscript.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/underline.html b/testing/web-platform/tests/editing/run/underline.html
new file mode 100644
index 000000000..bcf9e3229
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/underline.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>underline - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/underline.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>
diff --git a/testing/web-platform/tests/editing/run/unlink.html b/testing/web-platform/tests/editing/run/unlink.html
new file mode 100644
index 000000000..d61200b95
--- /dev/null
+++ b/testing/web-platform/tests/editing/run/unlink.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<meta charset=utf-8>
+<link rel=stylesheet href=../include/reset.css>
+<title>unlink - HTML editing conformance tests</title>
+
+<p id=timing></p>
+
+<div id=log></div>
+
+<div id=test-container></div>
+
+<script src=../include/implementation.js></script>
+<script>var testsJsLibraryOnly = true</script>
+<script src=../include/tests.js></script>
+<script src=../data/unlink.js></script>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+(function() {
+ var startTime = Date.now();
+
+ // Make document.body.innerHTML more tidy by removing unnecessary things.
+ [].forEach.call(document.querySelectorAll("script"), function(node) {
+ node.parentNode.removeChild(node);
+ });
+
+ if (true) {
+ // Silly hack: the CSS styling flag should be true, not false, to match
+ // expected results. This is because every group of tests except the
+ // last (multitest) sets styleWithCSS automatically, and it sets it
+ // first to false and then to true. Thus it's left at true at the end
+ // of each group of tests, so in gentest.html it will be true when
+ // starting each group of tests other than the first. But browsers are
+ // supposed to default it to false when the page loads, so flip it.
+ try { document.execCommand("styleWithCSS", false, "true") } catch(e) {}
+ }
+
+ browserTests.forEach(runConformanceTest);
+
+ document.getElementById("test-container").parentNode
+ .removeChild(document.getElementById("test-container"));
+
+ var elapsed = Math.round(Date.now() - startTime)/1000;
+ document.getElementById("timing").textContent =
+ "Time elapsed: " + Math.floor(elapsed/60) + ":"
+ + ((elapsed % 60) < 10 ? "0" : "")
+ + (elapsed % 60).toFixed(3) + " min.";
+})();
+</script>