#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

DEPTH		= @DEPTH@
topsrcdir	= @top_srcdir@
srcdir		= @srcdir@
VPATH		= @srcdir@
relativesrcdir  = @relativesrcdir@

include $(DEPTH)/config/autoconf.mk

MOCHITEST_FILES = \
		green.png \
		test_bug290026.html \
		test_bug291780.html \
		test_bug316447.html \
		test_bug332636.html \
		test_bug332636.html^headers^ \
		test_bug372345.html \
		test_bug404320.html \
		test_bug410986.html \
		test_bug414526.html \
		test_bug417418.html \
		test_bug432225.html \
		test_bug439808.html \
		test_bug442186.html \
		test_bug449243.html \
		test_bug455992.html \
		test_bug456244.html \
		test_bug460740.html \
		test_bug468353.html \
		test_bug478725.html \
		test_bug480647.html \
		test_bug480972.html \
		test_bug484181.html \
		test_bug487524.html \
		test_bug520189.html \
		test_bug525389.html \
		test_bug537046.html \
		test_bug549262.html \
		file_bug549262.html \
		test_bug550434.html \
		test_bug551704.html \
		test_bug552782.html \
		test_bug570144.html \
		test_bug578771.html \
		test_bug592592.html \
		test_bug597784.html \
		test_bug599322.html \
		test_bug607584.html \
		test_bug611182.html \
		test_bug612128.html \
		test_bug612447.html \
		test_bug620906.html \
		test_bug622371.html \
		test_bug629845.html \
		test_bug640321.html \
		test_bug668599.html \
		test_bug674770-1.html \
		file_bug674770-1.html \
		test_bug674770-2.html \
		test_bug674861.html \
		test_bug676401.html \
		test_bug677752.html \
		test_bug686203.html \
		test_bug697842.html \
		test_bug725069.html \
		test_bug735059.html \
		test_CF_HTML_clipboard.html \
		test_contenteditable_focus.html \
		test_dom_input_event_on_htmleditor.html \
		test_htmleditor_keyevent_handling.html \
		test_keypress_untrusted_event.html \
		test_select_all_without_body.html \
		file_select_all_without_body.html \
		test_root_element_replacement.html \
		test_bug738366.html \
		test_bug757371.html \
		test_bug767684.html \
		test_bug780035.html \
		test_bug787432.html \
		test_bug790475.html \
		test_bug796839.html \
		$(NULL)

ifneq (mobile,$(MOZ_BUILD_APP))
MOCHITEST_FILES +=  test_spellcheck_pref.html \
		$(NULL)
endif

_DATA_FILES = \
		data/cfhtml-chromium.txt \
		data/cfhtml-firefox.txt \
		data/cfhtml-ie.txt \
		data/cfhtml-ooo.txt \
		data/cfhtml-nocontext.txt \
		$(NULL)

MOCHITEST_CHROME_FILES = \
		test_contenteditable_text_input_handling.html \
		test_bug366682.html \
		test_bug489202.xul \
		test_bug490879.xul \
		test_bug607584.xul \
		test_bug616590.xul \
		test_bug635636.html \
		test_bug780908.xul \
		green.png \
		$(NULL)

include $(topsrcdir)/config/rules.mk

libs::
	(cd $(srcdir) && tar $(TAR_CREATE_FLAGS) - browserscope 2> /dev/null) | (cd $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir) && tar -xf -)

libs:: $(_DATA_FILES)
	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)/data
