Bug 924549 - Add MOCHITEST_WEBAPPRT_CHROME_MANIFESTS to specify webapprt chrome tests and convert all the webapprt mochitests to use manifests. r=gps
authorMarco Castelluccio <mar.castelluccio@studenti.unina.it>
Wed, 09 Oct 2013 09:16:18 -0400
changeset 150213 18d00b699ad6741c91879db63709ee0930dc391a
parent 150212 d8109ff79880146b99fa165468154560ae2e1483
child 150214 dc500967d5be7b7d060a37f30eaa941f425f071e
push id2976
push userryanvm@gmail.com
push dateWed, 09 Oct 2013 19:32:52 +0000
treeherderfx-team@a141e39bf6da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs924549
milestone27.0a1
Bug 924549 - Add MOCHITEST_WEBAPPRT_CHROME_MANIFESTS to specify webapprt chrome tests and convert all the webapprt mochitests to use manifests. r=gps
build/docs/test_manifests.rst
config/makefiles/mochitest.mk
config/rules.mk
js/src/config/makefiles/mochitest.mk
js/src/config/rules.mk
python/mozbuild/mozbuild/frontend/emitter.py
python/mozbuild/mozbuild/frontend/sandbox_symbols.py
webapprt/moz.build
webapprt/test/chrome/Makefile.in
webapprt/test/chrome/moz.build
webapprt/test/chrome/webapprt.ini
webapprt/test/content/Makefile.in
webapprt/test/content/mochitest.ini
webapprt/test/content/moz.build
webapprt/test/moz.build
--- a/build/docs/test_manifests.rst
+++ b/build/docs/test_manifests.rst
@@ -26,16 +26,19 @@ browser.ini
    For the *browser chrome* flavor of mochitests.
 
 a11y.ini
    For the *a11y* flavor of mochitests.
 
 xpcshell.ini
    For *xpcshell* tests.
 
+webapprt.ini
+   For the *chrome* flavor of webapp runtime mochitests.
+
 .. _manifest_destiny_manifests:
 
 Manifest Destiny Manifests
 ==========================
 
 Manifest destiny manifests are essentially ini files that conform to a basic
 set of assumptions.
 
