--HG--
rename : toolkit/components/ctypes/tests/test_ctypes.xul.in => toolkit/components/ctypes/tests/test_ctypes.xul
This commit is contained in:
Ben Turner 2010-04-20 14:39:18 -07:00
Родитель 97d5981252
Коммит 24a3323a7e
3 изменённых файлов: 18 добавлений и 9 удалений

Просмотреть файл

@ -66,6 +66,7 @@ XPCSHELL_TESTS = unit
_CHROME_TEST_FILES = \
xpcshellTestHarnessAdaptor.js \
ctypes_worker.js \
test_ctypes.xul \
$(NULL)
include $(topsrcdir)/config/rules.mk
@ -82,6 +83,8 @@ libs:: unit/test_jsctypes.js.in
$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \
-DCTYPES_TEST_LIB=\"$(SHARED_LIBRARY)\" $^ > $(xpctestdir)/test_jsctypes.js
$(TEST_INSTALLER) $(SHARED_LIBRARY) $(xpctestdir)
$(TEST_INSTALLER) $(xpctestdir)/test_jsctypes.js $(chrometestdir)
$(TEST_INSTALLER) $(xpctestdir)/$(SHARED_LIBRARY) $(chrometestdir)
$(RM) $(xpctestdir)/test_jsctypes.js.in
libs:: $(_CHROME_TEST_FILES)
@ -90,4 +93,6 @@ libs:: $(_CHROME_TEST_FILES)
GARBAGE += \
$(xpctestdir)/test_jsctypes.js \
$(xpctestdir)/$(SHARED_LIBRARY) \
$(chrometestdir)/test_jsctypes.js \
$(chrometestdir)/$(SHARED_LIBRARY) \
$(NULL)

Просмотреть файл

@ -39,8 +39,8 @@
importScripts("xpcshellTestHarnessAdaptor.js");
onmessage = function(event) {
_WORKINGDIR_ = event.data[0];
importScripts("file://" + event.data[0] + "/" + event.data[1]);
_WORKINGDIR_ = event.data;
importScripts("test_jsctypes.js");
run_test();
postMessage("Done!");
}

Просмотреть файл

@ -50,8 +50,6 @@
<script type="application/javascript">
<![CDATA[
#expand const CTYPES_TEST_JS = __CTYPES_TEST_JS__;
function test()
{
SimpleTest.waitForExplicitFinish();
@ -67,11 +65,17 @@
SimpleTest.finish();
}
var file = Components.classes["@mozilla.org/file/local;1"].
createInstance(Components.interfaces.nsILocalFile);
file.initWithPath(CTYPES_TEST_JS);
file.normalize();
worker.postMessage([file.parent.path, file.leafName]);
let dir = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties)
.get("CurWorkD", Components.interfaces.nsILocalFile);
let path = location.pathname.slice("content/".length,
-1 * "/test_ctypes.xul".length);
let components = path.split("/");
for (let part in components) {
dir.append(components[part]);
}
ok(dir.exists() && dir.isDirectory(), "Chrome test dir doesn't exist?!");
worker.postMessage(dir.path);
}
]]>