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.
This commit is contained in:
Ted Mielczarek 2015-04-03 08:20:32 -04:00
parent 7070a8f701
commit c4be9315ba
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
]