--- a/config/makefiles/mochitest.mk
+++ b/config/makefiles/mochitest.mk
@@ -42,16 +42,11 @@ MOCHITEST_METRO_DEST := $(call mochitest
 INSTALL_TARGETS += MOCHITEST_METRO
 endif
 
 ifdef MOCHITEST_ROBOCOP_FILES
 MOCHITEST_ROBOCOP_DEST := $(call mochitestdir,tests/robocop,flat_hierarchy)
 INSTALL_TARGETS += MOCHITEST_ROBOCOP
 endif
 
-ifdef MOCHITEST_WEBAPPRT_CHROME_FILES
-MOCHITEST_WEBAPPRT_CHROME_DEST := $(call mochitestdir,webapprtChrome)
-INSTALL_TARGETS += MOCHITEST_WEBAPPRT_CHROME
-endif
-
 INCLUDED_TESTS_MOCHITEST_MK := 1
 
 endif #} INCLUDED_TESTS_MOCHITEST_MK
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -47,16 +47,17 @@ INCLUDED_RULES_MK = 1
   XPCSHELL_TESTS \
   XPIDL_MODULE \
   $(NULL)
 
 _DEPRECATED_VARIABLES := \
   XPIDL_FLAGS \
   MOCHITEST_FILES_PARTS \
   MOCHITEST_BROWSER_FILES_PARTS \
+  MOCHITEST_WEBAPPRT_CHROME_FILES \
   $(NULL)
 
 ifndef EXTERNALLY_MANAGED_MAKE_FILE
 # Using $(firstword) may not be perfect. But it should be good enough for most
 # scenarios.
 _current_makefile = $(CURDIR)/$(firstword $(MAKEFILE_LIST))
 
 $(foreach var,$(_MOZBUILD_EXTERNAL_VARIABLES),$(if $(filter file override,$(subst $(NULL) ,_,$(origin $(var)))),\
@@ -1723,17 +1724,16 @@ FREEZE_VARIABLES = \
   EXTRA_COMPONENTS \
   EXTRA_PP_COMPONENTS \
   MOCHITEST_FILES \
   MOCHITEST_CHROME_FILES \
   MOCHITEST_BROWSER_FILES \
   MOCHITEST_A11Y_FILES \
   MOCHITEST_METRO_FILES \
   MOCHITEST_ROBOCOP_FILES \
-  MOCHITEST_WEBAPPRT_CHROME_FILES \
   $(NULL)
 
 $(foreach var,$(FREEZE_VARIABLES),$(eval $(var)_FROZEN := '$($(var))'))
 
 CHECK_FROZEN_VARIABLES = $(foreach var,$(FREEZE_VARIABLES), \
   $(if $(subst $($(var)_FROZEN),,'$($(var))'),$(error Makefile variable '$(var)' changed value after including rules.mk. Was $($(var)_FROZEN), now $($(var)).)))
 
 libs export::
--- a/js/src/config/makefiles/mochitest.mk
+++ b/js/src/config/makefiles/mochitest.mk
@@ -42,16 +42,11 @@ MOCHITEST_METRO_DEST := $(call mochitest
 INSTALL_TARGETS += MOCHITEST_METRO
 endif
 
 ifdef MOCHITEST_ROBOCOP_FILES
 MOCHITEST_ROBOCOP_DEST := $(call mochitestdir,tests/robocop,flat_hierarchy)
 INSTALL_TARGETS += MOCHITEST_ROBOCOP
 endif
 
-ifdef MOCHITEST_WEBAPPRT_CHROME_FILES
-MOCHITEST_WEBAPPRT_CHROME_DEST := $(call mochitestdir,webapprtChrome)
-INSTALL_TARGETS += MOCHITEST_WEBAPPRT_CHROME
-endif
-
 INCLUDED_TESTS_MOCHITEST_MK := 1
 
 endif #} INCLUDED_TESTS_MOCHITEST_MK
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -47,16 +47,17 @@ INCLUDED_RULES_MK = 1
   XPCSHELL_TESTS \
   XPIDL_MODULE \
   $(NULL)
 
 _DEPRECATED_VARIABLES := \
   XPIDL_FLAGS \
   MOCHITEST_FILES_PARTS \
   MOCHITEST_BROWSER_FILES_PARTS \
+  MOCHITEST_WEBAPPRT_CHROME_FILES \
   $(NULL)
 
 ifndef EXTERNALLY_MANAGED_MAKE_FILE
 # Using $(firstword) may not be perfect. But it should be good enough for most
 # scenarios.
 _current_makefile = $(CURDIR)/$(firstword $(MAKEFILE_LIST))
 
 $(foreach var,$(_MOZBUILD_EXTERNAL_VARIABLES),$(if $(filter file override,$(subst $(NULL) ,_,$(origin $(var)))),\
@@ -1723,17 +1724,16 @@ FREEZE_VARIABLES = \
   EXTRA_COMPONENTS \
   EXTRA_PP_COMPONENTS \
   MOCHITEST_FILES \
   MOCHITEST_CHROME_FILES \
   MOCHITEST_BROWSER_FILES \
   MOCHITEST_A11Y_FILES \
   MOCHITEST_METRO_FILES \
   MOCHITEST_ROBOCOP_FILES \
-  MOCHITEST_WEBAPPRT_CHROME_FILES \
   $(NULL)
 
 $(foreach var,$(FREEZE_VARIABLES),$(eval $(var)_FROZEN := '$($(var))'))
 
 CHECK_FROZEN_VARIABLES = $(foreach var,$(FREEZE_VARIABLES), \
   $(if $(subst $($(var)_FROZEN),,'$($(var))'),$(error Makefile variable '$(var)' changed value after including rules.mk. Was $($(var)_FROZEN), now $($(var)).)))
 
 libs export::
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -226,16 +226,17 @@ class TreeMetadataEmitter(LoggingMixin):
         # harness can yet deal with test filtering. Once all harnesses can do
         # this, this feature can be dropped.
         test_manifests = dict(
             A11Y=('a11y', 'testing/mochitest/a11y', True),
             BROWSER_CHROME=('browser-chrome', 'testing/mochitest/browser', True),
             METRO_CHROME=('metro-chrome', 'testing/mochitest/metro', True),
             MOCHITEST=('mochitest', 'testing/mochitest/tests', True),
             MOCHITEST_CHROME=('chrome', 'testing/mochitest/chrome', True),
+            MOCHITEST_WEBAPPRT_CHROME=('webapprt-chrome', 'testing/mochitest/webapprtChrome', True),
             WEBRTC_SIGNALLING_TEST=('steeplechase', 'steeplechase', True),
             XPCSHELL_TESTS=('xpcshell', 'xpcshell', False),
         )
 
         for prefix, info in test_manifests.items():
             for path in sandbox.get('%s_MANIFESTS' % prefix, []):
                 for obj in self._process_test_manifest(sandbox, info, path):
                     yield obj
--- a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py
+++ b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py
@@ -476,22 +476,26 @@ VARIABLES = {
     'BROWSER_CHROME_MANIFESTS': (StrictOrderingOnAppendList, list, [],
         """List of manifest files defining browser chrome tests.
         """, None),
 
     'METRO_CHROME_MANIFESTS': (StrictOrderingOnAppendList, list, [],
         """List of manifest files defining metro browser chrome tests.
         """, None),
 
+    'MOCHITEST_CHROME_MANIFESTS': (StrictOrderingOnAppendList, list, [],
+        """List of manifest files defining mochitest chrome tests.
+        """, None),
+
     'MOCHITEST_MANIFESTS': (StrictOrderingOnAppendList, list, [],
         """List of manifest files defining mochitest tests.
         """, None),
 
-    'MOCHITEST_CHROME_MANIFESTS': (StrictOrderingOnAppendList, list, [],
-        """List of manifest files defining mochitest chrome tests.
+    'MOCHITEST_WEBAPPRT_CHROME_MANIFESTS': (StrictOrderingOnAppendList, list, [],
+        """List of manifest files defining webapprt mochitest chrome tests.
         """, None),
 
     'WEBRTC_SIGNALLING_TEST_MANIFESTS': (StrictOrderingOnAppendList, list, [],
         """List of manifest files defining WebRTC signalling tests.
         """, None),
 
     'XPCSHELL_TESTS_MANIFESTS': (StrictOrderingOnAppendList, list, [],
         """List of manifest files defining xpcshell tests.
--- a/webapprt/moz.build
+++ b/webapprt/moz.build
@@ -7,24 +7,27 @@
 if CONFIG['OS_ARCH'] == 'WINNT':
     DIRS += ['win']
 elif CONFIG['OS_ARCH'] == 'Darwin':
     DIRS += ['mac']
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2':
     DIRS += ['gtk2']
 
 DIRS += ['locales']
-TEST_DIRS += ['test']
 
 EXTRA_COMPONENTS += [
     'CommandLineHandler.js',
     'ContentPermission.js',
     'DirectoryProvider.js',
     'PaymentUIGlue.js',
     'components.manifest',
 ]
 
 EXTRA_JS_MODULES += [
     'RemoteDebugger.jsm',
     'Startup.jsm',
     'WebappRT.jsm',
     'WebappsHandler.jsm',
 ]
+
+MOCHITEST_WEBAPPRT_CHROME_MANIFESTS += ['test/chrome/webapprt.ini']
+MOCHITEST_MANIFESTS += ['test/content/mochitest.ini']
+
deleted file mode 100644
--- a/webapprt/test/chrome/Makefile.in
+++ /dev/null
@@ -1,40 +0,0 @@
-# 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/.
-
-MOCHITEST_WEBAPPRT_CHROME_FILES = \
-  head.js \
-  browser_sample.js \
-    sample.webapp \
-    sample.webapp^headers^ \
-    sample.html \
-  browser_window-title.js \
-    window-title.webapp \
-    window-title.webapp^headers^ \
-    window-title.html \
-  browser_webperm.js \
-    webperm.webapp \
-    webperm.webapp^headers^ \
-    webperm.html \
-  browser_noperm.js \
-    noperm.webapp \
-    noperm.webapp^headers^ \
-    noperm.html \
-  browser_geolocation-prompt-perm.js \
-  browser_geolocation-prompt-noperm.js \
-    geolocation-prompt-perm.webapp \
-    geolocation-prompt-perm.webapp^headers^ \
-    geolocation-prompt-noperm.webapp \
-    geolocation-prompt-noperm.webapp^headers^ \
-    geolocation-prompt-perm.html \
-    geolocation-prompt-noperm.html \
-  browser_debugger.js \
-    debugger.webapp \
-    debugger.webapp^headers^ \
-    debugger.html \
-  browser_mozpay.js \
-    mozpay.webapp \
-    mozpay.webapp^headers^ \
-    mozpay.html \
-    mozpay-success.html \
-  $(NULL)
deleted file mode 100644
--- a/webapprt/test/chrome/moz.build
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
new file mode 100644
--- /dev/null
+++ b/webapprt/test/chrome/webapprt.ini
@@ -0,0 +1,38 @@
+[DEFAULT]
+support-files =
+  head.js
+  sample.webapp
+  sample.webapp^headers^
+  sample.html
+  window-title.webapp
+  window-title.webapp^headers^
+  window-title.html
+  webperm.webapp
+  webperm.webapp^headers^
+  webperm.html
+  noperm.webapp
+  noperm.webapp^headers^
+  noperm.html
+  geolocation-prompt-perm.webapp
+  geolocation-prompt-perm.webapp^headers^
+  geolocation-prompt-noperm.webapp
+  geolocation-prompt-noperm.webapp^headers^
+  geolocation-prompt-perm.html
+  geolocation-prompt-noperm.html
+  debugger.webapp
+  debugger.webapp^headers^
+  debugger.html
+  mozpay.webapp
+  mozpay.webapp^headers^
+  mozpay.html
+  mozpay-success.html
+
+
+[browser_sample.js]
+[browser_window-title.js]
+[browser_webperm.js]
+[browser_noperm.js]
+[browser_geolocation-prompt-perm.js]
+[browser_geolocation-prompt-noperm.js]
+[browser_debugger.js]
+[browser_mozpay.js]
deleted file mode 100644
--- a/webapprt/test/content/Makefile.in
+++ /dev/null
@@ -1,10 +0,0 @@
-# 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/.
-
-MOCHITEST_FILES = \
-  test.webapp \
-  test.webapp^headers^ \
-  webapprt_sample.html \
-  webapprt_indexeddb.html \
-  $(NULL)
new file mode 100644
--- /dev/null
+++ b/webapprt/test/content/mochitest.ini
@@ -0,0 +1,7 @@
+[DEFAULT]
+support-files =
+  test.webapp
+  test.webapp^headers^
+
+[webapprt_sample.html]
+[webapprt_indexeddb.html]
deleted file mode 100644
--- a/webapprt/test/content/moz.build
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
deleted file mode 100644
--- a/webapprt/test/moz.build
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-DIRS += ['chrome', 'content']