Bug 924257 - Remove unneeded moz.build/Makefile.in from metro test dir [r=Ms2ger,rsilveira]
authorMatt Brubeck <mbrubeck@mozilla.com>
Tue, 08 Oct 2013 14:20:58 -0700
changeset 150179 d7e9a858c4b6
parent 150178 ce7d9ece6243
child 150180 e373ba1b3ce7
push id25425
push usercbook@mozilla.com
push date2013-10-09 08:16 +0000
treeherdermozilla-central@c22969eec61d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger, rsilveira
bugs924257
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 924257 - Remove unneeded moz.build/Makefile.in from metro test dir [r=Ms2ger,rsilveira]
browser/metro/base/moz.build
browser/metro/base/tests/Makefile.in
browser/metro/base/tests/moz.build
browser/metro/base/tests/unit/test_util_extend.js
browser/metro/base/tests/unit/test_util_populateFragmentFromString.js
browser/metro/moz.build
--- a/browser/metro/base/moz.build
+++ b/browser/metro/base/moz.build
@@ -1,6 +1,8 @@
 # -*- 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/.
 
+METRO_CHROME_MANIFESTS += ['tests/mochiperf/metro.ini', 'tests/mochitest/metro.ini']
+XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
deleted file mode 100644
--- a/browser/metro/base/tests/Makefile.in
+++ /dev/null
@@ -1,12 +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/.
-
-# For now we're copying the actual Util code.
-# We should make this into a jsm module. See bug 848137
-XPCSHELL_RESOURCES = \
-  $(DEPTH)/browser/metro/base/content/Util.js \
-  $(NULL)
-
-libs:: $(XPCSHELL_RESOURCES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit/
deleted file mode 100644
--- a/browser/metro/base/tests/moz.build
+++ /dev/null
@@ -1,8 +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/.
-
-METRO_CHROME_MANIFESTS += ['mochiperf/metro.ini', 'mochitest/metro.ini']
-XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/browser/metro/base/tests/unit/test_util_extend.js
+++ b/browser/metro/base/tests/unit/test_util_extend.js
@@ -1,11 +1,12 @@
 "use strict";
 
-load("Util.js");
+Components.utils.import("resource:///modules/ContentUtil.jsm");
+let Util = ContentUtil;
 
 function run_test() {
   do_print("Testing Util.extend");
 
   do_print("Check if function is defined");
   do_check_true(!!Util.extend);
 
   do_print("No parameter or null should return a new object");
--- a/browser/metro/base/tests/unit/test_util_populateFragmentFromString.js
+++ b/browser/metro/base/tests/unit/test_util_populateFragmentFromString.js
@@ -1,19 +1,17 @@
 // -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
 /* 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/. */
 
 "use strict";
 
-let Cu = Components.utils;
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource:///modules/ContentUtil.jsm");
-load("Util.js");
+Components.utils.import("resource:///modules/ContentUtil.jsm");
+let Util = ContentUtil;
 
 function empty_node(node) {
   let cnode;
   while((cnode = node.firstChild))
       node.removeChild(cnode);
   return node;
 }
 
@@ -29,18 +27,16 @@ function serializeContents(node) {
 }
 
 function run_test() {
   let doc, body, str, expectedResult, frag;
 
   do_print("Testing Util.populateFragmentFromString");
 
   do_check_true(!!Util.populateFragmentFromString);
-  do_check_true(!!ContentUtil.populateFragmentFromString);
-  do_check_eq(ContentUtil.populateFragmentFromString, Util.populateFragmentFromString);
 
   do_print("Loading blank document");
   doc = do_parse_document("blank.xhtml", "application/xhtml+xml");
 
   // sanity check
   do_check_eq(doc.nodeType, 9);
   do_check_true(doc.documentElement.localName != "parsererror");
 
@@ -82,9 +78,9 @@ function run_test() {
                                     frag, str,
                                     { text: "About the" }
                                   );
 
   empty_node(body);
   body.appendChild(frag);
   expectedResult = "<span>About the</span> &lt;body&gt; tag. &amp;copy; 2000 - Some Corp™"
   do_check_eq(serializeContents(body), expectedResult);
-}
\ No newline at end of file
+}
--- a/browser/metro/moz.build
+++ b/browser/metro/moz.build
@@ -10,11 +10,8 @@ DIRS += [
     'modules',
     'theme',
     'profile',
     'locales',
 ]
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     DIRS += ['shell']
-
-TEST_DIRS += ['base/tests']
-