# 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

DIRS = \
  extensions \
  $(NULL)

MOCHITEST_FILES = \
  test_404.html \
  test_atob.html \
  atob_worker.js \
  test_blobWorkers.html \
  test_clearTimeouts.html \
  clearTimeouts_worker.js \
  test_close.html \
  close_worker.js \
  test_closeOnGC.html \
  closeOnGC_worker.js \
  closeOnGC_server.sjs \
  test_dataURLWorker.html \
  test_errorPropagation.html \
  errorPropagation_iframe.html \
  errorPropagation_worker.js \
  test_eventDispatch.html \
  eventDispatch_worker.js \
  test_importScripts.html \
  importScripts_worker.js \
  importScripts_worker_imported1.js \
  importScripts_worker_imported2.js \
  importScripts_worker_imported3.js \
  importScripts_worker_imported4.js \
  test_instanceof.html \
  instanceof_worker.js \
  test_json.html \
  json_worker.js \
  test_location.html \
  location_worker.js \
  test_longThread.html \
  longThread_worker.js \
  test_navigator.html \
  navigator_worker.js \
  test_recursion.html \
  recursion_worker.js \
  test_recursiveOnerror.html \
  recursiveOnerror_worker.js \
  test_relativeLoad.html \
  relativeLoad_worker.js \
  relativeLoad_worker2.js \
  relativeLoad_import.js \
  test_suspend.html \
  suspend_iframe.html \
  suspend_worker.js \
  test_simpleThread.html \
  simpleThread_worker.js \
  test_terminate.html \
  terminate_worker.js \
  test_threadErrors.html \
  threadErrors_worker1.js \
  threadErrors_worker2.js \
  threadErrors_worker3.js \
  threadErrors_worker4.js \
  test_threadTimeouts.html \
  threadTimeouts_worker.js \
  test_throwingOnerror.html \
  throwingOnerror_worker.js \
  test_xhr.html \
  xhr_worker.js \
  test_xhr2.html \
  xhr2_worker.js \
  test_xhrAbort.html \
  xhrAbort_worker.js \
  testXHR.txt \
  test_fibonacci.html \
  fibonacci_worker.js \
  test_newError.html \
  newError_worker.js \
  test_chromeWorker.html \
  WorkerTest_badworker.js \
  test_workersDisabled.html \
  workersDisabled_worker.js \
  test_xhr_implicit_cancel.html \
  xhr_implicit_cancel_worker.js \
  test_xhr_timeout.html \
  test_xhr_parameters.html \
  test_xhr_parameters.js \
  test_xhr_system.html \
  test_xhr_system.js \
  test_blobConstructor.html \
  test_csp.html \
  test_csp.js \
  test_csp.html^headers^ \
  csp_worker.js \
  test_transferable.html \
  transferable_worker.js \
  $(NULL)

_SUBDIRMOCHITEST_FILES = \
  relativeLoad_sub_worker.js \
  relativeLoad_sub_worker2.js \
  relativeLoad_sub_import.js \
  $(NULL)

MOCHITEST_CHROME_FILES = \
  test_chromeWorker.xul \
  test_chromeWorkerJSM.xul \
  test_extension.xul \
  test_extensionBootstrap.xul \
  test_file.xul \
  test_fileSlice.xul \
  test_fileBlobPosting.xul \
  test_filePosting.xul \
  test_fileReaderSync.xul \
  test_fileReaderSyncErrors.xul \
  test_fileReadSlice.xul \
  test_fileSubWorker.xul \
  test_fileBlobSubWorker.xul \
  file_worker.js \
  fileBlob_worker.js \
  fileSlice_worker.js \
  filePosting_worker.js \
  fileReaderSync_worker.js \
  fileReaderSyncErrors_worker.js \
  fileReadSlice_worker.js \
  fileSubWorker_worker.js \
  fileBlobSubWorker_worker.js \
  WorkerTest.jsm \
  WorkerTest_worker.js \
  WorkerTest_subworker.js \
  chromeWorker_worker.js \
  chromeWorker_subworker.js \
  test_workersDisabled.xul \
  workersDisabled_worker.js \
  dom_worker_helper.js \
  $(NULL)

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

include $(topsrcdir)/config/rules.mk
