2008-10-10 19:38:47 -07:00
|
|
|
#
|
|
|
|
# ***** BEGIN LICENSE BLOCK *****
|
|
|
|
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
#
|
|
|
|
# The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
# 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
# the License. You may obtain a copy of the License at
|
|
|
|
# http://www.mozilla.org/MPL/
|
|
|
|
#
|
|
|
|
# Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
# for the specific language governing rights and limitations under the
|
|
|
|
# License.
|
|
|
|
#
|
|
|
|
# The Original Code is mozilla.org code.
|
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is
|
|
|
|
# Mozilla Foundation.
|
|
|
|
# Portions created by the Initial Developer are Copyright (C) 2008
|
|
|
|
# the Initial Developer. All Rights Reserved.
|
|
|
|
#
|
|
|
|
# Contributor(s):
|
|
|
|
#
|
|
|
|
# Alternatively, the contents of this file may be used under the terms of
|
|
|
|
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
|
|
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
# in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
# of those above. If you wish to allow use of your version of this file only
|
|
|
|
# under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
# use your version of this file under the terms of the MPL, indicate your
|
|
|
|
# decision by deleting the provisions above and replace them with the notice
|
|
|
|
# and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
# the provisions above, a recipient may use your version of this file under
|
|
|
|
# the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
#
|
|
|
|
# ***** END LICENSE BLOCK *****
|
|
|
|
|
|
|
|
DEPTH = ../../../..
|
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
relativesrcdir = editor/libeditor/html/tests
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
|
|
|
_TEST_FILES = \
|
2010-09-24 12:02:21 -07:00
|
|
|
green.png \
|
2011-08-09 16:14:53 -07:00
|
|
|
test_bug290026.html \
|
2011-08-09 16:14:58 -07:00
|
|
|
test_bug291780.html \
|
2010-06-04 10:28:19 -07:00
|
|
|
test_bug332636.html \
|
|
|
|
test_bug332636.html^headers^ \
|
2010-10-29 09:30:15 -07:00
|
|
|
test_bug372345.html \
|
2010-09-21 20:33:44 -07:00
|
|
|
test_bug410986.html \
|
2011-07-14 08:25:07 -07:00
|
|
|
test_bug414526.html \
|
2011-07-18 11:42:56 -07:00
|
|
|
test_bug417418.html \
|
2008-10-31 17:30:45 -07:00
|
|
|
test_bug432225.html \
|
2011-06-29 18:01:59 -07:00
|
|
|
test_bug439808.html \
|
2011-08-10 16:03:34 -07:00
|
|
|
test_bug442186.html \
|
2011-08-02 12:04:43 -07:00
|
|
|
test_bug449243.html \
|
2009-02-20 20:28:09 -08:00
|
|
|
test_bug455992.html \
|
2008-10-10 19:38:47 -07:00
|
|
|
test_bug456244.html \
|
2011-07-26 14:38:23 -07:00
|
|
|
test_bug460740.html \
|
2009-02-20 18:51:52 -08:00
|
|
|
test_bug478725.html \
|
2009-03-31 18:05:44 -07:00
|
|
|
test_bug480972.html \
|
2010-05-31 14:40:17 -07:00
|
|
|
test_bug484181.html \
|
2009-05-13 02:45:38 -07:00
|
|
|
test_bug487524.html \
|
2010-04-09 14:06:09 -07:00
|
|
|
test_bug520189.html \
|
2010-01-10 17:45:45 -08:00
|
|
|
test_bug525389.html \
|
2010-04-06 11:35:25 -07:00
|
|
|
test_bug537046.html \
|
2010-09-06 13:59:41 -07:00
|
|
|
test_bug549262.html \
|
|
|
|
file_bug549262.html \
|
2010-06-10 19:46:51 -07:00
|
|
|
test_bug550434.html \
|
2010-11-06 15:49:26 -07:00
|
|
|
test_bug551704.html \
|
2011-09-20 09:27:24 -07:00
|
|
|
test_bug552782.html \
|
2011-09-12 12:25:38 -07:00
|
|
|
test_bug570144.html \
|
2010-09-02 17:36:42 -07:00
|
|
|
test_bug592592.html \
|
2010-09-27 10:21:34 -07:00
|
|
|
test_bug597784.html \
|
2010-09-24 12:02:21 -07:00
|
|
|
test_bug599322.html \
|
2010-10-29 10:01:49 -07:00
|
|
|
test_bug607584.html \
|
2010-11-11 11:09:09 -08:00
|
|
|
test_bug611182.html \
|
2010-11-18 13:01:12 -08:00
|
|
|
test_bug612447.html \
|
2011-01-11 13:00:44 -08:00
|
|
|
test_bug620906.html \
|
2011-01-06 14:13:51 -08:00
|
|
|
test_bug622371.html \
|
2011-02-10 16:59:37 -08:00
|
|
|
test_bug629845.html \
|
2011-03-16 12:34:30 -07:00
|
|
|
test_bug640321.html \
|
2011-07-25 14:11:46 -07:00
|
|
|
test_bug668599.html \
|
2011-08-02 12:04:43 -07:00
|
|
|
test_bug674861.html \
|
2011-08-17 10:28:03 -07:00
|
|
|
test_bug676401.html \
|
Bug 677752 - [contentEditable] indent and justify* fail on editable nodes that have only one child; r=ehsan
Issue #1: indent/justify* can create non-valid fragments.
When applying a block-level formatting to a text node, Gecko creates a div or
blockquote block around the text node and sets the corresponding "align" or
"style" attribute. This patch checks that the active editing host can contain
such a block-level element.
Issue #2: indent/justify* can modify the active editing host.
On the first child of the editable element, the selection is extended outside of
the active editing host -- which causes a few issues for our test cases.
In this patch, this issue is "solved" by modifying
`nsHTMLEditRules::GetPromotedPoint' for block-level operations.
** About the tests **
Sorry for the long explanation but I prefer to be as sharp as possible when I
have to modify existing unit tests.
This patch raises 34 unit test "failures" which are improvements.
Two test files are concerned and have been modified accordingly:
* test_htmleditor_keyevent_handling
* test_richtext2.html
One test has been clarified (no real modification):
* test_bug414526.html
Of course, a specific unit test has been added, see `test_bug677752.html'.
** editor/libeditor/html/tests/test_htmleditor_keyevent_handling.html **
Outdenting now works properly, which results in 4 `FAIL'.
* 7372 ERROR TEST-UNEXPECTED-FAIL
| non-tabbable HTML editor: Shift+Tab after Tab on UL
- got "<ul><li id=\"target\">ul list item</li></ul>",
expected "<ul><ul><li id=\"target\">ul list item</li></ul></ul>"
* 7379 ERROR TEST-UNEXPECTED-FAIL
| non-tabbable HTML editor: Shift+Tab on UL
- got "ul list item",
expected "<ul><li id=\"target\">ul list item</li></ul>"
* 7415 ERROR TEST-UNEXPECTED-FAIL
| non-tabbable HTML editor: Shift+Tab after Tab on OL -
got "<ol><li id=\"target\">ol list item</li></ol>",
expected "<ol><ol><li id=\"target\">ol list item</li></ol></ol>"
* 7422 ERROR TEST-UNEXPECTED-FAIL
| non-tabbable HTML editor: Shfit+Tab on OL
- got "ol list item",
expected "<ol><li id=\"target\">ol list item</li></ol>"
** editor/libeditor/html/tests/browserscope/test_richtext2.html **
The 15 tests that now pass result in 15 `FAIL' and 15 `UNEXPECTED_PASS'.
Here's an overview of what we had before the patch:
* Section A - Apply Formatting Tests: +10 points
before patch: 21/31 (Selection: 9/31)
after patch: 28/31 (Selection: 12/31)
FB:BQ_TEXT-1_SI EXECUTION EXCEPTION
FB:BQ_TEXT-1_SI EXECUTION EXCEPTION
FB:BQ_BR.BR-1_SM EXECUTION EXCEPTION
FB:BQ_BR.BR-1_SM EXECUTION EXCEPTION
IND_TEXT-1_SI EXECUTION EXCEPTION
IND_TEXT-1_SI EXECUTION EXCEPTION
JC_TEXT-1_SC editing host is modified
JF_TEXT-1_SC editing host is modified
JL_TEXT-1_SC editing host is modified
JR_TEXT-1_SC editing host is modified
* Section AC - Apply Formatting Tests, using styleWithCSS: +5 points
before patch: 7/18 (Selection: 5/18)
after patch: 12/18 (Selection: 5/18)
IND_TEXT-1_SI editing host is modified
JC_TEXT-1_SC editing host is modified
JF_TEXT-1_SC editing host is modified
JL_TEXT-1_SC editing host is modified
JR_TEXT-1_SC editing host is modified
** editor/libeditor/html/tests/test_bug414526.html **
This test has been clarified to get more explicit report messages -- the test
themselves haven't been changed. A `todo_is' test has been added.
This test is the one that shows that `IsNodeInActiveEditor' can't be modified,
and that limiting the range promotion for block-level operations is preferrable.
2011-08-23 12:10:14 -07:00
|
|
|
test_bug677752.html \
|
2010-06-23 11:40:08 -07:00
|
|
|
test_CF_HTML_clipboard.html \
|
2010-05-04 10:40:39 -07:00
|
|
|
test_contenteditable_focus.html \
|
2010-06-09 18:16:58 -07:00
|
|
|
test_htmleditor_keyevent_handling.html \
|
2009-12-16 20:46:30 -08:00
|
|
|
test_select_all_without_body.html \
|
|
|
|
file_select_all_without_body.html \
|
2010-06-16 22:32:05 -07:00
|
|
|
test_root_element_replacement.html \
|
2008-10-10 19:38:47 -07:00
|
|
|
$(NULL)
|
|
|
|
|
2011-09-22 09:35:24 -07:00
|
|
|
ifneq (mobile,$(MOZ_BUILD_APP))
|
|
|
|
_TEST_FILES += test_spellcheck_pref.html \
|
|
|
|
$(NULL)
|
|
|
|
endif
|
|
|
|
|
2010-06-23 11:40:08 -07:00
|
|
|
_DATA_FILES = \
|
|
|
|
data/cfhtml-chromium.txt \
|
|
|
|
data/cfhtml-firefox.txt \
|
|
|
|
data/cfhtml-ie.txt \
|
|
|
|
data/cfhtml-ooo.txt \
|
2011-09-21 10:22:54 -07:00
|
|
|
data/cfhtml-nocontext.txt \
|
2010-06-23 11:40:08 -07:00
|
|
|
$(NULL)
|
|
|
|
|
2009-05-15 01:44:16 -07:00
|
|
|
_CHROME_TEST_FILES = \
|
2011-06-19 08:56:44 -07:00
|
|
|
test_contenteditable_text_input_handling.html \
|
2011-09-22 09:35:24 -07:00
|
|
|
test_bug366682.html \
|
2011-07-26 10:59:50 -07:00
|
|
|
test_bug489202.xul \
|
2009-05-15 01:44:16 -07:00
|
|
|
test_bug490879.xul \
|
2010-10-29 09:36:21 -07:00
|
|
|
test_bug607584.xul \
|
2010-12-06 11:27:14 -08:00
|
|
|
test_bug616590.xul \
|
2011-02-21 13:58:07 -08:00
|
|
|
test_bug635636.html \
|
2009-05-15 01:44:16 -07:00
|
|
|
green.png \
|
|
|
|
$(NULL)
|
|
|
|
|
2008-10-10 19:38:47 -07:00
|
|
|
libs:: $(_TEST_FILES)
|
2011-11-05 11:35:59 -07:00
|
|
|
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
|
|
|
|
(cd $(srcdir) && tar $(TAR_CREATE_FLAGS) - browserscope 2> /dev/null) | (cd $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir) && tar -xf -)
|
2008-10-10 19:38:47 -07:00
|
|
|
|
2010-06-23 11:40:08 -07:00
|
|
|
libs:: $(_DATA_FILES)
|
2011-11-05 11:35:59 -07:00
|
|
|
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)/data
|
2010-06-23 11:40:08 -07:00
|
|
|
|
2009-05-15 01:44:16 -07:00
|
|
|
libs:: $(_CHROME_TEST_FILES)
|
2011-11-05 11:35:59 -07:00
|
|
|
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
|
2009-05-15 01:44:16 -07:00
|
|
|
|