#
# ***** 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) 2007
# 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  = content/base/test

include $(DEPTH)/config/autoconf.mk

DIRS += \
  chrome \
  $(NULL)

MODULE = content

CPP_UNIT_TESTS = \
                 TestNativeXMLHttpRequest.cpp \
                 TestPlainTextSerializer.cpp \
                 $(NULL)

LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/tests

REQUIRES += \
  caps \
  content \
  dom \
  js \
  netwerk \
  string \
  xpcom \
  xpconnect \
  htmlparser \
  $(NULL)

XPCSHELL_TESTS = \
               unit \
               $(NULL)

include $(topsrcdir)/config/rules.mk

_TEST_FILES = 	test_bug5141.html \
		test_bug51034.html \
		test_bug199959.html \
		test_bug218236.html \
		file_bug218236_multipart.txt \
		file_bug218236_multipart.txt^headers^ \
		test_bug218277.html \
		test_bug238409.html \
		test_bug254337.html \
		test_bug276037-1.html \
		test_bug276037-2.xhtml \
		test_bug298064.html \
		bug298064-subframe.html \
		test_bug308484.html \
		test_bug311681.xml \
		test_bug322317.html \
		test_bug330925.xhtml \
		test_bug337631.html \
		test_bug338541.xhtml \
		test_bug338679.html \
		test_bug339494.html \
		test_bug339494.xhtml \
		test_bug339494.xul \
		test_bug343596.html \
		test_bug345339.html \
		345339_iframe.html \
		test_bug352728.html \
		test_bug352728.xhtml \
		test_bug353334.html \
		test_bug355026.html \
		test_bug357450.js \
		test_bug357450.html \
		test_bug357450.xhtml \
		test_bug357450.xul \
		test_bug357450_svg.xhtml \
		test_bug357509.html \
		test_bug358660.html \
		test_bug362391.xhtml \
		test_bug364092.xhtml \
		test_bug364413.xhtml \
		test_bug366946.html \
		test_bug367164.html \
		test_bug371576-1.html \
		test_bug371576-2.html \
		test_bug371576-3.html \
		test_bug371576-4.html \
		test_bug371576-5.html \
		test_bug372086.html \
		test_bug372964.html \
		test_bug372964-2.html \
		test_bug373181.xhtml \
		test_bug375314.html \
		test_bug378969.html \
		test_bug382113.html \
		test_bug382871.html \
		test_bug383430.html \
		test_bug390219.html \
		test_bug390735.html \
		test_bug392318.html \
		test_bug392511.html \
		test_bug393968.html \
		test_bug395915.html \
		test_bug397234.html \
		test_bug398243.html \
		formReset.html \
		bug382113_object.html \
		test_bug326337.html \
		file_bug326337_inner.html \
		file_bug326337_outer.html \
		file_bug326337.xml \
		file_bug326337_multipart.txt \
		file_bug326337_multipart.txt^headers^ \
		test_bug333198.html \
		test_bug402150.html \
		test_bug402150.html^headers^ \
		test_bug401662.html \
		test_bug403852.html \
		test_bug403868.xml \
		test_bug405182.html \
		test_bug403841.html \
		test_bug409380.html \
		test_bug410229.html \
		test_bug413974.html \
		test_bug415860.html \
		test_bug414190.html \
		test_bug414796.html \
		test_bug416317-1.html \
		test_bug416317-2.html \
		file_bug416317.xhtml \
		test_bug416383.html \
		test_bug417255.html \
		test_bug417384.html \
		test_bug418214.html \
		test_bug419527.xhtml \
		test_bug420609.xhtml \
		test_bug420700.html \
		test_bug421602.html \
		test_bug422537.html \
		test_bug424359-1.html \
		file_htmlserializer_1.html \
		file_htmlserializer_1_bodyonly.html \
		file_htmlserializer_1_format.html \
		file_htmlserializer_1_linebreak.html \
		file_htmlserializer_1_links.html \
		file_htmlserializer_1_noflag.html \
		file_htmlserializer_1_noformatpre.html \
		file_htmlserializer_1_raw.html \
		file_htmlserializer_1_nested_body.html \
		file_htmlserializer_1_sibling_body.html \
		file_htmlserializer_1_sibling_body_only_body.html \
		file_htmlserializer_1_no_body.html \
		test_bug424359-2.html \
		file_htmlserializer_2.html \
		test_bug431082.html \
		file_htmlserializer_2_basic.html \
		file_htmlserializer_2_enthtml.html \
		file_htmlserializer_2_entw3c.html \
		file_htmlserializer_2_latin1.html \
		test_bug424212.html \
		test_bug425013.html \
		bug426308-redirect.sjs \
		test_bug426308.html \
		test_bug426646.html \
		file_bug426646-1.html \
		file_bug426646-2.html \
		test_bug429157.html \
		test_XHR.html \
		file_XHR_pass1.xml \
		file_XHR_pass2.txt \
		file_XHR_pass3.txt \
		file_XHR_pass3.txt^headers^ \
		file_XHR_fail1.txt \
		file_XHR_fail1.txt^headers^ \
		test_bug428847.html \
		file_bug428847-1.xhtml \
		file_bug428847-2.xhtml \
		test_bug431701.html \
		test_bug431833.html \
		test_bug435425.html \
		bug435425.sjs \
		bug435425_redirect.sjs \
		test_bug438519.html \
		test_bug444722.html \
		test_bug451376.html \
		test_text_replaceWholeText.html \
		test_text_wholeText.html \
		test_bug433533.html \
		wholeTexty-helper.xml \
		test_bug444030.xhtml \
		test_NodeIterator_basics_filters.xhtml \
		test_NodeIterator_mutations_1.xhtml \
		test_NodeIterator_mutations_2.html \
		test_bug28293.html \
		test_bug28293.xhtml \
		file_bug28293.sjs \
		test_bug445225.html \
		file_bug445225_multipart.txt \
		file_bug445225_multipart.txt^headers^ \
		test_title.html \
		test_bug453521.html \
		test_bug391728.html \
		file_bug391728.html \
		test_bug454325.html \
		file_bug391728_2.html \
		test_bug456262.html \
		test_bug368972.html \
		test_bug448993.html \
		test_bug450160.html \
		test_bug453736.html \
		test_bug454326.html \
		test_bug457746.html \
		bug457746.sjs \
		test_CrossSiteXHR.html \
		file_CrossSiteXHR_inner.html \
		file_CrossSiteXHR_inner_data.sjs \
		file_CrossSiteXHR_inner.jar \
		file_CrossSiteXHR_server.sjs \
		test_CrossSiteXHR_cache.html \
		file_CrossSiteXHR_cache_server.sjs \
		test_XHRDocURI.html \
		file_XHRDocURI.xml \
		file_XHRDocURI.xml^headers^ \
		file_XHRDocURI.text \
		file_XHRDocURI.text^headers^ \
		test_bug459424.html \
		bug461735-redirect1.sjs \
		bug461735-redirect2.sjs \
		bug461735-post-redirect.js \
		test_bug461735.html \
		test_bug380418.html \
		test_bug465767.html \
		test_bug380418.html^headers^ \
		test_elementTraversal.html \
		test_w3element_traversal.html \
		test_w3element_traversal.xhtml \
		test_bug469020.html \
		test_w3element_traversal_svg.html \
		w3element_traversal.svg \
		test_bug444322.html \
		bug444322.txt \
		bug444322.js \
		test_bug455629.html \
		bug455629-helper.svg \
		test_bug473162-1.html \
		test_bug473162-2.html \
		test_XHRSendData.html \
		file_XHRSendData.sjs \
		file_XHRSendData_doc.xml \
		file_XHRSendData_doc.xml^headers^ \
		test_bug466751.xhtml \
		test_bug461555.html \
		$(NULL)

# Disabled for now. Mochitest isn't reliable enough for these.
# test_bug444546.html \
# bug444546.sjs \

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