Bug 598289 - Test case for CF_HTML parsing with StartHTML/EndHTML set to -1. r=ehsan
authorBrian R. Bondy <netzen@gmail.com>
Wed, 21 Sep 2011 13:22:54 -0400
changeset 78590 9e3562fefd4ca1970d8f7ba430b582e7dc6092bb
parent 78589 b7486f31f6b1d29d60098ba74bc2ba0c0e2d17c5
child 78591 c67ec721fdd67b1b776ffdda5c627ae127a685c9
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs598289
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 598289 - Test case for CF_HTML parsing with StartHTML/EndHTML set to -1. r=ehsan
editor/libeditor/html/tests/Makefile.in
editor/libeditor/html/tests/data/cfhtml-nocontext.txt
editor/libeditor/html/tests/test_CF_HTML_clipboard.html
--- a/editor/libeditor/html/tests/Makefile.in
+++ b/editor/libeditor/html/tests/Makefile.in
@@ -98,16 +98,17 @@ include $(topsrcdir)/config/rules.mk
 		test_root_element_replacement.html \
 		$(NULL)
 
 _DATA_FILES = \
 		data/cfhtml-chromium.txt \
 		data/cfhtml-firefox.txt \
 		data/cfhtml-ie.txt \
 		data/cfhtml-ooo.txt \
+		data/cfhtml-nocontext.txt \
 		$(NULL)
 
 _CHROME_TEST_FILES = \
 		test_contenteditable_text_input_handling.html \
 		test_bug489202.xul \
 		test_bug490879.xul \
 		test_bug607584.xul \
 		test_bug616590.xul \
new file mode 100644
--- /dev/null
+++ b/editor/libeditor/html/tests/data/cfhtml-nocontext.txt
@@ -0,0 +1,18 @@
+Version:0.9
+StartHTML:-1
+EndHTML:-1
+StartFragment:0000000111
+EndFragment:0000000246
+<!--StartFragment-->
+<html>
+  <head>
+    <title>Test</title>
+    
+  </head>
+  <body>
+    <p>
+      3.<b>1415926535897932</b>
+    </p>
+  </body>
+</html>
+<!--EndFragment-->
--- a/editor/libeditor/html/tests/test_CF_HTML_clipboard.html
+++ b/editor/libeditor/html/tests/test_CF_HTML_clipboard.html
@@ -84,16 +84,18 @@ var gTests = [
   // Copied from Firefox
   {fileName: "cfhtml-firefox.txt", expected: "Firefox"},
   // Copied from OpenOffice.org
   {fileName: "cfhtml-ooo.txt", expected: "hello"},
   // Copied from IE
   {fileName: "cfhtml-ie.txt", expected: "browser"},
   // Copied from Chromium
   {fileName: "cfhtml-chromium.txt", expected: "Pacific"},
+  // CF_HTML with no context specified (StartHTML and EndHTML set to -1)
+  {fileName: "cfhtml-nocontext.txt", expected: "3.1415926535897932"},
 ];
 var gTestIndex = 0;
 
 SimpleTest.waitForExplicitFinish();
 
 for (var i = 0; i < gTests.length; ++i) {
   gTests[i].data = loadCF_HTMLdata("data/" + gTests[i].fileName);
 }