Test insertText on HTML
authorAryeh Gregor <ayg@aryeh.name>
Wed, 23 May 2012 02:27:16 -0600
changeset 732 57abe6d3cb60
parent 731 90017605b677
child 733 fbd22998ba8f
Test insertText on HTML

Reported-By: Ehsan Akhgari
Report-URL: https://bugzilla.mozilla.org/show_bug.cgi?id=748307#c15
conformancetest/data.js
tests.js
--- a/conformancetest/data.js	Sun May 20 06:30:28 2012 -0600
+++ b/conformancetest/data.js	Wed May 23 02:27:16 2012 -0600
@@ -16225,6 +16225,21 @@
 	[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],
--- a/tests.js	Sun May 20 06:30:28 2012 -0600
+++ b/tests.js	Wed May 23 02:27:16 2012 -0600
@@ -2478,6 +2478,10 @@
 		['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'],