#
# ***** 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  = toolkit/content/tests/chrome

include $(DEPTH)/config/autoconf.mk

DIRS = rtltest

include $(topsrcdir)/config/rules.mk

_TEST_FILES = 	findbar_window.xul \
		test_findbar.xul \
		test_bug253481.xul \
		bug263683_window.xul \
		test_bug263683.xul \
		bug304188_window.xul \
		test_bug304188.xul \
		bug331215_window.xul \
		test_bug331215.xul \
		bug360437_window.xul \
		test_bug360437.xul \
		bug366992_window.xul \
		test_bug366992.xul \
		test_bug418874.xul \
		bug429723_window.xul \
		test_bug429723.xul \
		bug437844.css \
		bug437844.dtd \
		bug437844.manifest \
		test_bug437844.xul \
		bug451286_window.xul \
		test_bug451286.xul \
		bug451540_window.xul \
		test_bug451540.xul \
		test_bug471776.xul \
		test_popup_preventdefault_chrome.xul \
		window_popup_preventdefault_chrome.xul \
		test_largemenu.xul \
		window_largemenu.xul \
		test_popup_anchor.xul \
		window_popup_anchor.xul \
		frame_popup_anchor.xul \
		test_preferences.xul \
		window_preferences.xul \
		window_preferences2.xul \
		window_preferences3.xul \
		test_autocomplete2.xul \
		test_autocomplete3.xul \
		test_autocomplete4.xul \
		test_keys.xul \
		window_keys.xul \
		test_showcaret.xul \
		test_righttoleft.xul \
		test_screenPersistence.xul \
		window_screenPosSize.xul \
		$(NULL)

# test_panel_focus.xul won't work if the Full Keyboard Access preference is set to
# textboxes and lists only, so skip this test on Mac
ifeq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
_TEST_FILES += test_panel_focus.xul \
               window_panel_focus.xul \
               test_dialogfocus.xul \
               dialog_dialogfocus.xul
else
_TEST_FILES += test_autocomplete.xul
endif

ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
_TEST_FILES += 	$(warning test_cursorsnap.xul temporarily disabled) \
		window_cursorsnap_dialog.xul \
		window_cursorsnap_wizard.xul
endif

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