bug 1151407 - Remove _HTTPD_JS_PATH from xpcshell test harness. r=jmaher

Only the httpd.js unit tests actually rely on this. I tried to make them use Cu.import but they also rely on poking a bunch of stuff in httpd.js that's not exported, so instead I just made the test manifest copy httpd.js to the test directory and had them load it from there.

--HG--
extra : rebase_source : 24b04d619891ec95e5df23a2eb7f3277dd3206b2
extra : amend_source : 72139cecdcd695171e2fd0ce8ea7be91c1eebd1a
This commit is contained in:
Ted Mielczarek 2015-04-03 08:20:32 -04:00
parent f579fcc2d6
commit fb4b821e19
5 changed files with 4 additions and 9 deletions

View File

@ -992,7 +992,6 @@ function do_load_child_test_harness()
let command =
"const _HEAD_JS_PATH=" + uneval(_HEAD_JS_PATH) + "; "
+ "const _HTTPD_JS_PATH=" + uneval(_HTTPD_JS_PATH) + "; "
+ "const _HEAD_FILES=" + uneval(_HEAD_FILES) + "; "
+ "const _TAIL_FILES=" + uneval(_TAIL_FILES) + "; "
+ "const _XPCSHELL_PROCESS='child';";

View File

@ -4,11 +4,9 @@
* 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/. */
/**
* Loads _HTTPD_JS_PATH file, which is dynamically defined by
* <runxpcshelltests.py>.
*/
load(_HTTPD_JS_PATH);
var _HTTPD_JS_PATH = __LOCATION__.parent;
_HTTPD_JS_PATH.append("httpd.js");
load(_HTTPD_JS_PATH.path);
// if these tests fail, we'll want the debug output
DEBUG = true;

View File

@ -2,7 +2,7 @@
head = head_utils.js
tail =
skip-if = toolkit == 'gonk'
support-files = data/**
support-files = data/** ../httpd.js
[test_async_response_sending.js]
[test_basic_functionality.js]

View File

@ -1209,7 +1209,6 @@ function do_load_child_test_harness()
let command =
"const _HEAD_JS_PATH=" + uneval(_HEAD_JS_PATH) + "; "
+ "const _HTTPD_JS_PATH=" + uneval(_HTTPD_JS_PATH) + "; "
+ "const _HEAD_FILES=" + uneval(_HEAD_FILES) + "; "
+ "const _TAIL_FILES=" + uneval(_TAIL_FILES) + "; "
+ "const _TEST_NAME=" + uneval(_TEST_NAME) + "; "

View File

@ -421,7 +421,6 @@ class XPCShellTestThread(Thread):
'-r', self.httpdManifest,
'-m',
'-s',
'-e', 'const _HTTPD_JS_PATH = "%s";' % self.httpdJSPath,
'-e', 'const _HEAD_JS_PATH = "%s";' % self.headJSPath
]