# HG changeset patch # Parent 6fb9aee6c332841f8b7a7630d3cc4549ce2c3a5b # User Brian R. Bondy Bug 598289 - Test for pasting CF_HTML from clipboard with no context diff --git a/editor/libeditor/html/tests/Makefile.in b/editor/libeditor/html/tests/Makefile.in --- a/editor/libeditor/html/tests/Makefile.in +++ b/editor/libeditor/html/tests/Makefile.in @@ -93,16 +93,17 @@ _TEST_FILES = \ 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 \ diff --git a/editor/libeditor/html/tests/data/cfhtml-nocontext.txt b/editor/libeditor/html/tests/data/cfhtml-nocontext.txt 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 + + + + Test + + + +

+ 3.1415926535897932 +

+ + + diff --git a/editor/libeditor/html/tests/test_CF_HTML_clipboard.html b/editor/libeditor/html/tests/test_CF_HTML_clipboard.html --- 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); }